org.apache.stanbol.entityhub.servicesapi.site
Interface SiteManager


public interface SiteManager


Method Summary
 QueryResultList<Representation> find(FieldQuery query)
          Searches for Entities based on the parsed query and returns representations including the selected fields and filtered values
 QueryResultList<Entity> findEntities(FieldQuery query)
          Returns the Entities that confirm to the parsed Query
 QueryResultList<String> findIds(FieldQuery query)
          Searches for Entities based on the parsed query and returns the ids.
 InputStream getContent(String entity, String contentType)
          Getter for the content of the entity
 Entity getEntity(String reference)
          Getter for the Entity referenced by the parsed ID.
 Site getSite(String id)
          Getter for the referenced site based on the id
 Collection<String> getSiteIds()
          Getter for the Id's of all active referenced sites
 Collection<Site> getSitesByEntityPrefix(String entityUri)
          Getter for Sites that manages entities with the given ID.
 boolean isReferred(String id)
          Returns if a site with the parsed id is referenced
 

Method Detail

isReferred

boolean isReferred(String id)
Returns if a site with the parsed id is referenced

Parameters:
baseUri - the base URI
Returns:
true if a site with the parsed ID is present. Otherwise false.

getSite

Site getSite(String id)
Getter for the referenced site based on the id

Parameters:
baseUri - the base URI of the referred Site
Returns:
the Site or null if no site is present for the parsed base ID.

getSitesByEntityPrefix

Collection<Site> getSitesByEntityPrefix(String entityUri)
Getter for Sites that manages entities with the given ID. A Site can define a list of prefixes of Entities ID it manages. This method can be used to retrieve all the Site that may be able to dereference the parsed entity id

Parameters:
entityUri - the ID of the entity
Returns:
A list of referenced sites that may manage the entity in question.

getEntity

Entity getEntity(String reference)
Getter for the Entity referenced by the parsed ID. This method will search all referenced sites

Parameters:
id - the id of the entity
Returns:
the Sign or null if not found

findEntities

QueryResultList<Entity> findEntities(FieldQuery query)
Returns the Entities that confirm to the parsed Query

Parameters:
query - the query
Returns:
the id's of Entities

find

QueryResultList<Representation> find(FieldQuery query)
Searches for Entities based on the parsed query and returns representations including the selected fields and filtered values

Parameters:
query - The query
Returns:
The representations including selected fields/values

findIds

QueryResultList<String> findIds(FieldQuery query)
Searches for Entities based on the parsed query and returns the ids.

Parameters:
query - The query
Returns:
the ids of the selected entities

getContent

InputStream getContent(String entity,
                       String contentType)
Getter for the content of the entity

Parameters:
entity - the id of the entity
contentType - the content type
Returns:
the content as InputStream or null if no entity with this ID is known by the Entityhub or no representation for the requested entity is available for the parsed content type

getSiteIds

Collection<String> getSiteIds()
Getter for the Id's of all active referenced sites

Returns:
Unmodifiable collections of the id#s of all referenced sites


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.