|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.jena.JenaNormalizer
A class that is able to normalize a given OntModel. Normalizing makes sure that a given OWL file (edited outside of Protege) fulfills some syntactic constraints. This process does the following:
Field Summary | |
private static boolean |
logging
Indicates whether logging is turned on or not |
private static String |
LOGGING
Set this to "true" in protege.properties to enable logging |
private com.hp.hpl.jena.ontology.OntModel |
ontModel
|
private com.hp.hpl.jena.rdf.model.Model |
owlFullModel
|
Constructor Summary | |
JenaNormalizer(com.hp.hpl.jena.ontology.OntModel ontModel,
com.hp.hpl.jena.rdf.model.Model owlFullModel,
NamespaceManager namespaceManager)
|
Method Summary | |
private void |
alignPrefixes(com.hp.hpl.jena.ontology.OntModel ontModel,
NamespaceManager nsm)
|
private void |
assignNamesToAnonymousIndividuals(com.hp.hpl.jena.ontology.OntModel ontModel,
String defaultNamespace)
|
private void |
assignNamesToAnonymousTopLevelClasses(com.hp.hpl.jena.ontology.OntModel ontModel,
String defaultNamespace)
|
static void |
assignRDFTypesToMetaclassInstances(com.hp.hpl.jena.ontology.OntModel ontModel,
com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private void |
convertCyclicPropertyInheritance()
|
private void |
convertCyclicPropertyInheritance(com.hp.hpl.jena.util.iterator.ExtendedIterator it,
List errors)
|
private void |
convertCyclicPropertyInheritance(com.hp.hpl.jena.ontology.OntProperty start,
com.hp.hpl.jena.ontology.OntProperty ontProperty,
Set visited,
Collection errors)
|
private void |
convertMultipleDomainsIntoIntersection(Iterator ontProperties)
|
private void |
convertMultipleDomainsIntoIntersection(com.hp.hpl.jena.ontology.OntModel ontModel)
|
private void |
convertMultipleRangesIntoIntersection(Iterator ontProperties)
|
private void |
convertMultipleRangesIntoIntersection(com.hp.hpl.jena.ontology.OntModel ontModel)
|
private void |
convertNamedClassExpressions()
|
private com.hp.hpl.jena.ontology.AllValuesFromRestriction |
createAllValuesFromRestriction(com.hp.hpl.jena.ontology.AllValuesFromRestriction base)
|
private com.hp.hpl.jena.ontology.CardinalityRestriction |
createCardinalityRestriction(com.hp.hpl.jena.ontology.CardinalityRestriction base)
|
private com.hp.hpl.jena.ontology.ComplementClass |
createComplementClass(com.hp.hpl.jena.ontology.ComplementClass base)
|
private com.hp.hpl.jena.ontology.EnumeratedClass |
createEnumeratedClass(com.hp.hpl.jena.ontology.OntClass enumeratedClass)
|
private com.hp.hpl.jena.ontology.HasValueRestriction |
createHasValueRestriction(com.hp.hpl.jena.ontology.HasValueRestriction base)
|
private String |
createImportURI(com.hp.hpl.jena.ontology.OntModel ontModel)
|
private com.hp.hpl.jena.ontology.IntersectionClass |
createIntersectionClass(com.hp.hpl.jena.ontology.IntersectionClass intersectionClass)
|
private com.hp.hpl.jena.ontology.MaxCardinalityRestriction |
createMaxCardinalityRestriction(com.hp.hpl.jena.ontology.MaxCardinalityRestriction base)
|
private com.hp.hpl.jena.ontology.MinCardinalityRestriction |
createMinCardinalityRestriction(com.hp.hpl.jena.ontology.MinCardinalityRestriction base)
|
private void |
createPrefixesForImports(com.hp.hpl.jena.ontology.OntModel ontModel,
NamespaceManager nsm)
Makes sure that there is a prefix for all non-anonymous owl:Ontologies. |
private com.hp.hpl.jena.ontology.Restriction |
createRestriction(com.hp.hpl.jena.ontology.Restriction restriction)
|
private com.hp.hpl.jena.ontology.SomeValuesFromRestriction |
createSomeValuesFromRestriction(com.hp.hpl.jena.ontology.SomeValuesFromRestriction base)
|
private com.hp.hpl.jena.ontology.UnionClass |
createUnionClass(com.hp.hpl.jena.ontology.UnionClass unionClass)
|
private void |
ensureAnnotationPropertiesHaveRange()
|
private void |
ensureDeprecatedClassesAreOntClasses(com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private void |
ensureDeprecatedPropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private void |
ensureFunctionalPropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private static boolean |
ensureRDFType(com.hp.hpl.jena.ontology.OntResource individual,
com.hp.hpl.jena.rdf.model.Resource type,
com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private void |
ensureSuperclassesAreRDFSClasses(com.hp.hpl.jena.rdf.model.Model owlFullModel)
Needed for pure RDF files that define subclasses of classes that are not imported. |
private void |
ensureSuperPropertiesAreRDFProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
Needed for pure RDF files that define sub-properties of properties that are not imported. |
private void |
ensureSymmetricPropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private void |
ensureTransitivePropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
|
private com.hp.hpl.jena.graph.Graph |
getHomeGraph(com.hp.hpl.jena.ontology.OntResource resource)
|
private boolean |
hasValidPropertyType(com.hp.hpl.jena.rdf.model.Property property)
|
static Iterator |
listAnonTopLevelClasses(com.hp.hpl.jena.ontology.OntModel m)
|
private static void |
log(String message)
|
private void |
mergeOntologies()
|
private void |
removeRedundantDomains(Iterator it)
|
private static com.hp.hpl.jena.rdf.model.Resource |
setResourceNamespace(com.hp.hpl.jena.rdf.model.Resource resource,
String newNamespace)
|
static void |
standardizePrefixes(com.hp.hpl.jena.ontology.OntModel ontModel)
|
static void |
unifyNamespace(com.hp.hpl.jena.ontology.OntModel ontModel,
String oldNamespace,
String newNamespace)
|
private static void |
unifyNamespaceOfIndividuals(com.hp.hpl.jena.ontology.OntModel ontModel,
String oldNamespace,
String newNamespace)
|
private static void |
unifyNamespaceOfNamedClasses(com.hp.hpl.jena.ontology.OntModel ontModel,
String oldNamespace,
String newNamespace)
|
private static void |
unifyNamespaceOfOntologies(com.hp.hpl.jena.ontology.OntModel ontModel,
String oldNamespace,
String newNamespace)
|
private static void |
unifyNamespaceOfProperties(com.hp.hpl.jena.ontology.OntModel ontModel,
String oldNamespace,
String newNamespace)
|
private static void |
unifyNamespaceOfResources(Iterator it,
String oldNamespace,
String newNamespace)
|
private static void |
updateLoggingStatus()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static boolean logging
private static String LOGGING
private com.hp.hpl.jena.ontology.OntModel ontModel
private com.hp.hpl.jena.rdf.model.Model owlFullModel
Constructor Detail |
public JenaNormalizer(com.hp.hpl.jena.ontology.OntModel ontModel, com.hp.hpl.jena.rdf.model.Model owlFullModel, NamespaceManager namespaceManager)
Method Detail |
private void createPrefixesForImports(com.hp.hpl.jena.ontology.OntModel ontModel, NamespaceManager nsm)
ontModel
- private String createImportURI(com.hp.hpl.jena.ontology.OntModel ontModel)
private void alignPrefixes(com.hp.hpl.jena.ontology.OntModel ontModel, NamespaceManager nsm)
private void ensureDeprecatedClassesAreOntClasses(com.hp.hpl.jena.rdf.model.Model owlFullModel)
private void ensureDeprecatedPropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
private void ensureFunctionalPropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
private boolean hasValidPropertyType(com.hp.hpl.jena.rdf.model.Property property)
private void ensureSuperclassesAreRDFSClasses(com.hp.hpl.jena.rdf.model.Model owlFullModel)
owlFullModel
- the Model to write the additional rdf:type triples toprivate void ensureSuperPropertiesAreRDFProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
owlFullModel
- the Model to write the additional rdf:type triples toprivate void ensureSymmetricPropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
private void ensureTransitivePropertiesAreOntProperties(com.hp.hpl.jena.rdf.model.Model owlFullModel)
private void assignNamesToAnonymousIndividuals(com.hp.hpl.jena.ontology.OntModel ontModel, String defaultNamespace)
private void assignNamesToAnonymousTopLevelClasses(com.hp.hpl.jena.ontology.OntModel ontModel, String defaultNamespace)
public static void assignRDFTypesToMetaclassInstances(com.hp.hpl.jena.ontology.OntModel ontModel, com.hp.hpl.jena.rdf.model.Model owlFullModel)
private void convertCyclicPropertyInheritance()
private void convertCyclicPropertyInheritance(com.hp.hpl.jena.util.iterator.ExtendedIterator it, List errors)
private void convertCyclicPropertyInheritance(com.hp.hpl.jena.ontology.OntProperty start, com.hp.hpl.jena.ontology.OntProperty ontProperty, Set visited, Collection errors)
private void convertMultipleDomainsIntoIntersection(com.hp.hpl.jena.ontology.OntModel ontModel)
private void convertMultipleDomainsIntoIntersection(Iterator ontProperties)
private void convertMultipleRangesIntoIntersection(com.hp.hpl.jena.ontology.OntModel ontModel)
private void convertMultipleRangesIntoIntersection(Iterator ontProperties)
private void convertNamedClassExpressions()
private com.hp.hpl.jena.ontology.AllValuesFromRestriction createAllValuesFromRestriction(com.hp.hpl.jena.ontology.AllValuesFromRestriction base)
private com.hp.hpl.jena.ontology.CardinalityRestriction createCardinalityRestriction(com.hp.hpl.jena.ontology.CardinalityRestriction base)
private com.hp.hpl.jena.ontology.ComplementClass createComplementClass(com.hp.hpl.jena.ontology.ComplementClass base)
private com.hp.hpl.jena.ontology.EnumeratedClass createEnumeratedClass(com.hp.hpl.jena.ontology.OntClass enumeratedClass)
private com.hp.hpl.jena.ontology.HasValueRestriction createHasValueRestriction(com.hp.hpl.jena.ontology.HasValueRestriction base)
private com.hp.hpl.jena.ontology.IntersectionClass createIntersectionClass(com.hp.hpl.jena.ontology.IntersectionClass intersectionClass)
private com.hp.hpl.jena.ontology.MaxCardinalityRestriction createMaxCardinalityRestriction(com.hp.hpl.jena.ontology.MaxCardinalityRestriction base)
private com.hp.hpl.jena.ontology.MinCardinalityRestriction createMinCardinalityRestriction(com.hp.hpl.jena.ontology.MinCardinalityRestriction base)
private com.hp.hpl.jena.ontology.Restriction createRestriction(com.hp.hpl.jena.ontology.Restriction restriction)
private com.hp.hpl.jena.ontology.SomeValuesFromRestriction createSomeValuesFromRestriction(com.hp.hpl.jena.ontology.SomeValuesFromRestriction base)
private com.hp.hpl.jena.ontology.UnionClass createUnionClass(com.hp.hpl.jena.ontology.UnionClass unionClass)
private void ensureAnnotationPropertiesHaveRange()
private static boolean ensureRDFType(com.hp.hpl.jena.ontology.OntResource individual, com.hp.hpl.jena.rdf.model.Resource type, com.hp.hpl.jena.rdf.model.Model owlFullModel)
private com.hp.hpl.jena.graph.Graph getHomeGraph(com.hp.hpl.jena.ontology.OntResource resource)
public static Iterator listAnonTopLevelClasses(com.hp.hpl.jena.ontology.OntModel m)
private static void log(String message)
private void mergeOntologies()
private void removeRedundantDomains(Iterator it)
private static com.hp.hpl.jena.rdf.model.Resource setResourceNamespace(com.hp.hpl.jena.rdf.model.Resource resource, String newNamespace)
public static void standardizePrefixes(com.hp.hpl.jena.ontology.OntModel ontModel)
public static void unifyNamespace(com.hp.hpl.jena.ontology.OntModel ontModel, String oldNamespace, String newNamespace)
private static void unifyNamespaceOfIndividuals(com.hp.hpl.jena.ontology.OntModel ontModel, String oldNamespace, String newNamespace)
private static void unifyNamespaceOfResources(Iterator it, String oldNamespace, String newNamespace)
private static void unifyNamespaceOfNamedClasses(com.hp.hpl.jena.ontology.OntModel ontModel, String oldNamespace, String newNamespace)
private static void unifyNamespaceOfOntologies(com.hp.hpl.jena.ontology.OntModel ontModel, String oldNamespace, String newNamespace)
private static void unifyNamespaceOfProperties(com.hp.hpl.jena.ontology.OntModel ontModel, String oldNamespace, String newNamespace)
private static void updateLoggingStatus()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |