CMS Adapter
Following services are available for this endpoint:
Map RDF to repository
Description |
Allows clients to map specified RDF to the content repository. In the first step the RDF data is annotated according to
RDF Bridges loaded in the OSGI environment. Additional annotations provide selection of certain resources from RDF data and
creation/update of related content repository object. Either a raw RDF can be given in serializedGraph parameter
or URL of an external RDF data can given in url parameter. However, serializedGraph has a higher
priority.
|
Request |
POST /cmsadapter/map/rdf |
Parameters |
- @FormParam sessionKey: Interaction with the content repository is provided through the Session Key property. To be able to use the services below a session key
should be through the /cmsadapter/session resource.
- @FormParam serializedGraph: External RDF in application/rdf+xml format
- @FormParam url: URL of the external RDF data.
|
Produces |
HTTP 200 in case of successful execution.
HTTP 400 in case of sessionKey parameter or none of the serializedGraph and url parameters is not set
HTTP 500 in case of an expected exception occurs |
Example |
curl -i -X POST -d "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&url=http://www.externalrdf.data" http://localhost:8080/cmsadapter/map/rdf |
Description |
This is service does the same job with the previous one except that this service provides users to submit an RDF file from his local
file system. So it takes connection parameters as query parameters in the service URL.
|
Request |
POST /cmsadapter/map/rdf?repositoryURL={repositoryURL}&workspaceName={workspaceName}&username={username}&password={password}"&connectionType={connectionType} |
Parameters |
- @FormParam sessionKey: Interaction with the content repository is provided through the Session Key property. To be able to use the services below a session key
should be through the /cmsadapter/session resource.
- @FormDataParam rdfFile: Local RDF file to be submitted
- @FormDataParam rdfFileInfo: Information about submitted RDF file
|
Produces |
HTTP 200 in case of successful execution.
HTTP 400 when sessionKey parameter or an RDF file is not set
HTTP 500 in case of an expected exception occurs |
Example |
curl -i -X POST -F "rdfFile=@localRDFFile" "http://localhost:8080/cmsadapter/map/rdf?sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0" |
Map repository to RDF
Description |
This service allows clients to map content repository to RDF. In the first step, structure of the content repository is converted into an RDF.
For this process detailed documentation can be found in javadoc of RDFMapper interface.
There are two implementations of this interface for JCR and CMIS protocols respectively, JCRRDFMapper
and CMISRDFMapper.
At the end of first step, generated RDF contains only CMS Vocabulary annotations. Afterwards, additional assertions are added based on RDF
Bridges loaded in the OSGI environment.
|
Request |
POST /cmsadapter/map/cms |
Parameters |
- @FormParam sessionKey: Interaction with the content repository is provided through the Session Key property. To be able to use the services below a session key
should be through the /cmsadapter/session resource.
- @FormParam baseURI: Base URI for the RDF to be generated.
- @FormParam store: A boolean value indicating whether the generated will be stored persistently or not.
- @FormParam update: A boolean value indicating whether the generated will be added into an existing RDF having the
specified
baseURI . If there is no existing RDF a new one is created. Note that, this parameter is
considered only if store is set as true . If it is not set explicitly, its default value is
true .
|
Produces |
HTTP 200 together with the mapped RDF from content repository in application/rdf+xml format in case of successful execution
HTTP 400 when session key parameter is not set
HTTP 500 in case of an expected exception occurs | .
Example |
curl -i -X POST -d "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&baseURI=http://www.apache.org/stanbol/cms&store=true" http://localhost:8080/cmsadapter/map/cms |