This namespace implements a "thing" structure, approximating a URI, for uniquely naming and referencing entities in a Grimoire documentation store.
Thing ::= Sum[Group, Artifact, Version, Platform, Namespace, Def, Note, Example]; Group ::= Record[ Name: String]; Artifact ::= Record[Parent: Group, Name: String]; Version ::= Record[Parent: Artifact, Name: String]; Platform ::= Record[Parent: Version, Name: String]; Namespace ::= Record[Parent: Platform, Name: String]; Def ::= Record[Parent: Namespace, Name: String];
Note ::= Record[Parent: Thing, Handle: String]; Example ::= Record[Parent: Thing, Handle: String];
This namespace implements a "thing" structure, approximating a URI, for uniquely naming and referencing entities in a Grimoire documentation store. Thing ::= Sum[Group, Artifact, Version, Platform, Namespace, Def, Note, Example]; Group ::= Record[ Name: String]; Artifact ::= Record[Parent: Group, Name: String]; Version ::= Record[Parent: Artifact, Name: String]; Platform ::= Record[Parent: Version, Name: String]; Namespace ::= Record[Parent: Platform, Name: String]; Def ::= Record[Parent: Namespace, Name: String]; Note ::= Record[Parent: Thing, Handle: String]; Example ::= Record[Parent: Thing, Handle: String];
(->artifact parent name)
Generated constructor for the artifact type.
Generated constructor for the artifact type.
(->def parent name)
Generated constructor for the def type.
Generated constructor for the def type.
(->example parent name handle)
Generated constructor for the example type.
Generated constructor for the example type.
(->group name)
Generated constructor for the group type.
Generated constructor for the group type.
(->namespace parent name)
Generated constructor for the namespace type.
Generated constructor for the namespace type.
(->note parent name handle)
Generated constructor for the note type.
Generated constructor for the note type.
(->platform parent name)
Generated constructor for the platform type.
Generated constructor for the platform type.
(->version parent name)
Generated constructor for the version type.
Generated constructor for the version type.
(artifact? x__5843__auto__)
Generated predicate for the artifact type.
Generated predicate for the artifact type.
(artifacted? t)
Predicate testing whether the input either is an artifact or has an artifact as a parent.
Predicate testing whether the input either is an artifact or has an artifact as a parent.
(def? x__5843__auto__)
Generated predicate for the def type.
Generated predicate for the def type.
(ensure-thing maybe-thing)
Transformer which, if given a string, will construct a Thing (with a warning) and if given a Thing will return the Thing without modification. Intended as a guard for potentially mixed input situations.
Transformer which, if given a string, will construct a Thing (with a warning) and if given a Thing will return the Thing without modification. Intended as a guard for potentially mixed input situations.
(example? x__5843__auto__)
Generated predicate for the example type.
Generated predicate for the example type.
(full-uri->thing uri-string)
Complement of thing->full-uri.
Complement of thing->full-uri.
(group? x__5843__auto__)
Generated predicate for the group type.
Generated predicate for the group type.
(grouped? t)
Predicate testing whether the input either is a group or has a group as a parent.
Predicate testing whether the input either is a group or has a group as a parent.
(leaf? t)
Predicate testing whether the input Thing is either an example or a note.
Predicate testing whether the input Thing is either an example or a note.
(namespace? x__5843__auto__)
Generated predicate for the namespace type.
Generated predicate for the namespace type.
(namespaced? t)
Predicate testing whether the input either is a namespace or has a namespace as a parent.
Predicate testing whether the input either is a namespace or has a namespace as a parent.
(note? x__5843__auto__)
Generated predicate for the note type.
Generated predicate for the note type.
(parse-short-string s)
Function from a String as generated by thing->short-string to one of either [:def nil nil nil <ns-name> <def-name>] or [:ns nil nil nil <ns-name>]. The intention is that this function can be used to parse short-strings into structures for which Things can be looked up out of a datastore. Returns nil on failure to parse.
Function from a String as generated by thing->short-string to one of either [:def nil nil nil <ns-name> <def-name>] or [:ns nil nil nil <ns-name>]. The intention is that this function can be used to parse short-strings into structures for which Things can be looked up out of a datastore. Returns nil on failure to parse.
(path->thing path)
String to Thing transformer which builds a Thing tree by splitting on /. The resulting things are rooted on a Group as required by the definition of a Thing.
String to Thing transformer which builds a Thing tree by splitting on /. The resulting things are rooted on a Group as required by the definition of a Thing.
(platform? x__5843__auto__)
Generated predicate for the platform type.
Generated predicate for the platform type.
(platformed? t)
Predicate testing whether the input either is a platform or has a platform as a parent.
Predicate testing whether the input either is a platform or has a platform as a parent.
(thing->artifact t)
Function from a Thing to an Artifact. If the Thing is rooted on an Artifact, or is an Artifact, traverses thing->parent until the rooting Artifact is reached and then returns that value. Otherwise returns nil.
Function from a Thing to an Artifact. If the Thing is rooted on an Artifact, or is an Artifact, traverses thing->parent until the rooting Artifact is reached and then returns that value. Otherwise returns nil.
(thing->def t)
Function from a Thing to a Def. If the Thing either is a Def or is rooted on a Def, traverses thing->parent until the rooting Def is reached and then returns that value. Otherwise returns nil.
Function from a Thing to a Def. If the Thing either is a Def or is rooted on a Def, traverses thing->parent until the rooting Def is reached and then returns that value. Otherwise returns nil.
(thing->full-uri t)
Function from a Thing to a String representing a unique Thing naming URI.
URIs have the same structure as thing->url-path but are prefixed by <t>: where <t> is the lower cased name of the type of the input Thing.
For example, a Thing represeting org.clojure/clojure would give the full URI grim+artifact:org.clojure/clojure. A Thing representing org.clojure/clojure/1.6.0 would likewise be grim+version:org.clojure/clojure/1.6.0 and soforth.
Function from a Thing to a String representing a unique Thing naming URI. URIs have the same structure as thing->url-path but are prefixed by <t>: where <t> is the lower cased name of the type of the input Thing. For example, a Thing represeting org.clojure/clojure would give the full URI grim+artifact:org.clojure/clojure. A Thing representing org.clojure/clojure/1.6.0 would likewise be grim+version:org.clojure/clojure/1.6.0 and soforth.
(thing->group t)
Function from a Thing to a Group. If the Thing is rooted on a Group, or is a Group, traverses thing->parent until a Group is produced. Otherwise returns nil.
Function from a Thing to a Group. If the Thing is rooted on a Group, or is a Group, traverses thing->parent until a Group is produced. Otherwise returns nil.
(thing->name t)
Function from an object to Maybe[String]. If the input is a thing, returns the name of the Thing. Otherwise returns nil.
Function from an object to Maybe[String]. If the input is a thing, returns the name of the Thing. Otherwise returns nil.
(thing->namespace t)
Function from a Thing to a Namespace. If the Thing is rooted on a Platform or is a Platform traverses thing->parent until the rooting Platform is reached and then returns that value. Otherwise returns nil.
Function from a Thing to a Namespace. If the Thing is rooted on a Platform or is a Platform traverses thing->parent until the rooting Platform is reached and then returns that value. Otherwise returns nil.
(thing->parent t)
Function from any object to Maybe[Thing]. If the input is a thing, returns the parent (maybe nil) of that Thing. Otherwise returns nil.
Function from any object to Maybe[Thing]. If the input is a thing, returns the parent (maybe nil) of that Thing. Otherwise returns nil.
(thing->path t)
Provides a mechanism for converting one of the Handle objects into a cannonical "path" which can be serialized, deserialized and walked back into a Handle.
Provides a mechanism for converting one of the Handle objects into a cannonical "path" which can be serialized, deserialized and walked back into a Handle.
(thing->platform t)
Function from a Thing to a Platform. If the Thing is rooted on a Platform or is a Platform traverses thing->parent until the rooting Platform is reached and then returns that value. Otherwise returns nil.
Function from a Thing to a Platform. If the Thing is rooted on a Platform or is a Platform traverses thing->parent until the rooting Platform is reached and then returns that value. Otherwise returns nil.
(thing->short-string t)
Function from a Thing to a String representing a mostly unique naming string.
Unlike thing->full-uri, thing->short-string will discard exact artifact, group and verison information instead giving only a URI with respect to the platform, namespace and name of a Thing.
For example, the Thing representing org.clojure/clojure/1.6.0/clj/clojure.core/+ would give the short string clj::clojure.core/+.
Function from a Thing to a String representing a mostly unique naming string. Unlike thing->full-uri, thing->short-string will discard exact artifact, group and verison information instead giving only a URI with respect to the platform, namespace and name of a Thing. For example, the Thing representing org.clojure/clojure/1.6.0/clj/clojure.core/+ would give the short string clj::clojure.core/+.
(thing->type-name t)
(thing->url-path t)
(thing->url-path t munge-fn)
Function from a Thing to a munged and URL safe Thing path
Function from a Thing to a munged and URL safe Thing path
(thing->version t)
Function from a Thing to a Verison. If the Thing is rooted on a Version or is a Version, traverses thing->parent until the rooting Version is reached and then returns that value. Otherwise returns nil.
Function from a Thing to a Verison. If the Thing is rooted on a Version or is a Version, traverses thing->parent until the rooting Version is reached and then returns that value. Otherwise returns nil.
(thing? t)
Predicate testing whether the input exists within the "thing" variant of Σ[Group, Artifact,Version, Platform, Namespace, Def]
Predicate testing whether the input exists within the "thing" variant of Σ[Group, Artifact,Version, Platform, Namespace, Def]
(url-path->thing url)
Function from a URL to a Thing. Complement of thing->url-path.
Function from a URL to a Thing. Complement of thing->url-path.
(version? x__5843__auto__)
Generated predicate for the version type.
Generated predicate for the version type.
(versioned? t)
Predicate testing whether the input exists within the subset of the "thing" variant which can be said to be "versioned" in that it is rooted on a Version instance and thus a version instance can be reached by upwards traversal.
Predicate testing whether the input exists within the subset of the "thing" variant which can be said to be "versioned" in that it is rooted on a Version instance and thus a version instance can be reached by upwards traversal.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close