Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/api/woql.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Logical conjunction of the contained queries - all queries must match or the ent
//a start_station Start, and that start_station is labeled Start_Label
let [Journey, Start, Start_Label] = vars("Journey", "Start", "Start_Label")
WOQL.and(
WOQL.triple(Journey, "type", "scm:Journey"),
WOQL.triple(Journey, "rdf:type", "@schema:Journey"),
WOQL.triple(Journey, "start_station", Start),
WOQL.triple(Start, "label", Start_Label))
```
Expand Down Expand Up @@ -195,7 +195,7 @@ Specifies the graph resource to write the contained query into
**Example**
```javascript
//Subq is an argument or a chained query
using("admin/minecraft").into("instance/main").add_triple("a", "type", "scm:X")
using("admin/minecraft").into("instance/main").add_triple("a", "rdf:type", "@schema:X")
//writes a single tripe (doc:a, rdf:type, scm:X) into the main instance graph
```

Expand Down Expand Up @@ -453,8 +453,8 @@ Deletes a single triple from the graph [Subject, Predicate, Object, Graph]

**Example**
```javascript
remove the class Person from the schema/main graph
WOQL.delete_quad("Person", "type", "owl:Class", "schema/main")
remove the class Person from the schema graph
WOQL.delete_quad("Person", "rdf:type", "sys:Class", "schema")
```

## add_triple
Expand Down Expand Up @@ -1051,7 +1051,7 @@ Creates a count of the results of the query
**Example**
```javascript
let [count, Person] = vars("count", "Person")
WOQL.count(count).triple(Person, "type", "scm:Person")
WOQL.count(count).triple(Person, "rdf:type", "@schema:Person")
```

## typecast
Expand Down Expand Up @@ -1261,7 +1261,7 @@ optionally into the specified graph
**Example**
```javascript
insert("mydoc", "MyType")
//equivalent to add_triple("mydoc", "type", "MyType")
//equivalent to add_triple("mydoc", "rdf:type", "@schema:MyType")
```

## graph
Expand Down
12 changes: 6 additions & 6 deletions lib/woql.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ WOQL.distinct = function (...varNames) {
* //a start_station Start, and that start_station is labeled Start_Label
* let [Journey, Start, Start_Label] = vars("Journey", "Start", "Start_Label")
* WOQL.and(
* WOQL.triple(Journey, "type", "scm:Journey"),
* WOQL.triple(Journey, "rdf:type", "@schema:Journey"),
* WOQL.triple(Journey, "start_station", Start),
* WOQL.triple(Start, "label", Start_Label))
*
Expand Down Expand Up @@ -191,7 +191,7 @@ WOQL.from = function (graphRef, query) {
* @returns {WOQLQuery} A WOQLQuery which will be written into the graph in question
* @example
* //Subq is an argument or a chained query
* using("admin/minecraft").into("instance/main").add_triple("a", "type", "scm:X")
* using("admin/minecraft").into("instance/main").add_triple("a", "rdf:type", "@schema:X")
* //writes a single tripe (doc:a, rdf:type, scm:X) into the main instance graph
*
*/
Expand Down Expand Up @@ -424,8 +424,8 @@ WOQL.delete_triple = function (subject, predicate, object) {
* @param {string} object - The IRI of a node or a variable, or a literal
* @param {typedef.GraphRef} graphRef - A valid graph resource identifier string
* @returns {WOQLQuery} - A WOQLQuery which contains the Delete Quad Statement
* @example remove the class Person from the schema/main graph
* WOQL.delete_quad("Person", "type", "owl:Class", "schema/main")
* @example remove the class Person from the schema graph
* WOQL.delete_quad("Person", "rdf:type", "sys:Class", "schema")
*/
WOQL.delete_quad = function (subject, predicate, object, graphRef) {
return new WOQLQuery().delete_quad(subject, predicate, object, graphRef);
Expand Down Expand Up @@ -975,7 +975,7 @@ WOQL.immediately = function (subquery) {
* @returns {WOQLQuery} A WOQLQuery object containing the count sub Query
* @example
* let [count, Person] = vars("count", "Person")
* WOQL.count(count).triple(Person, "type", "scm:Person")
* WOQL.count(count).triple(Person, "rdf:type", "@schema:Person")
*/
WOQL.count = function (countVarName, subquery) {
return new WOQLQuery().count(countVarName, subquery);
Expand Down Expand Up @@ -1186,7 +1186,7 @@ WOQL.node = function (nodeid, chainType) {
* @returns {WOQLQuery} A WOQLQuery which contains the insert expression
* @example
* insert("mydoc", "MyType")
* //equivalent to add_triple("mydoc", "type", "MyType")
* //equivalent to add_triple("mydoc", "rdf:type", "@schema:MyType")
*/
WOQL.insert = function (classId, classType, graphRef) {
return new WOQLQuery().insert(classId, classType, graphRef);
Expand Down