Skip to content

Commit 54d584c

Browse files
committed
Completed work on Intellisense!
1 parent 24d63b6 commit 54d584c

13 files changed

+252
-106
lines changed

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLAsymmetricObjectProperty.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,36 @@ namespace OWLSharp.Ontology
3030
public sealed class OWLAsymmetricObjectProperty : OWLObjectPropertyAxiom
3131
{
3232
#region Properties
33-
//Register here all derived types of OWLObjectPropertyExpression
33+
/// <summary>
34+
/// The object property expression asserted to have asymmetric behavior (e.g: http://example.org/isChildOf)
35+
/// </summary>
3436
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3537
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3638
public OWLObjectPropertyExpression ObjectPropertyExpression { get; set; }
3739
#endregion
3840

3941
#region Ctors
40-
internal OWLAsymmetricObjectProperty()
41-
{ }
42+
internal OWLAsymmetricObjectProperty() { }
43+
44+
/// <summary>
45+
/// Builds an OWLAsymmetricObjectProperty with the given object property
46+
/// </summary>
47+
/// <exception cref="OWLException"></exception>
4248
public OWLAsymmetricObjectProperty(OWLObjectProperty objectProperty) : this()
43-
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException("Cannot create OWLAsymmetricObjectProperty because given \"objectProperty\" parameter is null");
49+
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException($"Cannot create OWLAsymmetricObjectProperty because given '{nameof(objectProperty)}' parameter is null");
50+
51+
/// <summary>
52+
/// Builds an OWLAsymmetricObjectProperty with the given anonymous inverse property
53+
/// </summary>
54+
/// <exception cref="OWLException"></exception>
4455
public OWLAsymmetricObjectProperty(OWLObjectInverseOf objectInverseOf) : this()
45-
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException("Cannot create OWLAsymmetricObjectProperty because given \"objectInverseOf\" parameter is null");
56+
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException($"Cannot create OWLAsymmetricObjectProperty because given '{nameof(objectInverseOf)}' parameter is null");
4657
#endregion
4758

4859
#region Methods
60+
/// <summary>
61+
/// Exports this OWLAsymmetricObjectProperty to an equivalent RDFGraph object
62+
/// </summary>
4963
public override RDFGraph ToRDFGraph()
5064
{
5165
RDFGraph graph = new RDFGraph();

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLDisjointObjectProperties.cs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,36 +32,45 @@ namespace OWLSharp.Ontology
3232
public sealed class OWLDisjointObjectProperties : OWLObjectPropertyAxiom
3333
{
3434
#region Properties
35-
//Register here all derived types of OWLObjectPropertyExpression
35+
/// <summary>
36+
/// The set of object property expressions asserted to be pairwise disjoint (e.g: http://example.org/hasParent, http://example.org/hasChild)
37+
/// </summary>
3638
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3739
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3840
public List<OWLObjectPropertyExpression> ObjectPropertyExpressions { get; set; }
3941
#endregion
4042

4143
#region Ctors
42-
internal OWLDisjointObjectProperties()
43-
{ }
44+
internal OWLDisjointObjectProperties() { }
45+
46+
/// <summary>
47+
/// Builds an OWLDisjointObjectProperties with the given set of pairwise disjoint object property expressions (must be at least 2)
48+
/// </summary>
49+
/// <exception cref="OWLException"></exception>
4450
public OWLDisjointObjectProperties(List<OWLObjectPropertyExpression> objectPropertyExpressions) : this()
4551
{
4652
#region Guards
4753
if (objectPropertyExpressions == null)
48-
throw new OWLException("Cannot create OWLDisjointObjectProperties because given \"objectPropertyExpressions\" parameter is null");
54+
throw new OWLException($"Cannot create OWLDisjointObjectProperties because given '{nameof(objectPropertyExpressions)}' parameter is null");
4955
if (objectPropertyExpressions.Count < 2)
50-
throw new OWLException("Cannot create OWLDisjointObjectProperties because given \"objectPropertyExpressions\" parameter must contain at least 2 elements");
56+
throw new OWLException($"Cannot create OWLDisjointObjectProperties because given '{nameof(objectPropertyExpressions)}' parameter must contain at least 2 elements");
5157
if (objectPropertyExpressions.Any(ope => ope == null))
52-
throw new OWLException("Cannot create OWLDisjointObjectProperties because given \"objectPropertyExpressions\" parameter contains a null element");
58+
throw new OWLException($"Cannot create OWLDisjointObjectProperties because given '{nameof(objectPropertyExpressions)}' parameter contains a null element");
5359
#endregion
5460

5561
ObjectPropertyExpressions = objectPropertyExpressions;
5662
}
5763
#endregion
5864

5965
#region Methods
66+
/// <summary>
67+
/// Exports this OWLDisjointObjectProperties to an equivalent RDFGraph object
68+
/// </summary>
6069
public override RDFGraph ToRDFGraph()
6170
{
6271
RDFGraph graph = new RDFGraph();
6372

64-
//propertyDisjointWith
73+
//owl:propertyDisjointWith
6574
if (ObjectPropertyExpressions.Count == 2)
6675
{
6776
RDFResource leftObjPropExpressionIRI = ObjectPropertyExpressions[0].GetIRI();
@@ -78,7 +87,7 @@ public override RDFGraph ToRDFGraph()
7887
graph = graph.UnionWith(annotation.ToRDFGraph(axiomTriple));
7988
}
8089

81-
//AllDisjointProperties
90+
//owl:AllDisjointProperties
8291
else
8392
{
8493
RDFResource allDisjointPropertiesIRI = new RDFResource();

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLEquivalentObjectProperties.cs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,40 @@ namespace OWLSharp.Ontology
3131
public sealed class OWLEquivalentObjectProperties : OWLObjectPropertyAxiom
3232
{
3333
#region Properties
34-
//Register here all derived types of OWLObjectPropertyExpression
34+
/// <summary>
35+
/// The set of object property expressions asserted to be equivalent (e.g: http://example.org/hasMother, http://example.org/hasFemaleParent)
36+
/// </summary>
3537
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3638
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3739
public List<OWLObjectPropertyExpression> ObjectPropertyExpressions { get; set; }
3840
#endregion
3941

4042
#region Ctors
41-
internal OWLEquivalentObjectProperties()
42-
{ }
43+
internal OWLEquivalentObjectProperties() { }
44+
45+
/// <summary>
46+
/// Builds an OWLEquivalentObjectProperties with the given set of equivalent object property expressions (must be at least 2)
47+
/// </summary>
48+
/// <exception cref="OWLException"></exception>
4349
public OWLEquivalentObjectProperties(List<OWLObjectPropertyExpression> objectPropertyExpressions) : this()
4450
{
4551
#region Guards
4652
if (objectPropertyExpressions == null)
47-
throw new OWLException("Cannot create OWLEquivalentObjectProperties because given \"objectPropertyExpressions\" parameter is null");
53+
throw new OWLException($"Cannot create OWLEquivalentObjectProperties because given '{nameof(objectPropertyExpressions)}' parameter is null");
4854
if (objectPropertyExpressions.Count < 2)
49-
throw new OWLException("Cannot create OWLEquivalentObjectProperties because given \"objectPropertyExpressions\" parameter must contain at least 2 elements");
55+
throw new OWLException($"Cannot create OWLEquivalentObjectProperties because given '{nameof(objectPropertyExpressions)}' parameter must contain at least 2 elements");
5056
if (objectPropertyExpressions.Any(ope => ope == null))
51-
throw new OWLException("Cannot create OWLEquivalentObjectProperties because given \"objectPropertyExpressions\" parameter contains a null element");
57+
throw new OWLException($"Cannot create OWLEquivalentObjectProperties because given '{nameof(objectPropertyExpressions)}' parameter contains a null element");
5258
#endregion
5359

5460
ObjectPropertyExpressions = objectPropertyExpressions;
5561
}
5662
#endregion
5763

5864
#region Methods
65+
/// <summary>
66+
/// Exports this OWLEquivalentObjectProperties to an equivalent RDFGraph object
67+
/// </summary>
5968
public override RDFGraph ToRDFGraph()
6069
{
6170
RDFGraph graph = new RDFGraph();
@@ -71,7 +80,7 @@ public override RDFGraph ToRDFGraph()
7180
//Axiom Triple(s)
7281
List<RDFTriple> axiomTriples = new List<RDFTriple>();
7382
for (int i = 0; i < ObjectPropertyExpressions.Count - 1; i++)
74-
for (int j = i + 1; j < ObjectPropertyExpressions.Count; j++)
83+
for (int j = i+1; j < ObjectPropertyExpressions.Count; j++)
7584
{
7685
RDFTriple axiomTriple = new RDFTriple(objPropIRIs[i], RDFVocabulary.OWL.EQUIVALENT_PROPERTY, objPropIRIs[j]);
7786
axiomTriples.Add(axiomTriple);

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLFunctionalObjectProperty.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,36 @@ namespace OWLSharp.Ontology
3030
public sealed class OWLFunctionalObjectProperty : OWLObjectPropertyAxiom
3131
{
3232
#region Properties
33-
//Register here all derived types of OWLObjectPropertyExpression
33+
/// <summary>
34+
/// The object property expression asserted to have functional behavior (e.g: http://example.org/hasBiologicalMother)
35+
/// </summary>
3436
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3537
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3638
public OWLObjectPropertyExpression ObjectPropertyExpression { get; set; }
3739
#endregion
3840

3941
#region Ctors
40-
internal OWLFunctionalObjectProperty()
41-
{ }
42+
internal OWLFunctionalObjectProperty() { }
43+
44+
/// <summary>
45+
/// Builds an OWLFunctionalObjectProperty with the given object property
46+
/// </summary>
47+
/// <exception cref="OWLException"></exception>
4248
public OWLFunctionalObjectProperty(OWLObjectProperty objectProperty) : this()
43-
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException("Cannot create OWLFunctionalObjectProperty because given \"objectProperty\" parameter is null");
49+
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException($"Cannot create OWLFunctionalObjectProperty because given '{nameof(objectProperty)}' parameter is null");
50+
51+
/// <summary>
52+
/// Builds an OWLFunctionalObjectProperty with the given anonymous inverse property
53+
/// </summary>
54+
/// <exception cref="OWLException"></exception>
4455
public OWLFunctionalObjectProperty(OWLObjectInverseOf objectInverseOf) : this()
45-
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException("Cannot create OWLFunctionalObjectProperty because given \"objectInverseOf\" parameter is null");
56+
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException($"Cannot create OWLFunctionalObjectProperty because given '{nameof(objectInverseOf)}' parameter is null");
4657
#endregion
4758

4859
#region Methods
60+
/// <summary>
61+
/// Exports this OWLFunctionalObjectProperty to an equivalent RDFGraph object
62+
/// </summary>
4963
public override RDFGraph ToRDFGraph()
5064
{
5165
RDFGraph graph = new RDFGraph();

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLInverseFunctionalObjectProperty.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,36 @@ namespace OWLSharp.Ontology
3131
public sealed class OWLInverseFunctionalObjectProperty : OWLObjectPropertyAxiom
3232
{
3333
#region Properties
34-
//Register here all derived types of OWLObjectPropertyExpression
34+
/// <summary>
35+
/// The object property expression asserted to have inverse functional behavior (e.g: http://example.org/hasSSN)
36+
/// </summary>
3537
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3638
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3739
public OWLObjectPropertyExpression ObjectPropertyExpression { get; set; }
3840
#endregion
3941

4042
#region Ctors
41-
internal OWLInverseFunctionalObjectProperty()
42-
{ }
43+
internal OWLInverseFunctionalObjectProperty() { }
44+
45+
/// <summary>
46+
/// Builds an OWLInverseFunctionalObjectProperty with the given object property
47+
/// </summary>
48+
/// <exception cref="OWLException"></exception>
4349
public OWLInverseFunctionalObjectProperty(OWLObjectProperty objectProperty) : this()
44-
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException("Cannot create OWLInverseFunctionalObjectProperty because given \"objectProperty\" parameter is null");
50+
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException($"Cannot create OWLInverseFunctionalObjectProperty because given '{nameof(objectProperty)}' parameter is null");
51+
52+
/// <summary>
53+
/// Builds an OWLInverseFunctionalObjectProperty with the given anonymous inverse property
54+
/// </summary>
55+
/// <exception cref="OWLException"></exception>
4556
public OWLInverseFunctionalObjectProperty(OWLObjectInverseOf objectInverseOf) : this()
46-
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException("Cannot create OWLInverseFunctionalObjectProperty because given \"objectInverseOf\" parameter is null");
57+
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException($"Cannot create OWLInverseFunctionalObjectProperty because given '{nameof(objectInverseOf)}' parameter is null");
4758
#endregion
4859

4960
#region Methods
61+
/// <summary>
62+
/// Exports this OWLInverseFunctionalObjectProperty to an equivalent RDFGraph object
63+
/// </summary>
5064
public override RDFGraph ToRDFGraph()
5165
{
5266
RDFGraph graph = new RDFGraph();

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLInverseObjectProperties.cs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,39 @@ namespace OWLSharp.Ontology
3030
public sealed class OWLInverseObjectProperties : OWLObjectPropertyAxiom
3131
{
3232
#region Properties
33-
//Register here all derived types of OWLObjectPropertyExpression
33+
/// <summary>
34+
/// Represents the object property expression involved at "left" side of the relation (e.g: http://example.org/hasParent)
35+
/// </summary>
3436
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3537
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3638
public OWLObjectPropertyExpression LeftObjectPropertyExpression { get; set; }
3739

38-
//Register here all derived types of OWLObjectPropertyExpression
40+
/// <summary>
41+
/// Represents the object property expression involved at "right" side of the relation (e.g: http://example.org/hasChild)
42+
/// </summary>
3943
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=3)]
4044
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=3)]
4145
public OWLObjectPropertyExpression RightObjectPropertyExpression { get; set; }
4246
#endregion
4347

4448
#region Ctors
45-
internal OWLInverseObjectProperties()
46-
{ }
49+
internal OWLInverseObjectProperties() { }
50+
51+
/// <summary>
52+
/// Builds an OWLInverseObjectProperties with the given "left" and "right" object property expressions
53+
/// </summary>
54+
/// <exception cref="OWLException"></exception>
4755
public OWLInverseObjectProperties(OWLObjectPropertyExpression leftObjectPropertyExpression, OWLObjectPropertyExpression rightObjectPropertyExpression) : this()
4856
{
49-
LeftObjectPropertyExpression = leftObjectPropertyExpression ?? throw new OWLException("Cannot create OWLInverseObjectProperties because given \"leftObjectPropertyExpression\" parameter is null");
50-
RightObjectPropertyExpression = rightObjectPropertyExpression ?? throw new OWLException("Cannot create OWLInverseObjectProperties because given \"rightObjectPropertyExpression\" parameter is null");
57+
LeftObjectPropertyExpression = leftObjectPropertyExpression ?? throw new OWLException($"Cannot create OWLInverseObjectProperties because given '{nameof(leftObjectPropertyExpression)}' parameter is null");
58+
RightObjectPropertyExpression = rightObjectPropertyExpression ?? throw new OWLException($"Cannot create OWLInverseObjectProperties because given '{nameof(rightObjectPropertyExpression)}' parameter is null");
5159
}
5260
#endregion
5361

5462
#region Methods
63+
/// <summary>
64+
/// Exports this OWLInverseObjectProperties to an equivalent RDFGraph object
65+
/// </summary>
5566
public override RDFGraph ToRDFGraph()
5667
{
5768
RDFGraph graph = new RDFGraph();

OWLSharp/Ontology/Axioms/ObjectPropertyAxioms/OWLIrreflexiveObjectProperty.cs

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,36 @@ namespace OWLSharp.Ontology
2929
public sealed class OWLIrreflexiveObjectProperty : OWLObjectPropertyAxiom
3030
{
3131
#region Properties
32-
//Register here all derived types of OWLObjectPropertyExpression
32+
/// <summary>
33+
/// The object property expression asserted to have irreflexive behavior (e.g: http://example.org/isParentOf)
34+
/// </summary>
3335
[XmlElement(typeof(OWLObjectProperty), ElementName="ObjectProperty", Order=2)]
3436
[XmlElement(typeof(OWLObjectInverseOf), ElementName="ObjectInverseOf", Order=2)]
3537
public OWLObjectPropertyExpression ObjectPropertyExpression { get; set; }
3638
#endregion
3739

3840
#region Ctors
39-
internal OWLIrreflexiveObjectProperty()
40-
{ }
41+
internal OWLIrreflexiveObjectProperty() { }
42+
43+
/// <summary>
44+
/// Builds an OWLIrreflexiveObjectProperty with the given object property
45+
/// </summary>
46+
/// <exception cref="OWLException"></exception>
4147
public OWLIrreflexiveObjectProperty(OWLObjectProperty objectProperty) : this()
42-
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException("Cannot create OWLIrreflexiveObjectProperty because given \"objectProperty\" parameter is null");
48+
=> ObjectPropertyExpression = objectProperty ?? throw new OWLException($"Cannot create OWLIrreflexiveObjectProperty because given '{nameof(objectProperty)}' parameter is null");
49+
50+
/// <summary>
51+
/// Builds an OWLIrreflexiveObjectProperty with the given anonymous inverse property
52+
/// </summary>
53+
/// <exception cref="OWLException"></exception>
4354
public OWLIrreflexiveObjectProperty(OWLObjectInverseOf objectInverseOf) : this()
44-
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException("Cannot create OWLIrreflexiveObjectProperty because given \"objectInverseOf\" parameter is null");
55+
=> ObjectPropertyExpression = objectInverseOf ?? throw new OWLException($"Cannot create OWLIrreflexiveObjectProperty because given '{nameof(objectInverseOf)}' parameter is null");
4556
#endregion
4657

4758
#region Methods
59+
/// <summary>
60+
/// Exports this OWLIrreflexiveObjectProperty to an equivalent RDFGraph object
61+
/// </summary>
4862
public override RDFGraph ToRDFGraph()
4963
{
5064
RDFGraph graph = new RDFGraph();

0 commit comments

Comments
 (0)