public class MetadataResource extends BaseMdsResource
Modifier and Type | Field and Description |
---|---|
static String |
DELETE_METADATA
Function of this resource "Delete a Metadata".
|
private String |
doiName
DOI name, which is set on the URL template.
|
static String |
GET_METADATA
Function of this resource "Get a Metadata".
|
DOI_PARAMETER, LOG, URL_PARAMETER
Constructor and Description |
---|
MetadataResource() |
Modifier and Type | Method and Description |
---|---|
private void |
checkInputs(String doiName)
Checks input parameters
|
org.restlet.representation.Representation |
deleteMetadata()
Deletes a representation for a given DOI.
|
protected void |
describeDelete(org.restlet.ext.wadl.MethodInfo info)
Describes the DELETE method.
|
protected void |
describeGet(org.restlet.ext.wadl.MethodInfo info)
Describes the GET method.
|
protected void |
doInit()
Init by getting a DOI.
|
org.restlet.representation.Representation |
getMetadata()
Retuns the metadata for a given DOI.
|
Resource |
getMetadataAsJson()
Returns the metadata as JSON.
|
checkPermission, 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_METADATA
public static final String DELETE_METADATA
private volatile String doiName
protected void doInit() throws DoiServerException
doInit
in class BaseMdsResource
DoiServerException
- - if a problem happens@Requirement(reqId="DOI_INTER_070", reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") private void checkInputs(String doiName) throws DoiServerException
doiName
- DOI numberDoiServerException
- - 400 Bad Request if DOI_PARAMETER is not set@Requirement(reqId="DOI_SRV_060",reqName="R\u00e9cup\u00e9ration des m\u00e9tadonn\u00e9es") @Requirement(reqId="DOI_MONIT_020",reqName="Monitoring de l\'\u00e9tat de DataCite") @Get(value="xml") public org.restlet.representation.Representation getMetadata() throws DoiServerException
DoiServerException
- - if the response is not a success
@Get(value="json") public Resource getMetadataAsJson() throws IOException
IOException
- - if JSON conversion problem occurs@Requirement(reqId="DOI_SRV_050",reqName="D\u00e9sactivation d\u2019un DOI") @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") @Requirement(reqId="DOI_AUTO_020",reqName="S\u00e9lection du r\u00f4le") @Requirement(reqId="DOI_AUTO_030",reqName="V\u00e9rification du projet") @Delete public org.restlet.representation.Representation deleteMetadata() throws DoiServerException
DoiServerException
- - if the response is not a success
@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 description for GET method@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") protected final void describeDelete(org.restlet.ext.wadl.MethodInfo info)
ClientMDS.DATACITE_API_RESPONSE.SUCCESS
ClientMDS.DATACITE_API_RESPONSE.DOI_NOT_FOUND
DoiMdsApplication.API_MDS.SECURITY_USER_NO_ROLE
DoiMdsApplication.API_MDS.SECURITY_USER_NOT_IN_SELECTED_ROLE
DoiMdsApplication.API_MDS.SECURITY_USER_PERMISSION
DoiMdsApplication.API_MDS.SECURITY_USER_CONFLICT
DoiMdsApplication.API_MDS.DATACITE_PROBLEM
describeDelete
in class BaseMdsResource
info
- Wadl description for DELETE methodCopyright © 2017–2020 CNES. All rights reserved.