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

java.lang.Object
  extended by uk.ac.manchester.cs.owlapi.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.


Field Summary
protected  OWLAxiom[] ax
          Array representing all axioms of the associated ontology.
 
Constructor Summary
SyntacticLocalityModuleExtractor.OntologyAxiomSet(java.util.Set<OWLAxiom> axs)
          Creates a new OntologyAxiomSet from a given set of axioms 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.
 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.

Constructor Detail

SyntacticLocalityModuleExtractor.OntologyAxiomSet

public SyntacticLocalityModuleExtractor.OntologyAxiomSet(java.util.Set<OWLAxiom> axs)
Creates a new OntologyAxiomSet from a given set of axioms without looking up the referenced entities.

Parameters:
axs - the set of axioms representing the 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

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