Extracts the schema.org version number (as string) from the given schema.org version URL.
This function accepts URLs with following formats (any protocol variant is allowed - http/https):
"https://schema.org/docs/releases.html#v10.0"
-> "10.0"
"https://schema.org/version/3.4/"
-> "3.4"
a URL specifying a schema.org version
The version number as a string
Identifies the used DS-Specification version used by the given Domain Specification.
The input Domain Specification
The detected DS-Specification version
Returns the used DS-Specification version of this DS-Utilities instance, which is "5.0"
.
DS-Utilities instances are always bound to a specific DS-Specification version.
Returns the author name (schema:author -> schema:name) of the given DS.
schema:author is optional in DS-V5.
the input DS
The author name of the given DS
Returns the description (schema:description) of the given DS.
schema:description is optional in DS-V5.
the input DS
the description of the given DS
Returns the used external vocabularies (ds:usedVocabularies) of the given DS (clone - no reference).
ds:usedVocabularies is optional in DS-V5.
the input DS
array with the used external vocabularies (empty if none)
Returns the name (schema:name) of the given DS.
schema:name is optional in DS-V5.
the input DS
The name of the given DS
Returns the used schema.org version (schema:schemaVersion) of the given DS.
schema:schemaVersion is mandatory in DS-V5.
the input DS
the schema.org version identifier as simple string, e.g. "11.0"
Returns the target classes (sh:targetClass) of the given DS (clone - no reference).
sh:targetClass is mandatory in DS-V5.
the input DS
array with the target classes (empty if none)
Returns the used ds version (schema:version) of the given DS.
schema:version is optional in DS-V5.
the input DS
the ds version as number, e.g. 1.04
Returns the "pretty" version of a compacted IRI (single IRI or array of IRIs).
If an IRI belongs to schema.org, then the IRI is returned without the schema:
vocabulary indicator.
the input IRI or array of IRIs
The pretty-string for the given input
Returns the corresponding DS-V5 datatype (XSD/RDF) for a given schema.org datatype.
a compacted IRI representing a DataType of schema.org (e.g. schema:Text)
the corresponding DS-V5 Datatype (from XSD or RDF)
Returns the @id of the given DS (for DS-V5 this @id is found in outermost node). A DS @id is mandatory for DS-V5.
the input DS
The @id of the given DS
Returns a reference to the root node of the given Domain Specification
The input Domain Specification
The root node if the given DS
Returns the standard @context for DS-V5 (clone - no reference).
The standard @context for DS-V5
Returns the corresponding schema.org datatype for a given DS-V5 datatype (XSD/RDF)
a compacted IRI representing a DataType of DS-V5 (from XSD or RDF, e.g. "xsd:string")
the corresponding schema.org Datatype
DsUtilitiesV5
is a Class that offers an API for DS-Specification 5.0Instances of this class can be created with following static functions of this library:
Below you can find the API functions provided by this class (categorized by functionality).