Package org.apache.xmlbeans.impl.schema
Class SchemaIdentityConstraintImpl
java.lang.Object
org.apache.xmlbeans.impl.schema.SchemaIdentityConstraintImpl
- All Implemented Interfaces:
SchemaAnnotated
,SchemaComponent
,SchemaIdentityConstraint
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.xmlbeans.SchemaIdentityConstraint
SchemaIdentityConstraint.Ref
-
Field Summary
Fields inherited from interface org.apache.xmlbeans.SchemaComponent
ANNOTATION, ATTRIBUTE, ATTRIBUTE_GROUP, ELEMENT, IDENTITY_CONSTRAINT, MODEL_GROUP, NOTATION, TYPE
Fields inherited from interface org.apache.xmlbeans.SchemaIdentityConstraint
CC_KEY, CC_KEYREF, CC_UNIQUE
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaIdentityConstraintImpl
(org.apache.xmlbeans.impl.schema.SchemaContainer c) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns the Schema annotation object or null if none presentUsed for on-demand loading of schema components.int
Returns the type code for the schema object, eitherSchemaComponent.TYPE
,SchemaComponent.ELEMENT
,SchemaComponent.ATTRIBUTE
,SchemaComponent.ATTRIBUTE_GROUP
,SchemaComponent.MODEL_GROUP
,SchemaComponent.IDENTITY_CONSTRAINT
, orSchemaComponent.NOTATION
.int
Return the constraint category.getFieldPath
(int index) Return a compiled xpath object for the field.String[]
Return (a copy of) the xpaths for all the fields.getName()
The name of the schema componentgetNSMap()
Return a read-only copy of the namespace map.getRef()
Returns the key that a key ref refers to.Return the selector xpath as a string.Return a compiled xpath object for the selector.The name of resource that represends the source .xsd in which this component was defined (if known)
See:SchemaTypeLoader.getSourceAsStream(String)
Example:Returns the typesystem within which this component definition residesReturns user-specific information.boolean
Only applicable to keyrefs.void
void
setConstraintCategory
(int type) void
void
setFilename
(String filename) void
void
void
setParseContext
(XmlObject o, String targetNamespace, boolean chameleon) void
void
setSelector
(String selector) void
setUserData
(Object data)
-
Constructor Details
-
SchemaIdentityConstraintImpl
public SchemaIdentityConstraintImpl(org.apache.xmlbeans.impl.schema.SchemaContainer c)
-
-
Method Details
-
setFilename
-
getSourceName
Description copied from interface:SchemaComponent
The name of resource that represends the source .xsd in which this component was defined (if known)
See:SchemaTypeLoader.getSourceAsStream(String)
Example:SchemaType schemaType = ..; InputStream is = schemaType.getTypeSystem().getSourceAsStream(schemaType.getSourceName());
- Specified by:
getSourceName
in interfaceSchemaComponent
-
getSelector
Description copied from interface:SchemaIdentityConstraint
Return the selector xpath as a string.- Specified by:
getSelector
in interfaceSchemaIdentityConstraint
-
getSelectorPath
Description copied from interface:SchemaIdentityConstraint
Return a compiled xpath object for the selector.- Specified by:
getSelectorPath
in interfaceSchemaIdentityConstraint
-
setAnnotation
-
getAnnotation
Description copied from interface:SchemaAnnotated
Returns the Schema annotation object or null if none present- Specified by:
getAnnotation
in interfaceSchemaAnnotated
-
setNSMap
-
getNSMap
Description copied from interface:SchemaIdentityConstraint
Return a read-only copy of the namespace map. This is the set of prefix to URI mappings that were in scope in the schema at the point at which this constraint was declared- Specified by:
getNSMap
in interfaceSchemaIdentityConstraint
-
setSelector
-
setFields
-
getFields
Description copied from interface:SchemaIdentityConstraint
Return (a copy of) the xpaths for all the fields.- Specified by:
getFields
in interfaceSchemaIdentityConstraint
-
getFieldPath
Description copied from interface:SchemaIdentityConstraint
Return a compiled xpath object for the field.- Specified by:
getFieldPath
in interfaceSchemaIdentityConstraint
-
buildPaths
- Throws:
XPath.XPathCompileException
-
setReferencedKey
-
getReferencedKey
Description copied from interface:SchemaIdentityConstraint
Returns the key that a key ref refers to. Only valid for keyrefs.- Specified by:
getReferencedKey
in interfaceSchemaIdentityConstraint
-
setConstraintCategory
public void setConstraintCategory(int type) -
getConstraintCategory
public int getConstraintCategory()Description copied from interface:SchemaIdentityConstraint
Return the constraint category. EitherSchemaIdentityConstraint.CC_KEY
,SchemaIdentityConstraint.CC_KEYREF
, orSchemaIdentityConstraint.CC_UNIQUE
.- Specified by:
getConstraintCategory
in interfaceSchemaIdentityConstraint
-
setName
-
getName
Description copied from interface:SchemaComponent
The name of the schema component- Specified by:
getName
in interfaceSchemaComponent
-
getComponentType
public int getComponentType()Description copied from interface:SchemaComponent
Returns the type code for the schema object, eitherSchemaComponent.TYPE
,SchemaComponent.ELEMENT
,SchemaComponent.ATTRIBUTE
,SchemaComponent.ATTRIBUTE_GROUP
,SchemaComponent.MODEL_GROUP
,SchemaComponent.IDENTITY_CONSTRAINT
, orSchemaComponent.NOTATION
.- Specified by:
getComponentType
in interfaceSchemaComponent
-
getTypeSystem
Description copied from interface:SchemaComponent
Returns the typesystem within which this component definition resides- Specified by:
getTypeSystem
in interfaceSchemaComponent
-
setParseContext
-
getParseObject
-
getTargetNamespace
-
getChameleonNamespace
-
isResolved
public boolean isResolved()Only applicable to keyrefs. Other types are implicitly resolved. -
getRef
-
getComponentRef
Description copied from interface:SchemaComponent
Used for on-demand loading of schema components.- Specified by:
getComponentRef
in interfaceSchemaComponent
-
getUserData
Description copied from interface:SchemaIdentityConstraint
Returns user-specific information.- Specified by:
getUserData
in interfaceSchemaIdentityConstraint
- See Also:
-
setUserData
-