oldman.core.validation package

Submodules

oldman.core.validation.value_format module

class oldman.core.validation.value_format.AnyValueFormat[source]

Bases: oldman.core.validation.value_format.ValueFormat

Accepts any value.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.EmailValueFormat[source]

Bases: oldman.core.validation.value_format.TypedValueFormat

Checks that the value is an email address.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.HexBinaryFormat[source]

Bases: oldman.core.validation.value_format.TypedValueFormat

Checks that the value is a hexadecimal string.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

to_python(rdf_term)[source]

Returns a hexstring.

class oldman.core.validation.value_format.IRIValueFormat[source]

Bases: oldman.core.validation.value_format.ValueFormat

Checks that the value is an IRI.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.NegativeTypedValueFormat(types)[source]

Bases: oldman.core.validation.value_format.TypedValueFormat

Checks that the value is a negative number.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.NonNegativeTypedValueFormat(types)[source]

Bases: oldman.core.validation.value_format.TypedValueFormat

Checks that the value is a non-negative number.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.NonPositiveTypedValueFormat(types)[source]

Bases: oldman.core.validation.value_format.TypedValueFormat

Checks that the value is a non-positive number.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.PositiveTypedValueFormat(types)[source]

Bases: oldman.core.validation.value_format.TypedValueFormat

Checks that the value is a positive number.

check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.TypedValueFormat(types)[source]

Bases: oldman.core.validation.value_format.ValueFormat

Checks that the value is of a given type.

Parameters:types – Supported Python types.
check_value(value)[source]

See oldman.validation.value_format.ValueFormat.check_value().

class oldman.core.validation.value_format.ValueFormat[source]

Bases: object

A ValueFormat object checks the values and converts rdflib.term.Identifier objects into Python objects.

check_value(value)[source]

Raises a ValueFormatError exception if the value is wrongly formatted.

Parameters:value – Python value to check.
to_python(rdf_term)[source]

Converts a rdflib.term.Identifier object into a regular Python value.

By default, uses the RDFlib toPython() method.

Parameters:rdf_termrdflib.term.Identifier object.
Returns:Regular Python object.
exception oldman.core.validation.value_format.ValueFormatError[source]

Bases: exceptions.Exception

Invalid format detected.

Module contents