DataOneOf
- class DataOneOf(literals)[source]
Bases:
DataRangeA data range defined in 7.4 Enumeration of Literals”.
The following data range contains exactly two literals: the string “Peter” and the integer one.
>>> DataOneOf(["Peter", 1])
This can be specified more explicitly with
rdflib.Literal:>>> import rdflib >>> DataOneOf(["Peter", rdflib.Literal(1, datatype=XSD.nonNegativeInteger)])
Initialize an enumeration of literals.
Methods Summary
Get the inside of the functional OWL tag representing the enumeration of literals.
to_rdflib_node(graph, converter)Represent this enumeration of literals for RDF.
Methods Documentation
- Parameters:
literals (Sequence[LiteralBox])