Class KmlDocumentTests

java.lang.Object
org.opengis.cite.kml22.BaseFixture
org.opengis.cite.kml22.level1.KmlDocumentTests

public class KmlDocumentTests extends BaseFixture
Contains fundamental test methods that apply to any KML document as a whole.
See Also:
  • "OGC 07-134r2: OGC KML 2.2 - Abstract Test Suite"
  • Constructor Details

    • KmlDocumentTests

      public KmlDocumentTests()
  • Method Details

    • verifyDocumentElement

      public void verifyDocumentElement()
      [Test] Verify that the root element of the document has [local name] = "kml" and [namespace name] = "http://www.opengis.net/kml/2.2".
      See Also:
      • "OGC 07-134r2, ATC 1: Root element"
    • verifyXmlSchemaConstraints

      public void verifyXmlSchemaConstraints(org.testng.ITestContext testContext)
      [Test] Verifies that the document satisfies all KML 2.2 schema constraints.
      Parameters:
      testContext - The test context containing the SuiteAttribute.KML_SCHEMA attribute required to perform schema validation.
      See Also:
      • "OGC 07-134r2, ATC 2: XML Schema constraints"
      • ogckml22.xsd
    • verifyEmptyObjectHasId

      public void verifyEmptyObjectHasId(org.testng.ITestContext testContext)
      [Test] Verifies that a KML object that is not a descendant of kml:Update is either (a) not empty, or (b) empty but has an 'id' attribute value (so it can be easily updated). The relevant context is // kml:AbstractObjectType[not(ancestor::kml:Update)].
      Parameters:
      testContext - The test context containing the SuiteAttribute.KML_SCHEMA attribute required to perform schema validation.
      See Also:
      • "OGC 07-134r2, ATC 21: Empty object"
    • checkEmptyElementHasIdAttribute

      void checkEmptyElementHasIdAttribute(Element kmlElem, org.opengis.cite.validation.ValidationErrorHandler errHandler)
      An error is reported if any KML object is empty and does not have an id attribute.
      Parameters:
      kmlElem - A DOM Element representing a KML element (not a descendant of kml:Update).
      errHandler - The error handler that receives any errors that were detected.