public class OAIProviderService extends Object
| Constructor and Description |
|---|
OAIProviderService()
Instantiates a new OAI provider service.
|
| Modifier and Type | Method and Description |
|---|---|
String |
createSet(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo,
InputStream src)
Create set.
|
static ResumptionToken |
decodeResumptionToken(String token)
Decode resumption token.
|
static String |
encodeResumptionToken(String verb,
String metadataPrefix,
String from,
String until,
String set,
int offset)
Encode resumption token.
|
static JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
error(org.openarchives.oai._2.VerbType verb,
String identifier,
String metadataPrefix,
org.openarchives.oai._2.OAIPMHerrorcodeType errorCode,
String msg)
Creates a OAI error response for JAX-B
|
JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
getRecord(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo,
String identifier,
String metadataPrefix)
Gets record.
|
JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
identify(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo)
Identify jAXB element.
|
void |
init()
Service intitialization
|
JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
listIdentifiers(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo,
String metadataPrefix,
String from,
String until,
String set,
int offset)
List identifiers.
|
JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
listMetadataFormats(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo,
String identifier)
List metadata formats.
|
JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
listRecords(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo,
String metadataPrefix,
String from,
String until,
String set,
int offset)
List records.
|
JAXBElement<org.openarchives.oai._2.OAIPMHtype> |
listSets(javax.jcr.Session session,
javax.ws.rs.core.UriInfo uriInfo,
int offset)
List sets.
|
void |
setAutoGenerateOaiDc(boolean autoGenerateOaiDc)
Sets auto generate oai dc.
|
void |
setDescriptiveContent(Map<String,String> descriptiveContent)
Sets descriptive content.
|
void |
setMaxListSize(int maxListSize)
Sets max list size.
|
void |
setMetadataFormats(Map<String,MetadataFormat> metadataFormats)
Sets metadata formats.
|
void |
setOaiNamespace(String oaiNamespace)
Set oaiNamespace
|
void |
setPropertyHasSets(String propertyHasSets)
Sets property has sets.
|
void |
setPropertyHasSetSpec(String propertyHasSetSpec)
Sets property has set spec.
|
void |
setPropertyIsPartOfSet(String propertyIsPartOfSet)
Sets property is part of set.
|
void |
setPropertyOaiAdminEmail(String propertyOaiAdminEmail)
Set propertyOaiAdminEmail
|
void |
setPropertyOaiDescription(String propertyOaiDescription)
Set propertyOaiDescription
|
void |
setPropertyOaiRepositoryName(String propertyOaiRepositoryName)
Set propertyOaiRepositoryName
|
void |
setPropertySetName(String propertySetName)
Sets property set name.
|
void |
setSetsEnabled(boolean setsEnabled)
Sets sets enabled.
|
void |
setSetsRootPath(String setsRootPath)
Sets sets root path.
|
static String |
urlDecode(String value)
Url decode.
|
static String |
urlEncode(String value)
Url encode.
|
public OAIProviderService() throws DatatypeConfigurationException, JAXBException
DatatypeConfigurationException - the datatype configuration exceptionJAXBException - the jAXB exceptionpublic void setPropertyHasSetSpec(String propertyHasSetSpec)
propertyHasSetSpec - the property has set specpublic void setPropertySetName(String propertySetName)
propertySetName - the property set namepublic void setPropertyHasSets(String propertyHasSets)
propertyHasSets - the property has setspublic void setMaxListSize(int maxListSize)
maxListSize - the max list sizepublic void setPropertyIsPartOfSet(String propertyIsPartOfSet)
propertyIsPartOfSet - the property is part of setpublic void setPropertyOaiRepositoryName(String propertyOaiRepositoryName)
propertyOaiRepositoryName - the oai repository namepublic void setPropertyOaiDescription(String propertyOaiDescription)
propertyOaiDescription - the oai descriptionpublic void setPropertyOaiAdminEmail(String propertyOaiAdminEmail)
propertyOaiAdminEmail - the oai admin emailpublic void setOaiNamespace(String oaiNamespace)
oaiNamespace - the oai namespacepublic void setSetsRootPath(String setsRootPath)
setsRootPath - the sets root pathpublic void setSetsEnabled(boolean setsEnabled)
setsEnabled - the sets enabledpublic void setAutoGenerateOaiDc(boolean autoGenerateOaiDc)
autoGenerateOaiDc - the auto generate oai dcpublic void setMetadataFormats(Map<String,MetadataFormat> metadataFormats)
metadataFormats - the metadata formatspublic void setDescriptiveContent(Map<String,String> descriptiveContent)
descriptiveContent - the descriptive content@PostConstruct public void init() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException - the repository exceptionpublic JAXBElement<org.openarchives.oai._2.OAIPMHtype> identify(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo) throws javax.jcr.RepositoryException, JAXBException
session - the sessionuriInfo - the uri infojavax.jcr.RepositoryException - the repository exceptionJAXBException - the jAXB exceptionpublic JAXBElement<org.openarchives.oai._2.OAIPMHtype> listMetadataFormats(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo, String identifier) throws javax.jcr.RepositoryException
session - the sessionuriInfo - the uri infoidentifier - the identifierjavax.jcr.RepositoryException - the repository exceptionpublic JAXBElement<org.openarchives.oai._2.OAIPMHtype> getRecord(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo, String identifier, String metadataPrefix) throws javax.jcr.RepositoryException
session - the sessionuriInfo - the uri infoidentifier - the identifiermetadataPrefix - the metadata prefixjavax.jcr.RepositoryException - the repository exceptionpublic static JAXBElement<org.openarchives.oai._2.OAIPMHtype> error(org.openarchives.oai._2.VerbType verb, String identifier, String metadataPrefix, org.openarchives.oai._2.OAIPMHerrorcodeType errorCode, String msg)
verb - the verbidentifier - the identifiermetadataPrefix - the metadata prefixerrorCode - the error codemsg - the msgpublic JAXBElement<org.openarchives.oai._2.OAIPMHtype> listIdentifiers(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo, String metadataPrefix, String from, String until, String set, int offset) throws javax.jcr.RepositoryException
session - the sessionuriInfo - the uri infometadataPrefix - the metadata prefixfrom - the fromuntil - the untilset - the setoffset - the offsetjavax.jcr.RepositoryException - the repository exceptionpublic static String encodeResumptionToken(String verb, String metadataPrefix, String from, String until, String set, int offset) throws UnsupportedEncodingException
verb - the verbmetadataPrefix - the metadata prefixfrom - the fromuntil - the untilset - the setoffset - the offsetUnsupportedEncodingException - the unsupported encoding exceptionpublic static String urlEncode(String value) throws UnsupportedEncodingException
value - the valueUnsupportedEncodingException - the unsupported encoding exceptionpublic static String urlDecode(String value) throws UnsupportedEncodingException
value - the valueUnsupportedEncodingException - the unsupported encoding exceptionpublic static ResumptionToken decodeResumptionToken(String token) throws UnsupportedEncodingException
token - the tokenUnsupportedEncodingException - the unsupported encoding exceptionpublic JAXBElement<org.openarchives.oai._2.OAIPMHtype> listSets(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo, int offset) throws javax.jcr.RepositoryException
session - the sessionuriInfo - the uri infooffset - the offsetjavax.jcr.RepositoryException - the repository exceptionpublic String createSet(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo, InputStream src) throws javax.jcr.RepositoryException
session - the sessionuriInfo - the uri infosrc - the srcjavax.jcr.RepositoryException - the repository exceptionpublic JAXBElement<org.openarchives.oai._2.OAIPMHtype> listRecords(javax.jcr.Session session, javax.ws.rs.core.UriInfo uriInfo, String metadataPrefix, String from, String until, String set, int offset) throws javax.jcr.RepositoryException
session - the sessionuriInfo - the uri infometadataPrefix - the metadata prefixfrom - the fromuntil - the untilset - the setoffset - the offsetjavax.jcr.RepositoryException - the repository exceptionCopyright © 2013–2015 DuraSpace, Inc.. All rights reserved.