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 (JIRA)" <ji...@apache.org> on 2011/02/12 10:34:57 UTC

[jira] Closed: (STANBOL-81) Add FieldQuery support to RESTful services of Entityhub

     [ https://issues.apache.org/jira/browse/STANBOL-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rupert Westenthaler closed STANBOL-81.
--------------------------------------

    Resolution: Fixed

see Revision 1070047

> Add FieldQuery support to RESTful services of Entityhub
> -------------------------------------------------------
>
>                 Key: STANBOL-81
>                 URL: https://issues.apache.org/jira/browse/STANBOL-81
>             Project: Stanbol
>          Issue Type: New Feature
>          Components: Entity Hub
>            Reporter: Rupert Westenthaler
>            Assignee: Rupert Westenthaler
>
> This allows to perform any kind of FieldQuery via the RESTful interfaces of the Entityhub.
> Affected Endpoints:
>  - /entityhub/sites : perform field queries on all referenced sites
>  - /entityhub/site/{siteId} : performs a field query on a specific referenced site
>  - /entityhub/symbol : performs a field query on the entities managed by the Entityhub
> Service definition:
>  POST -d "query={query}" {endpoint}/query
> where {query} is a JSON serialized FieldQuery
> Root Element Keys:
>  - selected: json array with the name of the fields selected by this query
>  - offset: the offset of the first result returned by this query
>  - limit: the maximum number of results returned
>  - constraints: json array holding all the constraints of the query
> Constraints (all types):
>  - field: the field to apply the constraint
>  - type: the type of the constraint. One of "reference", "value", "text" or "range"
> Reference Constraint:
>  - value: the URI of the value
> Value Constraint
>  - value: the value
>  - dataTypes: json array with the data types of the value (by default the dataType is defined by the type of the parsed value)
> Text Constraint:
>  - text: the text to search
>  - languages: json array with the languages to search (default is all languages)
>  - patternType: one of "wildcard", "regex" or "none" (default is "none")
>  - caseSensitive: boolean (default is "false")
> Range Constraint:
>  - lowerBound: The lower bound of the range (one of lower and upper bound MUST BE defined)
>  - upperBound: The upper bound of the range (one of lower and upper bound MUST BE defined)
>  - inclusive: used for both upper and lower bound (default is "false")
> Example:
> {
>     "selected": [
>         "http:\/\/www.w3.org\/2000\/01\/rdf-schema#label",
>         "http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#type",
>         "http:\/\/dbpedia.org\/ontology\/elevation",
>         "http:\/\/dbpedia.org\/ontology\/populationTotal"],
>     "offset": "0",
>     "limit": "3",
>     "constraints": [
>         {
>             "type": "reference",
>             "field": "http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#type",
>             "value": "http:\/\/dbpedia.org\/ontology\/Place",
>         },
>         {
>            "type": "text",
>            "languages": ["de"],
>            "patternType": "wildcard",
>            "text": "Frankf*",
>            "field": "http:\/\/www.w3.org\/2000\/01\/rdf-schema#label"
>         },
>         {
>             "type": "range",
>             "field": "http:\/\/dbpedia.org\/ontology\/populationTotal",
>             "lowerBound": 1000000,
>             "inclusive": true,
>         },
>     ],
> }

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira