The set of semantic descriptors described below is the ALPS document, written in XML or JSON.
It can be written in XML or JSON.
You can add meta-information to ALPS documents, such as title, doc, link, and so on.
Semantic descriptors define special words used by the application.
descriptor is an element for semantic descriptors (semantic identifiers), describing words that are special to the application, such as API item names or link names.
element | meaning | example |
---|---|---|
descriptor | semantic identifier | <descriptor id="dateCreated" /> |
A doc or link element can be included to describe the descriptor.
elements | meanings | examples |
---|---|---|
doc | descriptive text | <doc format="markdown">Date the article was created</doc> |
link | link | <link href="https://example.com/issues" rel="issue"/> |
doc to explain the meaning in text
The doc can be formatted (text|markdown|html|asciidoc) with format. If not specified, text is used.
A link that links to a description of another resource.
For rel, choose IANA's [Link Relation] rel from IANA's registered rel, and link to the URL with href. The URL is linked by href.
A descriptor has attributes such as ID, type, and tag.
attribute | meaning | example |
---|---|---|
id | identifier | createdDate |
type | type | semantic|safe|unsafe|idemptent |
href | reference | #id |
rt | transition destination | #User |
rel | relationship | edit |
title | title | creation time |
tag | tag | ontology |
ALPS assigns a unique ID to all information and all transitions (links); there are no specification constraints on the ID phrase, but there are best practices for adding go
for safe transitions and do
for unsafe transitions.
The descriptor has a type attribute. If unspecified, it is semantic.
type | semantic |
---|---|
semantic | meaning |
safe | safe and powerfull transition |
idempotent | unsafe and powerfull transitions |
unsafe | unsafe and powerless transitions |
There is one type for semantics and three types for transitions.
List the words and phrases used in your application and create a vocabulary.
This is a transition for reading, where the state of the resource does not change.
Example: Get resource state by URL
This is a transition where the state of the resource changes by power.
Example: Creating a resource with a URL, changing or deleting the target resource.
This is a transition where the state change of the resource is not powerless.
Example: Creating a resource without a URL or adding a target resource.
There are four types in total.
A descriptor can be included to represent the nested structure of information or the information needed for a transition.
Example: A blog post contains body and date information.
To reuse a single descriptor, you can link to it with a href. There are two types of links: inline links, which link from the same document, and outbound links, which link to a descriptor in another file.
Specifies the transition destination ID.
Specifies a relation for transitions of type safe
, idempotent
, or unsafe
.
Rel is chosen from IANA's Link Relation.
A one-line comment describing the content.
ASD allows you to specify whether to draw or not, and the color of each tag.