jInfer

cz.cuni.mff.ksi.jinfer.xsdimporter.utils
Enum XSDAttribute

java.lang.Object
  extended by java.lang.Enum<XSDAttribute>
      extended by cz.cuni.mff.ksi.jinfer.xsdimporter.utils.XSDAttribute
All Implemented Interfaces:
Serializable, Comparable<XSDAttribute>

public enum XSDAttribute
extends Enum<XSDAttribute>

Enumeration of known tag attributes for the purpose of parsing XSD Schemas.

XSD Schema specifies several tag attributes that can occur within a schema document. Every value has its case sensitive name which should be used for comparison with tag attributes from schema. Special value INVALID is reserved for possible unknown tag attributes.


Enum Constant Summary
INVALID
          Special value meaning that the parsed attribute is not known.
MAXOCCURS
          Attribute maxOccurs of a tag.
MINOCCURS
          Attribute minOccurs of a tag.
NAME
          Attribute name of a tag.
REF
          Attribute ref of a tag.
TYPE
          Attribute type of a tag.
USE
          Attribute use of a tag.
 
Method Summary
 String getMetadataName()
          Get the prefixed name of current attribute to be used as a key in metadata.
 String getName()
          Get the case sensitive name of current attribute.
static XSDAttribute matchName(String name)
          Determine if the parameter can match any of the attributes.
 String toString()
          Get the case sensitive name of current attribute.
static XSDAttribute valueOf(String name)
          Returns the enum constant of this type with the specified name.
static XSDAttribute[] 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

NAME

public static final XSDAttribute NAME
Attribute name of a tag. For example, every complexType tag directly under schema tag must have this attribute defined.


REF

public static final XSDAttribute REF
Attribute ref of a tag. Used to reference another element tag.


TYPE

public static final XSDAttribute TYPE
Attribute type of a tag. Used to define that element is of a built-in type, or that it references a complexType tag.


USE

public static final XSDAttribute USE
Attribute use of a tag. Specifies if the usage of the corresponding attribute tag is compulsory or optional.


MINOCCURS

public static final XSDAttribute MINOCCURS
Attribute minOccurs of a tag. Sets the minimum number of occurrences for the corresponding element tag.


MAXOCCURS

public static final XSDAttribute MAXOCCURS
Attribute maxOccurs of a tag. Sets the maximum number of occurrences for the corresponding element tag.


INVALID

public static final XSDAttribute INVALID
Special value meaning that the parsed attribute is not known.

Method Detail

values

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

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

valueOf

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

toString

public String toString()
Get the case sensitive name of current attribute.

Overrides:
toString in class Enum<XSDAttribute>
Returns:
Case sensitive name of attribute.

getName

public String getName()
Get the case sensitive name of current attribute.

Returns:
Case sensitive name of attribute.

getMetadataName

public String getMetadataName()
Get the prefixed name of current attribute to be used as a key in metadata. Prefix distinguished that this metadata key is specifically from XSD Schema.

Returns:
Prefixed attribute name.

matchName

public static XSDAttribute matchName(String name)
Determine if the parameter can match any of the attributes. Operation is case sensitive.

Parameters:
name - A name to match up with an attribute.
Returns:
Corresponding attribute or INVALID when such attribute is not known.

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011