de.fau.cs.www8.jadeowlcodec
Class GenericIndividual

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

public class GenericIndividual
extends java.lang.Object

Generic java representation of an individual. Does not contain any schema checks or restrictions at all

Author:
Ulf Schreiber

Constructor Summary
GenericIndividual(AssertionSet assertionSet, Uri.Individual newRdfID)
           
GenericIndividual(AssertionSet assertionSet, Uri.Individual newRdfID, java.util.Set<Uri.Concept> clss)
          Create a new individual rdfID
GenericIndividual(AssertionSet assertionSet, Uri.Individual newRdfID, Uri.Concept cls)
           
 
Method Summary
 void addDirectClass(OWLClassDescription cls)
           
 void addDirectClass(Uri.Concept cls)
           
 void addPropertyValue(Uri.Role key, java.lang.Object val)
           
<T extends WrappedIndividual>
T
as(java.lang.Class<T> wrapperClass)
           
 boolean canHaveProperty(Uri.Role key, ReasonerKBHandle tempkb)
          expensive complete test, used for explicit checking, expects a reasoner kb containing the whole current state
 java.util.Set<Uri.Role> checkMincardinalities(ReasonerKBHandle inTempKb)
           
 boolean copyToOtherAssertionSet(AssertionSet newAset, ASetUpdater updater)
           
 java.util.Set<Uri.Role> getAssertedPropertyNames()
           
 AssertionSet getAssertionSet()
           
 java.util.Set<Uri.Concept> getDirectClasses()
           
 java.util.Set<OWLClassDescription> getDirectClassOWLDescriptions()
           
<T> java.util.Collection<T>
getDirectDatatypePropertyAndSubpropertyValues(Uri.Role propuri, java.lang.Class<T> cls)
           
 java.util.Collection<java.lang.Object> getDirectPropertyValueCollection(Uri.Role key)
          lowest level access to the properties
 java.util.Map<Uri.Role,java.util.Set<java.lang.Object>> getProperties()
           
<T> java.util.Collection<T>
getPropertyValuesByInference(Uri.Role propuri, java.lang.Class<T> cls)
          ask the reasoner for property fillers (unless the property is a datatype property, in which case internal handling can be better than reasoner -
 Uri.Individual getRdfID()
           
 KnowledgeBase getTBox()
           
 boolean incompleteCanHaveProperty(Uri.Role key)
          this is not complete and only sufficient for a warning even if it was complete it would only be worth a warning because OWA allows any property that does not lead to known membership in disjoint classes
 boolean isClass(Uri.Concept cls, boolean transitive)
          check for class membership
 boolean removePropertyValue(Uri.Role propuri, java.lang.Object o)
           
 void setRdfID(Uri.Individual rdfID)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericIndividual

public GenericIndividual(AssertionSet assertionSet,
                         Uri.Individual newRdfID,
                         Uri.Concept cls)

GenericIndividual

public GenericIndividual(AssertionSet assertionSet,
                         Uri.Individual newRdfID)

GenericIndividual

public GenericIndividual(AssertionSet assertionSet,
                         Uri.Individual newRdfID,
                         java.util.Set<Uri.Concept> clss)
Create a new individual rdfID

Parameters:
assertionSet - an AssertionSet
clss - a set of Uri.Concept direct class of this individual, defaulst to owl:thing if null
newRdfID - a Uri.Individual if this is null the individual will get a new unique id inside the namespace of tBox
Method Detail

copyToOtherAssertionSet

public boolean copyToOtherAssertionSet(AssertionSet newAset,
                                       ASetUpdater updater)

getAssertedPropertyNames

public java.util.Set<Uri.Role> getAssertedPropertyNames()

getDirectPropertyValueCollection

public java.util.Collection<java.lang.Object> getDirectPropertyValueCollection(Uri.Role key)
lowest level access to the properties

Parameters:
key - an Uri.Role
Returns:
a Collection which contains the property values

getDirectDatatypePropertyAndSubpropertyValues

public <T> java.util.Collection<T> getDirectDatatypePropertyAndSubpropertyValues(Uri.Role propuri,
                                                                                 java.lang.Class<T> cls)

getPropertyValuesByInference

public <T> java.util.Collection<T> getPropertyValuesByInference(Uri.Role propuri,
                                                                java.lang.Class<T> cls)
ask the reasoner for property fillers (unless the property is a datatype property, in which case internal handling can be better than reasoner -

Parameters:
propuri - a Uri.Role
cls - a Class
Returns:
a Collection of property values computed via inference
To do:
FIXME: what with owl:sameAs inference? since i can't find any support for equivalents-querying indDIG (maybe with asking for an unnamed nominals-class?)

incompleteCanHaveProperty

public boolean incompleteCanHaveProperty(Uri.Role key)
this is not complete and only sufficient for a warning even if it was complete it would only be worth a warning because OWA allows any property that does not lead to known membership in disjoint classes

Parameters:
key - a Uri.Role
Returns:
boolean that the property is "allowed"

canHaveProperty

public boolean canHaveProperty(Uri.Role key,
                               ReasonerKBHandle tempkb)
expensive complete test, used for explicit checking, expects a reasoner kb containing the whole current state

Parameters:
key - a Uri.Role
tempkb - a ReasonerKBHandle includes a reasoner kb containing the whole current state
Returns:
a boolean that indicates if the property is "allowed"

checkMincardinalities

public java.util.Set<Uri.Role> checkMincardinalities(ReasonerKBHandle inTempKb)
Parameters:
inTempKb - a ReasonerKBHandle
Returns:
properties that are not completely filled. note that the result can be misleading if a minCardinality exists of which the class of individuals for which the minCardinality applies is itself depending upon another minCardinality

addPropertyValue

public void addPropertyValue(Uri.Role key,
                             java.lang.Object val)

getRdfID

public Uri.Individual getRdfID()
Returns:
the RDF ID of this individual, sameas are imitated with multiple instances of GenericIndividual

getDirectClasses

public java.util.Set<Uri.Concept> getDirectClasses()
Returns:
Returns the direct classes.

getDirectClassOWLDescriptions

public java.util.Set<OWLClassDescription> getDirectClassOWLDescriptions()

addDirectClass

public void addDirectClass(OWLClassDescription cls)

addDirectClass

public void addDirectClass(Uri.Concept cls)

isClass

public boolean isClass(Uri.Concept cls,
                       boolean transitive)
check for class membership

Parameters:
cls - class URI
transitive - check only direct (declared) classes if false

getTBox

public KnowledgeBase getTBox()
Returns:
Returns the this.assertionSet.getKnowledgeBase().

setRdfID

public void setRdfID(Uri.Individual rdfID)
Parameters:
rdfID - The rdfID to set.

as

public <T extends WrappedIndividual> T as(java.lang.Class<T> wrapperClass)

removePropertyValue

public boolean removePropertyValue(Uri.Role propuri,
                                   java.lang.Object o)
Parameters:
propuri -
o -
Returns:
true if o has been removed from propuri or one of it's subproperties

toString

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

getAssertionSet

public AssertionSet getAssertionSet()

getProperties

public java.util.Map<Uri.Role,java.util.Set<java.lang.Object>> getProperties()
Returns:
the properties


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