Class VocabUtils

java.lang.Object
org.dlese.dpc.vocab.VocabUtils

public class VocabUtils extends Object
NOT YET DOCUMENTED
Version:
$Id: VocabUtils.java,v 1.3 2009/03/20 23:34:00 jweather Exp $
Author:
John Weatherley
  • Constructor Details

    • VocabUtils

      public VocabUtils()
  • Method Details

    • getFieldContent

      public static String getFieldContent(String metaFormat, String[] values, String useVocabMapping, MetadataVocab vocab) throws Exception
      Gets the vocab encoded keys for the given values, separated by the '+' symbol.
      Parameters:
      metaFormat - The metadata format, for example 'adn'
      values - The valuse to encode.
      useVocabMapping - The mapping to use, for example 'contentStandards'
      vocab - The MetadataVocab instance
      Returns:
      The encoded vocab keys.
      Throws:
      Exception - If error.
    • getFieldContent

      public static String getFieldContent(String metaFormat, String value, String useVocabMapping, MetadataVocab vocab) throws Exception
      Gets the encoded vocab key for the given content.
      Parameters:
      metaFormat - The metadata format, for example 'adn'
      value - The value to encode.
      useVocabMapping - The vocab mapping to use, for example "contentStandard".
      vocab - The MetadataVocab instance
      Returns:
      The encoded value.
      Throws:
      Exception - If error.