public class VocabChecker extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
VocabChecker.TermReporter
Callback interface for reporting vocabulary interrogation results.
|
Modifier and Type | Field and Description |
---|---|
static VocabChecker |
DATALINK_CORE
Instance for vocabulary at http://www.ivoa.net/rdf/datalink/core.
|
static VocabChecker |
EXAMPLES
Instance for vocabulary at http://www.ivoa.net/examples.
|
static VocabChecker |
MESSENGER
Instance for vocabulary at http://www.ivoa.net/rdf/messenger.
|
static VocabChecker |
PRODUCT_TYPE
Instance for vocabulary at http://www.ivoa.net/rdf/product-type.
|
static VocabChecker |
REFFRAME
Instance for vocabulary at http://www.ivoa.net/rdf/refframe.
|
static VocabChecker |
REFPOSITION
Instance for vocabulary at http://www.ivoa.net/rdf/refposition.
|
static VocabChecker |
TIMESCALE
Instance for vocabulary at http://www.ivoa.net/rdf/timescale.
|
Constructor and Description |
---|
VocabChecker(String vocabUrl,
String[] fixedTerms)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkTerm(String value,
VocabChecker.TermReporter termReporter)
Checks whether a term is present in this vocabulary,
and reports to a callback interface.
|
Collection<String> |
getFixedTerms()
Returns the hard-coded list of terms known by this checker.
|
Map<String,VocabTerm> |
getRetrievedTerms()
Lazily acquires vocabulary values by reading the resource at the
vocabulary URI.
|
String |
getVocabularyUri()
Returns the URI of this object's vocabulary in string form.
|
URL |
getVocabularyUrl()
Returns the URI/URL of this object's vocabulary.
|
static void |
main(String[] args)
Run to check hard-coded term lists against online versions.
|
String |
toString() |
public static final VocabChecker TIMESCALE
public static final VocabChecker REFPOSITION
public static final VocabChecker REFFRAME
public static final VocabChecker DATALINK_CORE
public static final VocabChecker PRODUCT_TYPE
public static final VocabChecker EXAMPLES
public static final VocabChecker MESSENGER
public void checkTerm(String value, VocabChecker.TermReporter termReporter)
value
- vocabulary name item to testtermReporter
- destination for reports;
exactly one of its methods will be invokedpublic URL getVocabularyUrl()
public String getVocabularyUri()
public Collection<String> getFixedTerms()
public Map<String,VocabTerm> getRetrievedTerms()
public static void main(String[] args) throws IOException
IOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.