org.activemath.webapp.tutor.cgWebService.RepositoryRegisterAPI
Class RepositoryRegistration

java.lang.Object
  extended by org.activemath.webapp.tutor.cgWebService.RepositoryRegisterAPI.RepositoryRegistration

public class RepositoryRegistration
extends Object

This class works like an interface for the registration of external repositories.


Method Summary
static RepositoryRegistration getInstance()
           
 String getMetadataOntologyURL()
          The URL of the metadata ontology used in the course generator.
 boolean isregistered(String bindingURL)
          Checks whether a repository with the given bindingURL is already registered.
 boolean registerRepository(String name, String bindingPort, String ontologyAdrURL, String mappingAdrURL, String testContentId)
          Registers a repository.
 boolean unregisterRepository(String bindingURL)
          Unregisters the repository identified by the bindingURL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RepositoryRegistration getInstance()

getMetadataOntologyURL

public String getMetadataOntologyURL()
The URL of the metadata ontology used in the course generator.

Returns:
the String of URL

registerRepository

public boolean registerRepository(String name,
                                  String bindingPort,
                                  String ontologyAdrURL,
                                  String mappingAdrURL,
                                  String testContentId)
Registers a repository. The repository will be validated with the given test contentId: It must have the demand interface for querying the data.

Parameters:
name - of the repository
bindingPort - (web service URL for accessing the repository)
ontologyAdrURL - (URL for addressing the ontology of the repository)
mappingAdrURL - (URL for addressing the mapping from local ontology to Ontology of Instructional Objects)
testContentId - (a contentId for a query test to check if the repository is valid)
Returns:
true if the repository is registered without any problem. Otherwise false.

unregisterRepository

public boolean unregisterRepository(String bindingURL)
Unregisters the repository identified by the bindingURL.

Parameters:
bindingURL -
Returns:
true if the repository is removed successfully. Otherwise false.

isregistered

public boolean isregistered(String bindingURL)
Checks whether a repository with the given bindingURL is already registered.

Parameters:
bindingURL -
Returns:
true if the repository is registered. Otherwise false.