org.wsmo.datastore
Interface DataStore

All Known Subinterfaces:
WsmoRepository

public interface DataStore


Method Summary
 Set<Entity> load(Identifier id)
          Loads an Entity given its identifier
 Entity load(Identifier id, Class clazz)
          Loads an Entity given its identifier
 void remove(Identifier id)
          Remove all entities identified by the provided Identifier from the Datastore
 void remove(Identifier id, Class clazz)
          Remove an entity identified by its Identifier and class type from the Datastore.
 void save(Entity item)
          Store an Entity into datastore
 

Method Detail

load

Set<Entity> load(Identifier id)
Loads an Entity given its identifier

Parameters:
id - The ID of the Entity to Load
Returns:
all Entities corresponding to the povided ID (or null if not found). Note that if metamodelling is not used, e.g. the language subset is WSML-Core, then there will be only one entity with a given ID.
See Also:
Entity

load

Entity load(Identifier id,
            Class clazz)
Loads an Entity given its identifier

Parameters:
id - The ID of the Entity to Load
clazz - The type of the desired entity to be loaded
Returns:
the entity with the specified identifier and type or null if no such entity is found.
See Also:
Entity

save

void save(Entity item)
Store an Entity into datastore

Parameters:
item - The entity to Store

remove

void remove(Identifier id)
Remove all entities identified by the provided Identifier from the Datastore

Parameters:
id - The ID of the Entity(ies) to be removed

remove

void remove(Identifier id,
            Class clazz)
Remove an entity identified by its Identifier and class type from the Datastore. The class is the WSMO API interface that the entity implements (e.g. org.omwg.ontology.Concept, etc) and not a specific class implementating the WSMO API interface

Parameters:
id - The ID of the Entity to be removed


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.