Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.schema
Class TypeReference

    java.lang.Object
      com.saxonica.schema.SchemaStructure
          com.saxonica.schema.TypeReference

All Implemented Interfaces:
  ComponentReference, java.io.Serializable, javax.xml.transform.SourceLocator

public class TypeReference
extends SchemaStructure
implements ComponentReference

A reference to a simple or complex type

See Also:
  Serialized Form

Constructor Summary
`TypeReference(int fingerprint, PreparedSchema schema, javax.xml.transform.SourceLocator locator)` Creates a new Type reference

Method Summary
`int` | `getFingerprint()` Get the fingerprint of the target of this reference
`int` | `getSymbolSpace()` Get the symbol space of the target of this reference
`SchemaComponent` | `getTarget()` Returns the type that this type reference is a reference to
`boolean` | `isResolved()` Determine whether this reference has been resolved
`void` | `lookForCycles(PreparedSchema schema, java.util.Stack references)` This method is called to look for cycles.
`void` | `setTarget(SchemaType target)`
`void` | `tryToResolve(PreparedSchema schema)` Attempt to resolved this reference using the groups defined in a given schema.

Methods inherited from class com.saxonica.schema.SchemaStructure
`getColumnNumber, getFixupStatus, getLineNumber, getPublicId, getSchema, getSystemId, getValidationStatus, setFixupStatus, setLineNumber, setLocator, setSchema, setSystemId, setValidationStatus`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.saxonica.schema.ComponentReference
`getSchema`

Methods inherited from interface javax.xml.transform.SourceLocator
`getColumnNumber, getLineNumber, getPublicId, getSystemId`

Constructor Detail

### TypeReference

    public TypeReference(int fingerprint,
                         PreparedSchema schema,
                         javax.xml.transform.SourceLocator locator)

  Creates a new Type reference

Parameters:
  `fingerprint` - the Name Pool fingerprint of the name of the type being referenced
  `schema` - the XML Schema in which this type reference appears. May be null if the reference is in a built-in type
  `locator` - the SourceLocator identifying the location of the reference. May be null if the reference is in a built-in type

Method Detail

### isResolved

    public boolean isResolved()

  Determine whether this reference has been resolved

  Specified by:
    `isResolved` in interface `ComponentReference`

### setTarget

    public void setTarget(SchemaType target)

### getFingerprint

    public int getFingerprint()

  Description copied from interface: `ComponentReference`
  Get the fingerprint of the target of this reference

  Specified by:
    `getFingerprint` in interface `ComponentReference`

### getSymbolSpace

    public int getSymbolSpace()

  Get the symbol space of the target of this reference

  Specified by:
    `getSymbolSpace` in interface `ComponentReference`

### getTarget

    public SchemaComponent getTarget()
                              throws UnresolvedReferenceException

  Returns the type that this type reference is a reference to

  Specified by:
    `getTarget` in interface `ComponentReference`
  Returns:
    the schema component if the reference has been resolved.
  Throws:
    `UnresolvedReferenceException` - if the reference has not been resolved. Note that this is an unchecked exception.

### tryToResolve

    public void tryToResolve(PreparedSchema schema)

  Attempt to resolved this reference using the groups defined in a given schema. No error results if the reference cannot be resolved.

  Specified by:
    `tryToResolve` in interface `ComponentReference`
  Parameters:
    `schema` - The schema containing the candidate target components for the reference. If null, the schema containing the reference is used.

### lookForCycles

    public void lookForCycles(PreparedSchema schema,
                              java.util.Stack references)
                       throws SchemaException

  This method is called to look for cycles. The object implementing this method is required (a) to raise an exception if the object itself appears in the list of references, (b) to add itself to the list of references, and (c) to call the lookForCycles method on all the objects that it references.

  Overrides:
    `lookForCycles` in class `SchemaStructure`
  Parameters:
    `schema` -
    `references` - A stack of objects that contain direct or indirect references to this object, and that must therefore not be referred to from this object.
  Throws:
    `SchemaException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD