edu.unika.aifb.owltools.tools
Class Dump

java.lang.Object
  extended by edu.unika.aifb.owltools.tools.KAON2Tool
      extended by edu.unika.aifb.owltools.tools.Dump

public class Dump
extends KAON2Tool

dump is used to serialize the ontology, or filtered parts of it, or to count it


Field Summary
 
Fields inherited from class edu.unika.aifb.owltools.tools.KAON2Tool
m_connection, printer
 
Constructor Summary
Dump()
           
 
Method Summary
 void compile()
          Entry point for the command line based usage of the Dump owl tool
 int count(org.semanticweb.kaon2.api.Ontology ontology)
          Counts the number of axioms in an ontology
 int count(org.semanticweb.kaon2.api.Ontology ontology, java.lang.Class filter)
          Counts the number of axioms of the specified kind in an ontology
 int countEntities(org.semanticweb.kaon2.api.Ontology ontology)
          Counts the number of entities mentioned in an ontology
 int countEntities(org.semanticweb.kaon2.api.Ontology ontology, java.lang.Class filter)
          Counts the number of entities of the specified kind in an ontology
 java.util.List<java.lang.String> dump(org.semanticweb.kaon2.api.Ontology ontology)
          Lists all the axioms of the ontology
 java.util.List<java.lang.String> dump(org.semanticweb.kaon2.api.Ontology ontology, java.lang.Class filter)
          Lists all the axioms of a special kind
 java.util.List<java.lang.String> dumpEntities(org.semanticweb.kaon2.api.Ontology ontology)
          Lists all entities in the ontology
 java.util.List<java.lang.String> dumpEntities(org.semanticweb.kaon2.api.Ontology ontology, java.lang.Class filter)
          Lists all entities of the specified kind in the ontology
static void main(java.lang.String[] args)
          If the tool is being called from the outside, some basic processing is being done
 java.lang.String name()
          Name of the tool
static void printUsage()
          prints the command line parameters and a short info
 boolean processArguments(java.lang.String[] args)
          processes the command line parameteres
 
Methods inherited from class edu.unika.aifb.owltools.tools.KAON2Tool
endConnection, loadOntology, printUsageError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dump

public Dump()
Method Detail

name

public java.lang.String name()
Name of the tool

Specified by:
name in class KAON2Tool
Returns:
the name of the tool

main

public static void main(java.lang.String[] args)
If the tool is being called from the outside, some basic processing is being done

Parameters:
args - Command line parameters. The same as for the OWLtools call

processArguments

public boolean processArguments(java.lang.String[] args)
processes the command line parameteres

Specified by:
processArguments in class KAON2Tool

dump

public java.util.List<java.lang.String> dump(org.semanticweb.kaon2.api.Ontology ontology)
                                      throws org.semanticweb.kaon2.api.KAON2Exception
Lists all the axioms of the ontology

Parameters:
ontology - The ontology to be listed
Returns:
A list of strings, each one representing one axiom
Throws:
org.semanticweb.kaon2.api.KAON2Exception

dump

public java.util.List<java.lang.String> dump(org.semanticweb.kaon2.api.Ontology ontology,
                                             java.lang.Class filter)
                                      throws org.semanticweb.kaon2.api.KAON2Exception
Lists all the axioms of a special kind

Parameters:
ontology - The ontology to be listed from
filter - The type of axiom. Must be one of the KAON2 axiom sublcass
Returns:
A list of strings, each one representing one axiom of the looked for type
Throws:
org.semanticweb.kaon2.api.KAON2Exception

dumpEntities

public java.util.List<java.lang.String> dumpEntities(org.semanticweb.kaon2.api.Ontology ontology)
                                              throws org.semanticweb.kaon2.api.KAON2Exception
Lists all entities in the ontology

Parameters:
ontology - The ontology to be listed from
Returns:
A list of strings, each one being an URI of an entity in the ontology
Throws:
org.semanticweb.kaon2.api.KAON2Exception

dumpEntities

public java.util.List<java.lang.String> dumpEntities(org.semanticweb.kaon2.api.Ontology ontology,
                                                     java.lang.Class filter)
                                              throws org.semanticweb.kaon2.api.KAON2Exception
Lists all entities of the specified kind in the ontology

Parameters:
ontology - The ontology to be listed from
filter - The kind of entities to be looked for
Returns:
A list of strings, each one being an URI of an entity of the specified kind
Throws:
org.semanticweb.kaon2.api.KAON2Exception

count

public int count(org.semanticweb.kaon2.api.Ontology ontology)
          throws org.semanticweb.kaon2.api.KAON2Exception
Counts the number of axioms in an ontology

Parameters:
ontology - The ontology to be counted
Returns:
The number of axioms in the ontology
Throws:
org.semanticweb.kaon2.api.KAON2Exception

count

public int count(org.semanticweb.kaon2.api.Ontology ontology,
                 java.lang.Class filter)
          throws org.semanticweb.kaon2.api.KAON2Exception
Counts the number of axioms of the specified kind in an ontology

Parameters:
ontology - The ontology to be counted
filter - The kind of axioms to be counted
Returns:
The number of axioms of the specified kind in the ontology
Throws:
org.semanticweb.kaon2.api.KAON2Exception

countEntities

public int countEntities(org.semanticweb.kaon2.api.Ontology ontology)
                  throws org.semanticweb.kaon2.api.KAON2Exception
Counts the number of entities mentioned in an ontology

Parameters:
ontology - The ontology to be counted
Returns:
The number of entities in the ontology
Throws:
org.semanticweb.kaon2.api.KAON2Exception

countEntities

public int countEntities(org.semanticweb.kaon2.api.Ontology ontology,
                         java.lang.Class filter)
                  throws org.semanticweb.kaon2.api.KAON2Exception
Counts the number of entities of the specified kind in an ontology

Parameters:
ontology - The ontology to be counted
filter - The kind of entities to be counted
Returns:
The number of entities of the specified kind in the ontology
Throws:
org.semanticweb.kaon2.api.KAON2Exception

compile

public void compile()
Entry point for the command line based usage of the Dump owl tool


printUsage

public static void printUsage()
prints the command line parameters and a short info