Class VocabChecker

java.lang.Object
uk.ac.starlink.ttools.votlint.VocabChecker

public class VocabChecker extends Object
Checks values that are defined by the content of an IVOA Vocabulary.
Since:
25 Apr 2019
Author:
Mark Taylor
  • Field Details

    • TIMESCALE

      public static final VocabChecker TIMESCALE
      Instance for vocabulary at http://www.ivoa.net/rdf/timescale.
    • REFPOSITION

      public static final VocabChecker REFPOSITION
      Instance for vocabulary at http://www.ivoa.net/rdf/refposition.
  • Constructor Details

    • VocabChecker

      public VocabChecker(String vocabUrl, String[] fixedTerms)
      Constructor.
      Parameters:
      vocabUrl - URI/URL for vocabulary document
      fixedTerms - hard-coded non-preliminary, non-deprecated terms known in the vocabulary; other terms may be available by resolving the vocabulary URL
  • Method Details

    • checkTerm

      public void checkTerm(String value, VocabChecker.TermReporter termReporter)
      Checks whether a term is present in this vocabulary, and reports to a callback interface.
      Parameters:
      value - vocabulary name item to test
      termReporter - destination for reports; exactly one of its methods will be invoked
    • getVocabularyUrl

      public URL getVocabularyUrl()
      Returns the URI/URL of this object's vocabulary.
      Returns:
      vocabulary URL
    • getFixedTerms

      public Collection<String> getFixedTerms()
      Returns the hard-coded list of terms known by this checker. It may not be complete if this class is out of date with respect to the vocabulary itself.
      Returns:
      unmodifiable list of known terms
    • getRetrievedTerms

      public Map<String,uk.ac.starlink.vo.VocabTerm> getRetrievedTerms()
      Lazily acquires vocabulary values by reading the resource at the vocabulary URI.
      Returns:
      term map retrieved from online vocabulary; in case of a read error this may be empty, but not null