RDFClosure.Literals._LiteralStructure

Package RDFClosure :: Module Literals :: Class _LiteralStructure |
[hide private]
[frames] | no frames]

# Class _LiteralStructure

source code

This class serves as a wrapper around rdflib's Literal, by changing the equality function to a strict identity of datatypes and lexical values.

On the other hand, to implement, eg, OWL RL's datatype rules, a should be able to generate an 'a sameAs b' triple, ie, the distinction should be kept. Hence this class that overrides the equality, and then can be used as a key in a Python dictionary.

Instance Methods | [hide private]
__init__(self, lit) | source code
boolean |
compare_value(self, other) Compare to literal structure instances for equality. | source code
__eq__(self, other) | source code
__ne__(self, other) | source code
__hash__(self) | source code
__repr__(self) | source code

Method Details | [hide private]

### compare_value(self, other) | source code
Compare to literal structure instances for equality. Here equality means in the sense of datatype values Returns: boolean comparison result