API Documentation
Types
CitableObject.Cite2Urn
— TypeImplementation of the Cite Object URN. See http://cite-architecture.org/cite2urn/.
CitableObject.CitableByCite2Urn
— TypeA value of CitableBase.CitableTrait
that can be used for content citable by CtsUrn
.
CitableObject.Cite2UrnComparable
— TypeValue for URN comparison trait on CtsUrn
DocStringExtensions
Functions
Manipulating Cite2Urn
s:
CitableObject.namespace
— Functionnamespace(u)
Extract CITE2 namespace from a CtsUrn.
Examples
julia>
namespace(Cite2Urn("urn:cite2:hmt:msA.v1:12r"))
CitableObject.collectioncomponent
— Functioncollectioncomponent(u)
Extract CITE2 work component from a CtsUrn.
Examples
julia>
collectioncomponent(Cite2Urn("urn:cite2:hmt:msA.v1:12r"))
CitableObject.objectcomponent
— Functionobjectcomponent(u)
Extract CITE2 object component from a CtsUrn.
Examples
julia>
objectcomponent(Cite2Urn("urn:cite2:hmt:msA.v1:12r"))
CitableBase.isrange
— FunctionTrue if u
is a range-type URN.
isrange(u)
CitableBase.range_begin
— Functionrange_begin(u)
Extract first part from a range expression in URN u
.
CitableBase.range_end
— Functionrange_end(u)
Extract second part from a range expression in URN u
.
CitableBase.supportssubref
— FunctionTrue for URN types that support subreferences.
supportssubref(u)
Cite2Urn
s support subreferences.
supportssubref(u)
CitableBase.hassubref
— FunctionTrue for URN types that support subreferences.
hassubref(u)
True if last component of u
has a sub-reference.
hassubref(u)
CitableBase.subref
— FunctionUrn subtypes should implement dropversion(urn::U)::U
.
subref(u)
subref(u)
Extract subreference from a a URN, or empty string if there is no subreference.
CitableBase.dropsubref
— FunctionUrn subtypes should implement dropversion(urn::U)::U
.
dropsubref(u)
dropsubref(u)
Remove any subreferences in URN u
. If u
is a range, separately drop subreference from each of range-begin and range-end parts.
CitableBase.supportsversion
— FunctionTrue for URN types that support versioning.
supportsversion(u)
Cite2Urn
s support version ids.
supportsversion(u)
CitableBase.dropversion
— FunctionUrn subtypes should implement dropversion(urn::U)::U
.
dropversion(u)
Create a new Cite2Urn by dropping the version part of a given Cite2Urn.
dropversion(u)
CitableBase.addversion
— FunctionUrn subtypes should implement addversion(urn::U, versionid)::U
.
addversion(u, versioninfo)
Create a new Cite2Urn by setting the version part of a given Cite2Urn to a given value.
addversion(u, versid)
CitableBase.versionid
— FunctionUrn subtypes should implement addversion(urn::U, versionid)::U
.
versionid(u)
versionid(u)
Extract CITE2 collection identifer from a Cite2Urn.
Examples
julia>
urn = Cite2Urn("urn:cite2:hmt:msA.v1:12r")
collectionid(urn)
CitableObject.dropproperty
— FunctionCreate a new Cite2Urn by dropping the version part of a given Cite2Urn.
dropproperty(u)
CitableObject.addproperty
— FunctionCreate a new Cite2Urn by setting the version part of a given Cite2Urn to a given value.
addproperty(u, propid)
Comparing a pair of Cite2Urn
s:
CitableBase.urncontains
— FunctionURN-comparable objects must implement urncontains
.
urncontains(x, y)
urncontains(u1, u2)
True if urn1
contains or is equal to urn2
accroding to URN logic.
```
CitableBase.urnequals
— FunctionFor subtypes of Urn
, implement urnequals
concretely.
urnequals(u1, u2)
URN-comparable objects must implement urnequals
.
urnequals(x, y)
urnequals(urn1, urn2)
Override urnequals
function for Cite2Urn
s.
CitableBase.urnsimilar
— FunctionURN-comparable objects must implement urnsimilar
.
urnsimilar(x, y)
urnsimilar(urn1, urn2)
Override similar
function to be true if urn1
and urn1
are similar by URN logic.
CexUtils
submodule
Finding data by URN value:
CitableObject.CexUtils.properties
— FunctionFind all property definitions in the CEX string s
contained by u
.
properties(s, u)
Find all property definitions in blks
contained by u
.
properties(blks, u)
Dispatch properties
on T
.
properties(cexsrc, u, reader)
Find all property definitions in CEX file filesrc
contained by u
.
properties(filesrc, u, freader)
Find all property definitions in CEX at URL url
contained by u
.
properties(url, u, ureader)
Find all property definitions in CEX at URL url
contained by u
.
properties(s, u, sreader)
CitableObject.CexUtils.collectiondata
— FunctionFind all data lines in blks
contained by
u`.
collectiondata(blks, u; delimiter)
Find all data lines in the CEX string s
contained by u
.
collectiondata(s, u; delimiter)
Dispatch collectiondata
on T
.
collectiondata(cexsrc, u, reader; delimiter)
Find all data lines in CEX file filesrc
contained by u
.
collectiondata(filesrc, u, freader; delimiter)
Find all data lines in CEX at URL url
contained by u
.
collectiondata(url, u, ureader; delimiter)
Find all datalines in CEX s
contained by u
.
collectiondata(s, u, sreader; delimiter)
CitableObject.CexUtils.implementations
— FunctionFind Cite2Urn
s for all collections in s
implementing datamodel
.
implementations(s, datamodel; delimiter)
Find Cite2Urn
s for all collections in blks
implementing datamodel
.
implementations(blks, datamodel; delimiter)
Dispatch implementations
on T
.
implementations(cexsrc, datamodel, reader; delimiter)
Find Cite2Urn
s for all collections in CEX file filesrc
implementing datamodel
.
implementations(filesrc, datamodel, freader; delimiter)
Find Cite2Urn
s for all collections in CEX file filesrc
implementing datamodel
.
implementations(url, datamodel, freader; delimiter)
Find Cite2Urn
s for all collections in CEX file filesrc
implementing datamodel
.
implementations(s, datamodel, freader; delimiter)
CitableObject.CexUtils.data_for_model
— FunctionFind all data lines in the CEX string s
for collections implementing datamodel
.
data_for_model(s, datamodel; delimiter)
Find all data lines in blks
for collections implementing datamodel
.
data_for_model(blks, datamodel; delimiter)
Dispatch data_for_model
on T
.
data_for_model(cexsrc, datamodel, reader; delimiter)
Find all data lines in file filesrc
for collections implementing datamodel
.
data_for_model(filesrc, datamodel, freader; delimiter)
Find all data lines in content of url
implementing datamodel
.
data_for_model(url, datamodel, freader; delimiter)
Find all data lines in s
implementing datamodel
.
data_for_model(s, datamodel, freader; delimiter)
CitableObject.CexUtils.relations_for_model
— FunctionFind relations data for all relation sets in s
implementing data model dm
.
relations_for_model(s, dm)
Find relations data for all relation sets in blks
implementing data model dm
.
relations_for_model(blks, dm)
Dispatch relations
on T
.
relations_for_model(cexsrc, dm, reader)
Find relations data for all relation sets in CEX file filesrc
implementing data model dm
.
relations_for_model(filesrc, dm, freader)
Find relations data for all relation sets from CEX at URL url
implementing data model dm
.
relations_for_model(url, dm, freader)
Find relations data for all relation sets in s
implementing data model dm
.
relations_for_model(s, dm, freader)
Finding human-readable labels by URN value:
CitableObject.CexUtils.cataloglabel
— FunctionFind catalog label, if any, for u
in CEX source s
. If no catalog found, compose machine-generated label.
cataloglabel(s, u; delimiter)
Find catalog label, if any, for u
in CEX source s
. If no catalog found, compose machine-generated label.
cataloglabel(blks, u; delimiter)
Dispatch properties
on T
.
cataloglabel(cexsrc, u, reader)
Find catalog label, if any, in CEX file filesrc
contained by u
.
cataloglabel(filesrc, u, freader)
Find catalog label, if any, in CEX at URL url
contained by u
.
cataloglabel(url, u, freader)
Find catalog label, if any, in CEX at URL url
contained by u
.
cataloglabel(s, u, sreader)