public class RecordImpl extends Object implements Record
| Modifier and Type | Field and Description |
|---|---|
protected List<ControlField> |
controlFields |
protected List<DataField> |
dataFields |
| Constructor and Description |
|---|
RecordImpl()
Creates a new
Record. |
| Modifier and Type | Method and Description |
|---|---|
void |
addVariableField(VariableField field)
Adds a
VariableField being a ControlField or
DataField. |
List<VariableField> |
find(String pattern)
Finds all the
VariableFields that match the supplied regular
expression pattern. |
List<VariableField> |
find(String[] tag,
String pattern)
Finds all the
VariableFields that match the supplied tags and
regular expression pattern. |
List<VariableField> |
find(String tag,
String pattern)
Finds all the
VariableFields that match the supplied tag and
regular expression pattern. |
List<ControlField> |
getControlFields()
|
String |
getControlNumber()
Gets the
Record's control number. |
ControlField |
getControlNumberField()
Returns the control number field or
null if no control
number field is available. |
List<DataField> |
getDataFields()
|
Long |
getId()
Returns the ID for this
Record. |
Leader |
getLeader()
|
String |
getType()
Gets the type of this
Record. |
VariableField |
getVariableField(String aTag)
Gets the first
VariableField with the supplied tag. |
List<VariableField> |
getVariableFields()
|
List<VariableField> |
getVariableFields(String aTag)
Gets a
List of VariableFields with the supplied tag. |
List<VariableField> |
getVariableFields(String[] tags)
Gets the
VariableFields in the Record with the supplied
tags. |
void |
removeVariableField(VariableField field)
Removes the supplied
VariableField |
void |
setId(Long id)
Sets the ID for this
Record. |
void |
setLeader(Leader leader)
|
void |
setType(String type)
Sets the type of this
Record. |
String |
toString()
Returns a string representation of this record.
|
protected List<ControlField> controlFields
public void setLeader(Leader leader)
public Leader getLeader()
public void addVariableField(VariableField field)
VariableField being a ControlField or
DataField.
If the VariableField is a control number field (001) and the
record already has a control number field, the field is replaced with the
new instance.addVariableField in interface Recordfield - the VariableFieldpublic void removeVariableField(VariableField field)
VariableFieldremoveVariableField in interface Recordfield - the variable fieldpublic ControlField getControlNumberField()
null if no control
number field is available.getControlNumberField in interface Recordpublic List<ControlField> getControlFields()
getControlFields in interface Recordpublic List<DataField> getDataFields()
getDataFields in interface Recordpublic VariableField getVariableField(String aTag)
VariableField with the supplied tag.getVariableField in interface RecordaTag - The tag of the field to be returnedpublic List<VariableField> getVariableFields(String aTag)
List of VariableFields with the supplied tag.getVariableFields in interface Recordpublic List<VariableField> getVariableFields()
getVariableFields in interface Recordpublic String getControlNumber()
Record's control number.getControlNumber in interface Recordpublic List<VariableField> getVariableFields(String[] tags)
VariableFields in the Record with the supplied
tags.getVariableFields in interface Recordpublic String toString()
LEADER 00714cam a2200205 a 4500
001 12883376
005 20030616111422.0
008 020805s2002 nyu j 000 1 eng
020 $a0786808772
020 $a0786816155 (pbk.)
040 $aDLC$cDLC$dDLC
100 1 $aChabon, Michael.
245 10$aSummerland /$cMichael Chabon.
250 $a1st ed.
260 $aNew York :$bMiramax Books/Hyperion Books for Children,$cc2002.
300 $a500 p. ;$c22 cm.
650 1$aFantasy.
650 1$aBaseball$vFiction.
650 1$aMagic$vFiction.
public List<VariableField> find(String pattern)
VariableFields that match the supplied regular
expression pattern.public List<VariableField> find(String tag, String pattern)
VariableFields that match the supplied tag and
regular expression pattern.public List<VariableField> find(String[] tag, String pattern)
VariableFields that match the supplied tags and
regular expression pattern.Copyright © 2014 FreeLibrary. All Rights Reserved.