Class OntologyValidationService<T>

java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_validation.OntologyValidationService<T>
Type Parameters:
T - The class which represents the ontology such as OWLOntology in case of the OWL API.
Direct Known Subclasses:
JenaOntologyValidationService, OwlApiOntologyValidationService

public abstract class OntologyValidationService<T> extends Object
An OntologyValidationService allows to validate a single ontology, i.e., make sure that the ontology is parseable. In addition the service calculates statistics about the ontology.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
      Default logger.
    • classes

      private Set<String> classes
    • datatypeProperties

      private Set<String> datatypeProperties
    • objectProperties

      private Set<String> objectProperties
    • properties

      private Set<String> properties
    • instances

      private Set<String> instances
    • numberOfRestrictions

      private int numberOfRestrictions
    • numberOfStatements

      private int numberOfStatements
    • ontologyDefined

      private boolean ontologyDefined
    • ontologyParseable

      private boolean ontologyParseable
    • ontologyParseError

      private String ontologyParseError
    • libName

      private String libName
    • libVersion

      private String libVersion
    • ontology

      protected T ontology
    • ontologyUri

      private URI ontologyUri
  • Constructor Details

    • OntologyValidationService

      public OntologyValidationService(URI ontologyUri)
      Constructor
      Parameters:
      ontologyUri - URI of the ontology to be validated.
    • OntologyValidationService

      public OntologyValidationService(String fileContent)
      Constructor
      Parameters:
      fileContent - file content of ontology file.
    • OntologyValidationService

      public OntologyValidationService(File ontologyFile)
      Constructor
      Parameters:
      ontologyFile - Ontology File to be validated.
  • Method Details

    • close

      public void close()
      Free all resources which are attached to this validation service.
    • computeStatistics

      protected void computeStatistics(T ontology)
      Set local statistics variables.
      Parameters:
      ontology - The ontologies for which the statistics shall be computed and set.
    • parseOntology

      protected abstract T parseOntology(URI ontUri) throws Exception
      Throws:
      Exception
    • parseOntology

      protected abstract T parseOntology(String fileContent) throws Exception
      Throws:
      Exception
    • retrieveClasses

      protected abstract Set<String> retrieveClasses(T ontology)
    • retrieveDatatypeProperties

      protected abstract Set<String> retrieveDatatypeProperties(T ontology)
    • retrieveObjectProperties

      protected abstract Set<String> retrieveObjectProperties(T ontology)
    • retrieveProperties

      protected abstract Set<String> retrieveProperties(T ontology)
    • retrieveInstances

      protected abstract Set<String> retrieveInstances(T ontology)
    • computeNumberOfRestrictions

      protected abstract int computeNumberOfRestrictions(T ontology)
    • computeNumberOfStatements

      protected abstract int computeNumberOfStatements(T ontology)
    • computeHasOntologyDefinition

      protected abstract boolean computeHasOntologyDefinition(T ontology)
    • retriveLibName

      protected abstract String retriveLibName()
    • retriveLibVersion

      protected abstract String retriveLibVersion()
    • isConceptDefined

      public abstract boolean isConceptDefined(String concept)
    • getVersionFromJarFile

      protected String getVersionFromJarFile(Class clazz)
    • getAllResources

      public Set<String> getAllResources()
      Returns all class-, property- and instance-URIs.
      Returns:
      A large set of all resources.
    • getClasses

      public Set<String> getClasses()
    • getNumberOfClasses

      public int getNumberOfClasses()
    • getDatatypeProperties

      public Set<String> getDatatypeProperties()
    • getNumberOfDatatypeProperties

      public int getNumberOfDatatypeProperties()
    • getObjectProperties

      public Set<String> getObjectProperties()
    • getNumberOfObjectProperties

      public int getNumberOfObjectProperties()
    • getProperties

      public Set<String> getProperties()
    • getNumberOfProperties

      public int getNumberOfProperties()
    • getInstances

      public Set<String> getInstances()
    • getNumberOfInstances

      public int getNumberOfInstances()
    • getNumberOfRestrictions

      public int getNumberOfRestrictions()
    • getNumberOfStatements

      public int getNumberOfStatements()
    • isOntologyDefined

      public boolean isOntologyDefined()
    • isOntologyParseable

      public boolean isOntologyParseable()
    • getLibName

      public String getLibName()
    • getLibVersion

      public String getLibVersion()
    • getOntology

      public T getOntology()
    • getOntologyUri

      public URI getOntologyUri()
    • getOntologyParseError

      public String getOntologyParseError()
    • toString

      public String toString()
      Overrides:
      toString in class Object