-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathISemanticCube.cs
More file actions
127 lines (111 loc) · 5.3 KB
/
ISemanticCube.cs
File metadata and controls
127 lines (111 loc) · 5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Waher.Content.Semantic
{
/// <summary>
/// Interface for semantic cubes.
/// </summary>
public interface ISemanticCube : ISemanticModel
{
/// <summary>
/// Gets available triples in the cube, having a given subject.
/// </summary>
/// <param name="Subject">Subject</param>
/// <returns>Available triples, ordered by predicate (X) and object (Y), or null if none.</returns>
Task<ISemanticPlane> GetTriplesBySubject(ISemanticElement Subject);
/// <summary>
/// Gets available triples in the cube, having a given predicate.
/// </summary>
/// <param name="Predicate">Predicate</param>
/// <returns>Available triples, ordered by subject (X) and object (Y), or null if none.</returns>
Task<ISemanticPlane> GetTriplesByPredicate(ISemanticElement Predicate);
/// <summary>
/// Gets available triples in the cube, having a given object.
/// </summary>
/// <param name="Object">Object</param>
/// <returns>Available triples, ordered by subject (X) and predicate (Y), or null if none.</returns>
Task<ISemanticPlane> GetTriplesByObject(ISemanticElement Object);
/// <summary>
/// Gets available triples in the cube, having a given subject and predicate.
/// </summary>
/// <param name="Subject">Subject</param>
/// <param name="Predicate">Predicate</param>
/// <returns>Available triples, or null if none.</returns>
Task<ISemanticLine> GetTriplesBySubjectAndPredicate(ISemanticElement Subject, ISemanticElement Predicate);
/// <summary>
/// Gets available triples in the cube, having a given subject and object.
/// </summary>
/// <param name="Subject">Subject</param>
/// <param name="Object">Object</param>
/// <returns>Available triples, or null if none.</returns>
Task<ISemanticLine> GetTriplesBySubjectAndObject(ISemanticElement Subject, ISemanticElement Object);
/// <summary>
/// Gets available triples in the cube, having a given predicate and subject.
/// </summary>
/// <param name="Predicate">Predicate</param>
/// <param name="Subject">Subject</param>
/// <returns>Available triples, or null if none.</returns>
Task<ISemanticLine> GetTriplesByPredicateAndSubject(ISemanticElement Predicate, ISemanticElement Subject);
/// <summary>
/// Gets available triples in the cube, having a given predicate and object.
/// </summary>
/// <param name="Predicate">Predicate</param>
/// <param name="Object">Object</param>
/// <returns>Available triples, or null if none.</returns>
Task<ISemanticLine> GetTriplesByPredicateAndObject(ISemanticElement Predicate, ISemanticElement Object);
/// <summary>
/// Gets available triples in the cube, having a given object and subject.
/// </summary>
/// <param name="Object">Object</param>
/// <param name="Subject">Subject</param>
/// <returns>Available triples, or null if none.</returns>
Task<ISemanticLine> GetTriplesByObjectAndSubject(ISemanticElement Object, ISemanticElement Subject);
/// <summary>
/// Gets available triples in the cube, having a given object and predicate.
/// </summary>
/// <param name="Object">Object</param>
/// <param name="Predicate">Predicate</param>
/// <returns>Available triples, or null if none.</returns>
Task<ISemanticLine> GetTriplesByObjectAndPredicate(ISemanticElement Object, ISemanticElement Predicate);
/// <summary>
/// Gets available triples in the cube, having a given subject, predicate and object.
/// </summary>
/// <param name="Subject">Subject</param>
/// <param name="Predicate">Predicate</param>
/// <param name="Object">Object</param>
/// <returns>Available triples, or null if none.</returns>
Task<IEnumerable<ISemanticTriple>> GetTriplesBySubjectAndPredicateAndObject(ISemanticElement Subject, ISemanticElement Predicate, ISemanticElement Object);
/// <summary>
/// Gets an enumerator of all subjects.
/// </summary>
/// <returns>Enumerator of semantic elements.</returns>
Task<IEnumerator<ISemanticElement>> GetSubjectEnumerator();
/// <summary>
/// Gets an enumerator of all predicates.
/// </summary>
/// <returns>Enumerator of semantic elements.</returns>
Task<IEnumerator<ISemanticElement>> GetPredicateEnumerator();
/// <summary>
/// Gets an enumerator of all objects.
/// </summary>
/// <returns>Enumerator of semantic elements.</returns>
Task<IEnumerator<ISemanticElement>> GetObjectEnumerator();
/// <summary>
/// Gets available triples in the cube, having a given value, along a given axis.
/// </summary>
/// <param name="Value">Value</param>
/// <param name="AxisIndex">Axis Index: 0=Subject, 1=Predicate, 2=Object.</param>
/// <returns>Available triples, or null if none.</returns>
Task<IEnumerable<ISemanticTriple>> GetTriples(ISemanticElement Value, int AxisIndex);
/// <summary>
/// Gets available triples in the cube, having two given values, along two given axes.
/// </summary>
/// <param name="Value1">Value 1</param>
/// <param name="Axis1Index">Axis 1 Index: 0=Subject, 1=Predicate, 2=Object.</param>
/// <param name="Value2">Value 2</param>
/// <param name="Axis2Index">Axis 2 Index: 0=Subject, 1=Predicate, 2=Object.</param>
/// <returns>Available triples, or null if none.</returns>
Task<IEnumerable<ISemanticTriple>> GetTriples(ISemanticElement Value1, int Axis1Index,
ISemanticElement Value2, int Axis2Index);
}
}