info.extensiblecatalog.nacm.model
Class AuthorityRecord

java.lang.Object
  extended by info.extensiblecatalog.nacm.model.AuthorityRecord

public class AuthorityRecord
extends java.lang.Object

Represents the necessary fields for an authority record.

Author:
Dean Rzonca

Field Summary
static java.lang.String MARC
           
 
Constructor Summary
AuthorityRecord()
          Creates a new, empty AuthorityRecord Note that this constructor is only present for JavaBeans compliance and should not be used
AuthorityRecord(Name authorizedForm, java.lang.String originalXML, java.lang.Integer xmlHash, java.lang.Boolean generated)
          Creates a new AuthorityRecord
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Set<Name> getAlternateForms()
          Gets the alternate forms for this name
 Name getAuthorizedForm()
          Gets the authorized form for this name in normalized form
 java.lang.Long getId()
          Gets the unique ID associated with this record
 java.lang.String getOriginalXML()
          Gets the original, raw XML for this record
 java.lang.String getRecordType()
          Determines the type of record Use static types defined in this class
 java.util.Set<Name> getSeeAlsoReferences()
          Gets other names which may be related to this record
 java.lang.Integer getXMLHash()
          Gets a hash code for the original XML Useful for determining whether this record is duplicated The hash code is identical for identical records
 int hashCode()
           
 java.lang.Boolean isGenerated()
          Determines whether this record was imported or generated
 void setAlternateForms(java.util.Set<Name> alternateForms)
          Sets the alternate forms for this name
 void setAuthorizedForm(Name authorizedForm)
          Sets the authorized form for this name in normalized form
 void setGenerated(java.lang.Boolean generated)
          Sets whether this record was imported or generated
 void setId(java.lang.Long id)
          Sets the unique ID associated with this record
 void setOriginalXML(java.lang.String xml)
          Sets the original source XML for this record
 void setRecordType(java.lang.String recordType)
          Sets the record type
 void setSeeAlsoReferences(java.util.Set<Name> seeAlsoReferences)
          Sets other names which may be related to this record
 void setXMLHash(java.lang.Integer code)
          Sets a hash code for the original XML This must be identical for identical XML
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MARC

public static final java.lang.String MARC
See Also:
Constant Field Values
Constructor Detail

AuthorityRecord

public AuthorityRecord()
Creates a new, empty AuthorityRecord Note that this constructor is only present for JavaBeans compliance and should not be used


AuthorityRecord

public AuthorityRecord(Name authorizedForm,
                       java.lang.String originalXML,
                       java.lang.Integer xmlHash,
                       java.lang.Boolean generated)
Creates a new AuthorityRecord

Parameters:
authorizedForm - the authorized form of the name
originalXML - the original record XML
xmlHash - the hash code of the XML
generated - whether or not this is a generated record
Method Detail

getAuthorizedForm

public Name getAuthorizedForm()
Gets the authorized form for this name in normalized form

Returns:
a Name

setAuthorizedForm

public void setAuthorizedForm(Name authorizedForm)
Sets the authorized form for this name in normalized form

Parameters:
authorizedForm -

getAlternateForms

public java.util.Set<Name> getAlternateForms()
Gets the alternate forms for this name

Returns:
All known alternate forms for this name

setAlternateForms

public void setAlternateForms(java.util.Set<Name> alternateForms)
Sets the alternate forms for this name

Parameters:
alternateForms - All known alternate forms for this name

getSeeAlsoReferences

public java.util.Set<Name> getSeeAlsoReferences()
Gets other names which may be related to this record

Returns:
All known names which may be related to this name, in normalized form

setSeeAlsoReferences

public void setSeeAlsoReferences(java.util.Set<Name> seeAlsoReferences)
Sets other names which may be related to this record

Parameters:
seeAlsoReferences - All known names which may be related to this name, in normalized form

getOriginalXML

public java.lang.String getOriginalXML()
Gets the original, raw XML for this record

Returns:
the XML that was originally imported

setOriginalXML

public void setOriginalXML(java.lang.String xml)
Sets the original source XML for this record

Parameters:
xml - the XML data for this record

isGenerated

public java.lang.Boolean isGenerated()
Determines whether this record was imported or generated

Returns:
true or false

setGenerated

public void setGenerated(java.lang.Boolean generated)
Sets whether this record was imported or generated

Parameters:
generated - true if the record was generated

getXMLHash

public java.lang.Integer getXMLHash()
Gets a hash code for the original XML Useful for determining whether this record is duplicated The hash code is identical for identical records

Returns:
a hash code for the XML

setXMLHash

public void setXMLHash(java.lang.Integer code)
Sets a hash code for the original XML This must be identical for identical XML

Parameters:
code - a hash code for the original XML

getRecordType

public java.lang.String getRecordType()
Determines the type of record Use static types defined in this class

Returns:
a String representing the record type

setRecordType

public void setRecordType(java.lang.String recordType)
Sets the record type

Parameters:
recordType - a String representing the record type and corresponding to one of the static items in this class

getId

public java.lang.Long getId()
Gets the unique ID associated with this record

Returns:
a unique ID

setId

public void setId(java.lang.Long id)
Sets the unique ID associated with this record

Parameters:
id - a unique ID

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object