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 DocumentFragment
getExtraRecordData()
Get extra record data attached to this record.SRURecordData
getRecordData()
Get the record.String
getRecordIdentifier()
Get the record identifier (only SRU version 1.2).int
getRecordPosition()
Get the record position in the result set.String
getRecordSchema()
The record schema for this record.boolean
hasExtraRecordData()
Check, if this record has extra record data attached to it.boolean
isRecordSchema(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:
true
if the record is in the supplied record schema,false
otherwise- 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
null
if not available
-
getRecordPosition
public int getRecordPosition()
Get the record position in the result set.- Returns:
- position of the record in the result set or
-1
if not available
-
getExtraRecordData
public DocumentFragment getExtraRecordData()
Get extra record data attached to this record.- Returns:
- get an instance of
DocumentFragment
containing the XML fragment for the extra record data from the SRU response ornull
if none are available
-
hasExtraRecordData
public boolean hasExtraRecordData()
Check, if this record has extra record data attached to it.- Returns:
true
if extra record data is attached,false
otherwise
-
-