Package org.apache.xmlbeans.impl.schema
Class SchemaIdentityConstraintImpl
java.lang.Object
org.apache.xmlbeans.impl.schema.SchemaIdentityConstraintImpl
- All Implemented Interfaces:
SchemaAnnotated,SchemaComponent,SchemaIdentityConstraint
public class SchemaIdentityConstraintImpl extends Object implements 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, TYPEFields inherited from interface org.apache.xmlbeans.SchemaIdentityConstraint
CC_KEY, CC_KEYREF, CC_UNIQUE -
Constructor Summary
Constructors Constructor Description SchemaIdentityConstraintImpl(org.apache.xmlbeans.impl.schema.SchemaContainer c) -
Method Summary
Modifier and Type Method Description voidbuildPaths()SchemaAnnotationgetAnnotation()Returns the Schema annotation object or null if none presentStringgetChameleonNamespace()SchemaComponent.RefgetComponentRef()Used for on-demand loading of schema components.intgetComponentType()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.intgetConstraintCategory()Return the constraint category.ObjectgetFieldPath(int index)Return a compiled xpath object for the field.String[]getFields()Return (a copy of) the xpaths for all the fields.QNamegetName()The name of the schema componentMap<String,String>getNSMap()Return a read-only copy of the namespace map.XmlObjectgetParseObject()SchemaIdentityConstraint.RefgetRef()SchemaIdentityConstraintgetReferencedKey()Returns the key that a key ref refers to.StringgetSelector()Return the selector xpath as a string.ObjectgetSelectorPath()Return a compiled xpath object for the selector.StringgetSourceName()The name of resource that represends the source .xsd in which this component was defined (if known)
See:SchemaTypeLoader.getSourceAsStream(String)
Example:StringgetTargetNamespace()SchemaTypeSystemgetTypeSystem()Returns the typesystem within which this component definition residesObjectgetUserData()Returns user-specific information.booleanisResolved()Only applicable to keyrefs.voidsetAnnotation(SchemaAnnotation ann)voidsetConstraintCategory(int type)voidsetFields(String[] fields)voidsetFilename(String filename)voidsetName(QName name)voidsetNSMap(Map<String,String> nsMap)voidsetParseContext(XmlObject o, String targetNamespace, boolean chameleon)voidsetReferencedKey(SchemaIdentityConstraint.Ref key)voidsetSelector(String selector)voidsetUserData(Object data)
-
Constructor Details
-
SchemaIdentityConstraintImpl
public SchemaIdentityConstraintImpl(org.apache.xmlbeans.impl.schema.SchemaContainer c)
-
-
Method Details
-
setFilename
-
getSourceName
Description copied from interface:SchemaComponentThe 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:
getSourceNamein interfaceSchemaComponent
-
getSelector
Description copied from interface:SchemaIdentityConstraintReturn the selector xpath as a string.- Specified by:
getSelectorin interfaceSchemaIdentityConstraint
-
getSelectorPath
Description copied from interface:SchemaIdentityConstraintReturn a compiled xpath object for the selector.- Specified by:
getSelectorPathin interfaceSchemaIdentityConstraint
-
setAnnotation
-
getAnnotation
Description copied from interface:SchemaAnnotatedReturns the Schema annotation object or null if none present- Specified by:
getAnnotationin interfaceSchemaAnnotated
-
setNSMap
-
getNSMap
Description copied from interface:SchemaIdentityConstraintReturn 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:
getNSMapin interfaceSchemaIdentityConstraint
-
setSelector
-
setFields
-
getFields
Description copied from interface:SchemaIdentityConstraintReturn (a copy of) the xpaths for all the fields.- Specified by:
getFieldsin interfaceSchemaIdentityConstraint
-
getFieldPath
Description copied from interface:SchemaIdentityConstraintReturn a compiled xpath object for the field.- Specified by:
getFieldPathin interfaceSchemaIdentityConstraint
-
buildPaths
- Throws:
XPath.XPathCompileException
-
setReferencedKey
-
getReferencedKey
Description copied from interface:SchemaIdentityConstraintReturns the key that a key ref refers to. Only valid for keyrefs.- Specified by:
getReferencedKeyin interfaceSchemaIdentityConstraint
-
setConstraintCategory
public void setConstraintCategory(int type) -
getConstraintCategory
public int getConstraintCategory()Description copied from interface:SchemaIdentityConstraintReturn the constraint category. EitherSchemaIdentityConstraint.CC_KEY,SchemaIdentityConstraint.CC_KEYREF, orSchemaIdentityConstraint.CC_UNIQUE.- Specified by:
getConstraintCategoryin interfaceSchemaIdentityConstraint
-
setName
-
getName
Description copied from interface:SchemaComponentThe name of the schema component- Specified by:
getNamein interfaceSchemaComponent
-
getComponentType
public int getComponentType()Description copied from interface:SchemaComponentReturns 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:
getComponentTypein interfaceSchemaComponent
-
getTypeSystem
Description copied from interface:SchemaComponentReturns the typesystem within which this component definition resides- Specified by:
getTypeSystemin interfaceSchemaComponent
-
setParseContext
-
getParseObject
-
getTargetNamespace
-
getChameleonNamespace
-
isResolved
public boolean isResolved()Only applicable to keyrefs. Other types are implicitly resolved. -
getRef
-
getComponentRef
Description copied from interface:SchemaComponentUsed for on-demand loading of schema components.- Specified by:
getComponentRefin interfaceSchemaComponent
-
getUserData
Description copied from interface:SchemaIdentityConstraintReturns user-specific information.- Specified by:
getUserDatain interfaceSchemaIdentityConstraint- See Also:
SchemaBookmark
-
setUserData
-