Class AsnDocKey

java.lang.Object
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 Details

    • 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 Details

    • 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