public class SimpleComponentReference extends SchemaStructure implements ComponentReference
Modifier and Type | Field and Description |
---|---|
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,
StructuredQName name,
EnterpriseConfiguration config)
Creates a new SimpleComponentReference definition
|
Modifier and Type | Method and Description |
---|---|
int |
getSymbolSpace()
Get the symbol space of the target of this reference
|
SchemaComponent |
getTarget()
Returns the schema component that this is a reference to
|
StructuredQName |
getTargetComponentName()
Get the name of the target of this reference
|
boolean |
isDangling()
Ask whether this is known to be a dangling reference
|
boolean |
isResolved()
Determine whether this reference has been resolved
|
void |
setTarget(SchemaComponent target)
Set the target component
|
void |
setTargetComponentName(StructuredQName name) |
void |
tryToResolve(SchemaCompiler compiler)
Attempt to resolve this reference using the components defined in a given schema.
|
elaborate, fixup, 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
getConfiguration
getColumnNumber, getLineNumber, getPublicId, getSystemId, saveLocation
protected SchemaComponent target
protected int symbolSpace
protected SimpleComponentReference()
public SimpleComponentReference(int symbolSpace, StructuredQName name, EnterpriseConfiguration config)
symbolSpace
- the symbol space for the component reference, for example elements, attributes,
or typesname
- the component nameconfig
- the configuration to which this component belongspublic boolean isResolved()
isResolved
in interface ComponentReference
public void setTargetComponentName(StructuredQName name)
public StructuredQName getTargetComponentName()
ComponentReference
getTargetComponentName
in interface ComponentReference
public int getSymbolSpace()
getSymbolSpace
in interface ComponentReference
public SchemaComponent getTarget() throws MissingComponentException
getTarget
in interface ComponentReference
MissingComponentException
- 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.public boolean isDangling()
isDangling
in interface ComponentReference
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.