eu.scape_project.watch.domain
Class SourceAdaptor

java.lang.Object
  extended by thewebsemantic.binding.RdfBean<SourceAdaptor>
      extended by eu.scape_project.watch.domain.SourceAdaptor

public class SourceAdaptor
extends thewebsemantic.binding.RdfBean<SourceAdaptor>

A software unit that is able to collect specific information from a specific Source and has the capability to convert/adapt it into a representation that fits the internal data model of Watch.

Author:
Luis Faria

Constructor Summary
SourceAdaptor()
          Create a new empty source adaptor.
SourceAdaptor(String name, String version, Source source, Map<String,String> configuration)
          Create a new source adaptor.
 
Method Summary
static String createId(String name, String version)
          Create a unique Id based on the name and version.
 boolean equals(Object obj)
           
 Map<String,String> getConfiguration()
           
 String getId()
           
 String getName()
           
 Source getSource()
           
 String getVersion()
           
 int hashCode()
           
 void setConfiguration(Map<String,String> configuration)
           
 void setName(String name)
           
 void setSource(Source source)
           
 void setVersion(String version)
          Set version and update Id.
 
Methods inherited from class thewebsemantic.binding.RdfBean
asIndividual, delete, fill, fill, load, query, refresh, save
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceAdaptor

public SourceAdaptor()
Create a new empty source adaptor.


SourceAdaptor

public SourceAdaptor(String name,
                     String version,
                     Source source,
                     Map<String,String> configuration)
Create a new source adaptor.

Parameters:
name - A name that uniquely identifies the adaptor, regardless of the version.
version - The version of the adaptor, preferably in the 1.0.1 format.
source - The source from which this adaptor fetchs information from.
configuration - The source adaptor configuration
Method Detail

createId

public static String createId(String name,
                              String version)
Create a unique Id based on the name and version.

Parameters:
name - The SourceAdaptor name.
version - The SourceAdaptor version.
Returns:
The unique Id in the format 'example-v1.0.0'

getName

public String getName()

setName

public void setName(String name)

getId

public String getId()

getVersion

public String getVersion()

getConfiguration

public Map<String,String> getConfiguration()

setConfiguration

public void setConfiguration(Map<String,String> configuration)

setVersion

public void setVersion(String version)
Set version and update Id.

Parameters:
version - The version of the adaptor, preferably in the 1.0.1 format.

getSource

public Source getSource()

setSource

public void setSource(Source source)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.