Package eu.clarin.sru.client.fcs
Class DataView
- java.lang.Object
-
- eu.clarin.sru.client.fcs.DataView
-
- Direct Known Subclasses:
DataViewAdvanced
,DataViewGenericDOM
,DataViewGenericString
,DataViewHits
,LegacyDataViewKWIC
public abstract class DataView extends Object
Base class for Data View implementations according to the CLARIN-FCS record schema.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMimeType()
Get the MIME type of this DataView.String
getPid()
Get the persistent identifier for this DataView.String
getRef()
Get the reference URI for this DataView.boolean
isMimeType(String type)
Convenience method to check if this DataView is of a certain MIME type.
-
-
-
Constructor Detail
-
DataView
protected DataView(String type, String pid, String ref)
Constructor.- Parameters:
type
- the MIME type of this DataViewpid
- a persistent identifier ornull
ref
- a reference URI ornull
- Throws:
NullPointerException
- if a mandatory argument was not supplied
-
-
Method Detail
-
getMimeType
public String getMimeType()
Get the MIME type of this DataView.- Returns:
- the MIME type of this DataView
-
isMimeType
public boolean isMimeType(String type)
Convenience method to check if this DataView is of a certain MIME type.- Parameters:
type
- the MIME type to test against- Returns:
true
if the DataView is in the supplied MIME type,false
otherwise- Throws:
NullPointerException
- if any required arguments are not supplied
-
getPid
public String getPid()
Get the persistent identifier for this DataView.- Returns:
- a persistent identifier or
null
of this DataView has none
-
getRef
public String getRef()
Get the reference URI for this DataView.- Returns:
- a reference URI or
null
of this DataView has none
-
-