Class VocabularyHelper

java.lang.Object
com.persequor.event.VocabularyHelper

public class VocabularyHelper extends Object
  • Constructor Details

    • VocabularyHelper

      public VocabularyHelper()
  • Method Details

    • transformToVocabularies

      @Deprecated public static VocabularyList transformToVocabularies(CustomTag customTag)
      Deprecated.
      Deprecated because throwing different type of RuntimeExceptions in case CustomTags are not shaped properly.
      Parameters:
      customTag - custom tag to extract vocabularies from
      Returns:
      extracted vocabularies
    • extractVocabularies

      public static VocabularyList extractVocabularies(CustomTag customTag)
      Helper to extract vocabularies from the custom tags. This requires the Custom Tag to contain tag(s) with tag name VocabularyList. The children of these will be parsed an must contain an attribute type specifying the URI of the vocabulary, and an attribute id specifying the URI/ID of the element. The xml-tag value of the node will be the value of the vocabulary element. Example:
       <VocabularyList>
          <Element type="urn:myvocabulary" id="vocab123">The Value of the element</Element>
       </VocabularyList>
       
      Parameters:
      customTag - custom tag to extract vocabularies from
      Returns:
      extracted vocabularies, empty list in case no vocabularies were found