Protégé-OWL 3.3.1

edu.stanford.smi.protegex.owl.swrl.util
Class SWRLOWLUtil

java.lang.Object
  extended by edu.stanford.smi.protegex.owl.swrl.util.SWRLOWLUtil

public class SWRLOWLUtil
extends Object

Class that wraps some common Protege-OWL API methods and throws meaningful exceptions when errors are encountered. Covers only a small number of basic method at the moment.


Constructor Summary
SWRLOWLUtil()
           
 
Method Summary
static void addPropertyValue(OWLModel owlModel, OWLIndividual individual, String propertyName, Object propertyValue)
           
static OWLIndividual createIndividualOfClass(OWLModel owlModel, OWLNamedClass cls)
           
static OWLIndividual createIndividualOfClass(OWLModel owlModel, OWLNamedClass cls, String individualName)
           
static OWLIndividual createIndividualOfClass(OWLModel owlModel, String className)
           
static OWLIndividual createIndividualOfClass(OWLModel owlModel, String className, String individualName)
           
static JenaOWLModel createJenaOWLModel()
           
static JenaOWLModel createJenaOWLModel(String owlFileName)
           
static String createNewResourceName(OWLModel owlModel, String prefix)
           
static Set<OWLIndividual> getAllIndividuals(OWLModel owlModel)
           
static OWLNamedClass getClass(OWLModel owlModel, String className)
           
static OWLNamedClass getClass(OWLModel owlModel, String className, boolean mustExist)
           
static Set<OWLNamedClass> getClassesOfIndividual(OWLModel owlModel, OWLIndividual individual)
           
static Set<OWLNamedClass> getClassesOfIndividual(OWLModel owlModel, String individualName)
           
static Set<OWLNamedClass> getClassesOfIndividual(OWLModel owlModel, String individualName, boolean mustExist)
           
static OWLDatatypeProperty getDatatypeProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static Object getDatavaluedPropertyValue(OWLModel owlModel, OWLIndividual individual, OWLProperty property, boolean mustExist)
           
static Object getDatavaluedPropertyValue(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel, OWLIndividual individual, OWLProperty property, boolean mustExist)
           
static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel, String individualName, String propertyName)
           
static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel, String individualName, String propertyName, boolean mustExist)
           
static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel, OWLIndividual individual, OWLProperty property, boolean mustExist)
           
static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel, OWLIndividual individual, String propertyName)
           
static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel, String individualName, String propertyName)
           
static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel, OWLIndividual individual, String propertyName)
           
static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel, String individualName, String propertyName)
           
static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel, String individualName, String propertyName, boolean mustExist)
           
static long getDatavaluedPropertyValueAsLong(OWLModel owlModel, OWLIndividual individual, String propertyName)
           
static long getDatavaluedPropertyValueAsLong(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static long getDatavaluedPropertyValueAsLong(OWLModel owlModel, String individualName, String propertyName)
           
static long getDatavaluedPropertyValueAsLong(OWLModel owlModel, String individualName, String propertyName, boolean mustExist)
           
static String getDatavaluedPropertyValueAsString(OWLModel owlModel, OWLIndividual individual, OWLProperty property, boolean mustExist)
           
static String getDatavaluedPropertyValueAsString(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static String getDatavaluedPropertyValueAsString(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist, String defaultValue)
           
static String getDatavaluedPropertyValueAsString(OWLModel owlModel, String individualName, String propertyName)
           
static String getDatavaluedPropertyValueAsString(OWLModel owlModel, String individualName, String propertyName, boolean mustExist)
           
static String getDatavaluedPropertyValueAsString(OWLModel owlModel, String individualName, String propertyName, boolean mustExist, String defaultValue)
           
static Set<OWLNamedClass> getDirectDomainClasses(OWLModel owlModel, String propertyName)
           
static Set<OWLNamedClass> getDirectDomainClasses(OWLModel owlModel, String propertyName, boolean mustExist)
           
static Set<OWLNamedClass> getDirectRangeClasses(OWLModel owlModel, String propertyName)
           
static Set<OWLNamedClass> getDirectRangeClasses(OWLModel owlModel, String propertyName, boolean mustExist)
           
static List<OWLNamedClass> getDirectSubClassesOf(OWLModel owlModel, String className)
           
static List<OWLProperty> getDirectSubPropertiesOf(OWLModel owlModel, String propertyName)
           
static List<OWLNamedClass> getDirectSuperClassesOf(OWLModel owlModel, String className)
           
static List<OWLProperty> getDirectSuperPropertiesOf(OWLModel owlModel, String propertyName)
           
static Set<OWLNamedClass> getDomainClasses(OWLModel owlModel, String propertyName)
           
static Set<OWLNamedClass> getDomainClasses(OWLModel owlModel, String propertyName, boolean mustExist)
           
static Set<OWLProperty> getDomainProperties(OWLModel owlModel, String className, boolean transitive)
           
static OWLIndividual getIndividual(OWLModel owlModel, OWLNamedClass cls, boolean mustExist, int mustHaveExactlyN)
           
static OWLIndividual getIndividual(OWLModel owlModel, String individualName)
           
static OWLIndividual getIndividual(OWLModel owlModel, String individualName, boolean mustExist)
           
static Set<OWLIndividual> getIndividuals(OWLModel owlModel, String className)
           
static Set<OWLIndividual> getIndividuals(OWLNamedClass cls)
           
static int getNumberOfDirectInstancesOfClass(OWLModel owlModel, String className, boolean mustExist)
           
static int getNumberOfIndividualsOfClass(OWLModel owlModel, String className)
           
static int getNumberOfIndividualsOfClass(OWLModel owlModel, String className, boolean mustExist)
           
static int getNumberOfPropertyValues(OWLModel owlModel, String individualName, String propertyName, boolean mustExist)
           
static int getNumberOfPropertyValues(OWLModel owlModel, String individualName, String propertyName, Object propertyValue, boolean mustExist)
           
static OWLObjectProperty getObjectProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static OWLIndividual getObjectPropertyValue(OWLIndividual individual, OWLProperty property)
           
static OWLIndividual getObjectPropertyValue(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static Set<OWLIndividual> getObjectPropertyValues(OWLModel owlModel, OWLIndividual individual, String propertyName)
           
static Set<OWLIndividual> getObjectPropertyValues(OWLModel owlModel, OWLIndividual individual, String propertyName, boolean mustExist)
           
static Collection getOWLAllDifferents(OWLModel owlModel)
           
static RDFProperty getOWLDifferentFromProperty(OWLModel owlModel)
           
static RDFProperty getOWLSameAsProperty(OWLModel owlModel)
           
static OWLNamedClass getOWLThingClass(OWLModel owlModel)
           
static Set<OWLProperty> getPossiblePropertiesOfIndividual(OWLModel owlModel, String individualName)
           
static Set<OWLProperty> getPropertiesOfIndividual(OWLModel owlModel, String individualName)
           
static OWLProperty getProperty(OWLModel owlModel, String propertyName)
           
static OWLProperty getProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static Set<OWLNamedClass> getRangeClasses(OWLModel owlModel, String propertyName)
           
static Set<OWLNamedClass> getRangeClasses(OWLModel owlModel, String propertyName, boolean mustExist)
           
static List<OWLNamedClass> getSubClassesOf(OWLModel owlModel, String className)
           
static List<OWLProperty> getSubPropertiesOf(OWLModel owlModel, String propertyName)
           
static List<OWLNamedClass> getSuperClassesOf(OWLModel owlModel, String className)
           
static List<OWLProperty> getSuperPropertiesOf(OWLModel owlModel, String propertyName)
           
static String getURI(OWLModel owlModel, String resourceName)
           
static Collection<OWLProperty> getUserDefinedOWLDatatypeProperties(OWLModel owlModel)
           
static Collection<OWLNamedClass> getUserDefinedOWLNamedClasses(OWLModel owlModel)
           
static Collection<OWLProperty> getUserDefinedOWLObjectProperties(OWLModel owlModel)
           
static Collection<OWLProperty> getUserDefinedOWLProperties(OWLModel owlModel)
           
static boolean hasInconsistentClasses(OWLModel owlModel)
           
static void importOWLFile(JenaOWLModel owlModel, String importOWLFileName)
           
static boolean isAnnotationProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isClass(OWLModel owlModel, String className)
           
static boolean isClass(OWLModel owlModel, String className, boolean mustExist)
           
static boolean isConsistentClass(OWLModel owlModel, String className, boolean mustExist)
           
static boolean isDatatypeProperty(OWLModel owlModel, String propertyName)
           
static boolean isDatatypeProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isDirectSubClassOf(OWLModel owlModel, String subClassName, String className, boolean mustExist)
           
static boolean isDirectSubPropertyOf(OWLModel owlModel, String subPropertyName, String propertyName, boolean mustExist)
           
static boolean isDirectSuperClassOf(OWLModel owlModel, String superClassName, String className, boolean mustExist)
           
static boolean isDirectSuperPropertyOf(OWLModel owlModel, String superPropertyName, String propertyName, boolean mustExist)
           
static boolean isDisjointClass(OWLModel owlModel, String className1, String className2, boolean mustExist)
           
static boolean isEquivalentClass(OWLModel owlModel, String className1, String className2, boolean mustExist)
           
static boolean isEquivalentProperty(OWLModel owlModel, String propertyName1, String propertyName2, boolean mustExist)
           
static boolean isFunctionalProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isInDirectPropertyDomain(OWLModel owlModel, String propertyName, String className, boolean mustExist)
           
static boolean isInDirectPropertyRange(OWLModel owlModel, String propertyName, String className, boolean mustExist)
           
static boolean isIndividual(OWLModel owlModel, String individualName)
           
static boolean isIndividual(OWLModel owlModel, String individualName, boolean mustExist)
           
static boolean isIndividualOfClass(OWLModel owlModel, String individualName, String className)
           
static boolean isInPropertyDomain(OWLModel owlModel, String propertyName, String className, boolean mustExist)
           
static boolean isInPropertyRange(OWLModel owlModel, String propertyName, String className, boolean mustExist)
           
static boolean isInverseFunctionalProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isObjectProperty(OWLModel owlModel, String propertyName)
           
static boolean isObjectProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isOWLIndividual(OWLModel owlModel, String individualName)
           
static boolean isProperty(OWLModel owlModel, String propertyName)
           
static boolean isProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isSubClassOf(OWLModel owlModel, String subClassName, String className, boolean mustExist)
           
static boolean isSubPropertyOf(OWLModel owlModel, String subPropertyName, String propertyName, boolean mustExist)
           
static boolean isSuperClassOf(OWLModel owlModel, String superClassName, String className)
           
static boolean isSuperClassOf(OWLModel owlModel, String superClassName, String className, boolean mustExist)
           
static boolean isSuperPropertyOf(OWLModel owlModel, String superPropertyName, String propertyName, boolean mustExist)
           
static boolean isSymmetricProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static boolean isTransitiveProperty(OWLModel owlModel, String propertyName)
           
static boolean isTransitiveProperty(OWLModel owlModel, String propertyName, boolean mustExist)
           
static Set<String> rdfResources2Names(Collection resources)
           
static Set<String> rdfResources2NamesList(Collection<RDFResource> resources)
           
static void writeJenaOWLModel2File(JenaOWLModel owlModel, String outputOWLFileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWRLOWLUtil

public SWRLOWLUtil()
Method Detail

createJenaOWLModel

public static JenaOWLModel createJenaOWLModel(String owlFileName)
                                       throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

createJenaOWLModel

public static JenaOWLModel createJenaOWLModel()
                                       throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

importOWLFile

public static void importOWLFile(JenaOWLModel owlModel,
                                 String importOWLFileName)
                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

writeJenaOWLModel2File

public static void writeJenaOWLModel2File(JenaOWLModel owlModel,
                                          String outputOWLFileName)
                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

createIndividualOfClass

public static OWLIndividual createIndividualOfClass(OWLModel owlModel,
                                                    String className)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

createIndividualOfClass

public static OWLIndividual createIndividualOfClass(OWLModel owlModel,
                                                    String className,
                                                    String individualName)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

createIndividualOfClass

public static OWLIndividual createIndividualOfClass(OWLModel owlModel,
                                                    OWLNamedClass cls)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

createIndividualOfClass

public static OWLIndividual createIndividualOfClass(OWLModel owlModel,
                                                    OWLNamedClass cls,
                                                    String individualName)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getClass

public static OWLNamedClass getClass(OWLModel owlModel,
                                     String className)
                              throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isIndividualOfClass

public static boolean isIndividualOfClass(OWLModel owlModel,
                                          String individualName,
                                          String className)
                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getIndividual

public static OWLIndividual getIndividual(OWLModel owlModel,
                                          OWLNamedClass cls,
                                          boolean mustExist,
                                          int mustHaveExactlyN)
                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getAllIndividuals

public static Set<OWLIndividual> getAllIndividuals(OWLModel owlModel)
                                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getIndividuals

public static Set<OWLIndividual> getIndividuals(OWLModel owlModel,
                                                String className)
                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getIndividuals

public static Set<OWLIndividual> getIndividuals(OWLNamedClass cls)
                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getProperty

public static OWLProperty getProperty(OWLModel owlModel,
                                      String propertyName)
                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatatypeProperty

public static OWLDatatypeProperty getDatatypeProperty(OWLModel owlModel,
                                                      String propertyName,
                                                      boolean mustExist)
                                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getObjectProperty

public static OWLObjectProperty getObjectProperty(OWLModel owlModel,
                                                  String propertyName,
                                                  boolean mustExist)
                                           throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isEquivalentProperty

public static boolean isEquivalentProperty(OWLModel owlModel,
                                           String propertyName1,
                                           String propertyName2,
                                           boolean mustExist)
                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isEquivalentClass

public static boolean isEquivalentClass(OWLModel owlModel,
                                        String className1,
                                        String className2,
                                        boolean mustExist)
                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDisjointClass

public static boolean isDisjointClass(OWLModel owlModel,
                                      String className1,
                                      String className2,
                                      boolean mustExist)
                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isSubPropertyOf

public static boolean isSubPropertyOf(OWLModel owlModel,
                                      String subPropertyName,
                                      String propertyName,
                                      boolean mustExist)
                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isSuperPropertyOf

public static boolean isSuperPropertyOf(OWLModel owlModel,
                                        String superPropertyName,
                                        String propertyName,
                                        boolean mustExist)
                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDirectSuperPropertyOf

public static boolean isDirectSuperPropertyOf(OWLModel owlModel,
                                              String superPropertyName,
                                              String propertyName,
                                              boolean mustExist)
                                       throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDirectSubPropertyOf

public static boolean isDirectSubPropertyOf(OWLModel owlModel,
                                            String subPropertyName,
                                            String propertyName,
                                            boolean mustExist)
                                     throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDirectSubClassOf

public static boolean isDirectSubClassOf(OWLModel owlModel,
                                         String subClassName,
                                         String className,
                                         boolean mustExist)
                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isSubClassOf

public static boolean isSubClassOf(OWLModel owlModel,
                                   String subClassName,
                                   String className,
                                   boolean mustExist)
                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDirectSuperClassOf

public static boolean isDirectSuperClassOf(OWLModel owlModel,
                                           String superClassName,
                                           String className,
                                           boolean mustExist)
                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isSuperClassOf

public static boolean isSuperClassOf(OWLModel owlModel,
                                     String superClassName,
                                     String className)
                              throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isSuperClassOf

public static boolean isSuperClassOf(OWLModel owlModel,
                                     String superClassName,
                                     String className,
                                     boolean mustExist)
                              throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getNumberOfIndividualsOfClass

public static int getNumberOfIndividualsOfClass(OWLModel owlModel,
                                                String className)
                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getNumberOfIndividualsOfClass

public static int getNumberOfIndividualsOfClass(OWLModel owlModel,
                                                String className,
                                                boolean mustExist)
                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getNumberOfDirectInstancesOfClass

public static int getNumberOfDirectInstancesOfClass(OWLModel owlModel,
                                                    String className,
                                                    boolean mustExist)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isConsistentClass

public static boolean isConsistentClass(OWLModel owlModel,
                                        String className,
                                        boolean mustExist)
                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDomainClasses

public static Set<OWLNamedClass> getDomainClasses(OWLModel owlModel,
                                                  String propertyName)
                                           throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDomainClasses

public static Set<OWLNamedClass> getDomainClasses(OWLModel owlModel,
                                                  String propertyName,
                                                  boolean mustExist)
                                           throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectDomainClasses

public static Set<OWLNamedClass> getDirectDomainClasses(OWLModel owlModel,
                                                        String propertyName)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectDomainClasses

public static Set<OWLNamedClass> getDirectDomainClasses(OWLModel owlModel,
                                                        String propertyName,
                                                        boolean mustExist)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getRangeClasses

public static Set<OWLNamedClass> getRangeClasses(OWLModel owlModel,
                                                 String propertyName,
                                                 boolean mustExist)
                                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getRangeClasses

public static Set<OWLNamedClass> getRangeClasses(OWLModel owlModel,
                                                 String propertyName)
                                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectRangeClasses

public static Set<OWLNamedClass> getDirectRangeClasses(OWLModel owlModel,
                                                       String propertyName,
                                                       boolean mustExist)
                                                throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectRangeClasses

public static Set<OWLNamedClass> getDirectRangeClasses(OWLModel owlModel,
                                                       String propertyName)
                                                throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isInPropertyDomain

public static boolean isInPropertyDomain(OWLModel owlModel,
                                         String propertyName,
                                         String className,
                                         boolean mustExist)
                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isInDirectPropertyDomain

public static boolean isInDirectPropertyDomain(OWLModel owlModel,
                                               String propertyName,
                                               String className,
                                               boolean mustExist)
                                        throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isInPropertyRange

public static boolean isInPropertyRange(OWLModel owlModel,
                                        String propertyName,
                                        String className,
                                        boolean mustExist)
                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isInDirectPropertyRange

public static boolean isInDirectPropertyRange(OWLModel owlModel,
                                              String propertyName,
                                              String className,
                                              boolean mustExist)
                                       throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isObjectProperty

public static boolean isObjectProperty(OWLModel owlModel,
                                       String propertyName,
                                       boolean mustExist)
                                throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isOWLIndividual

public static boolean isOWLIndividual(OWLModel owlModel,
                                      String individualName)

isObjectProperty

public static boolean isObjectProperty(OWLModel owlModel,
                                       String propertyName)
                                throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDatatypeProperty

public static boolean isDatatypeProperty(OWLModel owlModel,
                                         String propertyName,
                                         boolean mustExist)
                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isDatatypeProperty

public static boolean isDatatypeProperty(OWLModel owlModel,
                                         String propertyName)
                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isTransitiveProperty

public static boolean isTransitiveProperty(OWLModel owlModel,
                                           String propertyName,
                                           boolean mustExist)
                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isTransitiveProperty

public static boolean isTransitiveProperty(OWLModel owlModel,
                                           String propertyName)
                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isSymmetricProperty

public static boolean isSymmetricProperty(OWLModel owlModel,
                                          String propertyName,
                                          boolean mustExist)
                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isFunctionalProperty

public static boolean isFunctionalProperty(OWLModel owlModel,
                                           String propertyName,
                                           boolean mustExist)
                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isAnnotationProperty

public static boolean isAnnotationProperty(OWLModel owlModel,
                                           String propertyName,
                                           boolean mustExist)
                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isInverseFunctionalProperty

public static boolean isInverseFunctionalProperty(OWLModel owlModel,
                                                  String propertyName,
                                                  boolean mustExist)
                                           throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getIndividual

public static OWLIndividual getIndividual(OWLModel owlModel,
                                          String individualName,
                                          boolean mustExist)
                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getClass

public static OWLNamedClass getClass(OWLModel owlModel,
                                     String className,
                                     boolean mustExist)
                              throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getClassesOfIndividual

public static Set<OWLNamedClass> getClassesOfIndividual(OWLModel owlModel,
                                                        String individualName)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getClassesOfIndividual

public static Set<OWLNamedClass> getClassesOfIndividual(OWLModel owlModel,
                                                        String individualName,
                                                        boolean mustExist)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getClassesOfIndividual

public static Set<OWLNamedClass> getClassesOfIndividual(OWLModel owlModel,
                                                        OWLIndividual individual)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getProperty

public static OWLProperty getProperty(OWLModel owlModel,
                                      String propertyName,
                                      boolean mustExist)
                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getIndividual

public static OWLIndividual getIndividual(OWLModel owlModel,
                                          String individualName)
                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isClass

public static boolean isClass(OWLModel owlModel,
                              String className)
                       throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isClass

public static boolean isClass(OWLModel owlModel,
                              String className,
                              boolean mustExist)
                       throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isProperty

public static boolean isProperty(OWLModel owlModel,
                                 String propertyName)
                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isProperty

public static boolean isProperty(OWLModel owlModel,
                                 String propertyName,
                                 boolean mustExist)
                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getUserDefinedOWLNamedClasses

public static Collection<OWLNamedClass> getUserDefinedOWLNamedClasses(OWLModel owlModel)

getUserDefinedOWLProperties

public static Collection<OWLProperty> getUserDefinedOWLProperties(OWLModel owlModel)

getUserDefinedOWLObjectProperties

public static Collection<OWLProperty> getUserDefinedOWLObjectProperties(OWLModel owlModel)

getUserDefinedOWLDatatypeProperties

public static Collection<OWLProperty> getUserDefinedOWLDatatypeProperties(OWLModel owlModel)

isIndividual

public static boolean isIndividual(OWLModel owlModel,
                                   String individualName,
                                   boolean mustExist)
                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

isIndividual

public static boolean isIndividual(OWLModel owlModel,
                                   String individualName)
                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getNumberOfPropertyValues

public static int getNumberOfPropertyValues(OWLModel owlModel,
                                            String individualName,
                                            String propertyName,
                                            boolean mustExist)
                                     throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getPropertiesOfIndividual

public static Set<OWLProperty> getPropertiesOfIndividual(OWLModel owlModel,
                                                         String individualName)
                                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getPossiblePropertiesOfIndividual

public static Set<OWLProperty> getPossiblePropertiesOfIndividual(OWLModel owlModel,
                                                                 String individualName)
                                                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getURI

public static String getURI(OWLModel owlModel,
                            String resourceName)
                     throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getNumberOfPropertyValues

public static int getNumberOfPropertyValues(OWLModel owlModel,
                                            String individualName,
                                            String propertyName,
                                            Object propertyValue,
                                            boolean mustExist)
                                     throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

addPropertyValue

public static void addPropertyValue(OWLModel owlModel,
                                    OWLIndividual individual,
                                    String propertyName,
                                    Object propertyValue)
                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getObjectPropertyValue

public static OWLIndividual getObjectPropertyValue(OWLIndividual individual,
                                                   OWLProperty property)
                                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getObjectPropertyValues

public static Set<OWLIndividual> getObjectPropertyValues(OWLModel owlModel,
                                                         OWLIndividual individual,
                                                         String propertyName)
                                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getObjectPropertyValues

public static Set<OWLIndividual> getObjectPropertyValues(OWLModel owlModel,
                                                         OWLIndividual individual,
                                                         String propertyName,
                                                         boolean mustExist)
                                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getObjectPropertyValue

public static OWLIndividual getObjectPropertyValue(OWLModel owlModel,
                                                   OWLIndividual individual,
                                                   String propertyName,
                                                   boolean mustExist)
                                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValue

public static Object getDatavaluedPropertyValue(OWLModel owlModel,
                                                OWLIndividual individual,
                                                String propertyName,
                                                boolean mustExist)
                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValue

public static Object getDatavaluedPropertyValue(OWLModel owlModel,
                                                OWLIndividual individual,
                                                OWLProperty property,
                                                boolean mustExist)
                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsInteger

public static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel,
                                                      OWLIndividual individual,
                                                      String propertyName,
                                                      boolean mustExist)
                                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsInteger

public static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel,
                                                      String individualName,
                                                      String propertyName,
                                                      boolean mustExist)
                                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsInteger

public static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel,
                                                      OWLIndividual individual,
                                                      String propertyName)
                                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsInteger

public static int getDatavaluedPropertyValueAsInteger(OWLModel owlModel,
                                                      String individualName,
                                                      String propertyName)
                                               throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsLong

public static long getDatavaluedPropertyValueAsLong(OWLModel owlModel,
                                                    OWLIndividual individual,
                                                    String propertyName,
                                                    boolean mustExist)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsLong

public static long getDatavaluedPropertyValueAsLong(OWLModel owlModel,
                                                    String individualName,
                                                    String propertyName,
                                                    boolean mustExist)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsLong

public static long getDatavaluedPropertyValueAsLong(OWLModel owlModel,
                                                    OWLIndividual individual,
                                                    String propertyName)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsLong

public static long getDatavaluedPropertyValueAsLong(OWLModel owlModel,
                                                    String individualName,
                                                    String propertyName)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsString

public static String getDatavaluedPropertyValueAsString(OWLModel owlModel,
                                                        OWLIndividual individual,
                                                        String propertyName,
                                                        boolean mustExist)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsString

public static String getDatavaluedPropertyValueAsString(OWLModel owlModel,
                                                        String individualName,
                                                        String propertyName,
                                                        boolean mustExist,
                                                        String defaultValue)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsString

public static String getDatavaluedPropertyValueAsString(OWLModel owlModel,
                                                        String individualName,
                                                        String propertyName)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsString

public static String getDatavaluedPropertyValueAsString(OWLModel owlModel,
                                                        String individualName,
                                                        String propertyName,
                                                        boolean mustExist)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsString

public static String getDatavaluedPropertyValueAsString(OWLModel owlModel,
                                                        OWLIndividual individual,
                                                        String propertyName,
                                                        boolean mustExist,
                                                        String defaultValue)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsString

public static String getDatavaluedPropertyValueAsString(OWLModel owlModel,
                                                        OWLIndividual individual,
                                                        OWLProperty property,
                                                        boolean mustExist)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsBoolean

public static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel,
                                                          String individualName,
                                                          String propertyName,
                                                          boolean mustExist)
                                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsBoolean

public static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel,
                                                          String individualName,
                                                          String propertyName)
                                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsBoolean

public static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel,
                                                          OWLIndividual individual,
                                                          String propertyName,
                                                          boolean mustExist)
                                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsBoolean

public static Boolean getDatavaluedPropertyValueAsBoolean(OWLModel owlModel,
                                                          OWLIndividual individual,
                                                          OWLProperty property,
                                                          boolean mustExist)
                                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsCollection

public static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel,
                                                                OWLIndividual individual,
                                                                String propertyName)
                                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsCollection

public static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel,
                                                                String individualName,
                                                                String propertyName)
                                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsCollection

public static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel,
                                                                OWLIndividual individual,
                                                                String propertyName,
                                                                boolean mustExist)
                                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDatavaluedPropertyValueAsCollection

public static Collection getDatavaluedPropertyValueAsCollection(OWLModel owlModel,
                                                                OWLIndividual individual,
                                                                OWLProperty property,
                                                                boolean mustExist)
                                                         throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectSubClassesOf

public static List<OWLNamedClass> getDirectSubClassesOf(OWLModel owlModel,
                                                        String className)
                                                 throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getSubClassesOf

public static List<OWLNamedClass> getSubClassesOf(OWLModel owlModel,
                                                  String className)
                                           throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectSuperClassesOf

public static List<OWLNamedClass> getDirectSuperClassesOf(OWLModel owlModel,
                                                          String className)
                                                   throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getSuperClassesOf

public static List<OWLNamedClass> getSuperClassesOf(OWLModel owlModel,
                                                    String className)
                                             throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectSubPropertiesOf

public static List<OWLProperty> getDirectSubPropertiesOf(OWLModel owlModel,
                                                         String propertyName)
                                                  throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getSubPropertiesOf

public static List<OWLProperty> getSubPropertiesOf(OWLModel owlModel,
                                                   String propertyName)
                                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDirectSuperPropertiesOf

public static List<OWLProperty> getDirectSuperPropertiesOf(OWLModel owlModel,
                                                           String propertyName)
                                                    throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getSuperPropertiesOf

public static List<OWLProperty> getSuperPropertiesOf(OWLModel owlModel,
                                                     String propertyName)
                                              throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

getDomainProperties

public static Set<OWLProperty> getDomainProperties(OWLModel owlModel,
                                                   String className,
                                                   boolean transitive)
                                            throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

rdfResources2Names

public static Set<String> rdfResources2Names(Collection resources)

rdfResources2NamesList

public static Set<String> rdfResources2NamesList(Collection<RDFResource> resources)
                                          throws SWRLOWLUtilException
Throws:
SWRLOWLUtilException

hasInconsistentClasses

public static boolean hasInconsistentClasses(OWLModel owlModel)

createNewResourceName

public static String createNewResourceName(OWLModel owlModel,
                                           String prefix)

getOWLThingClass

public static OWLNamedClass getOWLThingClass(OWLModel owlModel)

getOWLSameAsProperty

public static RDFProperty getOWLSameAsProperty(OWLModel owlModel)

getOWLDifferentFromProperty

public static RDFProperty getOWLDifferentFromProperty(OWLModel owlModel)

getOWLAllDifferents

public static Collection getOWLAllDifferents(OWLModel owlModel)

Protégé-OWL 3.3.1

Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.