DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.standards.asn
Class AsnDocKey

java.lang.Object
  extended by org.dlese.dpc.schemedit.standards.asn.AsnDocKey

public class AsnDocKey
extends Object

A key representing an ASN StandardDoc that encodes the "author/subject", "topic/jurisdiction", "created date", and "UID" part of the full ASN purl id for the document (e.g., "D10001D0").

Used to facilitate matching among keys for similar key components (such as "topic") using a wildcard, and to provide a human-readible, unique key for managing documents. The UID segment of the key facilitates mapping to actual ASN purl when necessary.

Author:
Jonathan Ostwald

Constructor Summary
AsnDocKey(AsnDocument doc)
          Constructor for the AsnDocKey object given an AsnDocument
AsnDocKey(String author, String topic, String created)
          Constructor for the AsnDocKey object given author, topic and created segments.
AsnDocKey(String author, String topic, String created, String uid)
          Constructor for the AsnDocKey object with provided field data.
 
Method Summary
 String getAsnId()
           
static AsnDocKey makeAsnDocKey(String docKeyAsString)
          Returns a AsnDocKey instance created from provided docKeyAsString value (e.g., "NSES.Science.1995.D10001D0")
 String toString()
          return a string representation of this AsnDocKey object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsnDocKey

public AsnDocKey(AsnDocument doc)
Constructor for the AsnDocKey object given an AsnDocument

Parameters:
doc - an asn Standards Docuement

AsnDocKey

public AsnDocKey(String author,
                 String topic,
                 String created)
Constructor for the AsnDocKey object given author, topic and created segments. The resulting key has a wildcard for the "UID" segment.

Parameters:
author - the author
topic - the topic
created - the created

AsnDocKey

public AsnDocKey(String author,
                 String topic,
                 String created,
                 String uid)
Constructor for the AsnDocKey object with provided field data. Converts CAT authors to NSES author values to overcome inconsistencies between CAT and ASN naming conventions for authors (aka, jurisdiction).

Parameters:
author - the author
topic - the topic
created - the created
uid - unique part of asn id (e.g., "D10001D0")
Method Detail

makeAsnDocKey

public static AsnDocKey makeAsnDocKey(String docKeyAsString)
Returns a AsnDocKey instance created from provided docKeyAsString value (e.g., "NSES.Science.1995.D10001D0")


getAsnId

public String getAsnId()

toString

public String toString()
return a string representation of this AsnDocKey object

Overrides:
toString in class Object
Returns:
string representation of key

DLESE Tools
v1.6.0