ch.openlegal.defs

martingajdos.ch

Documentation

fragmentSelector object

WADM FragmentSelector — an intrinsic anchor within the document. For Swiss law this is the Akoma Ntoso eId.

Properties

conformsTo string uri Optional

The spec the fragment conforms to (AKN by default).

value string Required

The fragment identifier, e.g. an AKN eId ('art_8__para_1') or a media-fragment.

maxLength: 512 bytes
View raw schema
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "maxLength": 512,
      "description": "The fragment identifier, e.g. an AKN eId ('art_8__para_1') or a media-fragment."
    },
    "conformsTo": {
      "type": "string",
      "format": "uri",
      "default": "https://docs.oasis-open.org/legaldocml/ns/akn/3.0",
      "description": "The spec the fragment conforms to (AKN by default)."
    }
  },
  "description": "WADM FragmentSelector — an intrinsic anchor within the document. For Swiss law this is the Akoma Ntoso eId."
}
target object

What an annotation is about (WADM target). Either an on-network document or an external law, optionally narrowed by a selector and pinned to a version.

Properties

source string uri Required

The annotated resource: an at:// URI of a ch.openlegal.document, or an ELI / AKN-CH URI for an off-network law.

version string Optional

Which version was annotated (WADM state): an ELI version URI, or the CID of the target record. Absent = latest.

View raw schema
{
  "type": "object",
  "required": [
    "source"
  ],
  "properties": {
    "source": {
      "type": "string",
      "format": "uri",
      "description": "The annotated resource: an at:// URI of a ch.openlegal.document, or an ELI / AKN-CH URI for an off-network law."
    },
    "version": {
      "type": "string",
      "description": "Which version was annotated (WADM state): an ELI version URI, or the CID of the target record. Absent = latest."
    },
    "selector": {
      "refs": [
        "ch.openlegal.defs#fragmentSelector",
        "ch.openlegal.defs#textQuoteSelector",
        "ch.openlegal.defs#textPositionSelector"
      ],
      "type": "union",
      "closed": false,
      "description": "How to locate the annotated span within the source (WADM selector). Open union so new selector kinds degrade gracefully."
    }
  },
  "description": "What an annotation is about (WADM target). Either an on-network document or an external law, optionally narrowed by a selector and pinned to a version."
}
textBody object

A textual annotation body (WADM TextualBody), reusing Bluesky richtext for inline citations/links.

Properties

facets array of refapp.bsky.richtext.facet Optional

Richtext facets over `text` (links, mentions, and ch.openlegal.citation features).

langs array of stringlanguage Optional

BCP-47 language tags for the body.

maxLength: 3 items
text string Required

The body text.

maxLength: 20000 bytesmaxGraphemes: 10000 graphemes
View raw schema
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 20000,
      "description": "The body text.",
      "maxGraphemes": 10000
    },
    "langs": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "language"
      },
      "maxLength": 3,
      "description": "BCP-47 language tags for the body."
    },
    "facets": {
      "type": "array",
      "items": {
        "ref": "app.bsky.richtext.facet",
        "type": "ref"
      },
      "description": "Richtext facets over `text` (links, mentions, and ch.openlegal.citation features)."
    }
  },
  "description": "A textual annotation body (WADM TextualBody), reusing Bluesky richtext for inline citations/links."
}
textPositionSelector object

WADM TextPositionSelector — character offsets into the normalised text.

Properties

end integer Required

End offset (exclusive).

minimum: 0
start integer Required

Start offset (inclusive).

minimum: 0
View raw schema
{
  "type": "object",
  "required": [
    "start",
    "end"
  ],
  "properties": {
    "end": {
      "type": "integer",
      "minimum": 0,
      "description": "End offset (exclusive)."
    },
    "start": {
      "type": "integer",
      "minimum": 0,
      "description": "Start offset (inclusive)."
    }
  },
  "description": "WADM TextPositionSelector — character offsets into the normalised text."
}
textQuoteSelector object

WADM TextQuoteSelector — robust anchoring by the quoted text plus surrounding context.

Properties

exact string Required

The exact quoted text.

maxLength: 4096 bytesmaxGraphemes: 2000 graphemes
prefix string Optional

Text immediately before the quote.

maxLength: 512 bytes
suffix string Optional

Text immediately after the quote.

maxLength: 512 bytes
View raw schema
{
  "type": "object",
  "required": [
    "exact"
  ],
  "properties": {
    "exact": {
      "type": "string",
      "maxLength": 4096,
      "description": "The exact quoted text.",
      "maxGraphemes": 2000
    },
    "prefix": {
      "type": "string",
      "maxLength": 512,
      "description": "Text immediately before the quote."
    },
    "suffix": {
      "type": "string",
      "maxLength": 512,
      "description": "Text immediately after the quote."
    }
  },
  "description": "WADM TextQuoteSelector — robust anchoring by the quoted text plus surrounding context."
}

Lexicon Garden

@