Home | Trees | Indices | Help |
---|
|
Module to datatype restrictions, ie, data ranges.
The module implements the following aspects of datatype restrictions:
The last item is important to handle the following structures:
ex:RE a owl:Restriction ; owl:onProperty ex:p ; owl:someValuesFrom [ a rdfs:Datatype ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ xsd:minLength "3"^^xsd:integer ] [ xsd:maxLength "6"^^xsd:integer ] ) ] . ex:q ex:p "abcd"^^xsd:string.
In the case above the system can then infer that ex:q
is
also of type ex:RE
.
Datatype restrictions are used by the OWL RL Extensions extension class.
The implementation is not 100% complete. Some things that an ideal implementation should do are not done yet like:
Requires: RDFLib, 4.0.0 and higher
License: This software is available for use under the W3C Software License
Organization: World Wide Web Consortium
Author: Ivan Herman
Contact: Ivan Herman, ivan@w3.org
|
|||
RestrictedDatatypeCore An 'abstract' superclass for datatype restrictions. |
|||
RestrictedDatatype Implementation of a datatype with facets, ie, datatype with restrictions. |
|
|||
|
|||
boolean |
|
||
|
|
|||
__author__ =
|
|||
__license__ =
|
|||
MIN_MAX = 0
|
|||
LENGTH = 1
|
|||
LENGTH_AND_PATTERN = 2
|
|||
LENGTH_PATTERN_LRANGE = 3
|
|||
Datatypes_per_facets =
|
|||
facetable_datatypes =
|
|||
AllDifferent = rdflib.term.URIRef(u'http://www.w3.org/2002/07/
|
|||
AllDisjointClasses = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
AllDisjointProperties = rdflib.term.URIRef(u'http://www.w3.org
|
|||
Annotation = rdflib.term.URIRef(u'http://www.w3.org/2002/07/ow
|
|||
AnnotationProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
AsymmetricProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
Axiom = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#Axi
|
|||
BottomDataProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
BottomObjectProperty = rdflib.term.URIRef(u'http://www.w3.org/
|
|||
DataRange = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl
|
|||
DatatypeProperty = rdflib.term.URIRef(u'http://www.w3.org/2002
|
|||
DeprecatedClass = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
DeprecatedProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
FunctionalProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
InverseFunctionalProperty = rdflib.term.URIRef(u'http://www.w3
|
|||
IrreflexiveProperty = rdflib.term.URIRef(u'http://www.w3.org/2
|
|||
NamedIndividual = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
NegativePropertyAssertion = rdflib.term.URIRef(u'http://www.w3
|
|||
Nothing = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#N
|
|||
OWLClass = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#
|
|||
OWLNS = Namespace(u'http://www.w3.org/2002/07/owl#')
|
|||
OWLpredicate = rdflib.term.URIRef(u'http://www.w3.org/2002/07/
|
|||
OWLsubject = rdflib.term.URIRef(u'http://www.w3.org/2002/07/ow
|
|||
ObjectProperty = rdflib.term.URIRef(u'http://www.w3.org/2002/0
|
|||
Ontology = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#
|
|||
OntologyProperty = rdflib.term.URIRef(u'http://www.w3.org/2002
|
|||
ReflexiveProperty = rdflib.term.URIRef(u'http://www.w3.org/200
|
|||
Restriction = rdflib.term.URIRef(u'http://www.w3.org/2002/07/o
|
|||
SelfRestriction = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
SymmetricProperty = rdflib.term.URIRef(u'http://www.w3.org/200
|
|||
Thing = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#Thi
|
|||
TopDataProperty = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
TopObjectProperty = rdflib.term.URIRef(u'http://www.w3.org/200
|
|||
TransitiveProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
__package__ =
|
|||
allValuesFrom = rdflib.term.URIRef(u'http://www.w3.org/2002/07
|
|||
annotatedProperty = rdflib.term.URIRef(u'http://www.w3.org/200
|
|||
annotatedSource = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
annotatedTarget = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
assertionProperty = rdflib.term.URIRef(u'http://www.w3.org/200
|
|||
backwardCompatibleWith = rdflib.term.URIRef(u'http://www.w3.or
|
|||
cardinality = rdflib.term.URIRef(u'http://www.w3.org/2002/07/o
|
|||
complementOf = rdflib.term.URIRef(u'http://www.w3.org/2002/07/
|
|||
datatypeComplementOf = rdflib.term.URIRef(u'http://www.w3.org/
|
|||
deprecated = rdflib.term.URIRef(u'http://www.w3.org/2002/07/ow
|
|||
differentFrom = rdflib.term.URIRef(u'http://www.w3.org/2002/07
|
|||
disjointClasses = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
disjointUnionOf = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
disjointWith = rdflib.term.URIRef(u'http://www.w3.org/2002/07/
|
|||
distinctMembers = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
equivalentClass = rdflib.term.URIRef(u'http://www.w3.org/2002/
|
|||
equivalentProperty = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
hasKey = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#ha
|
|||
hasSelf = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#h
|
|||
hasValue = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#
|
|||
imports = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#i
|
|||
incompatibleWith = rdflib.term.URIRef(u'http://www.w3.org/2002
|
|||
intersectionOf = rdflib.term.URIRef(u'http://www.w3.org/2002/0
|
|||
inverseOf = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl
|
|||
maxCardinality = rdflib.term.URIRef(u'http://www.w3.org/2002/0
|
|||
maxQualifiedCardinality = rdflib.term.URIRef(u'http://www.w3.o
|
|||
members = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#m
|
|||
minCardinality = rdflib.term.URIRef(u'http://www.w3.org/2002/0
|
|||
minQualifiedCardinality = rdflib.term.URIRef(u'http://www.w3.o
|
|||
onClass = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#o
|
|||
onDataRange = rdflib.term.URIRef(u'http://www.w3.org/2002/07/o
|
|||
onDatatype = rdflib.term.URIRef(u'http://www.w3.org/2002/07/ow
|
|||
onProperties = rdflib.term.URIRef(u'http://www.w3.org/2002/07/
|
|||
onProperty = rdflib.term.URIRef(u'http://www.w3.org/2002/07/ow
|
|||
oneOf = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#one
|
|||
priorVersion = rdflib.term.URIRef(u'http://www.w3.org/2002/07/
|
|||
propertyChainAxiom = rdflib.term.URIRef(u'http://www.w3.org/20
|
|||
propertyDisjointWith = rdflib.term.URIRef(u'http://www.w3.org/
|
|||
qualifiedCardinality = rdflib.term.URIRef(u'http://www.w3.org/
|
|||
sameAs = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#sa
|
|||
someValuesFrom = rdflib.term.URIRef(u'http://www.w3.org/2002/0
|
|||
sourceIndividual = rdflib.term.URIRef(u'http://www.w3.org/2002
|
|||
targetIndividual = rdflib.term.URIRef(u'http://www.w3.org/2002
|
|||
targetValue = rdflib.term.URIRef(u'http://www.w3.org/2002/07/o
|
|||
unionOf = rdflib.term.URIRef(u'http://www.w3.org/2002/07/owl#u
|
|||
versionIRI = rdflib.term.URIRef(u'http://www.w3.org/2002/07/ow
|
|||
versionInfo = rdflib.term.URIRef(u'http://www.w3.org/2002/07/o
|
|||
withRestrictions = rdflib.term.URIRef(u'http://www.w3.org/2002
|
Imports: re, ns_owl, Datatype, type, ns_rdf, rdflibLiteral, ns_xsd, AltXSDToPYTHON, Namespace, rdflib
|
This method is used to convert a string to a value with facet checking. RDF Literals are converted to Python values using this method; if there is a problem, an exception is raised (and caught higher up to generate an error message). The method is the equivalent of all the methods in the DatatypeHandling module, and is registered to the system run time, as new restricted datatypes are discovered. (Technically, the registration is done via a
|
Implementation of the extended filtering algorithm, as defined in
point 3.3.2, of RFC 4647, on matching language ranges and language
tags. Needed to handle the
|
Extractions of restricted (ie, faceted) datatypes from the graph.
|
|
__license__
|
Datatypes_per_facets
|
facetable_datatypes
|
AllDifferent
|
AllDisjointClasses
|
AllDisjointProperties
|
Annotation
|
AnnotationProperty
|
AsymmetricProperty
|
Axiom
|
BottomDataProperty
|
BottomObjectProperty
|
DataRange
|
DatatypeProperty
|
DeprecatedClass
|
DeprecatedProperty
|
FunctionalProperty
|
InverseFunctionalProperty
|
IrreflexiveProperty
|
NamedIndividual
|
NegativePropertyAssertion
|
Nothing
|
OWLClass
|
OWLpredicate
|
OWLsubject
|
ObjectProperty
|
Ontology
|
OntologyProperty
|
ReflexiveProperty
|
Restriction
|
SelfRestriction
|
SymmetricProperty
|
Thing
|
TopDataProperty
|
TopObjectProperty
|
TransitiveProperty
|
allValuesFrom
|
annotatedProperty
|
annotatedSource
|
annotatedTarget
|
assertionProperty
|
backwardCompatibleWith
|
cardinality
|
complementOf
|
datatypeComplementOf
|
deprecated
|
differentFrom
|
disjointClasses
|
disjointUnionOf
|
disjointWith
|
distinctMembers
|
equivalentClass
|
equivalentProperty
|
hasKey
|
hasSelf
|
hasValue
|
imports
|
incompatibleWith
|
intersectionOf
|
inverseOf
|
maxCardinality
|
maxQualifiedCardinality
|
members
|
minCardinality
|
minQualifiedCardinality
|
onClass
|
onDataRange
|
onDatatype
|
onProperties
|
onProperty
|
oneOf
|
priorVersion
|
propertyChainAxiom
|
propertyDisjointWith
|
qualifiedCardinality
|
sameAs
|
someValuesFrom
|
sourceIndividual
|
targetIndividual
|
targetValue
|
unionOf
|
versionIRI
|
versionInfo
|
withRestrictions
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Feb 7 15:00:18 2014 | http://epydoc.sourceforge.net |