Class ModelAndSyntaxTests

java.lang.Object
org.opengis.cite.iso19136.general.SchemaModelFixture
org.opengis.cite.iso19136.general.ModelAndSyntaxTests

public class ModelAndSyntaxTests extends SchemaModelFixture
Includes tests for adherence to mandatory GML model and syntax constraints. A GML object is an element assigned to the gml:AbstractGML substitution group (and thus is derived from gml:AbstractGMLType). Note that the so-called "object-property model" is very similar to the "striped" encoding syntax convention used in RDF/XML representations, where elements alternately represent nodes (resources) and edges (properties).

Sources

  • ISO 19136:2007, cl. A.1.1.5: Support for the GML model and syntax
  • ISO 19136:2007, 7.1.2: Lexical conventions
  • Constructor Details

    • ModelAndSyntaxTests

      public ModelAndSyntaxTests()
  • Method Details

    • verifyGMLObjectPropertyPattern

      public void verifyGMLObjectPropertyPattern()
      [Test] A GML property is a child element of a GML object; such a property cannot itself be a GML object (i.e. derived from gml:AbstractGMLType). Furthermore, it must not declare any attributes of type xsd:ID.

      Sources

      • ISO 19136:2007, 7.1.3: XML schema definition of GML language
      • ISO 19136:2007, A.1.1.7: Property elements are not object elements
    • isGMLObject

      boolean isGMLObject(org.apache.xerces.xs.XSElementDeclaration elemDecl)
      Determines if an element is a GML object. A GML object is an XML element of a type derived from gml:AbstractGMLType.
      Parameters:
      elemDecl - An XSElementDeclaration object.
      Returns:
      true if the element corresponds to a GML object; false otherwise.
      See Also:
      • "ISO 19136:2007, 7.1.3: XML schema definition of GML language"
      • "ISO 19136:2007, 7.2.4.1: Derivation from AbstractGMLType"
    • hasIDTypeAttribute

      boolean hasIDTypeAttribute(org.apache.xerces.xs.XSElementDeclaration elemDecl)
      Determines if the type definition for the given element declaration includes an attribute of type xsd:ID. Only GML objects should have one (gml:id).
      Parameters:
      elemDecl - An XSElementDeclaration object.
      Returns:
      true if the element content model contains an ID type attribute; false otherwise.
      See Also:
      • "ISO 19136:2007, 7.1.3: XML schema definition of GML language"