# Fuzzy OWL 2 XML Annotations
This document outlines the XML structures used to represent FuzzyDL concepts, datatypes, and roles within the FuzzyOWL2 framework, as defined in the source code. It includes the XML representation, descriptions, and keys for each element, as well as the XML structures generated by the `FuzzyXML` utility class.
## Logic inference type
Represents the logic inference type used in the fuzzy ontology.
```xml
```
**Description:** Specifies the type of fuzzy logic inference applied in the ontology, such as "Zadeh", "Ćukasiewicz", and "Classical". The default logic used is "lukasiewicz" if not specified.
**Keys:**
* `logic`: The type of fuzzy logic inference used in the ontology. Possible values include "lukasiewicz", "zadeh", and "classical".
------
## Concepts
### Modified Concept
Represents a concept that has been modified by a specific function or hedge.
```xml
```
**Description:** A concept definition where a base concept is altered by a modifier (e.g., "very", "somewhat"). The modifier is applied to the base concept to derive the new concept.
**Keys:**
* `type`: The type of the concept, which is "modified".
* `modifier`: The IRI or identifier of the modifier being applied.
* `base`: The IRI or identifier of the base concept being modified.
### Weighted Concept
Represents a concept that is associated with a specific weight, serving as a fundamental element for weighted aggregation operations.
```xml
```
**Description:** A concept paired with a numerical weight, typically used in aggregation operations like weighted sum or weighted average.
**Keys:**
* `type`: The type of the concept, which is "weighted".
* `value`: The numerical weight (degree) associated with the concept.
* `base`: The IRI or identifier of the concept being weighted.
### Weighted Min/Max/Sum/SumZero
Represents fuzzy concepts defined using weighted aggregation operators: weighted minimum, weighted maximum, weighted sum, or weighted sum zero.
```xml
```
**Description:** Aggregates a list of sub-concepts using a specific weighted operator. The structure contains a list of weighted concepts.
**Keys:**
* `type`: The aggregation operator type. Values can be "weightedMinimum", "weightedMaximum", "weightedSum", or "weightedSumZero".
* `Concept` (child): Nested elements representing the weighted sub-concepts.
* `type`: "weighted".
* `value`: The weight for the sub-concept.
* `base`: The IRI of the sub-concept.
### OWA/Choquet/Sugeno/QuasiSugeno
Represents concepts defined using advanced aggregation operators: Ordered Weighted Averaging (OWA), Choquet integral, Sugeno integral, or Quasi-Sugeno integral.
```xml
0.5
0.5
Concept1IRI
Concept2IRI
```
**Description:** Defines a concept by aggregating a list of concepts using specific weights and an aggregation logic (OWA, Choquet, etc.).
**Keys:**
* `type`: The aggregation operator type. Values can be "owa", "choquet", "sugeno", or "quasisugeno".
* `Weights`: Container for the list of numerical weights.
* `Weight`: A single numerical weight value.
* `Names`: Container for the list of concept IRIs.
* `Name`: The IRI of a concept included in the aggregation.
### Quantified OWA
Represents a concept type that employs Quantified Ordered Weighted Averaging (OWA) aggregation.
```xml
Concept1IRI
Concept2IRI
```
**Description:** Similar to OWA, but uses a quantifier to determine the weighting scheme rather than an explicit list of weights.
**Keys:**
* `type`: The type of the concept, which is "qowa".
* `quantifier`: The quantifier IRI defining the aggregation is a `FuzzyConcreteConcept`.
* `Names`: Container for the list of concept IRIs.
* `Name`: The IRI of a concept included in the aggregation.
### Nominal
Represents a concept defined by a fuzzy nominal, typically involving specific individuals or enumerated values with fuzzy membership degrees.
```xml
```
**Description:** Associates a specific individual with a fuzzy degree of membership to a concept.
**Keys:**
* `type`: The type of the concept, which is "nominal".
* `value`: The degree of membership for the individual.
* `individual`: The IRI of the individual.
------
## Datatypes
### Crisp
Represents a crisp (non-fuzzy) datatype defined by an interval [a, b].
```xml
```
**Description:** Defines a datatype where membership is 1.0 within the interval [a, b] and 0.0 otherwise.
**Keys:**
* `type`: The shape of the datatype, which is "crisp".
* `a`: The lower bound of the interval.
* `b`: The upper bound of the interval.
### Left Shoulder
Represents a left shoulder membership function shape.
```xml
```
**Description:** Defines a datatype where membership decreases from 1.0 to 0.0 over the interval [a, b].
**Keys:**
* `type`: The shape of the datatype, which is "leftshoulder".
* `a`: The point where membership starts to decrease (is 1.0).
* `b`: The point where membership reaches 0.0.
### Right Shoulder
Represents a right shoulder membership function shape.
```xml
```
**Description:** Defines a datatype where membership increases from 0.0 to 1.0 over the interval [a, b].
**Keys:**
* `type`: The shape of the datatype, which is "rightshoulder".
* `a`: The point where membership is 0.0.
* `b`: The point where membership reaches 1.0.
### Triangular
Represents a triangular membership function shape.
```xml
```
**Description:** Defines a datatype with a triangular shape defined by three points: the start of the support (a), the peak (b), and the end of the support (c).
**Keys:**
* `type`: The shape of the datatype, which is "triangular".
* `a`: The leftmost point of the triangle (membership 0.0).
* `b`: The peak of the triangle (membership 1.0).
* `c`: The rightmost point of the triangle (membership 0.0).
### Trapezoidal
Represents a trapezoidal membership function shape.
```xml
```
**Description:** Defines a datatype with a trapezoidal shape defined by four points: start of support (a), start of core (b), end of core (c), and end of support (d).
**Keys:**
* `type`: The shape of the datatype, which is "trapezoidal".
* `a`: The leftmost point of the trapezoid (membership 0.0).
* `b`: The start of the top flat segment (membership 1.0).
* `c`: The end of the top flat segment (membership 1.0).
* `d`: The rightmost point of the trapezoid (membership 0.0).
### Linear
Represents a linear membership function.
```xml
```
**Description:** Defines a datatype with a linear membership function.
**Keys:**
* `type`: The shape of the datatype, which is "linear".
* `a`: Parameter defining the linear function.
* `b`: Parameter defining the linear function.
### Modified Datatype
Represents a datatype that has been modified by a specific function.
```xml
```
**Description:** A datatype definition where a base datatype is altered by a modifier, affecting the fuzzy interpretation of the datatype.
**Keys:**
* `type`: The type of the datatype, which is "modified".
* `modifier`: The IRI or identifier of the modifier being applied.
* `base`: The IRI or identifier of the base datatype being modified.
------
## Roles
### Modified Role
Represents a role (object property) that has been modified by a specific function.
```xml
```
**Description:** A role definition where a base role is altered by a modifier, affecting the fuzzy interpretation of the property.
**Keys:**
* `type`: The type of the role, which is "modified".
* `modifier`: The IRI or identifier of the modifier being applied.
* `base`: The IRI or identifier of the base role being modified.
------
## Modifiers
### Linear Modifier
Represents a linear modifier that can be applied to concepts or roles.
```xml
```
**Description:** A linear modifier that transforms the degree of membership of a concept or role using a linear function defined by the parameter `c`.
**Keys:**
* `type`: The type of the modifier, which is "linear".
* `c`: The parameter defining the linear transformation.
### Triangular Modifier
Represents a triangular modifier that can be applied to concepts or roles.
```xml
```
**Description:** A triangular modifier that transforms the degree of membership of a concept or role using a triangular function defined by three parameters: `a`, `b`, and `c`.
**Keys:**
* `type`: The type of the modifier, which is "triangular".
* `a`: The leftmost point of the triangle (membership 0.0).
* `b`: The peak of the triangle (membership 1.0).
* `c`: The rightmost point of the triangle (membership 0.0).
------
## Axioms
Represents an axiom that can be annotated with a degree of truth, allowing for the expression of fuzzy constraints in OWL 2.
```xml
```
**Description:** An axiom annotated with a degree, indicating the fuzzy degree of truth associated with the axiom. This allows for representing axioms that are not strictly true or false but have a certain degree of validity.
**Keys:**
* `value`: The value of the degree annotation, representing the fuzzy degree associated with the axiom.