| |
- __builtin__.dict(__builtin__.object)
-
- Env
- __builtin__.frozenset(__builtin__.object)
-
- N3Set(__builtin__.frozenset, CompoundTerm)
- __builtin__.object
-
- ListView
- Term
-
- CompoundTerm
-
- List
-
- EmptyList
-
- FragmentNil(EmptyList, Fragment)
- NonEmptyList
- N3Set(__builtin__.frozenset, CompoundTerm)
- ErrorFlag(exceptions.TypeError, Term)
- Existential
-
- SkolemFunction
- Literal
-
- XMLLiteral
- Node
-
- AnonymousNode
-
- AnonymousVariable
-
- AnonymousExistential(AnonymousVariable, Existential)
- AnonymousUniversal(AnonymousVariable, Universal)
- LabelledNode
-
- Fragment
-
- BuiltIn
-
- Function
-
- MultipleFunction
- GenericBuiltIn
-
- FiniteProperty(GenericBuiltIn, Function, ReverseFunction)
- HeavyBuiltIn
- LightBuiltIn
-
- RDFBuiltIn
- ReverseFunction
-
- MultipleReverseFunction
- Symbol
- Universal
- exceptions.TypeError(exceptions.StandardError)
-
- ArgumentNotLiteral
- ErrorFlag(exceptions.TypeError, Term)
- exceptions.ValueError(exceptions.StandardError)
-
- UnknownType
class AnonymousExistential(AnonymousVariable, Existential) |
|
An anonymous node which is existentially quantified in a given context.
Also known as a Blank Node, or "bnode" in RDF parlance. |
|
- Method resolution order:
- AnonymousExistential
- AnonymousVariable
- AnonymousNode
- Node
- Existential
- Term
- __builtin__.object
Methods defined here:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
Methods inherited from AnonymousVariable:
- __init__(self, scope, uri=None)
Methods inherited from AnonymousNode:
- asPair(self)
- classOrder(self)
- Anonymous ndoes are higher than symbols as the = smushing
tries to minimize the order rank of the node which it adopts
as the epresentative node of an equivalence class.
- compareTerm(self, other)
- Assume is also a Formula - see function compareTerm below
- freeVariables(self)
- generated(self)
- uriref(self)
Methods inherited from Term:
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class AnonymousNode(Node) |
|
Has no real URI except when needed for output.
Goal is to eliminate use of ths URI in the code.
The URI is however useful as a diagnostic, so we carry it
when it is given. It is NOT checked for uniqueness etc.
This is a superclass of many things, including AnonymousExistential,
which has a scope. |
|
- Method resolution order:
- AnonymousNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self, store, uri=None)
- asPair(self)
- classOrder(self)
- Anonymous ndoes are higher than symbols as the = smushing
tries to minimize the order rank of the node which it adopts
as the epresentative node of an equivalence class.
- compareTerm(self, other)
- Assume is also a Formula - see function compareTerm below
- freeVariables(self)
- generated(self)
- uriref(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class AnonymousUniversal(AnonymousVariable, Universal) |
|
Nodes which are introduced as universally quantified variables with
no quotable URI |
|
- Method resolution order:
- AnonymousUniversal
- AnonymousVariable
- AnonymousNode
- Node
- Universal
- Term
- __builtin__.object
Methods defined here:
- __init__(self, scope, uri=None)
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
Methods inherited from AnonymousNode:
- classOrder(self)
- Anonymous ndoes are higher than symbols as the = smushing
tries to minimize the order rank of the node which it adopts
as the epresentative node of an equivalence class.
- compareTerm(self, other)
- Assume is also a Formula - see function compareTerm below
- freeVariables(self)
- generated(self)
- uriref(self)
Methods inherited from Term:
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class AnonymousVariable(AnonymousNode) |
|
An anonymous node which is existentially quantified in a given context.
Also known as a Blank Node, or "bnode" in RDF parlance. |
|
- Method resolution order:
- AnonymousVariable
- AnonymousNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self, scope, uri=None)
Methods inherited from AnonymousNode:
- asPair(self)
- classOrder(self)
- Anonymous ndoes are higher than symbols as the = smushing
tries to minimize the order rank of the node which it adopts
as the epresentative node of an equivalence class.
- compareTerm(self, other)
- Assume is also a Formula - see function compareTerm below
- freeVariables(self)
- generated(self)
- uriref(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class BuiltIn(Fragment) |
|
This class is a supercalss to any builtin predicate in cwm.
A binary operator can calculate truth value given 2 arguments |
|
- Method resolution order:
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self, resource, fragid)
- eval(self, subj, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use
evaluate, subject, etc.
Static methods defined here:
- __new__(cls, *args, **keywords)
Data and other attributes defined here:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class CompoundTerm(Term) |
|
A compound term has occurrences of terms within it.
Examples: List, Formula |
|
- Method resolution order:
- CompoundTerm
- Term
- __builtin__.object
Methods inherited from Term:
- __init__(self, store)
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class EmptyList(List) |
| |
- Method resolution order:
- EmptyList
- List
- CompoundTerm
- Term
- __builtin__.object
Methods defined here:
- __getitem__(self, i)
- __repr__(self)
- classOrder(self)
- newList(self, value)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with substitution of equals made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with substitution made
- uriref(self)
- value(self)
Methods inherited from List:
- __init__(self, store, first, rest)
- __iter__(self)
- The internal method which allows one to iterate over the statements
as though a formula were a sequence.
- __len__(self)
- The internal method which allows one to count the statements
as though a formula were a sequence.
- asSequence(self)
- Convert to a python sequence - NOT recursive
- doesNodeAppear(self, symbol)
- Does that particular node appear anywhere in this list
This function is necessarily recursive, and is useful for the pretty
printer. It will also be useful for the flattener, when we write it.
- freeVariables(self)
- prepend(self, first)
Methods inherited from Term:
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- representation(self, base=None)
- The string represnting this in N3
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Env(__builtin__.dict) |
|
An env is an immutable dict
you can hash it (if you want to) |
|
- Method resolution order:
- Env
- __builtin__.dict
- __builtin__.object
Methods defined here:
- __getitem__(self, item)
- __hash__(self)
- __init__(self, other=None, keywords={})
- __repr__(self)
- __setitem__(self, item, val)
- asDict(self)
- bind = newBinding(self, var, val)
- canBind(self, var, val)
- copy(self)
- dereference(self, var)
- filter(self, varSet)
- flatten(self, other)
- Pull all of the bindings of other into a copy of self
- get(self, item, default=None)
- newBinding(self, var, val)
- substitution(self, node, *otherEnvs)
- update(self, d2)
- update2(self, d2)
Data and other attributes defined here:
- __slots__ = ['_hashval', '__weakref__', 'id']
- __weakref__ = <attribute '__weakref__' of 'Env' objects>
- list of weak references to the object (if defined)
- id = <member 'id' of 'Env' objects>
Methods inherited from __builtin__.dict:
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- D.__contains__(k) -> True if D has a key k, else False
- __delitem__(...)
- x.__delitem__(y) <==> del x[y]
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __gt__(...)
- x.__gt__(y) <==> x>y
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- clear(...)
- D.clear() -> None. Remove all items from D.
- has_key(...)
- D.has_key(k) -> True if D has a key k, else False
- items(...)
- D.items() -> list of D's (key, value) pairs, as 2-tuples
- iteritems(...)
- D.iteritems() -> an iterator over the (key, value) items of D
- iterkeys(...)
- D.iterkeys() -> an iterator over the keys of D
- itervalues(...)
- D.itervalues() -> an iterator over the values of D
- keys(...)
- D.keys() -> list of D's keys
- pop(...)
- D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem(...)
- D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
- setdefault(...)
- D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
- values(...)
- D.values() -> list of D's values
Data and other attributes inherited from __builtin__.dict:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
- fromkeys = <built-in method fromkeys of type object>
- dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.
|
class ErrorFlag(exceptions.TypeError, Term) |
| |
- Method resolution order:
- ErrorFlag
- exceptions.TypeError
- exceptions.StandardError
- exceptions.Exception
- Term
- __builtin__.object
Methods defined here:
- __init__(...)
- __repr__ = __str__(...)
- __str__(...)
- classOrder(self)
- value lambda s
Methods inherited from exceptions.Exception:
- __getitem__(...)
Methods inherited from Term:
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Existential(Term) |
| |
- Method resolution order:
- Existential
- Term
- __builtin__.object
Methods inherited from Term:
- __init__(self, store)
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class FiniteProperty(GenericBuiltIn, Function, ReverseFunction) |
|
A finite property has a finite set of pairs of (subj, object) values
The built-in finite property can ennumerate them all if necessary.
Argv is the only useful example I can think of right now. |
|
- Method resolution order:
- FiniteProperty
- GenericBuiltIn
- Function
- ReverseFunction
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- enn(self)
- Return list of pairs [(subj, obj)]
- ennumerate(self)
- eval(self, subj, obj, queue, bindings, proof, query)
- This is of course very inefficient except for really small ones like argv.
- evalObj(self, subj, queue, bindings, proof, query)
- This is of course very inefficient except for really small ones like argv.
- evalSubj(self, obj, queue, bindings, proof, query)
- This is of course very inefficient except for really small ones like argv.
Methods inherited from GenericBuiltIn:
- __init__(self, resource, fragid)
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Fragment(LabelledNode) |
|
A Term which DOES have a fragment id in its URI |
|
- Method resolution order:
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self, resource, fragid)
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class FragmentNil(EmptyList, Fragment) |
|
This is unique in being both a symbol and a list |
|
- Method resolution order:
- FragmentNil
- EmptyList
- List
- CompoundTerm
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self, resource, fragid)
Methods inherited from EmptyList:
- __getitem__(self, i)
- __repr__(self)
- classOrder(self)
- newList(self, value)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with substitution of equals made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with substitution made
- uriref(self)
- value(self)
Methods inherited from List:
- __iter__(self)
- The internal method which allows one to iterate over the statements
as though a formula were a sequence.
- __len__(self)
- The internal method which allows one to count the statements
as though a formula were a sequence.
- asSequence(self)
- Convert to a python sequence - NOT recursive
- doesNodeAppear(self, symbol)
- Does that particular node appear anywhere in this list
This function is necessarily recursive, and is useful for the pretty
printer. It will also be useful for the flattener, when we write it.
- freeVariables(self)
- prepend(self, first)
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref2(self, base)
Methods inherited from Term:
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Function(BuiltIn) |
|
A function is a builtin which can calculate its object given its subject.
To get cwm to invoke it this way, your built-in must be a subclass of Function.
I may make changes to clean up the parameters of these methods below some day. -tbl |
|
- Method resolution order:
- Function
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self)
- eval(self, subj, obj, queue, bindings, proof, query)
- evalObj(self, subj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use "evaluate", "subject", etc.
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class GenericBuiltIn(BuiltIn) |
| |
- Method resolution order:
- GenericBuiltIn
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self, resource, fragid)
Methods inherited from BuiltIn:
- eval(self, subj, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use
evaluate, subject, etc.
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class HeavyBuiltIn(GenericBuiltIn) |
|
A heavy built-in is fast and is calculated late, after searching the store
to see if the answer is already in it.
Make your built-in a subclass of either this or LightBultIn to tell cwm when to
run it. Going out onto the web or net counts as Heavy. |
|
- Method resolution order:
- HeavyBuiltIn
- GenericBuiltIn
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods inherited from GenericBuiltIn:
- __init__(self, resource, fragid)
Methods inherited from BuiltIn:
- eval(self, subj, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use
evaluate, subject, etc.
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class LabelledNode(Node) |
|
The labelled node is one which has a URI. |
|
- Method resolution order:
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- classOrder(self)
- compareTerm(self, other)
- Assume is also a LabelledNode - see function compareTerm in formula.py
Methods inherited from Term:
- __init__(self, store)
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class LightBuiltIn(GenericBuiltIn) |
|
A light built-in is fast and is calculated immediately before searching the store.
Make your built-in a subclass of either this or HeavyBultIn to tell cwm when to
run it. Going out onto the web or net counts as heavy. |
|
- Method resolution order:
- LightBuiltIn
- GenericBuiltIn
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods inherited from GenericBuiltIn:
- __init__(self, resource, fragid)
Methods inherited from BuiltIn:
- eval(self, subj, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use
evaluate, subject, etc.
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class List(CompoundTerm) |
| |
- Method resolution order:
- List
- CompoundTerm
- Term
- __builtin__.object
Methods defined here:
- __init__(self, store, first, rest)
- __iter__(self)
- The internal method which allows one to iterate over the statements
as though a formula were a sequence.
- __len__(self)
- The internal method which allows one to count the statements
as though a formula were a sequence.
- asSequence(self)
- Convert to a python sequence - NOT recursive
- doesNodeAppear(self, symbol)
- Does that particular node appear anywhere in this list
This function is necessarily recursive, and is useful for the pretty
printer. It will also be useful for the flattener, when we write it.
- freeVariables(self)
- occurringIn(self, vars)
- Which variables in the list occur in this list?
- prepend(self, first)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with substitution of equals made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with variable substitution made
- uriref(self)
- value(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- representation(self, base=None)
- The string represnting this in N3
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class ListView(__builtin__.object) |
|
#### Everything that follows are the new unification routines |
|
Methods defined here:
- __init__(self, list, start=0)
- __len__(self)
Properties defined here:
- car
- get = _car(self)
- cdr
- get = _cdr(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'ListView' objects>
- list of weak references to the object (if defined)
|
class Literal(Term) |
|
A Literal is a representation of an RDF literal
really, data:text/rdf+n3;%22hello%22 == "hello" but who
wants to store it that way? Maybe we do... at least in theory and maybe
practice but, for now, we keep them in separate subclases of Term.
An RDF literal has a value - by default a string, and a datattype, and a
language. |
|
- Method resolution order:
- Literal
- Term
- __builtin__.object
Methods defined here:
- __decimal__(self)
- __float__(self)
- __init__(self, store, str, dt=None, lang=None)
- __int__(self)
- __repr__(self)
- __str__(self)
- asHashURI(self)
- return a md5: URI for this literal.
Hmm... encoding... assuming utf8? @@test this.
Hmm... for a class of literals including this one,
strictly speaking.
- asPair(self)
- classOrder(self)
- compareTerm(self, other)
- Assume is also a literal - see function compareTerm in formula.py
- occurringIn(self, vars)
- representation(self, base=None)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with subsitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- uriref(self)
- value(self)
- Datatype conversion XSD to Python
RDF primitive datatypes are XML schema datatypes, in the XSD namespace.
see http://www.w3.org/TR/xmlschema-2
Methods inherited from Term:
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class MultipleFunction(Function) |
|
Multiple return values.
The preconditions are the same as for Function, that the subject must be bound.
The result is different, as multiple versions are returned. Example: member of list. |
|
- Method resolution order:
- MultipleFunction
- Function
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- evalSubj(self, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
The python one returns a list of function values.
This returns a 'new bindings' structure (nbs) which is a sequence of
(bindings, reason) pairs.
Methods inherited from Function:
- __init__(self)
- eval(self, subj, obj, queue, bindings, proof, query)
- evalObj(self, subj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use "evaluate", "subject", etc.
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class MultipleReverseFunction(ReverseFunction) |
|
Multiple return values |
|
- Method resolution order:
- MultipleReverseFunction
- ReverseFunction
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- evalObj(self, subj, queue, bindings, proof, query)
Methods inherited from ReverseFunction:
- __init__(self)
- eval(self, subj, obj, queue, bindings, proof, query)
- evalSubj(self, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class N3Set(__builtin__.frozenset, CompoundTerm) |
|
There can only be one of every N3Set |
|
- Method resolution order:
- N3Set
- __builtin__.frozenset
- CompoundTerm
- Term
- __builtin__.object
Methods defined here:
- __init__(self, stuff=[])
- something
- asSequence(self)
- classOrder(self)
- compareTerm(self, other)
- This is annoying
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with substitution of equals made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with variable substitution made
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- uriref(self)
Static methods defined here:
- __new__(cls, stuff=[])
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- res = {}
Methods inherited from __builtin__.frozenset:
- __and__(...)
- x.__and__(y) <==> x&y
- __cmp__(...)
- x.__cmp__(y) <==> cmp(x,y)
- __contains__(...)
- x.__contains__(y) <==> y in x.
- __eq__(...)
- x.__eq__(y) <==> x==y
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __or__(...)
- x.__or__(y) <==> x|y
- __rand__(...)
- x.__rand__(y) <==> y&x
- __reduce__(...)
- Return state information for pickling.
- __repr__(...)
- x.__repr__() <==> repr(x)
- __ror__(...)
- x.__ror__(y) <==> y|x
- __rsub__(...)
- x.__rsub__(y) <==> y-x
- __rxor__(...)
- x.__rxor__(y) <==> y^x
- __sub__(...)
- x.__sub__(y) <==> x-y
- __xor__(...)
- x.__xor__(y) <==> x^y
- copy(...)
- Return a shallow copy of a set.
- difference(...)
- Return the difference of two sets as a new set.
(i.e. all elements that are in this set but not the other.)
- intersection(...)
- Return the intersection of two sets as a new set.
(i.e. all elements that are in both sets.)
- issubset(...)
- Report whether another set contains this set.
- issuperset(...)
- Report whether this set contains another set.
- symmetric_difference(...)
- Return the symmetric difference of two sets as a new set.
(i.e. all elements that are in exactly one of the sets.)
- union(...)
- Return the union of two sets as a new set.
(i.e. all elements that are in either set.)
Methods inherited from Term:
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- representation(self, base=None)
- The string represnting this in N3
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Node(Term) |
|
A node in the graph |
|
- Method resolution order:
- Node
- Term
- __builtin__.object
Methods inherited from Term:
- __init__(self, store)
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class NonEmptyList(List) |
| |
- Method resolution order:
- NonEmptyList
- List
- CompoundTerm
- Term
- __builtin__.object
Methods defined here:
- __getitem__(self, i)
- classOrder(self)
- compareTerm(self, other)
- Assume is also a NonEmptyList - see function compareTerm in formula.py
- debugString(self, already=[])
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Methods inherited from List:
- __init__(self, store, first, rest)
- __iter__(self)
- The internal method which allows one to iterate over the statements
as though a formula were a sequence.
- __len__(self)
- The internal method which allows one to count the statements
as though a formula were a sequence.
- asSequence(self)
- Convert to a python sequence - NOT recursive
- doesNodeAppear(self, symbol)
- Does that particular node appear anywhere in this list
This function is necessarily recursive, and is useful for the pretty
printer. It will also be useful for the flattener, when we write it.
- freeVariables(self)
- occurringIn(self, vars)
- Which variables in the list occur in this list?
- prepend(self, first)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with substitution of equals made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with variable substitution made
- uriref(self)
- value(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- representation(self, base=None)
- The string represnting this in N3
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class RDFBuiltIn(LightBuiltIn) |
|
An RDF built-in is a light built-in which is inherent in the RDF model.
The only examples are (I think) rdf:first and rdf:rest which in the RDF model
are arcs but in cwm have to be builtins as Lists a a first class data type.
. |
|
- Method resolution order:
- RDFBuiltIn
- LightBuiltIn
- GenericBuiltIn
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods inherited from GenericBuiltIn:
- __init__(self, resource, fragid)
Methods inherited from BuiltIn:
- eval(self, subj, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions.
To reduce confusion, the inital ones called with the internals available
use abreviations "eval", "subj" etc while the python-style ones use
evaluate, subject, etc.
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class ReverseFunction(BuiltIn) |
|
A reverse function is a builtin which can calculate its subject given its object.
To get cwm to invoke it this way, your built-in must be a subclass of ReverseFunction.
If a function (like log:uri for example) is a two-way (1:1) builtin, it should be declared
a subclass of Function and ReverseFunction. Then, cwm will call it either way as needed
in trying to resolve a query. |
|
- Method resolution order:
- ReverseFunction
- BuiltIn
- Fragment
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __init__(self)
- eval(self, subj, obj, queue, bindings, proof, query)
- evalSubj(self, obj, queue, bindings, proof, query)
- This function which has access to the store, unless overridden,
calls a simpler one which uses python conventions
Static methods inherited from BuiltIn:
- __new__(cls, *args, **keywords)
Data and other attributes inherited from BuiltIn:
- all = []
Methods inherited from Fragment:
- compareTerm(self, other)
- dereference(self, mode='', workingContext=None)
- dereference an identifyer, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- generated(self)
- A generated identifier?
This arises when a document is parsed and a arbitrary
name is made up to represent a node with no known URI.
It is useful to know that its ID has no use outside that
context.
- representation(self, base=None)
- Optimize output if prefixes available
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- occurringIn(self, vars)
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class SkolemFunction(Existential) |
| |
- Method resolution order:
- SkolemFunction
- Existential
- Term
- __builtin__.object
Methods inherited from Term:
- __init__(self, store)
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Symbol(LabelledNode) |
|
A Term which has no fragment |
|
- Method resolution order:
- Symbol
- LabelledNode
- Node
- Term
- __builtin__.object
Methods defined here:
- __getitem__(self, lname)
- get the lname Symbol in this namespace.
lname -- an XML name (limited to URI characters)
- __init__(self, uri, store)
- dereference(self, mode='', workingContext=None)
- dereference an identifier, finding the semantics of its schema if any
Returns None if it cannot be retreived.
- internFrag(self, fragid, thetype)
- uriref(self)
- uriref2(self, base)
Methods inherited from LabelledNode:
- classOrder(self)
- compareTerm(self, other)
- Assume is also a LabelledNode - see function compareTerm in formula.py
Methods inherited from Term:
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Term(__builtin__.object) |
|
The Term object represents an RDF term.
It is interned for speed of processing by the store.
Every term has a pointer back to its store. |
|
Methods defined here:
- __init__(self, store)
- __repr__(self)
- This method only used for debugging output - it can be ambiguous,
as it is is deliberately short to make debug printout readable.
output as XML qnames [http://www.w3.org/TR/REC-xml-names/#NT-QName].
This could be beefed up to guarantee unambiguity.
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class Universal(Term) |
| |
- Method resolution order:
- Universal
- Term
- __builtin__.object
Methods inherited from Term:
- __init__(self, store)
- asPair(self)
- Representation in an earlier format, being phased out 2002/08
The first part of the pair is a constant number represnting the type
see RDFSink.py. the second is the value -- uri for symbols,
string for literals
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- occurringIn(self, vars)
- representation(self, base=None)
- The string represnting this in N3
- substituteEquals(self, bindings, newRedirections)
- Return this or a version of me with substitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
- value(self)
- As a python value - by default, none exists, use self
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
|
class XMLLiteral(Literal) |
|
A Literal is a representation of an RDF literal
really, data:text/rdf+n3;%22hello%22 == "hello" but who
wants to store it that way? Maybe we do... at least in theory and maybe
practice but, for now, we keep them in separate subclases of Term.
An RDF literal has a value - by default a string, and a datattype, and a
language. |
|
- Method resolution order:
- XMLLiteral
- Literal
- Term
- __builtin__.object
Methods defined here:
- __decimal__(self)
- __float__(self)
- __init__(self, store, dom)
- __int__(self)
- __repr__(self)
- __str__(self)
- asHashURI(self)
- return a md5: URI for this literal.
Hmm... encoding... assuming utf8? @@test this.
Hmm... for a class of literals including this one,
strictly speaking.
- asPair(self)
- classOrder(self)
- compareTerm(self, other)
- Assume is also a literal - see function compareTerm in formula.py
- occurringIn(self, vars)
- representation(self, base=None)
- substituteEquals(self, bindings, newBindings)
- Return this or a version of me with subsitution made
- substitution(self, bindings, why=None, cannon=False)
- Return this or a version of me with subsitution made
- uriref(self)
- value(self)
- Datatype conversion XSD to Python
The internal reopresentation is the dom tree
Methods inherited from Term:
- compareAnyTerm(self, other)
- Compare two langauge items
This is a cannoncial ordering in that is designed to allow
the same graph always to be printed in the same order.
This makes the regression tests possible.
The literals are deemed smaller than symbols, which are smaller
than formulae. This puts the rules at the botom of a file where
they tend to take a lot of space anyway.
Formulae have to be compared as a function of their sorted contents.
@@ Anonymous nodes have to, within a given Formula, be compared as
a function of the sorted information about them in that context.
This is not done yet
- debugString(self, already=[])
- doesNodeAppear(self, symbol)
- Does that node appear within this one
This non-overloaded function will simply return if I'm equal to him
- freeVariables(self)
- generated(self)
- Boolean Is this thing a genid - is its name arbitrary?
- unify(self, other, env1=Env({}), env2=Env({}), vars=set([]), universals=set([]), existentials=set([]), n1Source=32, n2Source=32)
- unifySecondary(self, other, env1, env2, vars, universals, existentials, n1Source=55, n2Source=55)
Data and other attributes inherited from Term:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Term' objects>
- list of weak references to the object (if defined)
| |