You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Rupert Westenthaler (Created) (JIRA)" <ji...@apache.org> on 2012/02/09 09:47:00 UTC

[jira] [Created] (STANBOL-488) EnhancementProperties

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

        

[jira] [Commented] (STANBOL-488) EnhancementProperties

Posted by "Olivier Grisel (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206803#comment-13206803 ] 

Olivier Grisel commented on STANBOL-488:
----------------------------------------

Let me further motivate this separation. To me enhancementContext properties are technical transient contextual metadata of the enhancement process itself, not of the content under analysis (e.g. service credentials). They making them part of the contentParts would break this distinction and we would run the risk of having engines or other components (e.g. the ContentHub) expose or store such credentials as content element or content metadata which they are not.
                
> 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

        

[jira] [Commented] (STANBOL-488) EnhancementProperties

Posted by "Olivier Grisel (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206861#comment-13206861 ] 

Olivier Grisel commented on STANBOL-488:
----------------------------------------

I would rather prefer either option-1 or extending the EnhancementEngine API as I suggested previously. EnhancementContextManager.getContext(UriRef contentItemId) is problematic as the execution context should be identified by a job id and not a contentItemId (a content item might be analyzed several times by several clients and maybe even in parallel). I don't want to enforce a any kind on semantic constraints on the content item id that is releted to the fact that this content is under enhancement process.
                
> 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

        

[jira] [Commented] (STANBOL-488) EnhancementProperties

Posted by "Rupert Westenthaler (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (STANBOL-488) EnhancementProperties

Posted by "Rupert Westenthaler (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215690#comment-13215690 ] 

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

After some additional thoughts I think that the original proposal of Olivier is probably the best - because it is the simplest.

    boolean canEnhance(ContentItem ci, Map<String, Object> enhancementContext)
    void computeEnhancements(ContentItem ci, Map<String, Object> enhancementContext)

However I would still like to know how one can make the enhancementContext parameter optional.

                
> 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

        

[jira] [Commented] (STANBOL-488) EnhancementProperties

Posted by "Olivier Grisel (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STANBOL-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206802#comment-13206802 ] 

Olivier Grisel commented on STANBOL-488:
----------------------------------------

I would rather not make them part of the ContentItem API but would rather extend the EnhancementEngine API to have pass an enhancementContext that would host such properties:

boolean canEnhance(ContentItem ci, Map<String, Object> enhancementContext)
void computeEnhancements(ContentItem ci, Map<String, Object> enhancementContext)

We could make the enhancementContext context optional for engines that do not care about those parameters and presever backward compat.
                
> 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