Package OWL2generator

Class WriteTriplets

java.lang.Object
OWL2generator.WriteTriplets

public class WriteTriplets
extends java.lang.Object
The WriteTriplets class processes a user-defined file containing triplet definitions (object property relationships) and generates the corresponding OWL code snippets for inclusion in an OWL/XML ontology. This class is responsible for generating the core OWL statements representing relationships between instances (individuals) within the ontology. It relies on separate classes for processing annotations and class information.

Key Functionalities:

Reads Triplet Definition File: Parses a text file structured with sections containing property names, super-properties, annotations, and subject-object class pairs for each triplet.

Processes Triplet Definitions: Extracts property details (names, inverses, annotations), class names, and individual references from each section.

Generates OWL Object and Data Property Declarations: Writes OWL code for object and data properties, including super-properties and annotations.

Generates OWL Triplet Statements: Writes OWL code for individual instances and their relationships using the defined object properties.

Manages Individuals: Maintains a dictionary of class-individuals assigning unique serial numbers and storing annotations.

Handles I/O Operations: Manages file reading and writing operations.

Additional Notes:

The class assumes a pre-defined file format for the triplet data.

The class leverages a SharedUtils class for common OWL code generation tasks.

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/06/12
Version:
1-001
Author:
Edit Hlaszny (https://www.hlaszny.eu/ edithlaszny@gmail.com)