Options
All
  • Public
  • Public/Protected
  • All
Menu

A resource, represented as a JSON object, that is part of the domain data.

Examples:


A subject with one property: "fred's name is Fred"

{
  "@id": "fred",
  "name": "Fred"
}

A subject with a Reference property: "fred's wife is wilma"

{
  "@id": "fred",
  "wife": { "@id": "wilma" }
}

A subject with another nested subject: "fred's wife is wilma, and her name is Wilma"

{
  "@id": "fred",
  "wife": {
    "@id": "wilma",
    "name": "Wilma"
  }
}
see

json-rql subject

Hierarchy

  • Pattern
    • Subject

Indexable

[key: string]: SubjectPropertyObject | Context | undefined

Specifies a graph edge, that is, a mapping from the @id of this subject to a set of one or more values.

Examples:


A subject with one property: "fred's name is Fred"

{
  "@id": "fred",
  "name": "Fred"
}

A subject with a Reference property: "fred's wife is wilma"

{
  "@id": "fred",
  "wife": { "@id": "wilma" }
}

A subject with another nested subject: "fred's wife is wilma, and her name is Wilma"

{
  "@id": "fred",
  "wife": {
    "@id": "wilma",
    "name": "Wilma"
  }
}
see

json-rql subject

Index

Properties

Properties

Optional @context

@context: Context

A JSON-LD Context for the query. In an API, this will frequently be implicit. For example, using json-rql as the body of a POST to http://example.com/my-api/v1/person/query might have the implicit context of a Person (possibly found at http://example.com/my-api/v1/person).

see

examples

Optional @id

@id: Iri | Variable

The unique identity of the subject in the domain.

🚧 Subjects strictly need not be identified with an @id, but the data of such Subjects cannot be retrieved with a simple Describe query.

Optional @type

@type: Iri | Variable | Iri[] | Variable[]

The type of the subject, as an IRI or set of IRIs. (@type is actually shorthand for the RDF property rdf:type.)

Legend

  • Constructor
  • Property
  • Method
  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Protected method
  • Static method

Generated using TypeDoc. Delivered by Vercel. @m-ld/m-ld - v0.8.2 Source code licensed MIT. Privacy policy