API documentation
URNs
CitableBase.Urn
— TypeUnique identifiers expressible in the syntax of the IETF's URN specification.
CitableBase.components
— Functioncomponents(uString)
Splits a string on colons (separator for top-level components of URNs).
Examples
julia> components("urn:cts:greekLit:tlg0012.tlg001.msA:1.1")
components(u)
Splits a URN's string representation into top-level components.
CitableBase.parts
— Functionparts(componentString)
Splits a string on periods (seprator for parts within components of URNs).
Examples
julia> parts("tlg0012.tlg001.msA")
CitableBase.addversion
— FunctionUrn subtypes should implement addversion(urn::U, versionid)::U
.
addversion(u, versioninfo)
CitableBase.dropversion
— FunctionUrn subtypes should implement dropversion(urn::U)::U
.
dropversion(u)
Citable resources
CitableBase.Citable
— TypeA citable unit of any kind is identified by a URN and has a human-readable label.
CitableBase.CitableTrait
— TypeAbstraction of values for a citable trait.
CitableBase.NotCitable
— TypeValue for the CitableTrait for everything not citable.
CitableBase.citabletrait
— FunctionDefine default value of CitableTrait as NotCitable.
CitableBase.citable
— FunctionTrue if x
is a citable object.
CitableBase.urn
— FunctionDelegate urn
to specific functions based on type's citable trait value.
urn(x)
It is an error to invoke the urn
function on material that is not citable.
urn(_, x)
CitableBase.label
— FunctionDelegate label
to specific functions based on type's citable trait value.
label(x)
It is an error to invoke the label
function on material that is not citable.
label(_, x)
URN comparison
CitableBase.UrnComparisonTrait
— TypeAbstraction of values for URN manipulation.
CitableBase.NotUrnComparable
— TypeValue of the UrnComparisonTrait for evertything that can NOT be compared using URN logic.
CitableBase.urncomparisontrait
— FunctionDefault value of UrnComparisonTrait
is NotUrnComparable
.
CitableBase.urncomparable
— FunctionTrue if type T
implements the UrnComparisonTrait
.
urncomparable(u)
CitableBase.urnequals
— FunctionFor subtypes of Urn
, implement urnequals
concretely.
urnequals(u1, u2)
URN-comparable objects must implement urnequals
.
urnequals(x, y)
CitableBase.urncontains
— FunctionURN-comparable objects must implement urncontains
.
urncontains(x, y)
CitableBase.urnsimilar
— FunctionURN-comparable objects must implement urnsimilar
.
urnsimilar(x, y)
CEX serialization
CitableBase.CexTrait
— TypeTrait for objects serializable in CEX format.
CitableBase.NotCexSerializable
— TypeValue for the CexTrait for content not serializable to CEX format.
CitableBase.cextrait
— FunctionThe default value of CexTrait
is NotCexSerializable
.
cextrait(_)
Subtypes of Citable
are CexSerializable
.
cextrait(_)
CitableBase.cexserializable
— FunctionTrue if type T
is serializable to CEX format
cexserializable(x)
CitableBase.cex
— FunctionDelegate cex
to specific functions based on type's cextrait
value.
cex(x; delimiter)
It is an error to invoke the cex
function on material that is not CEX serializable.
cex(, x; delimiter)
CitableBase.fromcex
— FunctionDispatch fromcex
on cextrait
of T
to instantiate an object of type T
from CEX-formatted data cexsrc
.
fromcex(cexsrc, T; delimiter, configuration, strict)
Implement fromcex
using first string parameter for a file name.
fromcex(fname, T, freader; delimiter, configuration, strict)
Implement fromcex
using first string parameter for a URL.
fromcex(url, T, ureader; delimiter, configuration, strict)
Implement fromcex
using first string parameter for raw string data.
fromcex(
cexsrc,
T,
freader;
delimiter,
configuration,
strict
)
It is an error to invoke the fromcex
function on material that is not CEX serializable.
fromcex(, cex, T; delimiter, configuration, strict)
It is an error invoke fromcex
function with an unimplemented trait value.
fromcex(
traitvalue,
cexsrc,
T;
delimiter,
configuration,
strict
)
Citable collections
CitableBase.CitableCollectionTrait
— TypeAbstraction of values for a citable library collection trait.
CitableBase.NotCitableCollection
— TypeValue for the CitableCollectionTrait for evertything that is not a citable library collection.
CitableBase.citablecollectiontrait
— FunctionDefine default value of CitableCollectionTrait as NotCitableCollection.
CitableBase.citablecollection
— FunctionTrue if x
has the value CitableCollection
for the CitableCollectionTrait
.
citablecollection(x)