public class Records extends Object
| Constructor and Description |
|---|
Records() |
| Modifier and Type | Method and Description |
|---|---|
static String |
findMatchingSearchTerms(File dataFile,
QName... elemNames)
Finds matching search terms corresponding to the given record elements.
|
static List<String> |
findPropertyValues(File file,
String xpath)
Evaluates an XPath (2.0) expression against the sample data and returns
the results as a list of string values.
|
static net.sf.saxon.s9api.XdmValue |
findRecordsInSampleData(File dataFile,
QName... properties)
Finds records in the sample data that contain all of the specified child
elements (some of which may occur more than once).
|
static String |
generateRandomText()
Generates a random sequence of 5-14 characters in the range [a-z].
|
static String |
getRecordId(Element record)
Gets the identifier of the given record representation.
|
static QName |
getRecordName(String mediaType)
Returns the name of the catalog record corresponding to the specified
media type.
|
public static String generateRandomText()
public static String getRecordId(Element record)
record - An Element node representing an entry in a result set
(csw:Record or atom:entry).public static List<String> findPropertyValues(File file, String xpath)
file - A File containing catalog data (csw:GetRecordsResponse).xpath - An XPath expression that is expected to denote a simple
record property; the namespace prefixes "dc" and "dct" may be used (e.g.
//dc:title).public static String findMatchingSearchTerms(File dataFile, QName... elemNames)
dataFile - A file containing sample data (csw:Record
representations).elemNames - A list of QName objects denoting the qualified names of
record elements.public static net.sf.saxon.s9api.XdmValue findRecordsInSampleData(File dataFile, QName... properties)
dataFile - A file containing sample data (csw:Record
representations).properties - A list of QName objects denoting the qualified names of
record elements.public static QName getRecordName(String mediaType)
mediaType - A string identifying a media type.Copyright © 2018 Open Geospatial Consortium. All rights reserved.