DatatypeRestriction

class DatatypeRestriction(datatype, pairs)[source]

Bases: DataRange

A data range defined in 7.5 Datatype Restrictions “.

The following data range contains exactly the integers 5, 6, 7, 8, and 9:

>>> DatatypeRestriction("xsd:integer", [("xsd:minInclusive", 5), ("xsd:maxExclusive", 10)])

Initialize a datatype restriction.

Parameters:
  • datatype (IdentifierBox) – The base datatype

  • pairs (list[tuple[IdentifierBox, LiteralBox]]) – A list of pairs of restrictions (e.g., xsd:minInclusive) and literal values

Methods Summary

to_funowl_args()

Get the inside of the functional OWL tag representing the datatype restriction.

to_rdflib_node(graph, converter)

Represent this datatype restriction for RDF.

Methods Documentation

to_funowl_args()[source]

Get the inside of the functional OWL tag representing the datatype restriction.

Return type:

str

to_rdflib_node(graph, converter)[source]

Represent this datatype restriction for RDF.

Parameters:
  • graph (Graph)

  • converter (Converter)

Return type:

IdentifiedNode