org.apache.stanbol.entityhub.servicesapi.defaults
Enum SpecialFieldEnum

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

public enum SpecialFieldEnum
extends Enum<SpecialFieldEnum>

Enumeration that defines fields that need to be treated specially by the Stanbol Entityhub.

All those field do use the NamespaceEnum.entityhubQuery namespace. Entries of this enumeration are equals to the local name of the URIs. and are also defined by the RdfResourceEnum. This enumeration is intended to be used by Yard implementations to efficiently work with special fields (e.g. decide if a field is a special field)

Author:
Rupert Westenthaler

Enum Constant Summary
fullText
          The full text field.
references
          The semantic context field.
 
Method Summary
 NamespaceEnum getNamespace()
           
 String getQName()
           
static SpecialFieldEnum getSpecialField(String name)
          Getter for the SpecialFieldEnum for the parsed name (local name or qname or full URI)
 String getUri()
           
static boolean isSpecialField(String name)
          Checks if the parsed name (local name or qname or full URI) is a special field
static SpecialFieldEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SpecialFieldEnum[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

fullText

public static final SpecialFieldEnum fullText
The full text field. Union over all Text and String values of any outgoing relation


references

public static final SpecialFieldEnum references
The semantic context field. Union over all Reference values of any outgoing relation

Method Detail

values

public static SpecialFieldEnum[] 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 (SpecialFieldEnum c : SpecialFieldEnum.values())
    System.out.println(c);

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

valueOf

public static SpecialFieldEnum 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()

getQName

public String getQName()

getNamespace

public NamespaceEnum getNamespace()

isSpecialField

public static final boolean isSpecialField(String name)
Checks if the parsed name (local name or qname or full URI) is a special field

Parameters:
name - the local name, qname or URI
Returns:
true if the parsed name references to a special field or otherwise false

getSpecialField

public static SpecialFieldEnum getSpecialField(String name)
Getter for the SpecialFieldEnum for the parsed name (local name or qname or full URI)

Parameters:
name - the local name, qname or URI
Returns:
the SpecialFieldEnum or null if the parsed name does not refer to a special field.


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