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

All Known Subinterfaces:
ManagedSiteConfiguration, ReferencedSiteConfiguration

public interface SiteConfiguration

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

Author:
Rupert Westenthaler

Field Summary
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_PREFIX
          Key used for the configuration of prefixes used by Entities managed by this Site
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 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 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.
 Dictionary<String,Object> getConfiguration()
          The configuration as Dictionary (as used by OSGI)
 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[] getEntityPrefixes()
          Getter for the prefixes 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)
 

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

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

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

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

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

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.

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.

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.

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

getConfiguration

Dictionary<String,Object> getConfiguration()
The configuration as Dictionary (as used by OSGI)

Returns:
the configuration as Dictionary


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