Class DatasetsValidator
java.lang.Object
org.opengis.cite.cdb10.util.reference.Validator
org.opengis.cite.cdb10.util.reference.DatasetsValidator
Provides methods to validate if a Dataset follows the standard.
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize this validator with the contents of an XML Document. -
Method Summary
Modifier and TypeMethodDescriptiondatasetNameForCode
(Integer code) Lookup a String name dataset for an Integer code according to the embedded Datasets.xmlboolean
isExtendedCode
(Integer code) Dataset codes between 900 - 999 (inclusive) will always be valid as extended datasets.boolean
isValidCode
(Integer code) Check if an integer code is valid according to the embedded Datasets.xml.boolean
isValidName
(String datasetName) Check if a dataset name is valid according to the embedded Datasets.xmlMethods inherited from class org.opengis.cite.cdb10.util.reference.Validator
compileAndEvaluate
-
Constructor Details
-
DatasetsValidator
Initialize this validator with the contents of an XML Document.- Parameters:
doc
- XML Document from Datasets.xml
-
-
Method Details
-
isExtendedCode
Dataset codes between 900 - 999 (inclusive) will always be valid as extended datasets.- Parameters:
code
- Integer for Dataset code (no leading zeros)- Returns:
- true/false
-
isValidCode
Check if an integer code is valid according to the embedded Datasets.xml. Dataset codes between 900 - 999 (inclusive) will always be valid as extended datasets.- Parameters:
code
- Integer for Dataset code (no leading zeros)- Returns:
- true/false
-
isValidName
Check if a dataset name is valid according to the embedded Datasets.xml- Parameters:
datasetName
- String name of the dataset- Returns:
- true/false
-
datasetNameForCode
Lookup a String name dataset for an Integer code according to the embedded Datasets.xml- Parameters:
code
- Integer for Dataset code (no leading zeros)- Returns:
- String name for Dataset
-