DLESE Tools
v1.2

org.dlese.dpc.repository
Class RecordData

java.lang.Object
  extended byorg.dlese.dpc.repository.RecordData

public class RecordData
extends Object

Holds data related to a single item-level record such as it's annotations and records that refer to the same resource. This class is used by class ItemFileIndexingWriter and ItemDocReader.

Author:
John Weatherley
See Also:
ItemFileIndexingWriter, ItemDocReader, RecordDataService

Constructor Summary
protected RecordData(DleseAnnoDocReader[] annoDocs, ItemDocReader[] associatedItemsDocs, String accessionStatus)
          Contruct the record data for an item-level record.
 
Method Summary
 String getAccessionStatus()
          Gets the accessionStatus attribute of the RecordData object
 DleseAnnoDocReader[] getAnnotationDocs()
          Gets DocReaders for all annotation records that reference this resource, or null if none exist.
 ItemDocReader[] getAsociatedItemsDocs()
          Gets DocReaders for all item-level records that refer to the same resource, or null if none exist.
 String[] getAssociatedIds()
          Gets the associatedIDs for this record, records that catalog the same resource.
protected static String getDateStamp()
          Return a string for the current time and date, sutiable for display in log files and output to standout:
protected  void prtln(String s)
          Output a line of text to standard out, with datestamp, if debug is set to true.
protected  void prtlnErr(String s)
          Output a line of text to error out, with datestamp.
static void setDebug(boolean db)
          Sets the debug attribute of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordData

protected RecordData(DleseAnnoDocReader[] annoDocs,
                     ItemDocReader[] associatedItemsDocs,
                     String accessionStatus)
Contruct the record data for an item-level record. Created by RecordDataService.

Parameters:
annoDocs - DleseAnnoDocReaders for records that annotate this item.
associatedItemsDocs - ItemDocReaders for items that refer to the same resource.
accessionStatus - The accession status.
See Also:
RecordDataService
Method Detail

getAccessionStatus

public String getAccessionStatus()
Gets the accessionStatus attribute of the RecordData object

Returns:
The accessionStatus value

getAsociatedItemsDocs

public ItemDocReader[] getAsociatedItemsDocs()
Gets DocReaders for all item-level records that refer to the same resource, or null if none exist.

Returns:
The asociatedItemsDocs value or null.

getAnnotationDocs

public DleseAnnoDocReader[] getAnnotationDocs()
Gets DocReaders for all annotation records that reference this resource, or null if none exist.

Returns:
The annotationDocs value or null.

getAssociatedIds

public String[] getAssociatedIds()
Gets the associatedIDs for this record, records that catalog the same resource. Returns only IDs for those records that are currently in the index.

Returns:
The associatedIDs value.

getDateStamp

protected static final String getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout:

Returns:
The dateStamp value

prtlnErr

protected final void prtlnErr(String s)
Output a line of text to error out, with datestamp.

Parameters:
s - The text that will be output to error out.

prtln

protected final void prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true.

Parameters:
s - The String that will be output.

setDebug

public static void setDebug(boolean db)
Sets the debug attribute of the object

Parameters:
db - The new debug value

DLESE Tools
v1.2