Skip to content

Commit 378f806

Browse files
committed
More work on Intellisense
1 parent 38df8fd commit 378f806

File tree

4 files changed

+54
-22
lines changed

4 files changed

+54
-22
lines changed

OWLSharp/Ontology/Axioms/ClassAxioms/OWLDisjointClasses.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public sealed class OWLDisjointClasses : OWLClassAxiom
3232
{
3333
#region Properties
3434
/// <summary>
35-
/// The set of class expressions asserted to be pairwise disjoint
35+
/// The set of class expressions asserted to be pairwise disjoint (e.g: http://example.org/Male, http://example.org/Female)
3636
/// </summary>
3737
[XmlElement(typeof(OWLClass), ElementName="Class", Order=2)]
3838
[XmlElement(typeof(OWLObjectIntersectionOf), ElementName="ObjectIntersectionOf", Order=2)]
@@ -59,7 +59,7 @@ public sealed class OWLDisjointClasses : OWLClassAxiom
5959
internal OWLDisjointClasses() { }
6060

6161
/// <summary>
62-
/// Builds an OWLDisjointClasses with the given set of class expressions (must be at least 2)
62+
/// Builds an OWLDisjointClasses with the given set of pairwise disjoint class expressions (must be at least 2)
6363
/// </summary>
6464
/// <exception cref="OWLException"></exception>
6565
public OWLDisjointClasses(List<OWLClassExpression> classExpressions) : this()

OWLSharp/Ontology/Axioms/ClassAxioms/OWLDisjointUnion.cs

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ namespace OWLSharp.Ontology
3232
public sealed class OWLDisjointUnion : OWLClassAxiom
3333
{
3434
#region Properties
35+
/// <summary>
36+
/// The class representing the union of the pairwise disjoint class expressions (e.g: http://example.org/Person)
37+
/// </summary>
3538
[XmlElement("Class", Order=2)]
3639
public OWLClass ClassIRI { get; set; }
3740

38-
//Register here all derived types of OWLClassExpression
41+
/// <summary>
42+
/// The set of class expressions asserted to be pairwise disjoint (e.g: http://example.org/Male, http://example.org/Female)
43+
/// </summary>
3944
[XmlElement(typeof(OWLClass), ElementName="Class", Order=3)]
4045
[XmlElement(typeof(OWLObjectIntersectionOf), ElementName="ObjectIntersectionOf", Order=3)]
4146
[XmlElement(typeof(OWLObjectUnionOf), ElementName="ObjectUnionOf", Order=3)]
@@ -58,25 +63,32 @@ public sealed class OWLDisjointUnion : OWLClassAxiom
5863
#endregion
5964

6065
#region Ctors
61-
internal OWLDisjointUnion()
62-
{ }
66+
internal OWLDisjointUnion() { }
67+
68+
/// <summary>
69+
/// Builds an OWLDisjointUnion with the given class and set of pairwise disjoint class expressions (must be at least 2)
70+
/// </summary>
71+
/// <exception cref="OWLException"></exception>
6372
public OWLDisjointUnion(OWLClass classIRI, List<OWLClassExpression> classExpressions) : this()
6473
{
6574
#region Guards
6675
if (classExpressions == null)
67-
throw new OWLException("Cannot create OWLDisjointUnion because given \"classExpressions\" parameter is null");
76+
throw new OWLException($"Cannot create OWLDisjointUnion because given '{nameof(classExpressions)}' parameter is null");
6877
if (classExpressions.Count < 2)
69-
throw new OWLException("Cannot create OWLDisjointUnion because given \"classExpressions\" parameter must contain at least 2 elements");
78+
throw new OWLException($"Cannot create OWLDisjointUnion because given '{nameof(classExpressions)}' parameter must contain at least 2 elements");
7079
if (classExpressions.Any(cex => cex == null))
71-
throw new OWLException("Cannot create OWLDisjointUnion because given \"classExpressions\" parameter contains a null element");
80+
throw new OWLException($"Cannot create OWLDisjointUnion because given '{nameof(classExpressions)}' parameter contains a null element");
7281
#endregion
7382

74-
ClassIRI = classIRI ?? throw new OWLException("Cannot create OWLDisjointUnion because given \"classIRI\" parameter is null");
83+
ClassIRI = classIRI ?? throw new OWLException($"Cannot create OWLDisjointUnion because given '{nameof(classIRI)}' parameter is null");
7584
ClassExpressions = classExpressions;
7685
}
7786
#endregion
7887

7988
#region Methods
89+
/// <summary>
90+
/// Exports this OWLDisjointUnion to an equivalent RDFGraph object
91+
/// </summary>
8092
public override RDFGraph ToRDFGraph()
8193
{
8294
RDFGraph graph = new RDFGraph();

OWLSharp/Ontology/Axioms/ClassAxioms/OWLEquivalentClasses.cs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ namespace OWLSharp.Ontology
3131
public sealed class OWLEquivalentClasses : OWLClassAxiom
3232
{
3333
#region Properties
34-
//Register here all derived types of OWLClassExpression
34+
/// <summary>
35+
/// The set of class expressions asserted to be equivalent (e.g: http://example.org/Human, http://example.org/Person)
36+
/// </summary>
3537
[XmlElement(typeof(OWLClass), ElementName="Class", Order=2)]
3638
[XmlElement(typeof(OWLObjectIntersectionOf), ElementName="ObjectIntersectionOf", Order=2)]
3739
[XmlElement(typeof(OWLObjectUnionOf), ElementName="ObjectUnionOf", Order=2)]
@@ -54,24 +56,31 @@ public sealed class OWLEquivalentClasses : OWLClassAxiom
5456
#endregion
5557

5658
#region Ctors
57-
internal OWLEquivalentClasses()
58-
{ }
59+
internal OWLEquivalentClasses() { }
60+
61+
/// <summary>
62+
/// Builds an OWLEquivalentClasses with the given set of equivalent class expressions (must be at least 2)
63+
/// </summary>
64+
/// <exception cref="OWLException"></exception>
5965
public OWLEquivalentClasses(List<OWLClassExpression> classExpressions) : this()
6066
{
6167
#region Guards
6268
if (classExpressions == null)
63-
throw new OWLException("Cannot create OWLEquivalentClasses because given \"classExpressions\" parameter is null");
69+
throw new OWLException($"Cannot create OWLEquivalentClasses because given '{nameof(classExpressions)}' parameter is null");
6470
if (classExpressions.Count < 2)
65-
throw new OWLException("Cannot create OWLEquivalentClasses because given \"classExpressions\" parameter must contain at least 2 elements");
71+
throw new OWLException($"Cannot create OWLEquivalentClasses because given '{nameof(classExpressions)}' parameter must contain at least 2 elements");
6672
if (classExpressions.Any(cex => cex == null))
67-
throw new OWLException("Cannot create OWLEquivalentClasses because given \"classExpressions\" parameter contains a null element");
73+
throw new OWLException($"Cannot create OWLEquivalentClasses because given '{nameof(classExpressions)}' parameter contains a null element");
6874
#endregion
6975

7076
ClassExpressions = classExpressions;
7177
}
7278
#endregion
7379

7480
#region Methods
81+
/// <summary>
82+
/// Exports this OWLEquivalentClasses to an equivalent RDFGraph object
83+
/// </summary>
7584
public override RDFGraph ToRDFGraph()
7685
{
7786
RDFGraph graph = new RDFGraph();
@@ -87,7 +96,7 @@ public override RDFGraph ToRDFGraph()
8796
//Axiom Triple(s)
8897
List<RDFTriple> axiomTriples = new List<RDFTriple>();
8998
for (int i = 0; i < ClassExpressions.Count - 1; i++)
90-
for (int j = i + 1; j < ClassExpressions.Count; j++)
99+
for (int j = i+1; j < ClassExpressions.Count; j++)
91100
{
92101
RDFTriple axiomTriple = new RDFTriple(clsExpressionIRIs[i], RDFVocabulary.OWL.EQUIVALENT_CLASS, clsExpressionIRIs[j]);
93102
axiomTriples.Add(axiomTriple);

OWLSharp/Ontology/Axioms/ClassAxioms/OWLSubClassOf.cs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ namespace OWLSharp.Ontology
2929
public sealed class OWLSubClassOf : OWLClassAxiom
3030
{
3131
#region Properties
32-
//Register here all derived types of OWLClassExpression
32+
/// <summary>
33+
/// The class expression representing the "child" in the hierarchy (e.g: http://example.org/Student)
34+
/// </summary>
3335
[XmlElement(typeof(OWLClass), ElementName="Class", Order=2)]
3436
[XmlElement(typeof(OWLObjectIntersectionOf), ElementName="ObjectIntersectionOf", Order=2)]
3537
[XmlElement(typeof(OWLObjectUnionOf), ElementName="ObjectUnionOf", Order=2)]
@@ -50,7 +52,9 @@ public sealed class OWLSubClassOf : OWLClassAxiom
5052
[XmlElement(typeof(OWLDataExactCardinality), ElementName="DataExactCardinality", Order=2)]
5153
public OWLClassExpression SubClassExpression { get; set; }
5254

53-
//Register here all derived types of OWLClassExpression
55+
/// <summary>
56+
/// The class expression representing the "mother" in the hierarchy (e.g: http://example.org/Person)
57+
/// </summary>
5458
[XmlElement(typeof(OWLClass), ElementName="Class", Order=3)]
5559
[XmlElement(typeof(OWLObjectIntersectionOf), ElementName="ObjectIntersectionOf", Order=3)]
5660
[XmlElement(typeof(OWLObjectUnionOf), ElementName="ObjectUnionOf", Order=3)]
@@ -73,16 +77,23 @@ public sealed class OWLSubClassOf : OWLClassAxiom
7377
#endregion
7478

7579
#region Ctors
76-
internal OWLSubClassOf()
77-
{ }
80+
internal OWLSubClassOf() { }
81+
82+
/// <summary>
83+
/// Builds an OWLSubClassOf with the given child and mother class expressions
84+
/// </summary>
85+
/// <exception cref="OWLException"></exception>
7886
public OWLSubClassOf(OWLClassExpression subClassExpression, OWLClassExpression superClassExpression) : this()
7987
{
80-
SubClassExpression = subClassExpression ?? throw new OWLException("Cannot create OWLSubClassOf because given \"subClassExpression\" parameter is null");
81-
SuperClassExpression = superClassExpression ?? throw new OWLException("Cannot create OWLSubClassOf because given \"superClassExpression\" parameter is null");
88+
SubClassExpression = subClassExpression ?? throw new OWLException($"Cannot create OWLSubClassOf because given '{nameof(subClassExpression)}' parameter is null");
89+
SuperClassExpression = superClassExpression ?? throw new OWLException($"Cannot create OWLSubClassOf because given '{nameof(superClassExpression)}' parameter is null");
8290
}
8391
#endregion
8492

8593
#region Methods
94+
/// <summary>
95+
/// Exports this OWLSubClassOf to an equivalent RDFGraph object
96+
/// </summary>
8697
public override RDFGraph ToRDFGraph()
8798
{
8899
RDFGraph graph = new RDFGraph();

0 commit comments

Comments
 (0)