jdrew.oo.util
Class QueryTypes

java.lang.Object
  extended by jdrew.oo.util.QueryTypes

public class QueryTypes
extends java.lang.Object

This Class will implement all the methods required to Query the type information(Taxonomy) It makes use of the methods defined in the Types class and is used as an API for querying types. Possible Queries include: To note subsumesPlus implements the transitive closure over the type system, while subsumes is only direct subClasses or superClasses. subsumes(superClass, subClass) -> Returns true if the superClass is direct superClass of the subClass, false otherwise. subsumesPlus(superClass, subClass) -> Similar to subsumes except it is not only direct subClasses it is any subClass of the superClass in the type graph. subsumes(superClass, ?subClass) -> This will return all the direct subClasses of the superClass. subsumesPlus(superClass, ?subClass) -> This will return all the subClasses of the superClass not just direct subClasses. subsumes(?superClass,subClass) -> This will return all direct superClasses of the given subClass. subsumesPlus(?superClass,subClass) -> This will return all superClasses of the given subClasses subsumes(?superClass,?subClass) -> This will return all direct super Class and sub Class relations. subsuemsPlus(?superClass,?subClass) -> This will return all super Class and sub Class relations, not only direct relations. lub(Class1,Class2,Class3,etc) -> returns the Least Upper Bound of a set of classes glb(Class1,Class2,Class3,etc) -> returns the Greatest Upper Bound of a set of classes

Title: OO jDREW

Description: Reasoning Engine for the Semantic Web - Supporting OO RuleML 0.91

Copyright: Copyright (c) 2007

Version:
0.93
Author:
Ben Craig

Constructor Summary
QueryTypes()
           
 
Method Summary
 java.util.Vector findAllDirectSubClassesOfEverything()
          This method will find all the super classes in the current type system.
 java.util.Vector findAllDirectSuperClassesOfEverything()
          This method will find all the direct super class relations in the current type system.
 java.lang.String[] findAllSubClasses(java.lang.String classString)
          This method will find all the subClasses for a given class This method uses transitive closure and not direct subClass.
 java.util.Vector findAllSubClassesOfEverything()
          This method will find all the sub classes relations in the current type system.
 java.lang.String[] findAllSuperClasses(java.lang.String classString)
          This method will find all the super classes for a given class This method uses transitive closure and not direct superClass.
 java.util.Vector findAllSuperClassesOfEverything()
          This method will find all the super classes relations in the current type system.
 java.lang.String[] getDirectSubClasses(java.lang.String superClass)
          This method will find all the direct sub classes for a given class
 java.lang.String[] getDirectSuperClasses(java.lang.String subClass)
          This method will find all the direct super Classes for a given class
 java.lang.String greatestLowerBound(java.lang.String[] classes)
          This method will determine the greaterLowerBound of an Array of classes(Strings)
 boolean isDirectSubClass(java.lang.String subClass, java.lang.String superClass)
          This method will determine if a class is a subClass of another class during Querying This method uses transitive closure and not direct subClass.
 boolean isDirectSuperClass(java.lang.String superClass, java.lang.String subClass)
          This method will determine is a class is a super class of another class during Querying
 boolean isSubClass(java.lang.String subClass, java.lang.String superClass)
          This method will determine if a class is a subClass of another class during Querying This method uses transitive closure and not direct subClass.
 boolean isSuperClass(java.lang.String superClass, java.lang.String subClass)
          This method will determine is a class is a super class of another class during Querying This method uses transitive closure and not direct super Class.
 java.lang.String leastUpperBound(java.lang.String[] classes)
          This method will determine the least upper bound of an array of classes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryTypes

public QueryTypes()
Method Detail

isSubClass

public boolean isSubClass(java.lang.String subClass,
                          java.lang.String superClass)
                   throws EngineException
This method will determine if a class is a subClass of another class during Querying This method uses transitive closure and not direct subClass.

Parameters:
String - - subClass this is the class that we are going to test if it is a sub class of the super class
String - - superClass this is the class that is going to be tested if it is a super class of the sub class
Returns:
boolean - true if the subClass is a sub class of the super class, false otherwise
Throws:
EngineException

isSuperClass

public boolean isSuperClass(java.lang.String superClass,
                            java.lang.String subClass)
                     throws EngineException
This method will determine is a class is a super class of another class during Querying This method uses transitive closure and not direct super Class.

Parameters:
String - - superClass this is the class that is going to be tested if it is a super class of the sub class
String - - subClass this is the class that is going to be tested if it a sub class of the super class
Returns:
boolean - true if the superClass is a super class of the sub class, false otherwise
Throws:
EngineException

isDirectSubClass

public boolean isDirectSubClass(java.lang.String subClass,
                                java.lang.String superClass)
                         throws EngineException
This method will determine if a class is a subClass of another class during Querying This method uses transitive closure and not direct subClass.

Parameters:
String - - subClass this is the class that we are going to test if it is a sub class of the super class
String - - superClass this is the class that is going to be tested if it is a super class of the sub class
Returns:
boolean - true if the subClass is a sub class of the super class, false otherwise
Throws:
EngineException

isDirectSuperClass

public boolean isDirectSuperClass(java.lang.String superClass,
                                  java.lang.String subClass)
                           throws EngineException
This method will determine is a class is a super class of another class during Querying

Parameters:
String - - superClass this is the class that is going to be tested if it is a super class of the sub class
String - - subClass this is the class that is going to be tested if it a sub class of the super class
Returns:
boolean - true if the superClass is a super class of the sub class, false otherwise
Throws:
EngineException

greatestLowerBound

public java.lang.String greatestLowerBound(java.lang.String[] classes)
                                    throws EngineException
This method will determine the greaterLowerBound of an Array of classes(Strings)

Parameters:
String[] - classes - this array contains all the classes that the user wants to test the greater lower bound for
Returns:
String - The class that is the greatest lower bound of the array of given classes
Throws:
EngineException

leastUpperBound

public java.lang.String leastUpperBound(java.lang.String[] classes)
                                 throws EngineException
This method will determine the least upper bound of an array of classes

Parameters:
String[] - classes - this array contains all of the classes that the user wants to test the least upper bound for
Returns:
String - the class that is the least upper bound of the array of given classes
Throws:
EngineException

getDirectSubClasses

public java.lang.String[] getDirectSubClasses(java.lang.String superClass)
This method will find all the direct sub classes for a given class

Parameters:
String - classString - this String contains the class name that all the sub classes will be found for
Returns:
String[] - all the strings in an array that are subclasses of the given class

getDirectSuperClasses

public java.lang.String[] getDirectSuperClasses(java.lang.String subClass)
This method will find all the direct super Classes for a given class

Parameters:
String - classString - this String contains the class name that all the sub classes will be found for
Returns:
String[] - all the strings in an array that are subclasses of the given class

findAllSubClasses

public java.lang.String[] findAllSubClasses(java.lang.String classString)
                                     throws EngineException
This method will find all the subClasses for a given class This method uses transitive closure and not direct subClass.

Parameters:
String - classString - this String contains the class name that all the sub classes will be found for
Returns:
String[] - all the strings in an array that are subclasses of the given class
Throws:
EngineException

findAllSuperClasses

public java.lang.String[] findAllSuperClasses(java.lang.String classString)
                                       throws EngineException
This method will find all the super classes for a given class This method uses transitive closure and not direct superClass.

Parameters:
String - classString - this String contains the class name that all the super classes will be found for
Returns:
String[] - all the strings in an array that are super classes of the given class
Throws:
EngineException

findAllSuperClassesOfEverything

public java.util.Vector findAllSuperClassesOfEverything()
                                                 throws EngineException
This method will find all the super classes relations in the current type system. This method uses transitive closure and not direct superClass.

Returns:
Vector - the vector contains a set strings in the order of superClass, subClass pairs it should be a subsumes Object Vector(may be implemented later)
Throws:
EngineException

findAllSubClassesOfEverything

public java.util.Vector findAllSubClassesOfEverything()
                                               throws EngineException
This method will find all the sub classes relations in the current type system. This method uses transitive closure and not direct sub Class.

Returns:
Vector - the vector contains a set strings in the order of superClass, subClass pairs it should be a subsumes Object Vector(may be implemented later)
Throws:
EngineException

findAllDirectSuperClassesOfEverything

public java.util.Vector findAllDirectSuperClassesOfEverything()
                                                       throws EngineException
This method will find all the direct super class relations in the current type system.

Returns:
Vector - the vector contains a set strings in the order of superClass, subClass pairs it should be a subsumes Object Vector(may be implemented later)
Throws:
EngineException

findAllDirectSubClassesOfEverything

public java.util.Vector findAllDirectSubClassesOfEverything()
                                                     throws EngineException
This method will find all the super classes in the current type system.

Returns:
Vector - the vector contains a set strings in the order of superClass, subClass pairs it should be a subsumes Object Vector(may be implemented later)
Throws:
EngineException