You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Meric Taze (JIRA)" <ji...@apache.org> on 2012/10/17 13:00:03 UTC

[jira] [Created] (STANBOL-785) Change REST service consuming multipart data with the one taking ContentItem parameter directly

Meric Taze created STANBOL-785:
----------------------------------

             Summary: Change REST service consuming multipart data with the one taking ContentItem parameter directly
                 Key: STANBOL-785
                 URL: https://issues.apache.org/jira/browse/STANBOL-785
             Project: Stanbol
          Issue Type: Sub-task
          Components: Content Hub
            Reporter: Meric Taze


Since Multipart serialization of ContentItems accepts multipart form data, the existing service should be adapted so that it would take the ContentItem directly in the deserialized form. This service can be used in the following ways:

    a) Create ContentItem without any metadata or additional part

        curl -i -F "content=I live in Paris.;type=text/plain" \
              "http://localhost:8080/contenthub/contenthub/store"


    b) Create ContentItem with only metadata

        curl -i -F "metadata=@metadata.rdf;type=application/rdf+xml" \
                 -F "content=I live in Paris.;type=text/plain" \
              "http://localhost:8080/contenthub/contenthub/store"


    c) Create ContentItem with both metadata and addition content part

        curl -i -F "metadata=@metadata.rdf;type=application/rdf+xml" \
                 -F "content=@contentFile;type=text/plain" \
                 -F "additionalPart=@additionalPart.rdf;type=application/rdf+xml" \
              "http://localhost:8080/contenthub/contenthub/store"

    d) To specify a custom URI for the ContentItem to be created the "uri" parameter can be added as in the following curl command:

        curl -i -F "content=@contentFile;type=text/plain" \
                 -F "additionalPart=@additionalPart.rdf;type=application/rdf+xml" \
              "http://localhost:8080/contenthub/contenthub/store?uri=custom_contentitem_uri"    

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira