|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.model.impl.OWLUtil
A collection of static utility methods for OWL classes. Many of them are used to "simulate" the multiple inheritance between the various implementations of RDFResource.
Constructor Summary | |
OWLUtil()
|
Method Summary | |
static void |
addComment(RDFResource resource,
String comment)
|
static void |
addDifferentFrom(RDFResource resource,
RDFResource differentFrom)
|
static void |
addIsDefinedBy(edu.stanford.smi.protege.model.Instance source,
edu.stanford.smi.protege.model.Instance instance)
|
static void |
addLabel(RDFResource source,
String label,
String language)
|
static void |
addPropertyValue(RDFResource resource,
RDFProperty property,
Object value)
|
static void |
addPropertyValueListener(RDFResource resource,
PropertyValueListener listener)
|
static void |
addProtegeType(RDFResource resource,
RDFSClass type)
|
static void |
addRDFType(RDFResource resource,
RDFSClass type)
|
static void |
addResourceListener(RDFResource resource,
ResourceListener listener)
|
static void |
addSameAs(edu.stanford.smi.protege.model.Instance source,
edu.stanford.smi.protege.model.Instance instance)
|
static void |
addVersionInfo(edu.stanford.smi.protege.model.Instance source,
String versionInfo)
|
static RDFResource |
as(RDFResource resource,
Class javaInterface)
|
static void |
assignUniqueURI(RDFUntypedResource eri)
|
static boolean |
canAs(RDFResource resource,
Class javaInterface)
|
static boolean |
confirmSaveAndReload()
Deprecated. use the version with project parameter instead |
static boolean |
confirmSaveAndReload(edu.stanford.smi.protege.model.Project project)
|
static boolean |
containsAnonymousClass(Collection clses)
|
static void |
convertEquivalentClsIntoSuperClses(RDFSClass ownerClass,
RDFSClass equivalentClass)
|
static void |
convertSuperClsIntoEquivalentCls(OWLNamedClass ownerCls,
RDFSClass superClass)
|
static void |
convertSuperClsIntoEquivalentCls(OWLNamedClass ownerCls,
RDFSClass superClass,
RDFSClass definition)
|
static void |
copyAnnotations(edu.stanford.smi.protege.model.Instance source,
edu.stanford.smi.protege.model.Instance target)
|
static edu.stanford.smi.protege.model.Cls |
createClone(edu.stanford.smi.protege.model.Cls cls)
Creates a copy of a given class and also copies the annotation property values. |
static RDFSClass |
createClone(OWLModel owlModel,
String expression)
|
static void |
ensureSubclassesDisjoint(OWLNamedClass cls)
|
static boolean |
equalsStructurally(Collection collection1,
Collection collection2)
|
static RDFResource |
getAllValuesFromOnTypes(RDFResource resource,
RDFProperty property)
|
static Collection |
getComments(RDFResource resource)
|
static Collection |
getDifferentFrom(RDFResource resource)
|
static RDFSClass |
getDirectRDFType(RDFResource resource)
|
static Collection |
getDirectRDFTypes(RDFResource resource)
|
static Collection |
getDocumentation(edu.stanford.smi.protege.model.Instance source)
|
static Collection |
getHasValuesOnTypes(RDFResource resource,
RDFProperty property)
|
static Collection |
getInferredDirectTypes(RDFResource resource)
|
static Collection |
getIsDefinedBy(edu.stanford.smi.protege.model.Instance source)
|
static Collection |
getLabels(RDFResource source)
|
static Collection |
getPathsToRoot(edu.stanford.smi.protege.model.Cls cls)
Gets all paths from a given class to the root. |
private static List |
getPathToRoot(edu.stanford.smi.protege.model.Cls cls,
LinkedList list,
Collection lists)
|
static Collection |
getPossibleRDFProperties(RDFResource resource)
|
static List |
getPotentiallyDisjointSubclasses(OWLNamedClass cls)
|
static Object |
getPropertyValue(RDFResource resource,
RDFProperty property,
boolean includingSubproperties)
|
static RDFResource |
getPropertyValueAs(RDFResource resource,
RDFProperty property,
Class javaInterface)
|
static int |
getPropertyValueCount(RDFResource resource,
RDFProperty property)
|
static RDFSLiteral |
getPropertyValueLiteral(RDFResource resource,
RDFProperty property)
|
static Collection |
getPropertyValueLiterals(RDFResource resource,
RDFProperty property)
|
static Collection |
getPropertyValues(RDFResource resource,
RDFProperty property,
boolean includingSubproperties)
|
static Collection |
getPropertyValuesAs(RDFResource resource,
RDFProperty property,
Class javaInterface)
|
static Collection |
getRDFProperties(RDFResource resource)
|
static RDFSClass |
getRDFType(RDFResource resource)
|
static Collection |
getRDFTypes(RDFResource resource)
|
static Set |
getReferringAnonymousClses(RDFResource instance)
|
static void |
getReferringLogicalClasses(RDFList list,
Set set)
|
static Collection |
getSameAs(edu.stanford.smi.protege.model.Instance source)
|
static Collection |
getSelectableNamedClses(OWLModel owlModel)
|
static Collection |
getVersionInfo(edu.stanford.smi.protege.model.Instance source)
|
static boolean |
hasDirectRestriction(edu.stanford.smi.protege.model.Cls cls,
edu.stanford.smi.protege.model.Slot slot,
edu.stanford.smi.protege.model.Cls metaCls)
|
static boolean |
hasOWLDLProfile(OWLModel owlModel)
|
static boolean |
hasOWLFullProfile(OWLModel owlModel)
|
static boolean |
hasPropertyValue(RDFResource resource,
RDFProperty property)
|
static boolean |
hasPropertyValue(RDFResource resource,
RDFProperty property,
boolean includingSubproperties)
|
static boolean |
hasPropertyValue(RDFResource resource,
RDFProperty property,
Object value,
boolean includingSubproperties)
|
static boolean |
hasProtegeType(RDFResource resource,
RDFSClass type)
|
static boolean |
hasProtegeType(RDFResource resource,
RDFSClass type,
boolean includingSuperclasses)
|
static boolean |
hasRDFProfile(OWLModel owlModel)
|
static boolean |
hasRDFType(RDFResource resource,
RDFSClass type)
|
static boolean |
hasRDFType(RDFResource resource,
RDFSClass type,
boolean includingSuperclasses)
|
static boolean |
isInconsistent(edu.stanford.smi.protege.model.Cls cls)
|
static boolean |
isSystem(edu.stanford.smi.protege.model.Frame resource)
|
static boolean |
isValidPropertyValue(RDFResource resource,
RDFProperty property,
Object object)
|
static Iterator |
listPropertyValues(RDFResource resource,
RDFProperty property,
boolean includingSubproperties)
|
static Iterator |
listPropertyValuesAs(RDFResource resource,
RDFProperty property,
Class javaInterface)
|
static void |
printStackTrace()
|
static void |
removeComment(RDFResource resource,
String comment)
|
static void |
removeDifferentFrom(RDFResource resource,
RDFResource differentFrom)
|
static List |
removeInvisibleResources(Iterator it)
|
static void |
removeIsDefinedBy(edu.stanford.smi.protege.model.Instance source,
edu.stanford.smi.protege.model.Instance instance)
|
static void |
removeLabel(RDFResource source,
String label,
String language)
|
static void |
removePropertyValue(RDFResource resource,
RDFProperty property,
Object value)
|
static void |
removePropertyValueListener(RDFResource resource,
PropertyValueListener listener)
|
static void |
removeProtegeType(RDFResource resource,
RDFSClass type)
|
static void |
removeRDFType(RDFResource resource,
RDFSClass type)
|
static void |
removeResourceListener(RDFResource resource,
ResourceListener listener)
|
static void |
removeSameAs(edu.stanford.smi.protege.model.Instance source,
edu.stanford.smi.protege.model.Instance instance)
|
static void |
removeSubclassesDisjoint(OWLNamedClass cls)
|
static void |
removeVersionInfo(edu.stanford.smi.protege.model.Instance source,
String versionInfo)
|
static void |
resetComputedSuperclasses(OWLModel owlModel)
|
static void |
resetComputedSuperclasses(OWLModel owlModel,
Collection clses)
|
static boolean |
saveAndReloadProject()
|
static void |
setComment(RDFResource resource,
String comment)
|
static void |
setComments(RDFResource resource,
Collection comments)
|
static void |
setConsistentClassificationStatus(OWLNamedClass namedCls)
|
static void |
setDocumentation(edu.stanford.smi.protege.model.Instance source,
Collection values)
|
static void |
setInferredTypes(RDFResource resource,
Collection types)
|
static void |
setPropertyValue(RDFResource resource,
RDFProperty property,
Object value)
|
static void |
setPropertyValues(RDFResource resource,
RDFProperty property,
Collection values)
|
static void |
setProtegeType(RDFResource resource,
RDFSClass type)
|
static void |
setProtegeTypes(RDFResource resource,
Collection types)
|
static void |
setRDFType(RDFResource resource,
RDFSClass type)
|
static void |
setRDFTypes(RDFResource resource,
Collection types)
|
static void |
sortSubclasses(edu.stanford.smi.protege.model.Cls superCls)
|
static void |
sortSubclasses(OWLModel owlModel)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OWLUtil()
Method Detail |
public static void addIsDefinedBy(edu.stanford.smi.protege.model.Instance source, edu.stanford.smi.protege.model.Instance instance)
public static void addLabel(RDFResource source, String label, String language)
public static void addSameAs(edu.stanford.smi.protege.model.Instance source, edu.stanford.smi.protege.model.Instance instance)
public static void addVersionInfo(edu.stanford.smi.protege.model.Instance source, String versionInfo)
public static void assignUniqueURI(RDFUntypedResource eri)
public static boolean confirmSaveAndReload()
public static boolean confirmSaveAndReload(edu.stanford.smi.protege.model.Project project)
public static void copyAnnotations(edu.stanford.smi.protege.model.Instance source, edu.stanford.smi.protege.model.Instance target)
public static void convertEquivalentClsIntoSuperClses(RDFSClass ownerClass, RDFSClass equivalentClass)
public static void convertSuperClsIntoEquivalentCls(OWLNamedClass ownerCls, RDFSClass superClass)
public static void convertSuperClsIntoEquivalentCls(OWLNamedClass ownerCls, RDFSClass superClass, RDFSClass definition)
public static edu.stanford.smi.protege.model.Cls createClone(edu.stanford.smi.protege.model.Cls cls)
cls
- the class to clone
public static RDFSClass createClone(OWLModel owlModel, String expression)
public static void ensureSubclassesDisjoint(OWLNamedClass cls)
public static boolean equalsStructurally(Collection collection1, Collection collection2)
public static Collection getDocumentation(edu.stanford.smi.protege.model.Instance source)
public static Collection getInferredDirectTypes(RDFResource resource)
public static Collection getIsDefinedBy(edu.stanford.smi.protege.model.Instance source)
public static Collection getLabels(RDFResource source)
public static Collection getPathsToRoot(edu.stanford.smi.protege.model.Cls cls)
cls
- the Cls to find all paths to
private static List getPathToRoot(edu.stanford.smi.protege.model.Cls cls, LinkedList list, Collection lists)
public static List getPotentiallyDisjointSubclasses(OWLNamedClass cls)
public static Set getReferringAnonymousClses(RDFResource instance)
public static void getReferringLogicalClasses(RDFList list, Set set)
public static Collection getSameAs(edu.stanford.smi.protege.model.Instance source)
public static Collection getSelectableNamedClses(OWLModel owlModel)
public static Collection getVersionInfo(edu.stanford.smi.protege.model.Instance source)
public static boolean hasDirectRestriction(edu.stanford.smi.protege.model.Cls cls, edu.stanford.smi.protege.model.Slot slot, edu.stanford.smi.protege.model.Cls metaCls)
public static boolean hasOWLDLProfile(OWLModel owlModel)
public static boolean hasOWLFullProfile(OWLModel owlModel)
public static boolean hasRDFProfile(OWLModel owlModel)
public static boolean isInconsistent(edu.stanford.smi.protege.model.Cls cls)
public static void printStackTrace()
public static void removeIsDefinedBy(edu.stanford.smi.protege.model.Instance source, edu.stanford.smi.protege.model.Instance instance)
public static void removeLabel(RDFResource source, String label, String language)
public static void removeSameAs(edu.stanford.smi.protege.model.Instance source, edu.stanford.smi.protege.model.Instance instance)
public static void removeSubclassesDisjoint(OWLNamedClass cls)
public static void removeVersionInfo(edu.stanford.smi.protege.model.Instance source, String versionInfo)
public static void resetComputedSuperclasses(OWLModel owlModel)
public static void resetComputedSuperclasses(OWLModel owlModel, Collection clses)
public static boolean saveAndReloadProject()
public static void setDocumentation(edu.stanford.smi.protege.model.Instance source, Collection values)
public static void setConsistentClassificationStatus(OWLNamedClass namedCls)
public static void sortSubclasses(edu.stanford.smi.protege.model.Cls superCls)
public static void addProtegeType(RDFResource resource, RDFSClass type)
public static RDFSClass getDirectRDFType(RDFResource resource)
public static Collection getDirectRDFTypes(RDFResource resource)
public static boolean hasProtegeType(RDFResource resource, RDFSClass type)
public static boolean hasProtegeType(RDFResource resource, RDFSClass type, boolean includingSuperclasses)
public static void removeProtegeType(RDFResource resource, RDFSClass type)
public static void setProtegeType(RDFResource resource, RDFSClass type)
public static void setProtegeTypes(RDFResource resource, Collection types)
public static void addDifferentFrom(RDFResource resource, RDFResource differentFrom)
public static void removeDifferentFrom(RDFResource resource, RDFResource differentFrom)
public static void addComment(RDFResource resource, String comment)
public static void removeComment(RDFResource resource, String comment)
public static void addPropertyValue(RDFResource resource, RDFProperty property, Object value)
public static Collection getComments(RDFResource resource)
public static void setComment(RDFResource resource, String comment)
public static void setComments(RDFResource resource, Collection comments)
public static void setInferredTypes(RDFResource resource, Collection types)
public static Collection getDifferentFrom(RDFResource resource)
public static Object getPropertyValue(RDFResource resource, RDFProperty property, boolean includingSubproperties)
public static int getPropertyValueCount(RDFResource resource, RDFProperty property)
public static Collection getPropertyValues(RDFResource resource, RDFProperty property, boolean includingSubproperties)
public static Iterator listPropertyValues(RDFResource resource, RDFProperty property, boolean includingSubproperties)
public static void removePropertyValue(RDFResource resource, RDFProperty property, Object value)
public static void setPropertyValue(RDFResource resource, RDFProperty property, Object value)
public static void setPropertyValues(RDFResource resource, RDFProperty property, Collection values)
public static boolean isSystem(edu.stanford.smi.protege.model.Frame resource)
public static Collection getPropertyValueLiterals(RDFResource resource, RDFProperty property)
public static RDFSLiteral getPropertyValueLiteral(RDFResource resource, RDFProperty property)
public static Collection getRDFProperties(RDFResource resource)
public static void addResourceListener(RDFResource resource, ResourceListener listener)
public static void removeResourceListener(RDFResource resource, ResourceListener listener)
public static boolean hasPropertyValue(RDFResource resource, RDFProperty property, Object value, boolean includingSubproperties)
public static void addPropertyValueListener(RDFResource resource, PropertyValueListener listener)
public static void removePropertyValueListener(RDFResource resource, PropertyValueListener listener)
public static Collection getPossibleRDFProperties(RDFResource resource)
public static RDFResource as(RDFResource resource, Class javaInterface)
public static boolean canAs(RDFResource resource, Class javaInterface)
public static Collection getPropertyValuesAs(RDFResource resource, RDFProperty property, Class javaInterface)
public static RDFResource getPropertyValueAs(RDFResource resource, RDFProperty property, Class javaInterface)
public static Iterator listPropertyValuesAs(RDFResource resource, RDFProperty property, Class javaInterface)
public static boolean hasPropertyValue(RDFResource resource, RDFProperty property)
public static boolean hasPropertyValue(RDFResource resource, RDFProperty property, boolean includingSubproperties)
public static RDFSClass getRDFType(RDFResource resource)
public static Collection getRDFTypes(RDFResource resource)
public static void addRDFType(RDFResource resource, RDFSClass type)
public static void removeRDFType(RDFResource resource, RDFSClass type)
public static boolean hasRDFType(RDFResource resource, RDFSClass type)
public static boolean hasRDFType(RDFResource resource, RDFSClass type, boolean includingSuperclasses)
public static void sortSubclasses(OWLModel owlModel)
public static void setRDFType(RDFResource resource, RDFSClass type)
public static void setRDFTypes(RDFResource resource, Collection types)
public static Collection getHasValuesOnTypes(RDFResource resource, RDFProperty property)
public static boolean containsAnonymousClass(Collection clses)
public static List removeInvisibleResources(Iterator it)
public static boolean isValidPropertyValue(RDFResource resource, RDFProperty property, Object object)
public static RDFResource getAllValuesFromOnTypes(RDFResource resource, RDFProperty property)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |