shaclapi.triple module#

class shaclapi.triple.TripleE(value)[source]#

Bases: IntEnum

An enumeration.

SUBJECT = 0#
PREDICATE = 1#
OBJECT = 2#
class shaclapi.triple.Triple(s, p, o, is_optional=False)[source]#

Bases: object

Representation of a Triple, which consists of a subject, a predicate and an object. Additionally, a triple can be marked as optional. Subject, predicate and objects need to be rdflib objects with n3() functions, which accept rdflib namespace_manager objects for shortening URIs.

static fromList(list_, is_optional)[source]#

Transforms a list of python tuples to a list of Triples

toTuple(namespace_manager=None) tuple[source]#

Transforms a triple object into a Tuple

n3(namespace_manager=None) str[source]#
set_subject(s)[source]#