Package org.opengis.cite.cat30.util
Class DatasetInfo
java.lang.Object
org.opengis.cite.cat30.util.DatasetInfo
Provides information about the data held by the IUT.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) org.opengis.geometry.Envelope
calculateTotalExtent
(File file) Calculates the total extent of the records in the sample data.net.sf.saxon.s9api.XdmValue
Finds the (infoset) items in the sample data that satisfy the given XPath (2.0) expression.Returns the file containing the sample data.org.opengis.geometry.Envelope
Returns an Envelope representing the total geographic extent of the sample data.Returns a sequence of record identifiers (dc:identifier) found in the sample data.Returns a sequence of record titles (dc:title) found in the sample data.Returns a sequence of topic (dc:subject) values found in the sample data.
-
Constructor Details
-
DatasetInfo
Constructor for DatasetInfo.
- Parameters:
dataFile
- aFile
object
-
-
Method Details
-
getDataFile
Returns the file containing the sample data.- Returns:
- A File object representing a normal file.
-
getGeographicExtent
public org.opengis.geometry.Envelope getGeographicExtent()Returns an Envelope representing the total geographic extent of the sample data. The bounding boxes (ows:BoundingBox or ows:WGS84BoundingBox) for each record are coalesced to determine the overall extent.- Returns:
- An Envelope in some supported CRS.
-
getRecordIdentifiers
Returns a sequence of record identifiers (dc:identifier) found in the sample data.- Returns:
- A List containing all element values.
-
getRecordTitles
Returns a sequence of record titles (dc:title) found in the sample data. At least one such element must appear in every record representation.- Returns:
- A List containing all element values.
-
getRecordTopics
Returns a sequence of topic (dc:subject) values found in the sample data. A record may contain zero or more subject elements that convey a set of topics (e.g. keywords, key phrases, classification codes) that apply to it.- Returns:
- A List containing all topic values.
-
findItems
public net.sf.saxon.s9api.XdmValue findItems(String xpath, Map<String, String> nsBindings) throws net.sf.saxon.s9api.SaxonApiExceptionFinds the (infoset) items in the sample data that satisfy the given XPath (2.0) expression.- Parameters:
xpath
- 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); bindings for the standard namespaces are not required.- Returns:
- A sequence of zero or more items, where each item is either an atomic value or a node.
- Throws:
net.sf.saxon.s9api.SaxonApiException
- If the expression cannot be evaluated (this always wraps some other underlying exception).
-
calculateTotalExtent
Calculates the total extent of the records in the sample data. Each csw:Record element may contain at least one ows:BoundingBox (or ows:WGS84BoundingBox) element that describes the spatial coverage of a catalogued resource.- Parameters:
file
- A File containing catalog data (csw:GetRecordsResponse).- Returns:
- An Envelope representing the total geographic extent of the sample data, or null if no bounding boxes exist in the data.
-