public class UserDefinedDataTests extends BaseFixture
| Modifier and Type | Field and Description |
|---|---|
(package private) static Set<QName> |
SIMPLE_FIELD_TYPES
List of XML Schema data types that may be used to define simple fields.
|
(package private) static Map<QName,Class<?>> |
XSD_JAVA_MAPPINGS
Java type mappings for XML Schema datatypes (from JAXB specification).
|
NS_MAP, testSubject| Constructor and Description |
|---|
UserDefinedDataTests() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkSimpleDataElements(Element schemaData,
net.sf.saxon.s9api.XdmNode schemaNode,
org.opengis.cite.validation.ValidationErrorHandler errHandler)
Checks that the content of a kml:SchemaData element conforms to the
declarations in the referenced Schema.
|
(package private) QName |
getFieldType(Element field)
Determines the data type declared for a given kml:SimpleField element.
|
void |
schemaHasIdAttribute()
[
Test] Verifies that a kml:Schema element has an 'id' attribute
value. |
(package private) boolean |
valueConformsToType(String value,
QName dataType)
Determines whether or not the given datum value conforms to a specified
XML Schema datatype.
|
void |
verifySchemaData()
[
Test] Verifies that a kml:SchemaData element satisfies all of
the following constraints:
the 'schemaUrl' attribute value is a URL with a fragment component
that refers to a kml:Schema element;
all kml:SimpleData child elements have a 'name' attribute that
matches the name of a declared kml:SimpleField element in the
corresponding Schema;
the values of all kml:SimpleData child elements conform to their
declared types.
|
void |
verifySimpleField()
[
Test] Verifies that a kml:SimpleField element satisfies all of
the following constraints:
it has a 'name' attribute;
the value of the 'type' attribute is one of the following XML Schema
data types:
xsd:string
xsd:int
xsd:unsignedInt
xsd:short
xsd:unsignedShort
xsd:float
xsd:double
xsd:boolean
|
void |
verifyUntypedDataAreUnique()
[
Test] Verifies that the value of the 'name' attribute on a
kml:Data element is unique within the context of the parent
kml:ExtendedData element. |
obtainTestSubject, setTestSubject, verifyElementNotEmptystatic final Set<QName> SIMPLE_FIELD_TYPES
public void schemaHasIdAttribute()
Test] Verifies that a kml:Schema element has an 'id' attribute
value.public void verifySimpleField()
Test] Verifies that a kml:SimpleField element satisfies all of
the following constraints:
public void verifySchemaData()
Test] Verifies that a kml:SchemaData element satisfies all of
the following constraints:
public void verifyUntypedDataAreUnique()
throws XPathExpressionException
Test] Verifies that the value of the 'name' attribute on a
kml:Data element is unique within the context of the parent
kml:ExtendedData element.XPathExpressionException - If an error occurred while evaluating an XPath expression.void checkSimpleDataElements(Element schemaData, net.sf.saxon.s9api.XdmNode schemaNode, org.opengis.cite.validation.ValidationErrorHandler errHandler)
schemaData - A kml:SchemaData element (with parent kml:ExtendedData).schemaNode - An XdmNode representing the referenced kml:Schema element.errHandler - An error handler that accepts reported constraint violations.boolean valueConformsToType(String value, QName dataType)
value - A String representing a datum value.dataType - A QName identifying some simple datatype.true if the value conforms to the data type;
false otherwise.Copyright © 2014 Open Geospatial Consortium. All rights reserved.