org.omwg.mediation.mappingstore.store
Interface MappingStore

All Known Implementing Classes:
MappingStoreImpl

public interface MappingStore

MappingStore is a component that allows storage/retrieval of Mapping objects. There could be multiple implementation classes for this interface, e.g. File-based, Database, Full-text. A MappingStore object could be obtained from StorageFactory.


Method Summary
 Mapping loadMapping(MappingID id)
          Loads a mapping through its identifier
 void removeMapping(MappingID mapping)
          Removes a mapping specified by its identifier.
 java.util.Iterator searchByKeywords(java.util.List keywords)
          Searches for all mappings with the given keywords in their descriptions
 java.util.Iterator searchByName(java.lang.String name)
          Searches for an ontology mapping with given name
 java.util.Iterator searchByRestriction(MappingRestriction mappingRestriction)
          Searches for ontology mappings in respect to given composite restriction .
 java.util.Iterator searchBySourceOntology(java.lang.String sourceOntURI)
          Searches for ontology mappings with specified source ontology
 java.util.Iterator searchByTargetOntology(java.lang.String targetOntURI)
          Searches for ontology mappings with specified target ontology
 java.util.Iterator searchByVersion(Version v)
          Searches for an ontology mapping by its version
 MappingID storeMapping(Mapping mapping)
          Stores a mapping and returns new created mapping identifier
 

Method Detail

searchByVersion

public java.util.Iterator searchByVersion(Version v)
Searches for an ontology mapping by its version

Parameters:
v - given version
Returns:
Iterator on MappingIDs

searchByName

public java.util.Iterator searchByName(java.lang.String name)
Searches for an ontology mapping with given name

Parameters:
name - given name of mapping
Returns:
Iterator on MappingIDs

searchByKeywords

public java.util.Iterator searchByKeywords(java.util.List keywords)
Searches for all mappings with the given keywords in their descriptions

Parameters:
keywords - list of strings representing given keywords
Returns:
Iterator on MappingIDs

searchBySourceOntology

public java.util.Iterator searchBySourceOntology(java.lang.String sourceOntURI)
Searches for ontology mappings with specified source ontology

Parameters:
sourceOntURI - given ontology identifier
Returns:
Iterator on MappingIDs

searchByTargetOntology

public java.util.Iterator searchByTargetOntology(java.lang.String targetOntURI)
Searches for ontology mappings with specified target ontology

Parameters:
targetOntURI - given ontology identifier
Returns:
Iterator on MappingIDs

searchByRestriction

public java.util.Iterator searchByRestriction(MappingRestriction mappingRestriction)
Searches for ontology mappings in respect to given composite restriction . It searches for AND-combination of the Restrictions by versions, descriptions, referencedPatterns, source and target ontologies.

Parameters:
mappingRestriction - given restrictions on mapping fields
Returns:
Iterator on MappingIDs

storeMapping

public MappingID storeMapping(Mapping mapping)
Stores a mapping and returns new created mapping identifier

Parameters:
mapping - given mapping
Returns:
Generated mapping identifier

loadMapping

public Mapping loadMapping(MappingID id)
Loads a mapping through its identifier

Parameters:
id - the identifier of mapping
Returns:
Mapping with the given identifier or null if such doesn't exist

removeMapping

public void removeMapping(MappingID mapping)
Removes a mapping specified by its identifier.

Parameters:
mapping - the identifier of mapping