OWLModel.java revision 2
/*
* Created on Dec 16, 2004
*/
/**
* An abstract view for querying a KnowledgeBase or a single ontology.
*
* @author Evren Sirin
*/
public interface OWLModel {
/**
* Return the implementation specific object for this model.
*
* @return
*/
public Object getImplementation();
/**
* Refresh the data in this model from the original source.
*/
public void refresh();
/**
* Check if the model is consistent or not. This functions will simply return true if
* there is no reasoner attached or the reasoner used does not support consistency check.
*
* @return
*/
public boolean isConsistent();
/**
* Prepare the reasoner associated with this model.
*/
public void prepare();
/**
* Tell the reasoner to compute the subclass relations between all the named classes and find
* the instances of each class. The results will be cached and subsequent calls to queyr the
* model will use the cache. This call has no effect if reasoner does not support
* classification.
*/
public void classify();
/**
* Returns true if the model is classifed.
*/
public boolean isClassified();
/**
* Set the reasoner of this model using a reasner name. See OWLFactory.getReasoners() for
* available reasoner names.
*
* <p>For Jena based implementation available reasoner names are:
* <ul>
* <li>RDFS</li>
* <li>RDFS-Simple</li>
* <li>Transitive</li>
* <li>OWL</li>
* <li>OWL-Mini</li>
* <li>OWL-Micro</li>
* <li>DIG</li>
* <li>Pellet</li>
* </ul>
* </p>
* @param reasonerName
*/
/**
* Set the reasoner using an implementation specific reasoner object. The exact type of the
* parameter is different for Jena and OWL-API.
*
* @param reasoner
*/
/**
* @return
*/
public Object getReasoner();
// /**
// * answer all the queries may be too expensive especially when the KB is being changed
// * frequently. Using this function, attached reasoner can be disabled and enabled back when
// * needed.
// *
// * @param enabled
// * @return
// */
// public void enableReasoner( boolean enabled );
/**
* The ontology where the changes will go. If this model represents an OWLOntology object
* then it is the same ontology, if th emodel represents a OWLKnowledgeBase then it is the
* base ontology of the KB.
*
* @return
*/
public OWLOntology getBaseOntology();
// /**
// * @return
// */
// public OWLSObjListFactory getListFactory();
//
// /**
// * @param vocabulary
// * @return
// */
// public OWLSObjListFactory getListFactory(ListVocabulary vocabulary);
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
*
* @param uri
* @return
*/
/**
* @param c
* @return
*/
/**
* @param c
* @param uri
* @return
*/
/**
* @param value
* @return
*/
/**
* @param value
* @param language
* @return
*/
/**
* @param value
* @param datatypeURI
* @return
*/
/**
* @param value
* @return
*/
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
public OWLIndividualList getIndividuals();
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
* @param uri
* @return
*/
/**
* Set the value for the given data property to the given plain literal
* value (no language identifier). All the existing data values (that has
* no language identifier) will be removed.
*
* @param propURI
* @param value
*/
/**
* @param ind
* @param prop
* @param value
*/
/**
* Set the value for the given data property. All the existing data values
* (that has the same language identifier with the given value) will be removed.
*
* @param propURI
* @param value
*/
/**
* @param ind
* @param prop
* @param value
*/
/**
* Set the value for the given data property to the given literal by
* determining the RDF datatype from Java class. This function is
* equivalent to <code>setProperty(prop, OWLFactory.createDataValue(value))</code>.
*
* @param prop
* @param value
*/
/**
* @param ind
* @param prop
* @param value
*/
/**
* @param ind
* @param prop
* @param value
*/
/**
* @param ind
* @param prop
*/
/**
* Removes the specified triple from the Model.
* @param theInd OWLIndividual
* @param theProp OWLProperty
* @param theValue OWLValue
*/
/**
* @param ind
* @param prop
* @param value
*/
/**
* @param ind
* @param prop
* @param value
*/
/**
* @param ind
* @param c
*/
/**
* @param ind
*/
/**
* Returns true if c is an enumerated class (defined with owl:oneOf)
*
* @param c
* @return
*/
public boolean isEnumerated(OWLClass c);
/**
* Returns the enumeration for the class (the list of individuals declared in the
* owl:oneOf list).
*
* @param c
* @return List of individuals or null if the class is not enumerated
*/
/**
* Check if one class is subclass of another
*
* @param c1
* @param c2
* @return
*/
/**
* Check if one datatype is subtype of another
*
* @param uri1
* @param uri2
* @return
*/
/**
* @param t1
* @param t2
* @return
*/
/**
* Check if one type is subsumed by another
*
* @param uri1
* @param uri2
* @return
*/
/**
* @param t1
* @param t2
* @return
*/
/**
* @param t1
* @param t2
* @return
*/
/**
* @param t1
* @param t2
* @return
*/
/**
* Check if two classes are disjoint. Returns true if there can possibly be no
* individual that may belong ot both classes.
*
* @param uri1
* @param uri2
* @return
*/
/**
* @param c1
* @param c2
* @return
*/
/**
* Get all the subclasses of the given class
*
* @param uri
* @return
*/
/**
* @param c
* @return
*/
/**
* Get all the (direct) subclasses of the given class
*
* @param c
* @param direct
* @return
*/
/**
* Get all the superclasses of the given class
*
* @param c
* @return
*/
/**
* Get all the (direct) subclasses of the given class
*
* @param c
* @param direct
* @return
*/
/**
* @param c
* @return
*/
/**
* @param p
* @return
*/
/**
* @param p
* @return
*/
/**
* @param p
* @return
*/
/**
* @param c
* @return
*/
/**
* @param ind
* @param c
* @return
*/
/**
* @param ind
* @return
*/
/**
* @param ind
* @return
*/
/**
* @param ind
* @param prop
* @return
*/
/**
* @param ind
* @param prop
* @return
*/
/**
* @param ind
* @return
*/
/**
* @param ind
* @param prop
* @return
*/
/**
* @param ind
* @param prop
* @param lang
* @return
*/
/**
* @param ind
* @param prop
* @return
*/
/**
* @param prop
* @param ind
* @return
*/
/**
* @param prop
* @param ind
* @return
*/
/**
* @param prop
* @param value
* @return
*/
/**
* @param prop
* @param value
* @return
*/
/**
* @param ind
* @param prop
* @return
*/
/**
* @param ind
* @param prop
* @param value
* @return
*/
/**
* Apply the given set of (ground) atoms to the model. Simply adds new assertions to the
* model.
*
* @param atoms
* @throws UnboundVariableException
*/
/**
* Similar to apply but simply skips the nonground atoms instead of throwing an
* exception.
*
* @param atoms
*/
/**
* Check if the conjunction of given atoms is entailed by the model.
*
* @param expr
* @return
*/
/**
* Check if the condition is true in this model. The condition is transformed into an
* <code>ABoxQuery</code> and then it is checked if the conjunction of atoms in the
* query is entailed by the model. This is equivalent to the call
* <code>isTrue( condition.getBody().toQuery() ).</code>
*
* @param expr
* @return
*/
/**
* Apply the given binding to the condition, thus grounding some of the variables,
* and then check if this condition is true in this model.
*
* @param expr
* @return
*/
/**
* Answer the given ABoxQuery and return a List of ValueMap's that contains the
* bindings for the result variables of the query. An empty list of answers
* indicates there are no answers for the query. If the query is ground, i.e.
* no variables in the body, then the returned list contains a single empty
* ValueMap object if the atoms in the query are entailed (again an empty list
* in case of failure)
*
* @param query
* @return
*/
/**
* Answer the given ABoxQuery passing in an initial binding of some of the variables
* in the query. This function returns a List of ValueMap's that contains the
* bindings for the result variables of the query. An empty list of answers
* indicates there are no answers for the query. If the query is ground, i.e.
* no variables in the body, then the returned list contains a single empty
* ValueMap object if the atoms in the query are entailed (again an empty list
* in case of failure)
*
* @param query
* @param values
* @return
*/
/**
*
* @param query
* @return
*/
/**
* Checks if this implementation supports locking for concurrent access;
*
* @return
*/
public boolean isLockSupported();
/**
* Lock the model for read operations. Multiple read operations are allowed for the same
* model. When the model is locked for reading no operation that would modify the model
* should be called. Throws an error if the model does not support concurrency, i.e.
* isLockSupported function returns false.
*
* @throws LockNotSupportedException
*/
public void lockForRead() throws LockNotSupportedException;
/**
* Lock the model for write operations. No other thread can access the model while there is
* a write lock. Throws an error if the model does not support concurrency, i.e.
* isLockSupported function returns false.
*
* @throws LockNotSupportedException
*/
public void lockForWrite() throws LockNotSupportedException;
/**
* Releases the lock form the matching lockForXXX function.
*/
public void releaseLock() throws LockNotSupportedException;
public List getServices();
public List getProfiles();
public List getProcesses();
public AnyOrder createAnyOrder();
public AtomicProcess createAtomicProcess();
public Choice createChoice();
public CompositeProcess createCompositeProcess();
public Condition createSWRLCondition();
public Expression createSWRLExpression();
public ForEach createForEach();
public Grounding createGrounding();
public IfThenElse createIfThenElse();
public Input createInput();
public InputBinding createInputBinding();
public Local createLocal();
public MessageMap createWSDLInputMessageMap();
public MessageMap createWSDLOutputMessageMap();
public MessageMap createUPnPMessageMap();
public Output createOutput();
public OutputBinding createOutputBinding();
public Perform createPerform();
public Produce createProduce();
public Profile createProfile();
public RepeatUntil createRepeatUntil();
public RepeatWhile createRepeatWhile();
public Result createResult();
public Sequence createSequence();
public Service createService();
public ServiceParameter createServiceParameter();
public Split createSplit();
public SplitJoin createSplitJoin();
//added 15.4.2005 by Michael Daenzer for Java-Grounding
public JavaAtomicGrounding createJavaAtomicGrounding();
public Grounding createJavaGrounding();
// end added
public UPnPAtomicGrounding createUPnPAtomicGrounding();
public ValueOf createValueOf();
public WSDLAtomicGrounding createWSDLAtomicGrounding();
public WSDLOperationRef createWSDLOperationRef();
public OWLSObjList createList();
/**
* @param literal
* @return
*/
/**
* Return true if given two individuals are same as each other as dictated by the
* semantics of owl:sameAs.
*
* @param ind1
* @param ind2
* @return
*/
/**
* Return true if given two individuals are different from each other as
* dictated by the semantics of owl:differentFrom.
*
* @param ind1
* @param ind2
* @return
*/
}