DataOneOf
- class DataOneOf(literals: Sequence[LiteralBox | Literal | int | float | bool | str | date | datetime | OBOLiteral])[source]
Bases:
DataRange
A 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