3using System.Threading.Tasks;
36 !
string.IsNullOrEmpty(GraphUri.Query) ||
37 !
string.IsNullOrEmpty(GraphUri.Fragment) ||
40 return Grade.NotAtAll;
43 string s = GraphUri.AbsolutePath;
44 string[] Parts = s.Split(
'/');
47 if (c < 1 || !
string.IsNullOrEmpty(Parts[0]))
48 return Grade.NotAtAll;
50 if (
string.IsNullOrEmpty(Parts[c - 1]))
57 return Grade.NotAtAll;
59 return Grade.Excellent;
74 !
string.IsNullOrEmpty(GraphUri.Query) ||
75 !
string.IsNullOrEmpty(GraphUri.Fragment) ||
85 if (DynamicGraph is
null)
111 string[] Parts = Path.Split(
'/');
112 int c = Parts.Length;
114 if (c < 1 || !
string.IsNullOrEmpty(Parts[0]))
117 if (
string.IsNullOrEmpty(Parts[c - 1]))
123 string SourceID = HttpUtility.UrlDecode(Parts[1]);
127 if (!await Source.CanViewAsync(Caller))
136 string NodeID = HttpUtility.UrlDecode(Parts[2]);
147 string Partition = HttpUtility.UrlDecode(Parts[2]);
148 NodeID = HttpUtility.UrlDecode(Parts[3]);
149 NodeObj = await Source.GetNodeAsync(
new ThingReference(NodeID, SourceID, Partition));
159 NodeID = HttpUtility.UrlDecode(Parts[2]);
160 NodeObj = await Source.GetNodeAsync(
new ThingReference(NodeID, SourceID));
167 return HttpUtility.UrlDecode(Parts[3])
switch
174 Partition = HttpUtility.UrlDecode(Parts[2]);
175 NodeID = HttpUtility.UrlDecode(Parts[3]);
176 NodeObj = await Source.GetNodeAsync(
new ThingReference(NodeID, SourceID, Partition));
183 return HttpUtility.UrlDecode(Parts[4])
switch
201 return new Uri(
Gateway.
GetUrl(
"/" + HttpUtility.UrlEncode(SourceID)));
211 StringBuilder sb =
new StringBuilder();
224 sb.Append(HttpUtility.UrlEncode(Node.
SourceId));
226 if (!
string.IsNullOrEmpty(Node.
Partition))
229 sb.Append(HttpUtility.UrlEncode(Node.
Partition));
233 sb.Append(HttpUtility.UrlEncode(Node.
NodeId));
244 StringBuilder sb =
new StringBuilder();
259 sb.Append(HttpUtility.UrlEncode(Command.CommandID));
270 StringBuilder sb =
new StringBuilder();
Static class managing the runtime environment of the IoT Gateway.
static bool IsDomain(string DomainOrHost, bool IncludeAlternativeDomains)
If a domain or host name represents the gateway.
static string GetUrl(string LocalResource)
Gets a URL for a resource.
static ConcentratorServer ConcentratorServer
XMPP Concentrator Server.
The server has not found anything matching the Request-URI. No indication is given of whether the con...
Contains information about a language.
Basic access point for runtime language localization.
static async Task< Language > GetDefaultLanguageAsync()
Gets the default language.
Base class for all nodes in a parsed script tree.
Tokens available in request.
Makes harmonized data sources and nodes available as semantic information.
async Task< ISemanticCube > LoadGraph(Uri GraphUri, ScriptNode Node, bool NullIfNotFound, RequestOrigin Caller)
Loads the graph
DataSourceGraph()
Makes harmonized data sources and nodes available as semantic information.
static Uri GetCommandUri(INode Node, ICommand Command)
Gets the Graph URI for a node command.
static Uri GetNodeUri(INode Node)
Gets the Graph URI for a node.
static void GetCommandUri(INode Node, ICommand Command, StringBuilder sb)
Gets the Graph URI for a node command.
static Uri GetSourceUri(string SourceID)
Gets the Graph URI for a data source.
static void GetNodeUri(INode Node, StringBuilder sb)
Gets the Graph URI for a node.
Grade Supports(Uri GraphUri)
How well the source handles a given Graph URI.
static void GetOperationUri(INode Node, string Category, string Action, StringBuilder sb)
Gets the Graph URI for a node operation.
static async Task< IDynamicGraph > FindDynamicGraph(string Path, RequestOrigin Caller)
Finds a dynamic graph, based on its relative path.
static Uri GetOperationUri(INode Node, string Category, string Action)
Gets the Graph URI for a node operation.
Dynamic graph of the Neuron.
Dynamic graph of a node in a data source on the Neuron.
Dynamic graph of a node node action.
Dynamic graph of a data source on the Neuron.
Contains a reference to a thing
Interface for graph sources.
Interface for datasources that are published through the concentrator interface.
Interface for nodes that are published through the concentrator interface.
Task< bool > CanViewAsync(RequestOrigin Caller)
If the node is visible to the caller.
string Partition
Optional partition in which the Node ID is unique.
string SourceId
Optional ID of source containing node.
Interface for dynamic graphs.
Task GenerateGraph(InMemorySemanticCube Result, Language Language, RequestOrigin Caller)
Generates the semantic graph.