public class MetadatasResource extends BaseMdsResource
Modifier and Type | Field and Description |
---|---|
static String |
CREATE_METADATA
Function of this resource "Create Metadata".
|
DOI_PARAMETER, LOG, URL_PARAMETER
Constructor and Description |
---|
MetadatasResource() |
Modifier and Type | Method and Description |
---|---|
private void |
checkInputs(Object obj)
Checks inputs.
|
private Resource |
createDataCiteResourceObject(org.restlet.representation.Representation entity)
Creates the metadata object from its representation.
|
String |
createMetadata(org.restlet.representation.Representation entity)
Create Metadata for a given DOI.
|
protected void |
describePost(org.restlet.ext.wadl.MethodInfo info)
Describes the POST method.
|
protected void |
doInit()
Init.
|
checkPermission, describeDelete, 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, describeGet, 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 CREATE_METADATA
protected void doInit() throws DoiServerException
doInit
in class BaseMdsResource
DoiServerException
- - if a problem happens@Requirement(reqId="DOI_SRV_010",reqName="Cr\u00e9ation de m\u00e9tadonn\u00e9es") @Requirement(reqId="DOI_SRV_040",reqName="Mise \u00e0 jour des m\u00e9tadonn\u00e9es 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") @Post public String createMetadata(org.restlet.representation.Representation entity) throws DoiServerException
entity
- Metadata representationDoiServerException
- - if the response is not a success
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
DoiMdsApplication.API_MDS.METADATA_VALIDATION
DoiMdsApplication.API_MDS.NETWORK_PROBLEM
@Requirement(reqId="DOI_INTER_070", reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") private void checkInputs(Object obj) throws DoiServerException
set
obj
- object to checkDoiServerException
- - DoiMdsApplication.API_MDS.METADATA_VALIDATION
@Requirement(reqId="DOI_INTER_060",reqName="V\u00e9rification du sch\u00e9ma de m\u00e9tadonn\u00e9es") @Requirement(reqId="DOI_INTER_070",reqName="V\u00e9rification des entr\u00e9es fournies pour DataCite") private Resource createDataCiteResourceObject(org.restlet.representation.Representation entity) throws JAXBException, SAXException, ValidationException
entity
- metadata representationJAXBException
- - if an error was encountered while creating the
JAXBContexSAXException
- - if a SAX error occurs during parsing.ValidationException
- - if metadata is not valid against the schema@Requirement(reqId="DOI_DOC_010", reqName="Documentation des interfaces") protected final void describePost(org.restlet.ext.wadl.MethodInfo info)
DoiMdsApplication.API_MDS.CREATE_METADATA
DoiMdsApplication.API_MDS.METADATA_VALIDATION
DoiMdsApplication.API_MDS.DATACITE_PROBLEM
DoiMdsApplication.API_MDS.NETWORK_PROBLEM
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
describePost
in class BaseMdsResource
info
- Wadl description for POST methodCopyright © 2017–2020 CNES. All rights reserved.