public class KeyRef extends IdentityConstraint implements ComponentReference
COMPONENT_FUNCTION_TYPE, FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING| Constructor and Description |
|---|
KeyRef()
Create a KeyRef object representing an xs:keyref constraints
|
KeyRef(int refer)
Create a new KeyRef Identity-Constraint.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
fixup(SchemaCompiler compiler)
Check references from this component to other components
|
int |
getReferFingerprint()
Gets the fingerprint of the name of the key being referenced).
|
int |
getSymbolSpace()
Get the symbol space of the target of this reference
|
SchemaComponent |
getTarget()
Get the schema component identified by this reference.
|
boolean |
isResolved()
Determine whether this reference has been resolved
|
void |
setReferFingerprint(int referFingerprint)
Sets the fingerprint of the name of the key being referenced.
|
void |
setTargetKey(IdentityConstraint key)
Set the target key or unique constraint
|
void |
tryToResolve(SchemaCompiler compiler)
Try to resolve the reference if possible, relative to components present in a given schema.
|
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this Schema defintion.
|
addField, elaborate, getComponentAsFunction, getFields, getFingerprint, getName, getSelector, getTargetNamespace, serialize, setNameCode, setSelector, typeCheckgetColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, makeXPathExpressionPropertyRecord, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, getFingerprintgetColumnNumber, getLineNumber, getPublicId, getSystemIdlookForCyclesgetRedefinitionLevel, getValidationStatuspublic KeyRef()
public KeyRef(int refer)
refer - the fingerprint of the referenced key.public int getReferFingerprint()
public void setReferFingerprint(int referFingerprint)
referFingerprint - the fingerprint of the name of the key to reference.public void setTargetKey(IdentityConstraint key)
key - the target key definition or unique constraintpublic void tryToResolve(SchemaCompiler compiler)
tryToResolve in interface ComponentReferencecompiler - The schema containing the candidate target components for the reference. If
null, the schema containing the reference is used.public boolean isResolved()
isResolved in interface ComponentReferencepublic SchemaComponent getTarget() throws UnresolvedReferenceException
getTarget in interface ComponentReferenceUnresolvedReferenceException - if the reference has not been resolved. Note that
this is an unchecked exception.public int getSymbolSpace()
getSymbolSpace in interface ComponentReferencepublic boolean fixup(SchemaCompiler compiler) throws SchemaException
fixup in interface UserSchemaComponentfixup in class IdentityConstraintcompiler - used for reporting error messagesSchemaExceptionpublic boolean validate(SchemaCompiler compiler) throws SchemaException
validate in interface UserSchemaComponentvalidate in class IdentityConstraintSchemaException - when this Schema definition is invalid.Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.