|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.semanticweb.elk.reasoner.taxonomy.TaxonomyPrinter
public class TaxonomyPrinter
Class of static helper functions for printing and hashing a taxonomy. It is primarily intended to be used for controlling the output of classification.
| Field Summary | |
|---|---|
protected static Comparator<ElkClass> |
CLASS_COMPARATOR
|
protected static Comparator<ElkNamedIndividual> |
INDIVIDUAL_COMPARATOR
|
| Constructor Summary | |
|---|---|
TaxonomyPrinter()
|
|
| Method Summary | |
|---|---|
static void |
dumpClassTaxomomy(Taxonomy<ElkClass> taxonomy,
Writer writer,
boolean addHash)
Print the contents of the given Taxonomy to the specified Writer. |
static void |
dumpClassTaxomomyToFile(Taxonomy<ElkClass> taxonomy,
String fileName,
boolean addHash)
Convenience method for printing a Taxonomy to a file at the given
location. |
static void |
dumpInstanceTaxomomy(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy,
Writer writer,
boolean addHash)
Print the contents of the given InstanceTaxonomy to the specified
Writer. |
static void |
dumpInstanceTaxomomyToFile(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy,
String fileName,
boolean addHash)
Convenience method for printing an InstanceTaxonomy to a file at
the given location. |
static String |
getHashString(Taxonomy<ElkClass> taxonomy)
Get a has string for the given Taxonomy. |
static String |
getInstanceHashString(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy)
|
protected static void |
printClassAxioms(ElkClass elkClass,
ArrayList<ElkClass> orderedEquivalentClasses,
TreeSet<ElkClass> orderedSubClasses,
Appendable writer)
Process axioms related to one ElkClass, where the relevant
related classes are given in two ordered collections of equivalent
classes and subclasses, respectively. |
protected static void |
printDeclarations(Taxonomy<ElkClass> classTaxonomy,
ElkObjectFactory objectFactory,
Appendable writer)
Prints class declarations |
protected static void |
printIndividualAxioms(ElkNamedIndividual individual,
ArrayList<ElkNamedIndividual> orderedSameIndividuals,
TreeSet<ElkClass> orderedDirectClasses,
ElkObjectFactory objectFactory,
Writer writer)
|
protected static void |
printIndividualDeclarations(Set<? extends InstanceNode<ElkClass,ElkNamedIndividual>> individualNodes,
ElkObjectFactory objectFactory,
Writer writer)
|
protected static void |
processInstanceTaxomomy(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy,
Writer writer)
|
protected static void |
processTaxomomy(Taxonomy<ElkClass> classTaxonomy,
Appendable writer)
Process a taxonomy and write a normalized serialization. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Comparator<ElkClass> CLASS_COMPARATOR
protected static Comparator<ElkNamedIndividual> INDIVIDUAL_COMPARATOR
| Constructor Detail |
|---|
public TaxonomyPrinter()
| Method Detail |
|---|
public static void dumpClassTaxomomyToFile(Taxonomy<ElkClass> taxonomy,
String fileName,
boolean addHash)
throws IOException
Taxonomy to a file at the given
location.
taxonomy - fileName - addHash - if true, a hash string will be added at the end of the output
using comment syntax of OWL 2 Functional Style
IOException - If an I/O error occursdumpClassTaxomomy(org.semanticweb.elk.reasoner.taxonomy.model.Taxonomy, java.io.Writer, boolean)
public static void dumpClassTaxomomy(Taxonomy<ElkClass> taxonomy,
Writer writer,
boolean addHash)
throws IOException
Taxonomy to the specified Writer.
Expressions are ordered for generating the output, ensuring that the
output is deterministic.
taxonomy - writer - addHash - if true, a hash string will be added at the end of the output
using comment syntax of OWL 2 Functional Style
IOException - If an I/O error occurs
public static void dumpInstanceTaxomomyToFile(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy,
String fileName,
boolean addHash)
throws IOException
InstanceTaxonomy to a file at
the given location.
taxonomy - fileName - addHash - if true, a hash string will be added at the end of the output
using comment syntax of OWL 2 Functional Style
IOException - If an I/O error occursdumpInstanceTaxomomy(org.semanticweb.elk.reasoner.taxonomy.model.InstanceTaxonomy, java.io.Writer, boolean)
public static void dumpInstanceTaxomomy(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy,
Writer writer,
boolean addHash)
throws IOException
InstanceTaxonomy to the specified
Writer. Expressions are ordered for generating the output, ensuring that
the output is deterministic.
taxonomy - writer - addHash - if true, a hash string will be added at the end of the output
using comment syntax of OWL 2 Functional Style
IOException - If an I/O error occurspublic static String getHashString(Taxonomy<ElkClass> taxonomy)
Taxonomy. Besides possible hash
collisions (which have very low probability) the hash string is the same
for two inputs if and only if the inputs describe the same taxonomy. So
it can be used to compare classification results.
taxonomy -
public static String getInstanceHashString(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy)
protected static void processTaxomomy(Taxonomy<ElkClass> classTaxonomy,
Appendable writer)
throws IOException
classTaxonomy - writer -
IOException
protected static void printDeclarations(Taxonomy<ElkClass> classTaxonomy,
ElkObjectFactory objectFactory,
Appendable writer)
throws IOException
classTaxonomy - objectFactory - writer -
IOException
protected static void printIndividualDeclarations(Set<? extends InstanceNode<ElkClass,ElkNamedIndividual>> individualNodes,
ElkObjectFactory objectFactory,
Writer writer)
throws IOException
IOException
protected static void printClassAxioms(ElkClass elkClass,
ArrayList<ElkClass> orderedEquivalentClasses,
TreeSet<ElkClass> orderedSubClasses,
Appendable writer)
throws IOException
ElkClass, where the relevant
related classes are given in two ordered collections of equivalent
classes and subclasses, respectively. The method serializes the axioms to
the Writer.
elkClass - orderedEquivalentClasses - orderedSubClasses - writer -
IOException
protected static void printIndividualAxioms(ElkNamedIndividual individual,
ArrayList<ElkNamedIndividual> orderedSameIndividuals,
TreeSet<ElkClass> orderedDirectClasses,
ElkObjectFactory objectFactory,
Writer writer)
throws IOException
IOException
protected static void processInstanceTaxomomy(InstanceTaxonomy<ElkClass,ElkNamedIndividual> taxonomy,
Writer writer)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||