@Services(value={@Service(value=java.lang.Object.class),@Service(value=ConceptProviderManager.class),@Service(value=GlobalMenuItemsProvider.class)}) @Property(name="javax.ws.rs", boolValue=true) public class SimpleConceptProviderManager extends Object implements ConceptProviderManager, GlobalMenuItemsProvider
Modifier and Type | Field and Description |
---|---|
protected ContentGraphProvider |
cgProvider |
Constructor and Description |
---|
SimpleConceptProviderManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context)
The activate method is called when SCR activates the component
configuration.
|
protected void |
deactivate(org.osgi.service.component.ComponentContext context) |
List<ConceptProvider> |
getConceptProviders()
Returns a list of
ConceptProvider s. |
Set<GlobalMenuItem> |
getMenuItems()
Returns a
Set of GlobalMenuItem S. |
GraphNode |
getProviderList(javax.ws.rs.core.UriInfo uriInfo)
Returns a GraphNode containing a list of
ConceptProvider s stored
in the content graph to be managed. |
javax.ws.rs.core.Response |
updateConceptProviders(List<String> types,
List<String> sparqlEndPoints,
List<String> defaultGraphs,
List<String> queryTemplates,
List<String> conceptSchemes)
Allows the list of
ConceptProvider s stored in the content graph
to be updated with the list POSTed via the URI sub-path
"update-concept-provider-list". |
@Reference protected ContentGraphProvider cgProvider
protected void activate(org.osgi.service.component.ComponentContext context) throws IOException, URISyntaxException
context
- IOException
URISyntaxException
protected void deactivate(org.osgi.service.component.ComponentContext context)
public GraphNode getProviderList(@Context javax.ws.rs.core.UriInfo uriInfo)
ConceptProvider
s stored
in the content graph to be managed. The order in the list represents
the priority of the providers.
This resource is accessible through a GET request on the URI sub-path
"edit-concept-provider-list".public javax.ws.rs.core.Response updateConceptProviders(List<String> types, List<String> sparqlEndPoints, List<String> defaultGraphs, List<String> queryTemplates, List<String> conceptSchemes)
ConceptProvider
s stored in the content graph
to be updated with the list POSTed via the URI sub-path
"update-concept-provider-list".
The order in the list represents the priority of the providers.types
- specify the type of each ConceptProvider: either a
LocalConceptProvider or a RemoteConceptProvider.sparqlEndPoints
- the SPARQL EndPoint to connect to in case of a RemoteConceptProvider.defaultGraphs
- the Graph to be queried in case of a RemoteConceptProvider.queryTemplates
- the template for the query to be used in case of a RemoteConceptProvider.conceptSchemes
- the concept scheme within which concepts are to be searched,
in case of a LocalConceptProvider.public List<ConceptProvider> getConceptProviders()
ConceptProviderManager
ConceptProvider
s. The list order determines
the priority of a ConceptProvider
. The meaning of the priority
is left to the implementation and application.getConceptProviders
in interface ConceptProviderManager
ConceptProvider
s.public Set<GlobalMenuItem> getMenuItems()
GlobalMenuItemsProvider
Set
of GlobalMenuItem
S. If there is
no GlobalMenuItem
available (e.g. the current user has not
the needed permissions) then the returned set is empty.getMenuItems
in interface GlobalMenuItemsProvider
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.