public class DoiResource extends BaseMdsResource
Modifier and Type | Field and Description |
---|---|
private String |
doiName
DOI template.
|
static String |
GET_DOI
Function of this resource "Get DOI".
|
DOI_PARAMETER, LOG, URL_PARAMETER
Constructor and Description |
---|
DoiResource() |
Modifier and Type | Method and Description |
---|---|
private void |
checkInput(String doiName)
Checks if doiName is not empty and contains the institution's prefix
|
protected void |
describeGet(org.restlet.ext.wadl.MethodInfo info)
Describes the Get Method.
|
protected void |
doInit()
Init by getting the DOI name in the
template URL . |
private org.restlet.ext.wadl.RepresentationInfo |
doiRepresentation()
DOI representation
|
org.restlet.representation.Representation |
getDoi()
Returns the URL associated to a given DOI or no content.
|
checkPermission, describeDelete, describePost, explainRepresentation, extractSelectedRoleFromRequestIfExists, getAttributePath, getDoiApp
addRequestDocToMethod, addRequestDocToMethod, addRequestDocToMethod, addResponseDocToMethod, createQueryParamDoc, createQueryRepresentationDoc, createResponseDoc, createResponseDoc, createResponseDoc, htmlRepresentation, isObjectExist, isObjectNotExist, isValueExist, isValueNotExist, stringRepresentation
canDescribe, createHtmlRepresentation, createWadlRepresentation, describe, describe, describe, describe, describe, describe, describe, describe, describeMethod, describeMethod, describeOptions, describeParameters, describePatch, describePut, getDescription, getName, getParameter, getParameters, getPreferredWadlVariant, getResourcePath, getResourcesBase, getWadlVariants, isAutoDescribing, options, setAutoDescribing, setDescription, setName
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, patch, patch, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString
public static final String GET_DOI
private volatile String doiName
protected void doInit() throws DoiServerException
template URL
.doInit
in class BaseMdsResource
DoiServerException
- - if a problem happens@Requirement(reqId="DOI_SRV_070",reqName="R\u00e9cup\u00e9ration de l\u2019URL de la landing page") @Requirement(reqId="DOI_MONIT_020",reqName="Monitoring de l\'\u00e9tat de DataCite") @Requirement(reqId="DOI_INTER_070",reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") @Get public org.restlet.representation.Representation getDoi() throws DoiServerException
DoiServerException
- - if the response is not a success
@Requirement(reqId="DOI_INTER_070", reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") private void checkInput(String doiName) throws DoiServerException
doiName
- DOI nameDoiServerException
- 400 Bad Request if the DOI does not contain
the institution suffix.@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") private org.restlet.ext.wadl.RepresentationInfo doiRepresentation()
@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") protected final void describeGet(org.restlet.ext.wadl.MethodInfo info)
describeGet
in class org.restlet.ext.wadl.WadlServerResource
info
- Wadl descriptionCopyright © 2017–2020 CNES. All rights reserved.