org.apache.stanbol.entityhub.servicesapi.model
Enum MappingState

java.lang.Object
  extended by java.lang.Enum<MappingState>
      extended by org.apache.stanbol.entityhub.servicesapi.model.MappingState
All Implemented Interfaces:
Serializable, Comparable<MappingState>

public enum MappingState
extends Enum<MappingState>

Enumeration that defines the different states of EntityMapping instances.

Author:
Rupert Westenthaler

Enum Constant Summary
confirmed
          Indicated, that this mapping is fully valied and can be used in any application context
expired
          This indicates that this mapping has expired.
proposed
          Indicated, that a mapping of the entity to the symbol is proposed.
rejected
          Mapping the entity to the symbol was rejected by some user/process.
 
Method Summary
static MappingState getState(String uri)
          Getter for the State based on the URI.
 String getUri()
           
static boolean isState(String uri)
           
 String toString()
           
static MappingState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MappingState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

rejected

public static final MappingState rejected
Mapping the entity to the symbol was rejected by some user/process. Such mappings MUST NOT be used in any application context other than some administrative interfaces.


proposed

public static final MappingState proposed
Indicated, that a mapping of the entity to the symbol is proposed. Such mappings still wait for some kind of confirmation to be fully established. Based on the application context it might already be OK to used them.


expired

public static final MappingState expired
This indicates that this mapping has expired. This indicated, that this mapping was once confirmed but now waits for some confirmation activity. Based on the application context it might still be OK to use mappings with that state.


confirmed

public static final MappingState confirmed
Indicated, that this mapping is fully valied and can be used in any application context

Method Detail

values

public static MappingState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MappingState c : MappingState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MappingState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getUri

public String getUri()

toString

public String toString()
Overrides:
toString in class Enum<MappingState>

getState

public static MappingState getState(String uri)
                             throws IllegalArgumentException
Getter for the State based on the URI.

Parameters:
uri - the URI
Returns:
the State
Throws:
IllegalArgumentException - if the parsed URI does not represent a state

isState

public static boolean isState(String uri)


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.