Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.schema
Class KeyRef

java.lang.Object
  |
  +--com.saxonica.schema.SchemaElement
        |
        +--com.saxonica.schema.IdentityConstraint
              |
              +--com.saxonica.schema.KeyRef
All Implemented Interfaces:
java.io.Serializable, javax.xml.transform.SourceLocator

public class KeyRef
extends IdentityConstraint

A class that represents the XML Schema Identity Constraint: KeyRef.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.saxonica.schema.SchemaElement
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, COMPOSITOR, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD_ATTRIBUTE, WILDCARD_ELEMENT
 
Constructor Summary
KeyRef(java.lang.String name, int refer)
          Creates a new KeyRef Identity-Constraint.
 
Method Summary
 int getReferFingerprint()
          Returns the refer field (the fingerprint of the name of the key being referenced).
 short getStructureType()
          Returns the type of this Schema Structure.
 void setReferFingerprint(int referFingerprint)
          Sets the refer field (the fingerprint of the name of the key being referenced).
 boolean validate(Schema schema)
          Checks the validity of this Schema defintion.
 
Methods inherited from class com.saxonica.schema.IdentityConstraint
addField, getFields, getFingerprint, getId, getName, getSchema, getSelector, iterateFields, setFingerprint, setId, setName, setSchema, setSelector
 
Methods inherited from class com.saxonica.schema.SchemaElement
getColumnNumber, getLineNumber, getPublicId, getSystemId, setLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyRef

public KeyRef(java.lang.String name,
              int refer)
       throws SchemaException
Creates a new KeyRef Identity-Constraint.

Parameters:
name - the name for the IdentityConstraint. Must not be null.
Throws:
SchemaException - when name or refer are null.
Method Detail

getReferFingerprint

public int getReferFingerprint()
Returns the refer field (the fingerprint of the name of the key being referenced).

Returns:
the refer field (the fingerprint of the key being referenced).

setReferFingerprint

public void setReferFingerprint(int referFingerprint)
                         throws SchemaException
Sets the refer field (the fingerprint of the name of the key being referenced).

Parameters:
referFingerprint - the fingerprint of the name of the key to reference.
Throws:
SchemaException - when refer is null.

getStructureType

public short getStructureType()
Returns the type of this Schema Structure.

Specified by:
getStructureType in class IdentityConstraint
Returns:
the type of this Schema Structure.

validate

public boolean validate(Schema schema)
                 throws javax.xml.transform.TransformerException
Checks the validity of this Schema defintion.

Overrides:
validate in class IdentityConstraint
Throws:
javax.xml.transform.TransformerException - when this Schema definition is invalid.


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.