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

Rupert Westenthaler commented on STANBOL-488:
---------------------------------------------

But this would basically also be true for the ExecutionMetadata (STANBOL-475) 
currently also stored as part of the ContentItem. I have always seen the 
"ContentItem" as the object that represents the state of the EnhancementProcess 
including  (1) content (2) enhancement and (3) technical metadata of the 
enhancement process itself.

Maybe this is not a good assumption and we should clearly separate (1+2) with 
(3). This issue and STANBOL-475 have an implicit assumption that using 
ContentParts of type (2) as described by [1] are sufficient. But I agree that 
this assumption is maybe not a valid one because (3) are not really in the same 
category as "intermediate enhancement results shared in-between engines".


IMHO for a real separation of (1+2) and (3) I think we would need to introduce

* option-1: an additional domain object - EnhancementJob - that allows access 
to the ContentItem and contextual information such as ExecutionMetadata and 
EnhancementProperties
* option-2: add an EnhancementContext Service that can be looked up by 
EnhancementEngines. It could be used to provide the context based on the ID of 
the contentItem EnhancementContextManager.getContext(UriRef contentItemId) : 
EnhancementContext.

In both cases the EnhancementJob/Context would come preconfigured with the 
Enhancer/EnhancementChain defaults but might get overridden/extended with 
parameters parsed for an Request.

In order to complete the implementation of STANBOL-481 and STANBOL-414 I would 
like to keep the suggested design as a local feature of the 
stanbol.enhancer.jersey module and create an own issue on how to deal with that.

WDYT
Rupert

[1] 
http://stanbol.staging.apache.org/stanbol/docs/trunk/enhancer/contentitem.html#contentparts
                
> EnhancementProperties
> ---------------------
>
>                 Key: STANBOL-488
>                 URL: https://issues.apache.org/jira/browse/STANBOL-488
>             Project: Stanbol
>          Issue Type: New Feature
>          Components: Enhancer
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> Enhancement Properties represent a "Map<String,Object>" that can be used to 
> add properties to an Enhancement Request.
> EnhancementProperties are a simple way to share information within an 
> EnhancementRequest. Intended Usage include:
> * Users may parse special properties that can be accessed by all components 
> of the EnhancementProcess (e.g. user.name user.pwd for external services)
> * To share parameters parsed as Query Parameters such as defined by 
> STANBOL-481
> Implementation:
> (1) Store EnhancementProperties as ContentPart with the URI 
> "urn:apache.org:stanbol.web:enhancement.properties"
> (2) Provide an EnhancementPropertiesHelper with helper methods
> (3) Optionally extend the ContentItem interface with a method to get the 
> EnhancementPrpoerties
>     + getEnhancementProperties() : Map<String,Object>
> This Issue will initially cover (1) and (2). (3) needs to be discussed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to