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


public interface SiteConfiguration

This interface defines the getter as well as the keys used to configure such properties when parsing an configuration for a ReferencedSite.

Author:
Rupert Westenthaler

Field Summary
static String ACCESS_URI
          Key used for the configuration of the AccessURI for a site
static String CACHE_ID
          The key used for the configuration of the id for the yard used as a cache for the data of a referenced Site.
static String CACHE_STRATEGY
          Key used for the configuration of the default expiration duration for entities and data for a site
static String DEFAULT_EXPIRE_DURATION
          Key used for the configuration of the default expiration duration for entities and data for a site
static String DEFAULT_MAPPING_STATE
          Key used for the configuration of the default EntityMapping state (MappingState for a site
static String DEFAULT_SYMBOL_STATE
          Key used for the configuration of the default ManagedEntityState for a site
static String DESCRIPTION
          The key to be used for the site description
static String ENTITY_DEREFERENCER_TYPE
          Key used for the configuration of the name of the dereferencer type to be used for this site
static String ENTITY_PREFIX
          Key used for the configuration of prefixes used by Entities managed by this Site
static String ENTITY_SEARCHER_TYPE
          Key used for the configuration of the type of the query
static String ID
          The key to be used for the site id
static String NAME
          The key to be used for the name of the site
static String QUERY_URI
          Key used for the configuration of the uri to access the query service of the site
static String SITE_ATTRIBUTION
          The attribution for the data provided by this referenced site
static String SITE_ATTRIBUTION_URL
          The URL to the attribution for the data provided by this referenced site
static String SITE_FIELD_MAPPINGS
          The key used to configure the FieldMappings for a Site.
static String SITE_LICENCE_NAME
          The key used to configure the name of License used by a referenced Site
static String SITE_LICENCE_TEXT
          The key used to configure the License of a referenced Site
static String SITE_LICENCE_URL
          The key used to configure the link to the License used by a referenced Site
 
Method Summary
 String getAccessUri()
          The URI used to access the Data of this Site.
 String getAttribution()
          The name the creator of the Work (representations in case of referenced sites) would like used when attributing re-use.
 String getAttributionUrl()
          The URL the creator of a Work (representations in case of referenced sites) would like used when attributing re-use.
 String getCacheId()
          The id of the Yard used to cache data of this referenced site.
 CacheStrategy getCacheStrategy()
          The cache strategy used by for this site to be used.
 long getDefaultExpireDuration()
          Return the duration in milliseconds or values <= 0 if mappings to entities of this Site do not expire.
 ManagedEntityState getDefaultManagedEntityState()
          The initial state if a Symbol is created for an entity managed by this site
 MappingState getDefaultMappedEntityState()
          The initial state for mappings of entities managed by this site
 String getDescription()
          Getter for the default short description of this site.
 String getEntityDereferencerType()
          The name of the EntityDereferencer to be used for accessing representations of entities managed by this Site
 String[] getEntityPrefixes()
          Getter for the prefixes of entities managed by this Site
 String getEntitySearcherType()
          The type of the EntitySearcher to be used to query for representations of entities managed by this Site.
 String[] getFieldMappings()
          Getter for the field mappings used for this site when importing entities to the Entityhub.
 String getId()
          Getter for the id of this site.
 License[] getLicenses()
          Getter for the the License(s) used for the data provided by this site.
 String getName()
          The preferred name of this site (if not present use the id)
 String getQueryUri()
          Getter for the queryUri of the site.
 

Field Detail

ID

static final String ID
The key to be used for the site id

See Also:
Constant Field Values

NAME

static final String NAME
The key to be used for the name of the site

See Also:
Constant Field Values

DESCRIPTION

static final String DESCRIPTION
The key to be used for the site description

See Also:
Constant Field Values

ACCESS_URI

static final String ACCESS_URI
Key used for the configuration of the AccessURI for a site

See Also:
Constant Field Values

ENTITY_DEREFERENCER_TYPE

static final String ENTITY_DEREFERENCER_TYPE
Key used for the configuration of the name of the dereferencer type to be used for this site

See Also:
Constant Field Values

QUERY_URI

static final String QUERY_URI
Key used for the configuration of the uri to access the query service of the site

See Also:
Constant Field Values

ENTITY_SEARCHER_TYPE

static final String ENTITY_SEARCHER_TYPE
Key used for the configuration of the type of the query

See Also:
Constant Field Values

DEFAULT_SYMBOL_STATE

static final String DEFAULT_SYMBOL_STATE
Key used for the configuration of the default ManagedEntityState for a site

See Also:
Constant Field Values

DEFAULT_MAPPING_STATE

static final String DEFAULT_MAPPING_STATE
Key used for the configuration of the default EntityMapping state (MappingState for a site

See Also:
Constant Field Values

DEFAULT_EXPIRE_DURATION

static final String DEFAULT_EXPIRE_DURATION
Key used for the configuration of the default expiration duration for entities and data for a site

See Also:
Constant Field Values

CACHE_STRATEGY

static final String CACHE_STRATEGY
Key used for the configuration of the default expiration duration for entities and data for a site

See Also:
Constant Field Values

CACHE_ID

static final String CACHE_ID
The key used for the configuration of the id for the yard used as a cache for the data of a referenced Site. This property is ignored if CacheStrategy.none is used.

See Also:
Constant Field Values

ENTITY_PREFIX

static final String ENTITY_PREFIX
Key used for the configuration of prefixes used by Entities managed by this Site

See Also:
Constant Field Values

SITE_FIELD_MAPPINGS

static final String SITE_FIELD_MAPPINGS
The key used to configure the FieldMappings for a Site. Note that values are parsed by using FieldMapping#parseFieldMapping(String)

See Also:
Constant Field Values

SITE_LICENCE_NAME

static final String SITE_LICENCE_NAME
The key used to configure the name of License used by a referenced Site

See Also:
Constant Field Values

SITE_LICENCE_TEXT

static final String SITE_LICENCE_TEXT
The key used to configure the License of a referenced Site

See Also:
Constant Field Values

SITE_LICENCE_URL

static final String SITE_LICENCE_URL
The key used to configure the link to the License used by a referenced Site

See Also:
Constant Field Values

SITE_ATTRIBUTION

static final String SITE_ATTRIBUTION
The attribution for the data provided by this referenced site

See Also:
Constant Field Values

SITE_ATTRIBUTION_URL

static final String SITE_ATTRIBUTION_URL
The URL to the attribution for the data provided by this referenced site

See Also:
Constant Field Values
Method Detail

getId

String getId()
Getter for the id of this site.

Returns:
The id of the Site

getName

String getName()
The preferred name of this site (if not present use the id)

Returns:
the name (or if not defined the id) of the site

getDescription

String getDescription()
Getter for the default short description of this site.

Returns:
The description or null if non is defined

getAccessUri

String getAccessUri()
The URI used to access the Data of this Site. This is usually a different URI as the ID of the site.

To give some Examples:

symbol.label: DBPedia
symbol.id: http://dbpedia.org
site.acessUri: http://dbpedia.org/resource/

symbol.label: Freebase
symbol.id: http://www.freebase.com
site.acessUri: http://rdf.freebase.com/

Returns:
the accessURI for the data of the referenced site

getEntityDereferencerType

String getEntityDereferencerType()
The name of the EntityDereferencer to be used for accessing representations of entities managed by this Site

Returns:
the id of the entity dereferencer implementation

getQueryUri

String getQueryUri()
Getter for the queryUri of the site.

Returns:
the uri to access the query service of this site

getEntitySearcherType

String getEntitySearcherType()
The type of the EntitySearcher to be used to query for representations of entities managed by this Site.

Returns:
the id of the entity searcher implementation.

getDefaultManagedEntityState

ManagedEntityState getDefaultManagedEntityState()
The initial state if a Symbol is created for an entity managed by this site

Returns:
the default state for new symbols

getDefaultMappedEntityState

MappingState getDefaultMappedEntityState()
The initial state for mappings of entities managed by this site

Returns:
the default state for mappings to entities of this site

getDefaultExpireDuration

long getDefaultExpireDuration()
Return the duration in milliseconds or values <= 0 if mappings to entities of this Site do not expire.

Returns:
the duration in milliseconds or values <=0 if not applicable.

getCacheStrategy

CacheStrategy getCacheStrategy()
The cache strategy used by for this site to be used.

Returns:
the cache strategy

getCacheId

String getCacheId()
The id of the Yard used to cache data of this referenced site.

Returns:
the id of the Yard used as a cache. May be null if CacheStrategy.none is configured for this yard

getEntityPrefixes

String[] getEntityPrefixes()
Getter for the prefixes of entities managed by this Site

Returns:
the entity prefixes. In case there are non an empty array is returned.

getFieldMappings

String[] getFieldMappings()
Getter for the field mappings used for this site when importing entities to the Entityhub.

Note that this field mappings are used in addition to the field mappings defined by the EntityhubConfiguration.

Returns:
the FieldMappings or null if none.

getLicenses

License[] getLicenses()
Getter for the the License(s) used for the data provided by this site. If multiple Liceneses are given it is assumed that any of them can be used.

Licenses are defined by the name (SITE_LICENCE_NAME), the text (SITE_LICENCE_TEXT) and the url (SITE_LICENCE_URL) to the page of the license. This three keys are combined to the License object.

It is recommended to use "cc:license" to link those licenses to the page.

Returns:
The name of the license

getAttribution

String getAttribution()
The name the creator of the Work (representations in case of referenced sites) would like used when attributing re-use. null if none is required by the license.

It is recommended to use "cc:attributionName" to represent this in RDF graphs

Returns:
the attribution name

getAttributionUrl

String getAttributionUrl()
The URL the creator of a Work (representations in case of referenced sites) would like used when attributing re-use. null if none is required by the license.

It is recommended to use "cc:attributionURL" to represent this in RDF graphs

Returns:
the link to the URL providing the full attribution


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