nyx_client.property¶
Structures for defining custom metadata (properties) for nyx_client.data.Data.
Fields in said structures follow Nyx OpenAPI spec naming.
Classes¶
A metadata property type describing a string with a given language. |
|
A metadata property type describing a string without a language. |
|
A metadata property type describing a literal with the given datatype. |
|
A metadata property type describing a Uri. |
|
A metadata property with a single value. |
Module Contents¶
- class nyx_client.property.LangLiteral¶
A metadata property type describing a string with a given language.
Implicit datatype: rdf:langString
- class nyx_client.property.StringLiteral¶
A metadata property type describing a string without a language.
Implicit datatype: rdf:string
- class nyx_client.property.Literal¶
A metadata property type describing a literal with the given datatype.
Implicit datatype: rdfs:Literal
- dataType: str¶
XSD data type without its namespace prefix.
The following types (from XSD namespace) are currently supported:
dateTime, time, date, boolean, integer, decimal, float, double, nonPositiveInteger, negativeInteger, nonNegativeInteger, positiveInteger, long, unsignedLong, int, unsignedInt, short, unsignedShort, byte, unsignedByte, base64Binary, anyURI
- class nyx_client.property.Uri¶
A metadata property type describing a Uri.
- class nyx_client.property.Property¶
A metadata property with a single value.
Multiple instances are used to represent a key (predicate) with multiple values.
- value: PropertyValue¶
The value (object) of the property
- as_dict()¶
Returns the object as a dictionary.
- classmethod from_dict(data)¶
Returns a new property instance constructed from the given dictionary.
This is expected to be in the same format as generated by
as_dict()(or returned nu the API).
- classmethod lang_string(key, value, lang)¶
Shorthand for creating a language-specific string property.
See
LangLiteralfor more details.
- classmethod string(key, value)¶
Shorthand for creating a string property (without language).
See
StringLiteralfor more details.