public class SimpleComponentReference extends SchemaStructure implements ComponentReference
Modifier and Type | Field and Description |
---|---|
protected int |
nameCode
The name of the SchemaComponent referenced
|
protected int |
symbolSpace
The symbol space representing the kind of schema component that is referenced
|
protected SchemaComponent |
target
The corresponding SchemaComponent.
|
Modifier | Constructor and Description |
---|---|
protected |
SimpleComponentReference()
Default constructor for use by subclasses
|
|
SimpleComponentReference(int symbolSpace,
int fingerprint,
EnterpriseConfiguration config)
Creates a new SimpleComponentReference definition
|
Modifier and Type | Method and Description |
---|---|
int |
getFingerprint()
Get the fingerprint of the target of this reference
|
int |
getNameCode() |
int |
getSymbolSpace()
Get the symbol space of the target of this reference
|
SchemaComponent |
getTarget()
Returns the schema component that this is a reference to
|
boolean |
isResolved()
Determine whether this reference has been resolved
|
void |
setNameCode(int nameCode) |
void |
setTarget(SchemaComponent target)
Set the target component
|
void |
tryToResolve(SchemaCompiler compiler)
Attempt to resolve this reference using the components defined in a given schema.
|
elaborate, fixup, getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, makeXPathExpressionPropertyRecord, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration
getColumnNumber, getLineNumber, getPublicId, getSystemId
protected int nameCode
protected SchemaComponent target
protected int symbolSpace
protected SimpleComponentReference()
public SimpleComponentReference(int symbolSpace, int fingerprint, EnterpriseConfiguration config)
symbolSpace
- the symbol space for the component reference, for example elements, attributes,
or typesfingerprint
- the name pool fingerprint of the component nameconfig
- the configuration to which this component belongspublic boolean isResolved()
isResolved
in interface ComponentReference
public void setNameCode(int nameCode)
public int getFingerprint()
ComponentReference
getFingerprint
in interface ComponentReference
public int getNameCode()
public int getSymbolSpace()
getSymbolSpace
in interface ComponentReference
public SchemaComponent getTarget() throws UnresolvedReferenceException
getTarget
in interface ComponentReference
UnresolvedReferenceException
- if the reference has not been resolved. Note that
this is an unchecked exception.public void setTarget(SchemaComponent target)
target
- the component that this reference points topublic void tryToResolve(SchemaCompiler compiler)
tryToResolve
in interface ComponentReference
compiler
- The compiler being used to compile the referring component.
This is assumed to know about the schema containing the candidate target components for the reference. If
null, the schema containing the reference is used.Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.