public class GenericObservationDataValidation extends DataFixture
dataFile, model, originalSubject, Resource_GML_Path, Resource_SWE_Path, testSubject, testSubjectUri| Constructor and Description |
|---|
GenericObservationDataValidation() |
| Modifier and Type | Method and Description |
|---|---|
void |
CategoryObservation() |
List<String> |
CheckObservationTypeCategory(String href)
Check Observation Type Category in schematron document
resultTypeConsistent.sch
|
List<String> |
CheckObservationTypeCount(String href)
Check Observation Type Count in schematron document
resultTypeConsistent.sch
|
List<String> |
CheckObservationTypeMeasurement(String href)
Check Observation Type Measurement in schematron document
resultTypeConsistent.sch
|
List<String> |
CheckObservationTypeTruth(String href)
Check Observation Type Truth in schematron document
resultTypeConsistent.sch
|
String |
CheckXPath2(String xpath)
Check XPath2.0
|
net.sf.saxon.s9api.XdmValue |
CheckXPath2Modified(String xpath2,
File xmlFile)
Check XPath2.0 modified version
|
void |
CountObservation() |
Validator |
CreateValidator(URL xsdPath)
Create Validator for checking XML file against XML Schema file
|
Validator |
CreateValidatorFromXSD(URL xsdPath)
Create validator from xsd file
|
static net.sf.saxon.s9api.XdmValue |
evaluateXPath2Modified(File xmlFile,
String expr,
Map<String,String> nsBindings)
Evaluates an XPath 2.0 expression using the Saxon s9api interfaces
modified version
|
void |
MeasurementData() |
void |
ObservationValidation()
A.1 Generic observation data.
|
void |
ResultGeometry()
A.6 Geometry observation data.
|
void |
ResultSWEBlock()
A.10 SWE array observation data.
|
void |
ResultSWErecord()
A.8 Complex observation data.
|
void |
ResultSWEscalar()
A.9 SWE scalar observation data.
|
void |
ResultTimeObject()
A.7 Temporal observation data.
|
void |
SamplingValid()
A.12 Sampling feature data.
|
String |
SchemaElement(String candidateNode,
String nodeName,
File schemaFile)
Return
"true" if candidate element node satisfy all three of
the following conditions: Condition 1: The name of the candidate node
matches the specified nodeName or matches the name of an
element in a substitution group headed by an element named
nodeName. |
void |
ShapeTypeConsistent()
A.13 Spatial Sampling feature data.
|
void |
SpatialParameter()
A.11 Spatial observation data.
|
void |
SpatialSamplingValid()
A.13 Spatial Sampling feature data.
|
void |
SpecimenValid()
A.18 Specimen data.
|
void |
TruthObservation() |
generateXPathExpression, obtainTestSubject, setDataFile, setSchemaModelpublic void ObservationValidation()
public void MeasurementData()
public void CategoryObservation()
public void CountObservation()
public void TruthObservation()
public void ResultGeometry()
public void ResultTimeObject()
public void ResultSWErecord()
public void ResultSWEscalar()
public void ResultSWEBlock()
public void SpatialParameter()
public void SamplingValid()
public void SpatialSamplingValid()
public void ShapeTypeConsistent()
public void SpecimenValid()
public Validator CreateValidator(URL xsdPath) throws XMLStreamException, SAXException, IOException
xsdPath - URL path of the XSD fileXMLStreamException - XMLStreamExceptionIOException - IOExceptionSAXException - SAX Errorpublic static net.sf.saxon.s9api.XdmValue evaluateXPath2Modified(File xmlFile, String expr, Map<String,String> nsBindings) throws net.sf.saxon.s9api.SaxonApiException
xmlFile - The XML file.expr - The XPath expression to be evaluated.nsBindings - A collection of namespace bindings required to evaluate the
XPath expression, where each entry maps a namespace URI (key)
to a prefix (value); this may be null if not needed.net.sf.saxon.s9api.SaxonApiException - SaxonApiExceptionpublic net.sf.saxon.s9api.XdmValue CheckXPath2Modified(String xpath2, File xmlFile)
xpath2 - String denoting an xpath syntaxxmlFile - the File xmlpublic String SchemaElement(String candidateNode, String nodeName, File schemaFile) throws net.sf.saxon.s9api.SaxonApiException
"true" if candidate element node satisfy all three of
the following conditions: Condition 1: The name of the candidate node
matches the specified nodeName or matches the name of an
element in a substitution group headed by an element named
nodeName. Condition 2: derives-from(AT, ET) is true, where
AT is the type annotation of the candidate node and ET is the schema type
declared for element nodeName in the in-scope element
declarations. Condition 3: If the element declaration for
nodeName in the in-scope element declarations is not
nillable, then the nilled property of the candidateNode is
falsecandidateNode - the candidate node for testingnodeName - name of node for comparingschemaFile - the location of schema used for testingnet.sf.saxon.s9api.SaxonApiException - SaxonApiExceptionpublic Validator CreateValidatorFromXSD(URL xsdPath) throws SAXException, IOException, URISyntaxException
xsdPath - A URL that denotes the location of a XML schema.SAXException - SAXExceptionURISyntaxException - URISyntaxExceptionIOException - IOExceptionpublic String CheckXPath2(String xpath)
xpath - String denoting an xpath syntaxpublic List<String> CheckObservationTypeMeasurement(String href)
href - the value of om:type/xlink:href to make the contextpublic List<String> CheckObservationTypeCategory(String href)
href - the value of om:type/xlink:href to make the contextpublic List<String> CheckObservationTypeCount(String href)
href - the value of om:type/xlink:href to make the contextCopyright © 2019 Open Geospatial Consortium. All rights reserved.