Package OWL2generator

Class OWL2_Generator

java.lang.Object
OWL2generator.OWL2_Generator

public class OWL2_Generator
extends java.lang.Object
The OWL2_Generator class serves as the core application logic within a Java framework for generating OWL/XML ontologies: It leverages text files containing configuration details to construct the ontology structure. This class acts as the central controller, directing the overall process of ontology generation based on user-provided configuration files.

Key Functionalities:

Processes Command Line Arguments: Evaluates user-provided arguments to determine the input/output directory for text files used during generation.

Controls Ontology Generation Sequence: Orchestrates the creation of the ontology by calling dedicated modules responsible for:

  • Generating the OWL header
  • Defining class structures
  • Setting class disjointness
  • Defining object property triplets (relationships between individuals)

Manages Configuration Files: Employs separate text files for each generation step, allowing for modularity and customization.

Logs Console Messages: Provides informative messages during execution to track progress.

Additional Notes:

The class utilizes pre-defined file paths and comments within the code, suggesting potential improvements for user-configurable settings.

The comments indicate the framework's reliance on external classes.

Environment:

  • IDE: Eclipse IDE for Java Developers
  • Version: 2021-12 (4.22.0)
  • Build id: 20211202-1639
  • HW Model Name: iMac, MacOS Monterey, 12.5.1
  • Processor Name: Quad-Core Intel Core i5
  • Processor Speed: 3.2 GHz
  • Memory: 32 GB 1867 MHz DDR3
  • Disk: APPLE SSD SM0256G
  • Serial: DGKRC080GG7V
Since:
2024/05/28
Version:
1-001
Author:
Edit Hlaszny (https://www.hlaszny.eu/)
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private java.lang.String baseURI
    The base URI plays a significant role in managing namespaces, resolving references, and potentially aiding in disambiguation within OWL/XML encoded ontologies.
    private java.lang.String classAnnotations
    Text file name, which defines the ontologz OWL class names.
    private java.lang.String commentChar
    Any text following the comment string on the first position is ignored by this simple parser in the class
    private java.lang.String defaultIOdirName
    This app is a Java-based, text file controlled OWL2 ontology generator.
    private java.lang.String disjointClassNameFile
    Text file name, which defines the disjoint OWL classes
    private java.lang.String headerDefFile
    Text file name, which defines the parameters of the ontology header
    private java.lang.String indentedClassNames
    Text file name, which defines the ontologz OWL class names.
    private java.lang.String IOdirectoryName
    You can overwrite this value with the 1st calling argument.
    private java.lang.String keyWord_CLASS_ANNOTATIONS  
    private java.lang.String keyWord_CLASS_NAME  
    private java.lang.String keyWord_END_OF_DISJOINT_CLASS_SET  
    private java.lang.String keyWord_END_OF_TRIPLET_SET  
    private java.lang.String keyWord_START_OF_DISJOINT_CLASS_SET
    Keywords in the control files
    private java.lang.String keyWord_START_OF_TRIPLET_SET  
    private int leadingZeroesInNameSuffix
    The OWL class individuals are with leading zeroes serial numbers suffixed.
    private java.lang.String OWLresultFile
    Text file name, which defines the name of the OWL2/XML encoded result file
    private java.lang.String runableJarfile
    Name of the JAR-file making the app stand alone runable
    private boolean silentMode
    Silent mode> no log messages will be displayed
    private java.lang.String tripletDefFile
    Text file name, which defines the triplets
  • Constructor Summary

    Constructors 
    Constructor Description
    OWL2_Generator()  
  • Method Summary

    Modifier and Type Method Description
    private void evalCallingArgs​(java.lang.String[] args)
    The method evaluates the calling arguments, and set the default directory, if it is set by the $1 arg.
    private void generateOWL2ontology​(java.lang.String[] args)
    The method controls the sequence of the ontology generation.
    void log​(java.lang.String logEntry)
    Writes text message to the console
    void Log​(java.lang.String logEntry)  
    static void main​(java.lang.String[] args)
    The main method starts the app.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • main

      public static final void main​(java.lang.String[] args)
      The main method starts the app.
      Parameters:
      args - Java standard calling arguments
    • evalCallingArgs

      private void evalCallingArgs​(java.lang.String[] args)
      The method evaluates the calling arguments, and set the default directory, if it is set by the $1 arg.
      Parameters:
      args - Java standard calling arguments
    • generateOWL2ontology

      private void generateOWL2ontology​(java.lang.String[] args)
      The method controls the sequence of the ontology generation. The app consists of the following modules (each of them is controlled by the corresponding text parameter files):
      1) generating the OWL-header
      2) defining the class structures
      3) setting class disjointness
      4) defining triplets
      Parameters:
      args - Java standard calling arguments
    • log

      public void log​(java.lang.String logEntry)
      Writes text message to the console
      Parameters:
      logEntry - displayed message
    • Log

      public void Log​(java.lang.String logEntry)