DatatypeRestriction

class DatatypeRestriction(datatype: URIRef | Reference | Referenced | str | IdentifierBox, pairs: list[tuple[URIRef | Reference | Referenced | str | IdentifierBox, LiteralBox | Literal | int | float | bool | str | date | datetime | OBOLiteral]])[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 – The base datatype

  • pairs – 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() str[source]

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

to_rdflib_node(graph: Graph, converter: Converter) IdentifiedNode[source]

Represent this datatype restriction for RDF.