Dataset
Interface to a set of data modelled according according to the Resource Description Framework.
- class Dataset.Attribute
Bases:
The attributes of IElement instances.
- class Collection
Bases:
- class Type
Bases:
The type of attribute.
Members:
STRING : An attribute whose whose value is a string.
CLASS : An attribute whose whose value is a class.
- CLASS = <Type.CLASS: 1>
- STRING = <Type.STRING: 0>
- property name
- property value
- property mproperty
The
RDF.Propertyof the attribute.
- property type
The Type of the attribute.
- property value
The value of the attribute.
- class Dataset.Element
Bases:
ResourceThe primary objects which make up the model.
- add_attribute(*args, **kwargs)
Overloaded function.
add_attribute(self: Dataset.Element, mproperty: RDF.Property, value: str) -> XS::Dataset::IAttribute
Add an attribute with a string value.
add_attribute(self: Dataset.Element, mproperty: RDF.Property, value: RDF.Class) -> XS::Dataset::IAttribute
Add an attribute with a class value.
- add_date_property(self: Dataset.Element, rdl_class: RDF.Class, value: str) XS::Dataset::IProperty
Add a date property (type
Property.Type.DATE).
- add_qualitative_property(*args, **kwargs)
Overloaded function.
add_qualitative_property(self: Dataset.Element, rdl_class: RDF.Class, value: str) -> XS::Dataset::IProperty
Add a qualitative property (type
Property.Type.QUALITY) with a string value.add_qualitative_property(self: Dataset.Element, rdl_class: RDF.Class, value: RDF.Class) -> XS::Dataset::IProperty
Add a qualitative property (type
Property.Type.QUALITY) with a class value.
- add_quantitative_property(self: Dataset.Element, rdl_class: RDF.Class, value: str, UOM: RDF.Class) XS::Dataset::IProperty
Add a quantitative property (type
Property.Type.QUANTITY) with a measure value.
- add_relationship(self: Dataset.Element, mproperty: RDF.Property, to_element: Dataset.Element) XS::Dataset::IRelationship
Add a
Relationshipto another element.
- add_tag(self: Dataset.Element, value: str, rdl_class: RDF.Class = None) XS::Dataset::ITag
Add a (typically) human-readable tag for the element.
This will add the value provided to the existing set of tags.
- set_tag(self: Dataset.Element, value: str, rdl_class: RDF.Class = None) XS::Dataset::ITag
Set a (typically) human-readable tag for the element.
This will replace all existing tags with the value provided.
- property description
A human-readable description for the element.
- property export
A flag indicating whether this element will be committed to the underlying
DataStore.Instance.
- property label
A human-readable label for the element.
- property mclass
- property named_graph
The (possibly undefined)
RDF.NamedGraphfor the element.
- property rdl_class
The (optional)
RDF.Classthat classifies the element according to reference data.This class is the object of a relationship describing a reference data relationship.
- property relationships
The collection of
Relationshipinstances from this element to others.
- property tags
The collection of (typically) human-readable tags for the element.
- class Dataset.Event
Bases:
- class Severity
Bases:
Members:
ERROR : Error.
WARNING : Warning.
NOTE : Note.
- ERROR = <Severity.ERROR: 0>
- NOTE = <Severity.NOTE: 2>
- WARNING = <Severity.WARNING: 1>
- property name
- property value
- class Type
Bases:
Members:
DUPLICATE_ELEMENT : Duplicate element.
INVALID_PROPERTY : Invalid property.
INVALID_OPERATION : Invalid operation.
NATIVE_ERROR : Error in native model.
UNMAPPED_TYPE : Not mapped type.
UNMAPPED_RELATIONSHIP : Not mapped relationship.
UNMAPPED_UOM : Not mapped UOM.
UNMATCHED : Not found match.
UNSUPPORTED_FEATURE : Model has unsupported feature.
- DUPLICATE_ELEMENT = <Type.DUPLICATE_ELEMENT: 0>
- INVALID_OPERATION = <Type.INVALID_OPERATION: 2>
- INVALID_PROPERTY = <Type.INVALID_PROPERTY: 1>
- NATIVE_ERROR = <Type.NATIVE_ERROR: 3>
- UNMAPPED_RELATIONSHIP = <Type.UNMAPPED_RELATIONSHIP: 5>
- UNMAPPED_TYPE = <Type.UNMAPPED_TYPE: 4>
- UNMAPPED_UOM = <Type.UNMAPPED_UOM: 6>
- UNMATCHED = <Type.UNMATCHED: 7>
- UNSUPPORTED_FEATURE = <Type.UNSUPPORTED_FEATURE: 8>
- property name
- property value
- property description
- property severity
- property source_element
- property type
- class Dataset.Instance
Bases:
The dataset itself, which contains a collection of
Elementinstances.- add_element(*args, **kwargs)
Overloaded function.
add_element(self: Dataset.Instance, namespace_name: tuple, mclass: RDF.Class, rdl_class: RDF.Class = None, label: Optional[str] = None, description: Optional[str] = None, tag: Optional[str] = None, exports: bool = True, named_graph: Optional[RDF.NamedGraph] = None) -> XS::Dataset::IElement
Add an instance of
Elementto the model by namespace and name.add_element(self: Dataset.Instance, uri: str, mclass: RDF.Class, rdl_class: RDF.Class = None, label: Optional[str] = None, description: Optional[str] = None, tag: Optional[str] = None, exports: bool = True, named_graph: Optional[RDF.NamedGraph] = None) -> XS::Dataset::IElement
Add an instance of
Elementto the model by URI (will be checked against the namespaces in the underlyingDataStore.Instance).
- add_named_graph(self: Dataset.Instance, uri: str, element_mclass: RDF.Class = None, element_named_graph: RDF.NamedGraph | None = None) RDF.NamedGraph
Add an instance of
RDF.NamedGraphto the model along with an (optional)Elementof the given class.
- export(*args, **kwargs)
Overloaded function.
export(self: Dataset.Instance, arg0: RDF.Statement.Collection) -> None
Export an
RDF.Statement.Collectiondescribing the model.export(self: Dataset.Instance) -> RDF.Statement.Collection
Export an
RDF.Statement.Collectiondescribing the model.
- import_rdf_model(self: Dataset.Instance, statements: RDF.Statement.Collection) None
Import a set of
RDF.Statement.
- import_source_model(self: Dataset.Instance, source_model: SourceModel.Model, mapping: XS::Dataset::IMapping) None
Import a
SourceModel.Modelby applying the givenMapping.
- subscribe_events(self: Dataset.Instance, callback: Callable) XS::EventSubscription<XS::Dataset::IEvent>
Subscribe to events that may be raised by this model.
- property default_named_graph
The (possibly undefined) default
RDF.NamedGraphfor the model.
- property named_graphs
The collection of
RDF.NamedGraphinstances known to the model.
- class Dataset.Mapping
Bases:
Describes a translation between a SourceModel and a DataModel.
- class Dataset.ModelEventSubscription
Bases:
- class Dataset.Property
Bases:
The properties of IElement instances.
- class Collection
Bases:
- class Type
Bases:
The type of property.
Members:
DATE : A property whose value is a date (point in time).
QUALITY : A property whose value is a quality.
QUANTITY : A property whose value is a numerical quantity (with optional unit of measure).
- DATE = <Type.DATE: 0>
- QUALITY = <Type.QUALITY: 1>
- QUANTITY = <Type.QUANTITY: 2>
- property name
- property value
- property type
The Type of the property.
- property value
The Value of the property.
- class Dataset.Relationship
Bases:
Describes a relationship between two IElement instances.
- class Collection
Bases:
- property mproperty
The
RDF.Propertyof the relationship.This class is the predicate.
- class Dataset.Tag
Bases:
A tag, which consists of a (typically) human-readable string and an optional classification.
- class Collection
Bases:
- property rdl_class
The (optional) classification.
- property value
The (typically) human-readable value of the tag.
- Dataset.get_statement_collection(arg0: DataStore.Instance, arg1: str, arg2: str) RDF.Statement.Collection