Rust implementation of NextGraph, a Decentralized and local-first web 3.0 ecosystem
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextgraph-rs/ng-sdk-js/example-webapp-react-social.../src/.ldo/socialquery.schema.ts

63 lines
1.8 KiB

import { Schema } from "shexj";
/**
* =============================================================================
* socialquerySchema: ShexJ Schema for socialquery
* =============================================================================
*/
export const socialquerySchema: Schema = {
type: "Schema",
shapes: [
{
id: "did:ng:x:shape#SocialQuery",
type: "ShapeDecl",
shapeExpr: {
type: "Shape",
expression: {
type: "EachOf",
expressions: [
{
type: "TripleConstraint",
predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
valueExpr: {
type: "NodeConstraint",
values: ["did:ng:x:class#SocialQuery"],
},
},
{
type: "TripleConstraint",
predicate: "did:ng:x:ng#social_query_sparql",
valueExpr: {
type: "NodeConstraint",
datatype: "http://www.w3.org/2001/XMLSchema#string",
},
min: 0,
max: 1,
},
{
type: "TripleConstraint",
predicate: "did:ng:x:ng#social_query_forwarder",
valueExpr: {
type: "NodeConstraint",
nodeKind: "iri",
},
min: 0,
max: 1,
},
{
type: "TripleConstraint",
predicate: "did:ng:x:ng#social_query_ended",
valueExpr: {
type: "NodeConstraint",
datatype: "http://www.w3.org/2001/XMLSchema#dateTime",
},
min: 0,
max: 1,
},
],
},
extra: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"],
},
},
],
};