info.sswap.impl.empire.model
Class ExpressivityChecker

java.lang.Object
  extended by info.sswap.impl.empire.model.ExpressivityChecker

public class ExpressivityChecker
extends java.lang.Object

Checks whether an OWLOntology has a specified expressivity

Author:
Blazej Bulka

Nested Class Summary
private static class ExpressivityChecker.ProfileViolationDescriptionGenerator
           
 
Field Summary
private static com.google.common.base.Predicate<org.semanticweb.owlapi.profiles.OWLProfileViolation> IGNORE_UNDECLARED_ANNOTATION_PROPERTY
           
private static com.google.common.base.Predicate<org.semanticweb.owlapi.profiles.OWLProfileViolation> IGNORE_UNDECLARED_ENTITY
           
private static com.google.common.base.Function<org.semanticweb.owlapi.profiles.OWLProfileViolation,java.lang.String> PROFILE_DESCRIPTION_GENERATOR
           
private  java.util.Map<Expressivity,org.semanticweb.owlapi.profiles.OWLProfile> profileMap
          A mapping between SSWAP expressivities to OWLAPI OWLProfiles
 
Constructor Summary
ExpressivityChecker()
          Creates a new expressivity checker
 
Method Summary
 boolean checkProfile(Expressivity expressivity, org.semanticweb.owlapi.model.OWLOntology ontology)
          Checks whether the given OWLOntology belongs to the specified profile/expressivity
 java.util.Collection<java.lang.String> getViolationExplanations(Expressivity expressivity, org.semanticweb.owlapi.model.OWLOntology ontology)
           
private  boolean isSupported(Expressivity expressivity)
           
private  java.util.Collection<org.semanticweb.owlapi.profiles.OWLProfileViolation> validateProfile(Expressivity expressivity, org.semanticweb.owlapi.model.OWLOntology ontology, com.google.common.base.Predicate<org.semanticweb.owlapi.profiles.OWLProfileViolation> ignoredViolations)
          Validates the ontology for the given profile expressivity and returns any violations that does not satisfy the given predicate.
 void validateProfileIgnoringUndefinedEntities(Expressivity expressivity, org.semanticweb.owlapi.model.OWLOntology ontology)
          Checks whether the given OWLOntology belongs to the specified profile/expressivity, while ignoring any violations about undefined entities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE_UNDECLARED_ANNOTATION_PROPERTY

private static final com.google.common.base.Predicate<org.semanticweb.owlapi.profiles.OWLProfileViolation> IGNORE_UNDECLARED_ANNOTATION_PROPERTY

IGNORE_UNDECLARED_ENTITY

private static final com.google.common.base.Predicate<org.semanticweb.owlapi.profiles.OWLProfileViolation> IGNORE_UNDECLARED_ENTITY

PROFILE_DESCRIPTION_GENERATOR

private static final com.google.common.base.Function<org.semanticweb.owlapi.profiles.OWLProfileViolation,java.lang.String> PROFILE_DESCRIPTION_GENERATOR

profileMap

private java.util.Map<Expressivity,org.semanticweb.owlapi.profiles.OWLProfile> profileMap
A mapping between SSWAP expressivities to OWLAPI OWLProfiles

Constructor Detail

ExpressivityChecker

public ExpressivityChecker()
Creates a new expressivity checker

Method Detail

isSupported

private boolean isSupported(Expressivity expressivity)

checkProfile

public boolean checkProfile(Expressivity expressivity,
                            org.semanticweb.owlapi.model.OWLOntology ontology)
Checks whether the given OWLOntology belongs to the specified profile/expressivity

Parameters:
expressivity - the expressivity to be checked
ontology - the ontology to be checked
Returns:
true if the ontology is in the profile

getViolationExplanations

public java.util.Collection<java.lang.String> getViolationExplanations(Expressivity expressivity,
                                                                       org.semanticweb.owlapi.model.OWLOntology ontology)

validateProfileIgnoringUndefinedEntities

public void validateProfileIgnoringUndefinedEntities(Expressivity expressivity,
                                                     org.semanticweb.owlapi.model.OWLOntology ontology)
                                              throws ValidationException
Checks whether the given OWLOntology belongs to the specified profile/expressivity, while ignoring any violations about undefined entities.

Parameters:
expressivity - the expressivity to be checked
ontology - the ontology to be checked
Throws:
ValidationException - if the ontology does not pass the check

validateProfile

private java.util.Collection<org.semanticweb.owlapi.profiles.OWLProfileViolation> validateProfile(Expressivity expressivity,
                                                                                                  org.semanticweb.owlapi.model.OWLOntology ontology,
                                                                                                  com.google.common.base.Predicate<org.semanticweb.owlapi.profiles.OWLProfileViolation> ignoredViolations)
Validates the ontology for the given profile expressivity and returns any violations that does not satisfy the given predicate. Returns emoty results for unsupported expressivity;



Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.