xArch/xADL 2.0 Data Binding Library

edu.uci.isr.xarch
Class XArchPropertyMetadata

java.lang.Object
  extended byedu.uci.isr.xarch.XArchPropertyMetadata
All Implemented Interfaces:
Serializable

public class XArchPropertyMetadata
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static int ATTRIBUTE
          ATTRIBUTE indicates that this property is an attribute.
static int ELEMENT
          ELEMENT indicates that this property is an element that can contain only one value.
static int ELEMENT_MANY
          ELEMENT_MANY indicates that this property is an element that can contain multiple values.
static int UNBOUNDED
          Comment for UNBOUNDED
 
Constructor Summary
XArchPropertyMetadata(int type, String name, String typePackage, String typeName, int minOccurs, int maxOccurs, String fixedValue, String[] enumeratedValues)
           
 
Method Summary
static XArchPropertyMetadata createAttribute(String name, String typePackage, String typeName, String fixedValue, String[] enumeratedValues)
           
static XArchPropertyMetadata createElement(String name, String typePackage, String typeName, int minOccurs, int maxOccurs)
           
 List getEnumeratedValues()
          Returns a list of values for this property, or an empty list if the element is not restricted to a set of values.
 String getFixedValue()
          Returns the fixed value of this property, or null if it is not fixed.
 int getMaxOccurs()
          Returns the maximum cardinality of this property, or UNBOUNDED if it is unbounded.
 int getMinOccurs()
          Returns the minimum cardinality of this property.
 String getName()
          Returns the element property name used to store a value of this type.
 int getType()
          Returns the type of this property.
 String getTypeName()
          Returns the base type name for expected property value types.
 String getTypePackage()
          Returns the abbreviated package name (context name) for expected property value types, or null in the event that the expected property value type has no package name.
 boolean isEnumerated()
          Returns true if the element has enumerated values, false otherwise
 boolean isFixed()
          Returns true if the value of this property is fixed, false otherwise.
 boolean isId()
          Returns true if this is an id attribute, false otherwise.
 boolean isMany()
          Returns true if a property of this name may have more than one value, false otherwise.
 boolean isOptional()
          Returns true if this is an optional property, false otherwise.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTE

public static final int ATTRIBUTE
ATTRIBUTE indicates that this property is an attribute.

See Also:
Constant Field Values

ELEMENT

public static final int ELEMENT
ELEMENT indicates that this property is an element that can contain only one value.

See Also:
Constant Field Values

ELEMENT_MANY

public static final int ELEMENT_MANY
ELEMENT_MANY indicates that this property is an element that can contain multiple values.

See Also:
Constant Field Values

UNBOUNDED

public static final int UNBOUNDED
Comment for UNBOUNDED

See Also:
Constant Field Values
Constructor Detail

XArchPropertyMetadata

public XArchPropertyMetadata(int type,
                             String name,
                             String typePackage,
                             String typeName,
                             int minOccurs,
                             int maxOccurs,
                             String fixedValue,
                             String[] enumeratedValues)
Method Detail

createAttribute

public static XArchPropertyMetadata createAttribute(String name,
                                                    String typePackage,
                                                    String typeName,
                                                    String fixedValue,
                                                    String[] enumeratedValues)

createElement

public static XArchPropertyMetadata createElement(String name,
                                                  String typePackage,
                                                  String typeName,
                                                  int minOccurs,
                                                  int maxOccurs)

getType

public int getType()
Returns the type of this property.

Returns:
the type of this property
See Also:
ATTRIBUTE, ELEMENT, ELEMENT_MANY

getName

public String getName()
Returns the element property name used to store a value of this type.

Returns:
the element property name used to store a value of this type.

getTypePackage

public String getTypePackage()
Returns the abbreviated package name (context name) for expected property value types, or null in the event that the expected property value type has no package name.

Returns:
the abbreviated package name, or null.

getTypeName

public String getTypeName()
Returns the base type name for expected property value types.

Returns:
the base type name for expected property value types.

getMinOccurs

public int getMinOccurs()
Returns the minimum cardinality of this property.

Returns:
the minimum cardinality of this property
See Also:
UNBOUNDED

getMaxOccurs

public int getMaxOccurs()
Returns the maximum cardinality of this property, or UNBOUNDED if it is unbounded.

Returns:
the maximum cardinality of this property, or UNBOUNDED
See Also:
UNBOUNDED

getFixedValue

public String getFixedValue()
Returns the fixed value of this property, or null if it is not fixed.

Returns:
the fixed value of this property, or null

getEnumeratedValues

public List getEnumeratedValues()
Returns a list of values for this property, or an empty list if the element is not restricted to a set of values.

Returns:
the list of valid values for this property

isId

public boolean isId()
Returns true if this is an id attribute, false otherwise.

Returns:
true if this is an id attribute, false otherwise

isOptional

public boolean isOptional()
Returns true if this is an optional property, false otherwise.

Returns:
true if this is an optional property, false otherwise

isMany

public boolean isMany()
Returns true if a property of this name may have more than one value, false otherwise.

Returns:
true if a property of this name may have more than one value, false otherwise

isFixed

public boolean isFixed()
Returns true if the value of this property is fixed, false otherwise.

Returns:
true if the value of this property is fixed, false otherwise.

isEnumerated

public boolean isEnumerated()
Returns true if the element has enumerated values, false otherwise

Returns:
true if the element has enumerated values, false otherwise

toString

public String toString()

xArch/xADL 2.0 Data Binding Library