Class KeyRef

    • Constructor Detail

      • KeyRef

        public KeyRef()
        Create a KeyRef object representing an xs:keyref constraints
      • KeyRef

        public KeyRef​(EnterpriseConfiguration config,
                      StructuredQName refer)
        Create a new KeyRef Identity-Constraint.
        config - the configuration
        refer - the name of the referenced key.
    • Method Detail

      • getConstraintCategory

        public java.lang.String getConstraintCategory()
        Description copied from class: IdentityConstraint
        The type of constraint: one of "key", "unique", or "keyref"
        Specified by:
        getConstraintCategory in class IdentityConstraint
        one of "key", "unique", or "keyref" (note the spelling)
      • setTargetComponentName

        public void setTargetComponentName​(StructuredQName target)
        Sets the name of the key being referenced.
        target - the fingerprint of the name of the key to reference.
      • setTargetKey

        public void setTargetKey​(IdentityConstraint key)
        Set the target key or unique constraint
        key - the target key definition or unique constraint
      • tryToResolve

        public void tryToResolve​(SchemaCompiler compiler,
                                 boolean fatal)
        Try to resolve the reference if possible, relative to components present in a given schema. No error occurs if the reference cannot yet be resolved.
        Specified by:
        tryToResolve in interface ComponentReference
        compiler - The schema containing the candidate target components for the reference. If null, the schema containing the reference is used.
        fatal - true if a failure to resolve is to be treated as fatal
      • isResolved

        public boolean isResolved()
        Determine whether this reference has been resolved
        Specified by:
        isResolved in interface ComponentReference
        true if the reference has been resolved to a schema component
      • isDangling

        public boolean isDangling()
        Ask whether this is known to be a dangling reference
        Specified by:
        isDangling in interface ComponentReference
        true if the target of this component reference is known to be absent, and if a warning has been issued to this effect
      • getSymbolSpace

        public int getSymbolSpace()
        Get the symbol space of the target of this reference
        Specified by:
        getSymbolSpace in interface ComponentReference
        an integer code identifying the symbol space