Package org.exolab.castor.xml.schema
Class IdentityField
java.lang.Object
org.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.IdentityField
- All Implemented Interfaces:
Serializable
A class which represents the field selector for an IdentityConstraint
- Version:
- $Revision: 6230 $ $Date: 2006-04-14 04:14:43 -0600 (Fri, 14 Apr 2006) $
- Author:
- Keith Visco
- See Also:
-
Field Summary
Fields inherited from class org.exolab.castor.xml.schema.Structure
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Returns the Id of this IdentityField, or null if no Id has been set.shortReturns the type of this Schema StructuregetXPath()Returns the XPath of this IdentityField.voidSets the Id for this IdentityField.voidSets the XPath expression for this Field.voidvalidate()Checks the validity of this Schema defintion.Methods inherited from class org.exolab.castor.xml.schema.Annotated
addAnnotation, getAnnotations, removeAnnotation
-
Constructor Details
-
IdentityField
Creates a new IdentityField.- Parameters:
xpath- the xpath for the IdentityField. Must not be null.- Throws:
SchemaException- if xpath is null.
-
-
Method Details
-
getId
Returns the Id of this IdentityField, or null if no Id has been set.- Returns:
- the Id of this IdentityField, or null if no Id has been set.
-
getXPath
Returns the XPath of this IdentityField. This value will never be null.- Returns:
- the XPath of this IdentityField.
-
setId
Sets the Id for this IdentityField.- Parameters:
id- the Id for this IdentityField.
-
setXPath
Sets the XPath expression for this Field.- Parameters:
xpath- the XPath expression for this IdentityField. Must not be null.- Throws:
SchemaException- if xpath is null.
-
getStructureType
public short getStructureType()Returns the type of this Schema Structure- Specified by:
getStructureTypein classStructure- Returns:
- the type of this Schema Structure
-
validate
Checks the validity of this Schema defintion.- Specified by:
validatein classStructure- Throws:
ValidationException- when this Schema definition is invalid.
-