DataOneOf

class DataOneOf(literals)[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

to_funowl_args()

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])

to_funowl_args()[source]

Get the inside of the functional OWL tag representing the enumeration of literals.

Return type:

str

to_rdflib_node(graph, converter)[source]

Represent this enumeration of literals for RDF.

Parameters:
  • graph (Graph)

  • converter (Converter)

Return type:

IdentifiedNode