public abstract class IdentityConstraint extends SchemaStructure implements UserSchemaComponent, SerializableSchemaComponent
COMPONENT_FUNCTION_TYPE, FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING
Modifier | Constructor and Description |
---|---|
protected |
IdentityConstraint()
Constructor used by sub-classes.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(IdentityField field)
Adds the given IdentityField to this IdentityConstraint
|
void |
elaborate(SchemaCompiler compiler)
Elaborate the schema component: after reloading a serialized schema component model,
this expands the component with derived information needed during validation episodes.
|
boolean |
fixup(SchemaCompiler compiler)
Check references from this component to other components
|
Function |
getComponentAsFunction()
Get the schema component in the form of a function item.
|
StructuredQName |
getConstraintName()
Get the name of this identity constraint
|
java.util.List<IdentityField> |
getFields()
Returns the List of Fields contained within this IdentityConstraint.
|
java.lang.String |
getName()
Return the name of this IdentityConstraint.
|
IdentitySelector |
getSelector()
Returns the selector of this IdentityConstraint.
|
java.lang.String |
getTargetNamespace()
Return the target namespace of this IdentityConstraint.
|
boolean |
isSameDeclaration(IdentityConstraint other)
Test whether this is the same constraint as another.
|
void |
serialize(SchemaModelSerializer serializer)
Serialize the identity constraint as part of the serialized Schema Component Model
|
void |
setConstraintName(StructuredQName nc)
Set the integer cdde of the name of this identity constraint
|
void |
setSelector(IdentitySelector selector)
Sets the selector for this IdentityConstraint.
|
void |
typeCheck(SchemaCompiler compiler,
SchemaType contextType)
Typecheck the selector and the fields.
|
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this Schema defintion.
|
getColumnNumber, getConfiguration, getFixupStatus, getGeneratedId, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, hasSameLocation, lookForCycles, makeXPathExpressionPropertyRecord, saveLocation, setConfiguration, setFixupStatus, setGeneratedId, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
lookForCycles
getRedefinitionLevel, getValidationStatus
protected IdentityConstraint()
public void addField(IdentityField field)
field
- the IdentityField to add.public java.util.List<IdentityField> getFields()
public java.lang.String getName()
public java.lang.String getTargetNamespace()
public IdentitySelector getSelector()
public void setSelector(IdentitySelector selector) throws SchemaException
selector
- the Selector for this IdentityConstraint. Must not be
null.SchemaException
- if selector is null.public void setConstraintName(StructuredQName nc)
nc
- the namecodepublic StructuredQName getConstraintName()
public boolean fixup(SchemaCompiler compiler) throws SchemaException
fixup
in interface UserSchemaComponent
fixup
in class SchemaStructure
compiler
- the schema compilerSchemaException
public boolean validate(SchemaCompiler compiler) throws SchemaException
validate
in interface UserSchemaComponent
SchemaException
public void typeCheck(SchemaCompiler compiler, SchemaType contextType) throws XPathException
compiler
- the schema compilercontextType
- the type of the element whose constraint is being definedXPathException
- if a type error is foundpublic boolean isSameDeclaration(IdentityConstraint other)
other
- the notation declaration that we are comparing withpublic void elaborate(SchemaCompiler compiler) throws SchemaException
elaborate
in interface UserSchemaComponent
elaborate
in class SchemaStructure
compiler
- the schema compilerSchemaException
public void serialize(SchemaModelSerializer serializer) throws XPathException
serialize
in interface SerializableSchemaComponent
serializer
- the object responsible for performing the serializationMissingComponentException
- if the component cannot be serialized because it contains dangling referencesXPathException
- if serialization failspublic Function getComponentAsFunction()
SchemaComponent
getComponentAsFunction
in interface SchemaComponent
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.