Alignment API and Server 4.2.${version.update}

fr.inrialpes.exmo.align.parser
Enum SyntaxElement

java.lang.Object
  extended by java.lang.Enum<SyntaxElement>
      extended by fr.inrialpes.exmo.align.parser.SyntaxElement
All Implemented Interfaces:
Serializable, Comparable<SyntaxElement>

public enum SyntaxElement
extends Enum<SyntaxElement>

Defines all the elements which might show up in a mapping document. Here are also the string representations for the different elements defined.

$Id: SyntaxElement.java 1520 2010-10-06 07:10:00Z euzenat $

Version:
$Revision: 1.6 $
Author:
richi

Nested Class Summary
static class SyntaxElement.Constructor
          Operator to determine how to combine the expressions
 
Enum Constant Summary
ALID
           
ALIGNMENT
           
ALL
           
AND
           
APPLY
           
ARGUMENTS
           
ATTR_TRANSF
           
CELL
           
CELLID
           
CERTIFICATE
           
CLASS_EXPR
           
COMPARATOR
           
COMPOSE
           
CREATOR
           
DATATYPE
           
DATE
           
DOMAIN_RESTRICTION
           
ENTITY1
           
ENTITY2
           
EXISTS
           
FORMALISM
           
FORMATT
           
IDENTIFIER
           
INSTANCE_EXPR
           
INVERSE
           
LEVEL
           
LIMITATIONS
           
LITERAL
           
LOCATION
           
MAP
           
MAPPING_SOURCE
           
MAPPING_TARGET
           
MEASURE
           
METHOD
           
NAME
           
NOT
           
OCCURENCE_COND
           
ONPROPERTY
           
ONTOLOGY
           
OPERATOR
           
OR
           
PROPERTY_DOMAIN_COND
           
PROPERTY_EXPR
           
PROPERTY_TYPE_COND
           
PROPERTY_VALUE_COND
           
PURPOSE
           
RDF
           
RDF_ABOUT
           
RDF_DATATYPE
           
RDF_ID
           
RDF_PARSETYPE
           
RDF_RESOURCE
           
REFLEXIVE
           
RELATION_CODOMAIN_COND
           
RELATION_DOMAIN_COND
           
RELATION_EXPR
           
RULE_RELATION
           
SEMANTICS
           
STRING
           
SYMMETRIC
           
TIME
           
TOCLASS
           
TRANSF
           
TRANSFORMATION
           
TRANSITIVE
           
TRDIR
           
TRENT1
           
TRENT2
           
TYPE
           
TYPE_COND
           
URI
           
VALUE
           
VALUE_COND
           
VAR
           
XML
           
 
Field Summary
 boolean isProperty
          If the resource is a property.
 String name
          Holds the xml name for the element.
 Namespace namespace
          Holds the namespace for the element.
 SyntaxElement.Constructor operator
          Holds the corresponding operator in the .
private static Map<String,SyntaxElement> register
           
 Object resource
          Holds the RDF Resource or property for the entity This is to be used by the RDF parser.
 
Method Summary
static SyntaxElement getElement(SyntaxElement.Constructor op)
           
static SyntaxElement getElementByName(String s)
          Determines an element given on a name string.
 String getName()
          Returns the xml name of the element.
 Namespace getNamespace()
          Returns the namespace of the element.
 SyntaxElement.Constructor getOperator()
          Returns the namespace of the element.
static Object getResource(String name)
          Returns the resource of the element.
 String id()
           
 String print()
          Formats the element to a printable string.
 String print(Namespace namespace)
          Formats the element to a printable string.
private static void recordElement(String name, SyntaxElement el)
           
 String toString()
           Prints a short description of the element.
static SyntaxElement valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SyntaxElement[] 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

RDF

public static final SyntaxElement RDF

RDF_ID

public static final SyntaxElement RDF_ID

RDF_ABOUT

public static final SyntaxElement RDF_ABOUT

RDF_DATATYPE

public static final SyntaxElement RDF_DATATYPE

RDF_PARSETYPE

public static final SyntaxElement RDF_PARSETYPE

RDF_RESOURCE

public static final SyntaxElement RDF_RESOURCE

CREATOR

public static final SyntaxElement CREATOR

DATE

public static final SyntaxElement DATE

IDENTIFIER

public static final SyntaxElement IDENTIFIER

ALIGNMENT

public static final SyntaxElement ALIGNMENT

ALID

public static final SyntaxElement ALID

CELL

public static final SyntaxElement CELL

CERTIFICATE

public static final SyntaxElement CERTIFICATE

FORMALISM

public static final SyntaxElement FORMALISM

FORMATT

public static final SyntaxElement FORMATT

CELLID

public static final SyntaxElement CELLID

LEVEL

public static final SyntaxElement LEVEL

LIMITATIONS

public static final SyntaxElement LIMITATIONS

MAP

public static final SyntaxElement MAP

MAPPING_SOURCE

public static final SyntaxElement MAPPING_SOURCE

MAPPING_TARGET

public static final SyntaxElement MAPPING_TARGET

MEASURE

public static final SyntaxElement MEASURE

METHOD

public static final SyntaxElement METHOD

NAME

public static final SyntaxElement NAME

PURPOSE

public static final SyntaxElement PURPOSE

RULE_RELATION

public static final SyntaxElement RULE_RELATION

SEMANTICS

public static final SyntaxElement SEMANTICS

ENTITY1

public static final SyntaxElement ENTITY1

ENTITY2

public static final SyntaxElement ENTITY2

TIME

public static final SyntaxElement TIME

TYPE

public static final SyntaxElement TYPE

URI

public static final SyntaxElement URI

XML

public static final SyntaxElement XML

ONTOLOGY

public static final SyntaxElement ONTOLOGY

LOCATION

public static final SyntaxElement LOCATION

AND

public static final SyntaxElement AND

APPLY

public static final SyntaxElement APPLY

ARGUMENTS

public static final SyntaxElement ARGUMENTS

ATTR_TRANSF

public static final SyntaxElement ATTR_TRANSF

CLASS_EXPR

public static final SyntaxElement CLASS_EXPR

COMPARATOR

public static final SyntaxElement COMPARATOR

COMPOSE

public static final SyntaxElement COMPOSE

DATATYPE

public static final SyntaxElement DATATYPE

DOMAIN_RESTRICTION

public static final SyntaxElement DOMAIN_RESTRICTION

INSTANCE_EXPR

public static final SyntaxElement INSTANCE_EXPR

INVERSE

public static final SyntaxElement INVERSE

LITERAL

public static final SyntaxElement LITERAL

NOT

public static final SyntaxElement NOT

ONPROPERTY

public static final SyntaxElement ONPROPERTY

OPERATOR

public static final SyntaxElement OPERATOR

OR

public static final SyntaxElement OR

PROPERTY_EXPR

public static final SyntaxElement PROPERTY_EXPR

OCCURENCE_COND

public static final SyntaxElement OCCURENCE_COND

PROPERTY_TYPE_COND

public static final SyntaxElement PROPERTY_TYPE_COND

PROPERTY_DOMAIN_COND

public static final SyntaxElement PROPERTY_DOMAIN_COND

PROPERTY_VALUE_COND

public static final SyntaxElement PROPERTY_VALUE_COND

RELATION_DOMAIN_COND

public static final SyntaxElement RELATION_DOMAIN_COND

RELATION_CODOMAIN_COND

public static final SyntaxElement RELATION_CODOMAIN_COND

REFLEXIVE

public static final SyntaxElement REFLEXIVE

RELATION_EXPR

public static final SyntaxElement RELATION_EXPR

STRING

public static final SyntaxElement STRING

SYMMETRIC

public static final SyntaxElement SYMMETRIC

TOCLASS

public static final SyntaxElement TOCLASS

ALL

public static final SyntaxElement ALL

EXISTS

public static final SyntaxElement EXISTS

TRENT1

public static final SyntaxElement TRENT1

TRENT2

public static final SyntaxElement TRENT2

TRANSF

public static final SyntaxElement TRANSF

TRDIR

public static final SyntaxElement TRDIR

TRANSFORMATION

public static final SyntaxElement TRANSFORMATION

TRANSITIVE

public static final SyntaxElement TRANSITIVE

TYPE_COND

public static final SyntaxElement TYPE_COND

VALUE

public static final SyntaxElement VALUE

VAR

public static final SyntaxElement VAR

VALUE_COND

public static final SyntaxElement VALUE_COND
Field Detail

register

private static Map<String,SyntaxElement> register

name

public final String name
Holds the xml name for the element.


namespace

public final Namespace namespace
Holds the namespace for the element.


operator

public final SyntaxElement.Constructor operator
Holds the corresponding operator in the .


resource

public Object resource
Holds the RDF Resource or property for the entity This is to be used by the RDF parser.


isProperty

public final boolean isProperty
If the resource is a property.

Method Detail

values

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

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

valueOf

public static SyntaxElement 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

recordElement

private static void recordElement(String name,
                                  SyntaxElement el)

getElementByName

public static SyntaxElement getElementByName(String s)
Determines an element given on a name string. The search will be case-sensitive. Good morning efficiency...

Parameters:
s - the string to search for
Returns:
the element with the given string as name, or null, if any could be found
Throws:
NullPointerException - if the string is null

getName

public String getName()
Returns the xml name of the element.

Returns:
the name

getNamespace

public Namespace getNamespace()
Returns the namespace of the element.

Returns:
the namespace

getResource

public static Object getResource(String name)
                          throws AlignmentException
Returns the resource of the element.

Returns:
the resource
Throws:
AlignmentException

getOperator

public SyntaxElement.Constructor getOperator()
Returns the namespace of the element.

Returns:
the namespace

getElement

public static SyntaxElement getElement(SyntaxElement.Constructor op)

print

public String print()
Formats the element to a printable string. The resulting string will consist of the sort form of the namespace and the name of the element separated by a ':' e.g. rdf:resource

Returns:
the formated string

id

public String id()

print

public String print(Namespace namespace)
Formats the element to a printable string. Formats the string in the same way with the difference, that if the given namespace matches the namespace of the element, the formated string will not be prefixed bye the namespace and ':'.

Parameters:
namespace - the namespace for which not to prefix the resulting string
Returns:
teh formated string
See Also:
print()

toString

public String toString()

Prints a short description of the element. The format will be the shortcut of the namespace, and the name of the element separated by ':'.

A example string could be: rdf:resource

Overrides:
toString in class Enum<SyntaxElement>
Returns:
the description of the element

Alignment API and Server 4.2.${version.update}

(C) INRIA & friends, 2003-${curryear}