public class SchemaChecker extends Object
<xsd:complexType name="SchemaType" final="#all"> <xsd:all> <xsd:element ref="kml:SimpleField" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="kml:SimpleArrayField" minOccurs="0" maxOccurs="unbounded"/> <xsd:element ref="kml:SchemaExtension" minOccurs="0" maxOccurs="unbounded"/> </xsd:all> <xsd:attribute name="name" type="string"/> <xsd:attribute name="id" type="ID"/> <xsd:anyAttribute namespace="##other" processContents="lax"/> </xsd:complexType>The applicable test cases are identified below:
| Modifier and Type | Field and Description |
|---|---|
(package private) List<String> |
commonPrefixes
List of common prefix symbols in UCUM ('c','k', 'M', ..).
|
(package private) org.opengis.cite.validation.ValidationErrorHandler |
errHandler |
(package private) URL |
uomCodeListRef |
| Constructor and Description |
|---|
SchemaChecker()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkDataType(Element simpleField)
Checks that the value of the 'type' attribute is a known (simple)
datatype.
|
(package private) void |
checkSimpleArrayFields(Element schema)
Checks that a kml:SimpleArrayField element satisfies all applicable
constraints.
|
(package private) void |
checkSimpleFields(Element schema)
Checks that a kml:SimpleField element satisfies all applicable
constraints.
|
void |
checkUnitOfMeasure(Element schemaField)
Checks that a definition exists for a given unit of measure reference.
|
String |
getErrorMessages()
Returns all error messages reported during the last call to
isValid. |
List<org.opengis.cite.validation.ValidationError> |
getErrors()
Returns all errors reported to the handler.
|
(package private) List<String> |
getUomPrefixes() |
boolean |
isValid(Node node)
Validates a kml:Schema element.
|
org.opengis.cite.validation.ValidationErrorHandler errHandler
URL uomCodeListRef
public String getErrorMessages()
isValid.public List<org.opengis.cite.validation.ValidationError> getErrors()
public boolean isValid(Node node)
node - A kml:Schema element.void checkSimpleFields(Element schema)
schema - A kml:Schema element.void checkSimpleArrayFields(Element schema)
schema - A kml:Schema element.void checkDataType(Element simpleField)
Note: While a simple datatype that is derived from an XML Schema datatype is also allowed, such a user-defined datatype is not currently verified and will be reported as an error.
simpleField - A kml:SimpleField element.public void checkUnitOfMeasure(Element schemaField)
schemaField - A kml:SimpleField or kml:SimpleArrayField element.Copyright © 2016 Open Geospatial Consortium. All rights reserved.