Class AsnTopics

java.lang.Object
org.dlese.dpc.standards.asn.AsnTopics

public class AsnTopics extends Object
Class to read the ASN topics document from ASN web service and provide topic lookup by topic purl.
Author:
Jonathan Ostwald
  • Method Details

    • getInstance

      public static AsnTopics getInstance() throws Exception
      Gets the AsnTopic instance
      Returns:
      The instance value
      Throws:
      Exception - if topicURL cannot be processed
    • cacheTopicsDoc

      public static void cacheTopicsDoc(String srcDir) throws Exception
      Utility to update cached Topics File
      Parameters:
      srcDir - path to local src directory
      Throws:
      Exception - if file cannot be written
    • main

      public static void main(String[] args)
      The main program for the AsnTopics class - runs cacheTopicsDoc utility.
      Parameters:
      args - The command line arguments
    • getTopic

      public String getTopic(String purl)
      Returns a topic for a given topic purl (e.g., http://purl.org/ASN/scheme/ASNTopic/behavioralStudies)
      Parameters:
      purl - NOT YET DOCUMENTED
      Returns:
      The topic value
    • getTopicMap

      public Map getTopicMap() throws Exception
      Returns a mapping from topic purl to topic label
      Returns:
      The topicMap value
      Throws:
      Exception - NOT YET DOCUMENTED