de.fau.cs.www8.jadeowlcodec
Class AssertionSet

java.lang.Object
  extended by de.fau.cs.www8.jadeowlcodec.AssertionSet

public class AssertionSet
extends java.lang.Object


Nested Class Summary
 class AssertionSet.IndividualRenderer
           
 
Constructor Summary
AssertionSet(KnowledgeBase agentKB, java.lang.String name)
           
AssertionSet(KnowledgeBase agentKB, Uri.Other uri)
           
 
Method Summary
 java.util.Map<GenericIndividual,java.util.Set<Uri.Role>> checkCompletenessAll()
          test all individuals for complying with MinProperties
 boolean containsIndividual(Uri.Individual key)
           
 java.util.Collection<GenericIndividual> getAllIndividuals()
           
 GenericIndividual getIndividual(Uri.Individual key)
           
protected  AssertionSet.IndividualRenderer getIndividualRenderer()
           
<T extends WrappedIndividual>
java.util.Collection<T>
getIndividualsOfType(java.lang.Class<T> wrapperClass)
           
 java.util.Set<Uri.Individual> getIndividualURIs()
           
 KnowledgeBase getKnowledgeBase()
           
 GenericIndividual getOrMakeIndividual(Uri.Individual rdfid)
           
 GenericIndividual getOrMakeIndividual(Uri.Individual rdfid, Uri.Concept owlClass)
          Gets an existing individual or creates new, updates direct classes if existing and registers if new
 java.util.Set<Uri.Concept> getUnkownClasses()
          test all individuals for direct classes which are not known to the agentKB it is suggested to call this on outgoing message AssertionSets in order to avoid an uncontrolled ResultSet type flood (this way to cope with ResultSets has been chosen because it allows to easily learn ResultSet into the TBox in case they are really needed)
 Uri.Other getURI()
           
 GenericIndividual removeIndividual(Uri.Individual key)
           
 java.util.Set<GenericIndividual> stripClasses(java.util.Set<Uri.Concept> classesToStrip)
          remove all type assertions for classesToStrip from all individuals
 ReasonerKBHandle tellIntoReasoner()
          tells current tbox version and individuals into a new reasonerkb usable for various checking etc
 java.lang.String toString()
           
 void writeOWL(GenericIndividual gi, java.io.Writer stream, int indentation)
           
 void writeOWL(java.io.Writer stream, int indentation)
           
 void writeTell(java.io.Writer stream, int indentation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssertionSet

public AssertionSet(KnowledgeBase agentKB,
                    java.lang.String name)

AssertionSet

public AssertionSet(KnowledgeBase agentKB,
                    Uri.Other uri)
Method Detail

getURI

public Uri.Other getURI()

writeTell

public void writeTell(java.io.Writer stream,
                      int indentation)
               throws java.io.IOException
Throws:
java.io.IOException

writeOWL

public void writeOWL(java.io.Writer stream,
                     int indentation)
              throws java.io.IOException
Throws:
java.io.IOException

writeOWL

public void writeOWL(GenericIndividual gi,
                     java.io.Writer stream,
                     int indentation)
              throws java.io.IOException
Throws:
java.io.IOException

getIndividualRenderer

protected AssertionSet.IndividualRenderer getIndividualRenderer()

containsIndividual

public boolean containsIndividual(Uri.Individual key)

removeIndividual

public GenericIndividual removeIndividual(Uri.Individual key)

getIndividual

public GenericIndividual getIndividual(Uri.Individual key)

getOrMakeIndividual

public GenericIndividual getOrMakeIndividual(Uri.Individual rdfid,
                                             Uri.Concept owlClass)
Gets an existing individual or creates new, updates direct classes if existing and registers if new

Parameters:
rdfid - a Uri.Individual
owlClass - a Uri.Concept
Returns:
an existing or newly created GenericIndividual

getOrMakeIndividual

public GenericIndividual getOrMakeIndividual(Uri.Individual rdfid)

tellIntoReasoner

public ReasonerKBHandle tellIntoReasoner()
tells current tbox version and individuals into a new reasonerkb usable for various checking etc


checkCompletenessAll

public java.util.Map<GenericIndividual,java.util.Set<Uri.Role>> checkCompletenessAll()
test all individuals for complying with MinProperties

Returns:
all uncomplete individuals or emptyList if everything is complete

getIndividualsOfType

public <T extends WrappedIndividual> java.util.Collection<T> getIndividualsOfType(java.lang.Class<T> wrapperClass)
Parameters:
wrapperClass - the wrapper type we want to find individuals for it would make more sense to ask reasoner for individuals of type, then wrap exactly those individuals (possibly with best class)
Returns:
a Collection T should be a WrappedIndividual

getKnowledgeBase

public KnowledgeBase getKnowledgeBase()

getIndividualURIs

public java.util.Set<Uri.Individual> getIndividualURIs()

getAllIndividuals

public java.util.Collection<GenericIndividual> getAllIndividuals()

getUnkownClasses

public java.util.Set<Uri.Concept> getUnkownClasses()
test all individuals for direct classes which are not known to the agentKB it is suggested to call this on outgoing message AssertionSets in order to avoid an uncontrolled ResultSet type flood (this way to cope with ResultSets has been chosen because it allows to easily learn ResultSet into the TBox in case they are really needed)

Returns:
a set of Uri.Concepts

stripClasses

public java.util.Set<GenericIndividual> stripClasses(java.util.Set<Uri.Concept> classesToStrip)
remove all type assertions for classesToStrip from all individuals

Parameters:
classesToStrip - the classes to remove (use getUnkownClasses to remove all unknown classes)
Returns:
a set of references to any changed individuals

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2007 Moritz Goeb, Bernhard Schiemann, Ulf Schreiber of Chair of Artificial Intelligence, University of Erlangen-Nuremberg