Package eu.clarin.sru.client
Class SRURecord
- java.lang.Object
-
- eu.clarin.sru.client.SRURecord
-
public final class SRURecord extends Object
Class for holding a single record from a result set.- See Also:
SRUSearchRetrieveResponse
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentFragmentgetExtraRecordData()Get extra record data attached to this record.SRURecordDatagetRecordData()Get the record.StringgetRecordIdentifier()Get the record identifier (only SRU version 1.2).intgetRecordPosition()Get the record position in the result set.StringgetRecordSchema()The record schema for this record.booleanhasExtraRecordData()Check, if this record has extra record data attached to it.booleanisRecordSchema(String recordSchema)Check if this record is in a certain record schema.
-
-
-
Method Detail
-
getRecordSchema
public String getRecordSchema()
The record schema for this record.- Returns:
- the record schema for this record
-
isRecordSchema
public boolean isRecordSchema(String recordSchema)
Check if this record is in a certain record schema.- Parameters:
recordSchema- the record schema to test against- Returns:
trueif the record is in the supplied record schema,falseotherwise- Throws:
NullPointerException- if any required arguments are not supplied
-
getRecordData
public SRURecordData getRecordData()
Get the record.- Returns:
- the record
-
getRecordIdentifier
public String getRecordIdentifier()
Get the record identifier (only SRU version 1.2).- Returns:
- the record identifier or
nullif not available
-
getRecordPosition
public int getRecordPosition()
Get the record position in the result set.- Returns:
- position of the record in the result set or
-1if not available
-
getExtraRecordData
public DocumentFragment getExtraRecordData()
Get extra record data attached to this record.- Returns:
- get an instance of
DocumentFragmentcontaining the XML fragment for the extra record data from the SRU response ornullif none are available
-
hasExtraRecordData
public boolean hasExtraRecordData()
Check, if this record has extra record data attached to it.- Returns:
trueif extra record data is attached,falseotherwise
-
-