public class SchemaIdentityConstraintImpl extends Object implements SchemaIdentityConstraint
SchemaIdentityConstraint.RefCC_KEY, CC_KEYREF, CC_UNIQUEANNOTATION, ATTRIBUTE, ATTRIBUTE_GROUP, ELEMENT, IDENTITY_CONSTRAINT, MODEL_GROUP, NOTATION, TYPE| Constructor and Description |
|---|
SchemaIdentityConstraintImpl(org.apache.xmlbeans.impl.schema.SchemaContainer c) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildPaths() |
SchemaAnnotation |
getAnnotation()
Returns the Schema annotation object or null if none present
|
String |
getChameleonNamespace() |
SchemaComponent.Ref |
getComponentRef()
Used for on-demand loading of schema components.
|
int |
getComponentType()
Returns the type code for the schema object, either
SchemaComponent.TYPE,
SchemaComponent.ELEMENT, SchemaComponent.ATTRIBUTE, SchemaComponent.ATTRIBUTE_GROUP,
SchemaComponent.MODEL_GROUP, SchemaComponent.IDENTITY_CONSTRAINT, or SchemaComponent.NOTATION. |
int |
getConstraintCategory()
Return the constraint category.
|
Object |
getFieldPath(int index)
Return a compiled xpath object for the field.
|
String[] |
getFields()
Return (a copy of) the xpaths for all the fields.
|
QName |
getName()
The name of the schema component
|
Map<String,String> |
getNSMap()
Return a read-only copy of the namespace map.
|
XmlObject |
getParseObject() |
SchemaIdentityConstraint.Ref |
getRef() |
SchemaIdentityConstraint |
getReferencedKey()
Returns the key that a key ref refers to.
|
String |
getSelector()
Return the selector xpath as a string.
|
Object |
getSelectorPath()
Return a compiled xpath object for the selector.
|
String |
getSourceName()
The name of resource that represends the source .xsd in which this component was defined (if known)
See: SchemaTypeLoader.getSourceAsStream(String)
Example: |
String |
getTargetNamespace() |
SchemaTypeSystem |
getTypeSystem()
Returns the typesystem within which this component definition resides
|
Object |
getUserData()
Returns user-specific information.
|
boolean |
isResolved()
Only applicable to keyrefs.
|
void |
setAnnotation(SchemaAnnotation ann) |
void |
setConstraintCategory(int type) |
void |
setFields(String[] fields) |
void |
setFilename(String filename) |
void |
setName(QName name) |
void |
setNSMap(Map<String,String> nsMap) |
void |
setParseContext(XmlObject o,
String targetNamespace,
boolean chameleon) |
void |
setReferencedKey(SchemaIdentityConstraint.Ref key) |
void |
setSelector(String selector) |
void |
setUserData(Object data) |
public SchemaIdentityConstraintImpl(org.apache.xmlbeans.impl.schema.SchemaContainer c)
public void setFilename(String filename)
public String getSourceName()
SchemaComponentSchemaTypeLoader.getSourceAsStream(String)
SchemaType schemaType = ..; InputStream is = schemaType.getTypeSystem().getSourceAsStream(schemaType.getSourceName());
getSourceName in interface SchemaComponentpublic String getSelector()
SchemaIdentityConstraintgetSelector in interface SchemaIdentityConstraintpublic Object getSelectorPath()
SchemaIdentityConstraintgetSelectorPath in interface SchemaIdentityConstraintpublic void setAnnotation(SchemaAnnotation ann)
public SchemaAnnotation getAnnotation()
SchemaAnnotatedgetAnnotation in interface SchemaAnnotatedpublic Map<String,String> getNSMap()
SchemaIdentityConstraintgetNSMap in interface SchemaIdentityConstraintpublic void setSelector(String selector)
public void setFields(String[] fields)
public String[] getFields()
SchemaIdentityConstraintgetFields in interface SchemaIdentityConstraintpublic Object getFieldPath(int index)
SchemaIdentityConstraintgetFieldPath in interface SchemaIdentityConstraintpublic void buildPaths()
throws XPath.XPathCompileException
XPath.XPathCompileExceptionpublic void setReferencedKey(SchemaIdentityConstraint.Ref key)
public SchemaIdentityConstraint getReferencedKey()
SchemaIdentityConstraintgetReferencedKey in interface SchemaIdentityConstraintpublic void setConstraintCategory(int type)
public int getConstraintCategory()
SchemaIdentityConstraintSchemaIdentityConstraint.CC_KEY, SchemaIdentityConstraint.CC_KEYREF,
or SchemaIdentityConstraint.CC_UNIQUE.getConstraintCategory in interface SchemaIdentityConstraintpublic void setName(QName name)
public QName getName()
SchemaComponentgetName in interface SchemaComponentpublic int getComponentType()
SchemaComponentSchemaComponent.TYPE,
SchemaComponent.ELEMENT, SchemaComponent.ATTRIBUTE, SchemaComponent.ATTRIBUTE_GROUP,
SchemaComponent.MODEL_GROUP, SchemaComponent.IDENTITY_CONSTRAINT, or SchemaComponent.NOTATION.getComponentType in interface SchemaComponentpublic SchemaTypeSystem getTypeSystem()
SchemaComponentgetTypeSystem in interface SchemaComponentpublic XmlObject getParseObject()
public String getTargetNamespace()
public String getChameleonNamespace()
public boolean isResolved()
public SchemaIdentityConstraint.Ref getRef()
public SchemaComponent.Ref getComponentRef()
SchemaComponentgetComponentRef in interface SchemaComponentpublic Object getUserData()
SchemaIdentityConstraintgetUserData in interface SchemaIdentityConstraintSchemaBookmarkpublic void setUserData(Object data)