Package eu.clarin.sru.client.fcs
Class DataView
- java.lang.Object
-
- eu.clarin.sru.client.fcs.DataView
-
- Direct Known Subclasses:
DataViewAdvanced,DataViewGenericDOM,DataViewGenericString,DataViewHits,DataViewLex,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 StringgetMimeType()Get the MIME type of this DataView.StringgetPid()Get the persistent identifier for this DataView.StringgetRef()Get the reference URI for this DataView.booleanisMimeType(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 ornullref- 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:
trueif the DataView is in the supplied MIME type,falseotherwise- 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
nullof this DataView has none
-
getRef
public String getRef()
Get the reference URI for this DataView.- Returns:
- a reference URI or
nullof this DataView has none
-
-