Class Notation

All Implemented Interfaces:
SerializableSchemaComponent, UserSchemaComponent, SourceLocator, Location, SchemaComponent, Locator

public class Notation extends SchemaStructure implements UserSchemaComponent, SerializableSchemaComponent
A Notation Declaration Schema Component
  • Constructor Details

    • Notation

      public Notation(EnterpriseConfiguration config, SourceLocator locator)
      Creates a new Notation
      Parameters:
      config - the Configuration to which this Notation belongs
      locator - the location of the declaration in the schema document
  • Method Details

    • setNotationName

      public void setNotationName(StructuredQName nameCode)
      Set the name code of the notation
      Parameters:
      nameCode - the NamePool code for the notation name
    • getNotationName

      public StructuredQName getNotationName()
      Get the notation name
      Returns:
      the name of the notation as a NamePool fingerprint. This combines the values of the {name} and {target namespace} properties in the schema component model.
    • setNotationSystemId

      public void setNotationSystemId(String systemId)
      Set the system identifier of the notation
      Parameters:
      systemId - the system identifier (possibly null)\
    • setNotationPublicId

      public void setNotationPublicId(String publicId)
      Set the public identifier of the notation
      Parameters:
      publicId - the public identifier (possibly null)\
    • getNotationSystemId

      public String getNotationSystemId()
      Get the system identifier of the notation
      Returns:
      the value of the {system identifier} property (possibly null).
    • getNotationPublicId

      public String getNotationPublicId()
      Get the public identifier of the notation
      Returns:
      the value of the {public identifier} property (possibly null)\
    • getName

      public String getName()
      Return the local name of this Notation.
      Returns:
      the value of the {local name} property of the Notation Declaration
    • getTargetNamespace

      public NamespaceUri getTargetNamespace()
      Return the target namespace of this Notation
      Returns:
      the value of the {target namespace} property of the Notation Declaration
    • validate

      public boolean validate(SchemaCompiler compiler)
      Checks the validity of this Notation. Always returns true for this implementation.
      Specified by:
      validate in interface UserSchemaComponent
      Overrides:
      validate in class SchemaStructure
      Parameters:
      compiler - the schema compiler
      Returns:
      true when this Schema definition is valid, otherwise false.
    • fixup

      public boolean fixup(SchemaCompiler compiler)
      Check references from this component to other components
      Specified by:
      fixup in interface UserSchemaComponent
      Overrides:
      fixup in class SchemaStructure
      Parameters:
      compiler - the schema compiler
      Returns:
      true if all is well, false if errors found
    • isSameDeclaration

      public boolean isSameDeclaration(Notation other)
      Test whether this is the same notation as another. They are considered to be the same component if they are derived from the same definition in the original XML representation (which can happen when there are multiple includes of the same file)
      Parameters:
      other - the notation declaration that we are comparing with
      Returns:
      true if the two notation declarations are identical
    • elaborate

      public void elaborate(SchemaCompiler compiler)
      Elaborate the schema component: after reloading a serialized schema component model, this expands the component with derived information needed during validation episodes. The model is assumed to be valid.
      Specified by:
      elaborate in interface UserSchemaComponent
      Overrides:
      elaborate in class SchemaStructure
      Parameters:
      compiler - The schema compiler
    • serialize

      public void serialize(SchemaModelSerializer serializer) throws XPathException
      Serialize the schema component
      Specified by:
      serialize in interface SerializableSchemaComponent
      Parameters:
      serializer - the object responsible for performing the serialization
      Throws:
      XPathException - if serialization fails
    • getComponentAsFunction

      public FunctionItem getComponentAsFunction()
      Description copied from interface: SchemaComponent
      Get the schema component in the form of a function item. This allows schema information to be made visible to XSLT or XQuery code. The function makes available the contents of the schema component as defined in the XSD specification. The function takes a string as argument representing a property name, and returns the corresponding property of the schema component. There is also a property "class" which returns the kind of schema component, for example "Attribute Declaration".
      Specified by:
      getComponentAsFunction in interface SchemaComponent
      Overrides:
      getComponentAsFunction in class SchemaStructure
      Returns:
      the schema component represented as a function from property names to property values.