DLESE Tools
v1.6.0

org.dlese.dpc.standards.asn
Class AsnTopics

java.lang.Object
  extended by 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 Summary
static void cacheTopicsDoc(String srcDir)
          Utility to update cached Topics File
static AsnTopics getInstance()
          Gets the AsnTopic instance
 String getTopic(String purl)
          Returns a topic for a given topic purl (e.g., http://purl.org/ASN/scheme/ASNTopic/behavioralStudies)
 Map getTopicMap()
          Returns a mapping from topic purl to topic label
static void main(String[] args)
          The main program for the AsnTopics class - runs cacheTopicsDoc utility.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

DLESE Tools
v1.6.0