You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Suat Gonul (JIRA)" <ji...@apache.org> on 2012/12/13 16:14:13 UTC

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

    [ https://issues.apache.org/jira/browse/STANBOL-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531076#comment-13531076 ] 

Suat Gonul edited comment on STANBOL-785 at 12/13/12 3:12 PM:
--------------------------------------------------------------

Fixed as of the revision #1414032. Contenthub is now able to use the multipart serialization of ContentItem. See the documentations for this feature:

-http://incubator.apache.org/stanbol/docs/trunk/components/enhancer/contentitem.html#multipart_mime_serialization
-http://incubator.apache.org/stanbol/docs/trunk/components/enhancer/enhancerrest.html
                
      was (Author: suat.gonul):
    Fixed as of the revision #1414032. Contenthub is now able to use the multipart serialization of Contenthub.
                  
> 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: Contenthub
>            Reporter: Meric Taze
>             Fix For: contenthub-0.10.0
>
>
> 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"
> Side note: When a content item is created in the Contenthub, it is first enhanced through the Enhancer using the specified engine chain. However, if there is already a "metadata" part within the parsed ContentItem, it is not re-enhanced again.

--
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