Skip to content

Commit 38df8fd

Browse files
committed
More work on Intellisense
1 parent 47c8520 commit 38df8fd

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

OWLSharp/Ontology/Axioms/ClassAxioms/OWLDisjointClasses.cs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ namespace OWLSharp.Ontology
3131
public sealed class OWLDisjointClasses : OWLClassAxiom
3232
{
3333
#region Properties
34-
//Register here all derived types of OWLClassExpression
34+
/// <summary>
35+
/// The set of class expressions asserted to be pairwise disjoint
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,29 +56,36 @@ public sealed class OWLDisjointClasses : OWLClassAxiom
5456
#endregion
5557

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

79-
//disjointWith
88+
//owl:disjointWith
8089
if (ClassExpressions.Count == 2)
8190
{
8291
RDFResource leftClsExpressionIRI = ClassExpressions[0].GetIRI();
@@ -93,7 +102,7 @@ public override RDFGraph ToRDFGraph()
93102
graph = graph.UnionWith(annotation.ToRDFGraph(axiomTriple));
94103
}
95104

96-
//AllDisjointClasses
105+
//owl:AllDisjointClasses
97106
else
98107
{
99108
RDFResource allDisjointClassesIRI = new RDFResource();

0 commit comments

Comments
 (0)