|
3 | 3 |
|
4 | 4 | namespace JsonLD.Core |
5 | 5 | { |
6 | | - /// <summary> |
7 | | - /// Interface for parsing RDF into the RDF Dataset objects to be used by |
8 | | - /// JSONLD.fromRDF |
9 | | - /// </summary> |
10 | | - /// <author>Tristan</author> |
11 | | - public interface IRDFParser |
12 | | - { |
13 | | - /// <summary> |
14 | | - /// Parse the input into the internal RDF Dataset format The format is a Map |
15 | | - /// with the following structure: { GRAPH_1: [ TRIPLE_1, TRIPLE_2, ..., |
16 | | - /// TRIPLE_N ], GRAPH_2: [ TRIPLE_1, TRIPLE_2, ..., TRIPLE_N ], ... |
17 | | - /// </summary> |
18 | | - /// <remarks> |
19 | | - /// Parse the input into the internal RDF Dataset format The format is a Map |
20 | | - /// with the following structure: { GRAPH_1: [ TRIPLE_1, TRIPLE_2, ..., |
21 | | - /// TRIPLE_N ], GRAPH_2: [ TRIPLE_1, TRIPLE_2, ..., TRIPLE_N ], ... GRAPH_N: |
22 | | - /// [ TRIPLE_1, TRIPLE_2, ..., TRIPLE_N ] } |
23 | | - /// GRAPH: Must be the graph name/IRI. if no graph is present for a triple, |
24 | | - /// add it to the "@default" graph TRIPLE: Must be a map with the following |
25 | | - /// structure: { "subject" : SUBJECT "predicate" : PREDICATE "object" : |
26 | | - /// OBJECT } |
27 | | - /// Each of the values in the triple map must also be a map with the |
28 | | - /// following key-value pairs: "value" : The value of the node. "subject" can |
29 | | - /// be an IRI or blank node id. "predicate" should only ever be an IRI |
30 | | - /// "object" can be and IRI or blank node id, or a literal value (represented |
31 | | - /// as a string) "type" : "IRI" if the value is an IRI or "blank node" if the |
32 | | - /// value is a blank node. "object" can also be "literal" in the case of |
33 | | - /// literals. The value of "object" can also contain the following optional |
34 | | - /// key-value pairs: "language" : the language value of a string literal |
35 | | - /// "datatype" : the datatype of the literal. (if not set will default to |
36 | | - /// XSD:string, if set to null, null will be used). |
37 | | - /// The RDFDatasetUtils class has the following helper methods to make |
38 | | - /// generating this format easier: result = getInitialRDFDatasetResult(); |
39 | | - /// triple = generateTriple(s,p,o); triple = |
40 | | - /// generateTriple(s,p,value,datatype,language); |
41 | | - /// addTripleToRDFDatasetResult(result, graphName, triple); |
42 | | - /// </remarks> |
43 | | - /// <param name="dataset">The RDF library specific input to parse</param> |
44 | | - /// <returns>input in internal RDF Dataset format</returns> |
45 | | - /// <exception cref="JsonLdError">JsonLdError</exception> |
46 | | - /// <exception cref="JsonLD.Core.JsonLdError"></exception> |
47 | | - RDFDataset Parse(JToken input); |
48 | | - } |
| 6 | + /// <summary> |
| 7 | + /// Interface for parsing RDF into the RDF Dataset objects to be used by |
| 8 | + /// JSONLD.fromRDF |
| 9 | + /// </summary> |
| 10 | + /// <author>Tristan</author> |
| 11 | + public interface IRDFParser |
| 12 | + { |
| 13 | + /// <summary> |
| 14 | + /// Parse the input into the internal RDF Dataset format The format is a Map |
| 15 | + /// with the following structure: { GRAPH_1: [ TRIPLE_1, TRIPLE_2, ..., |
| 16 | + /// TRIPLE_N ], GRAPH_2: [ TRIPLE_1, TRIPLE_2, ..., TRIPLE_N ], ... |
| 17 | + /// </summary> |
| 18 | + /// <remarks> |
| 19 | + /// Parse the input into the internal RDF Dataset format The format is a Map |
| 20 | + /// with the following structure: { GRAPH_1: [ TRIPLE_1, TRIPLE_2, ..., |
| 21 | + /// TRIPLE_N ], GRAPH_2: [ TRIPLE_1, TRIPLE_2, ..., TRIPLE_N ], ... GRAPH_N: |
| 22 | + /// [ TRIPLE_1, TRIPLE_2, ..., TRIPLE_N ] } |
| 23 | + /// GRAPH: Must be the graph name/IRI. if no graph is present for a triple, |
| 24 | + /// add it to the "@default" graph TRIPLE: Must be a map with the following |
| 25 | + /// structure: { "subject" : SUBJECT "predicate" : PREDICATE "object" : |
| 26 | + /// OBJECT } |
| 27 | + /// Each of the values in the triple map must also be a map with the |
| 28 | + /// following key-value pairs: "value" : The value of the node. "subject" can |
| 29 | + /// be an IRI or blank node id. "predicate" should only ever be an IRI |
| 30 | + /// "object" can be and IRI or blank node id, or a literal value (represented |
| 31 | + /// as a string) "type" : "IRI" if the value is an IRI or "blank node" if the |
| 32 | + /// value is a blank node. "object" can also be "literal" in the case of |
| 33 | + /// literals. The value of "object" can also contain the following optional |
| 34 | + /// key-value pairs: "language" : the language value of a string literal |
| 35 | + /// "datatype" : the datatype of the literal. (if not set will default to |
| 36 | + /// XSD:string, if set to null, null will be used). |
| 37 | + /// The RDFDatasetUtils class has the following helper methods to make |
| 38 | + /// generating this format easier: result = getInitialRDFDatasetResult(); |
| 39 | + /// triple = generateTriple(s,p,o); triple = |
| 40 | + /// generateTriple(s,p,value,datatype,language); |
| 41 | + /// addTripleToRDFDatasetResult(result, graphName, triple); |
| 42 | + /// </remarks> |
| 43 | + /// <param name="dataset">The RDF library specific input to parse</param> |
| 44 | + /// <returns>input in internal RDF Dataset format</returns> |
| 45 | + /// <exception cref="JsonLdError">JsonLdError</exception> |
| 46 | + /// <exception cref="JsonLD.Core.JsonLdError"></exception> |
| 47 | + RDFDataset Parse(JToken input); |
| 48 | + } |
49 | 49 | } |
0 commit comments