ontea.sesame
Class Operations

java.lang.Object
  extended by ontea.sesame.Operations

public class Operations
extends java.lang.Object

Operations used to search or create individuals in sesame knowledge base

Author:
Michal Laclavik

Field Summary
private static org.apache.log4j.Logger log
           
(package private)  Memory mem
           
(package private)  org.openrdf.sesame.repository.SesameRepository rep
           
 
Constructor Summary
Operations(Memory _mem)
          Initialize sesame operation with sesame memory
 
Method Summary
 Individual createIndividual(java.util.Set<ResultOnto> ontoResS, java.lang.String individualName, java.lang.String ontClassURI)
          Creating of Sesame individual of defined type (ontClassURI) based on result set.
 java.util.Set<Result> searchIndividuals(Result result, java.lang.Boolean create)
          Search for individuals in the knowledgebase according to ontea.core.Result individual String and Result type (class)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log

mem

Memory mem

rep

org.openrdf.sesame.repository.SesameRepository rep
Constructor Detail

Operations

public Operations(Memory _mem)
Initialize sesame operation with sesame memory

Parameters:
_mem - sesame memory
Method Detail

searchIndividuals

public java.util.Set<Result> searchIndividuals(Result result,
                                               java.lang.Boolean create)
Search for individuals in the knowledgebase according to ontea.core.Result individual String and Result type (class)

Parameters:
result - result with text to be searched in knowledge base
create - if set to true and individual not found in knowledge base, it will also create an individual if result type is set
Returns:
set of found individuals

createIndividual

public Individual createIndividual(java.util.Set<ResultOnto> ontoResS,
                                   java.lang.String individualName,
                                   java.lang.String ontClassURI)
Creating of Sesame individual of defined type (ontClassURI) based on result set. Methods goes through set of results and search if they can be assigned to any individual's property If yes properties are assigned.

Parameters:
ontoResS - set of ontology results
individualName - name of new individual
ontClassURI - class of individual
Returns:
individual