uk.ac.manchester.cs.owl.modularity
Class SyntacticLocalityModuleExtractor.OntologyAxiomSet

java.lang.Object
  extended by uk.ac.manchester.cs.owl.modularity.SyntacticLocalityModuleExtractor.OntologyAxiomSet
Enclosing class:
SyntacticLocalityModuleExtractor

protected class SyntacticLocalityModuleExtractor.OntologyAxiomSet
extends java.lang.Object

Auxiliary inner class for the representation of the associated ontology and all its sub-ontologies as arrays of axioms. Advantages: (1) quicker set manipulation operations; (2) storage of all referenced entities of an axiom once this axiom is dealt with.

Author:
Thomas Schneider, School of Computer Science, University of Manchester

Field Summary
protected  OWLAxiom[] ax
          Array representing all axioms of the associated ontology.
protected  OWLEntity[][] ent
          Array representing all entities referenced in all axioms of the associated ontology.
 
Constructor Summary
SyntacticLocalityModuleExtractor.OntologyAxiomSet(OWLOntology ont)
          Creates a new OntologyAxiomSet from a given ontology without looking up the referenced entities.
 
Method Summary
 boolean[] cloneSubset(boolean[] oldSubset)
          Clones an array of Booleans that represents a subset of this set.
 OWLAxiom[] getAllAxioms()
          Returns an array containing all axioms in this set.
 OWLAxiom getAxiom(int i)
          Returns some axiom from this set.
 java.util.Set<OWLAxiom> getAxiomSet(boolean[] isIn)
          Returns the set of axioms that is represented by some array of Booleans.
 OWLEntity[] getEntities(int i)
          Returns an array containing all entities referenced by some axiom in this set.
 boolean[] getSubset(boolean init)
          Constructs an array of Booleans that represents a subset of this set.
 int size()
          Returns the number of axioms in this set.
 int subsetCardinality(boolean[] subset)
           
 java.util.Set<OWLAxiom> toSet(boolean[] subset)
          Transforms a subset of this set (represented by an array of Booleans) into a set of axioms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ax

protected OWLAxiom[] ax
Array representing all axioms of the associated ontology.


ent

protected OWLEntity[][] ent
Array representing all entities referenced in all axioms of the associated ontology.

Constructor Detail

SyntacticLocalityModuleExtractor.OntologyAxiomSet

public SyntacticLocalityModuleExtractor.OntologyAxiomSet(OWLOntology ont)
Creates a new OntologyAxiomSet from a given ontology without looking up the referenced entities.

Parameters:
ont - the associated ontology
Method Detail

size

public int size()
Returns the number of axioms in this set.

Returns:
the number of axioms in this set

getAxiom

public OWLAxiom getAxiom(int i)
Returns some axiom from this set.

Parameters:
i - a number for an axiom
Returns:
the i-th axiom in this set

getAllAxioms

public OWLAxiom[] getAllAxioms()
Returns an array containing all axioms in this set.

Returns:
array containing all axioms in this set

getEntities

public OWLEntity[] getEntities(int i)
Returns an array containing all entities referenced by some axiom in this set. The entities are stored to reduce the time needed for subsequent calls.

Parameters:
i - a number for an axiom
Returns:
array containing all entities referenced the i-th axiom in this set

getAxiomSet

public java.util.Set<OWLAxiom> getAxiomSet(boolean[] isIn)
Returns the set of axioms that is represented by some array of Booleans.

Parameters:
isIn - an array of Booleans
Returns:
the set of axioms represented by the specified array of Booleans

getSubset

public boolean[] getSubset(boolean init)
Constructs an array of Booleans that represents a subset of this set. The subset either equals this set (if init==true) or is the empty set (if init==false).

Parameters:
init - determines the initial value of the subset
Returns:
array of Booleans representing the specified subset

cloneSubset

public boolean[] cloneSubset(boolean[] oldSubset)
Clones an array of Booleans that represents a subset of this set.

Parameters:
oldSubset - an array representing the original subset
Returns:
an array representing the new subset

subsetCardinality

public int subsetCardinality(boolean[] subset)

toSet

public java.util.Set<OWLAxiom> toSet(boolean[] subset)
Transforms a subset of this set (represented by an array of Booleans) into a set of axioms.

Parameters:
subset - an array representing the subset
Returns:
a set of axioms