cwm_list
index
/devel/WWW/2000/10/swap/cwm_list.py


 
$Id: cwm_list.html,v 1.4 2004/01/29 18:03:20 timbl Exp $
 
List and set built-ins for cwm
http://www.w3.org/2000/10/swap/cwm_list.py
 
See cwm.py and the os module in python

 
Modules
            
uripath
 
Classes
            
term.Function(term.BuiltIn)
BI_first(term.LightBuiltIn, term.Function)
BI_last(term.LightBuiltIn, term.Function)
BI_rest(term.LightBuiltIn, term.Function)
term.LightBuiltIn(term.BuiltIn)
BI_first(term.LightBuiltIn, term.Function)
BI_in
BI_last(term.LightBuiltIn, term.Function)
BI_rest(term.LightBuiltIn, term.Function)
 
class BI_first(term.LightBuiltIn, term.Function)
       
  
Method resolution order:
BI_first
term.LightBuiltIn
term.BuiltIn
term.Fragment
term.Term
term.Function

Methods defined here:
evalObj(self, subj, queue, bindings, proof, query)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'cwm_list'

Methods inherited from term.BuiltIn:
__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.

Methods inherited from term.Fragment:
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.
reification(self, sink, why=None)
Describe myself in RDF to the given context
 
[ reify:uri "http://example.org/#whatever"]
representation(self, base=None)
 Optimize output if prefixes available
uriref(self)
uriref2(self, base)

Methods inherited from term.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
debugString(self, already)
occurringIn(self, vars)
substituteEquals(self, bindings, newRedirections)
Return this or a version of me with substitution made
substitution(self, bindings, why=None)
Return this or a version of me with subsitution made
unify(self, other, vars, existentials, bindings)
Unify this which may contain variables with the other,
which may contain existentials but not variables.
Return 0 if impossible.
return [({}, reason] if no new bindings
Return [( {var1: val1, var2: val2,...}, reason), ...] if match
value(self)
As a python value - by default, none exists, use self
 
class BI_in(term.LightBuiltIn)
      Is the subject in the object?
Thsi is a wimpy implementation, because the built-in 
system can only return single values right now.  It ought to be
able in the future return all subjects wjich are in the object.
 
  
Method resolution order:
BI_in
term.LightBuiltIn
term.BuiltIn
term.Fragment
term.Term

Methods defined here:
eval(self, subj, obj, queue, bindings, proof, query)

Data and non-method functions defined here:
__doc__ = 'Is the subject in the object?\n Thsi is a wimp...ture return all subjects wjich are in the object.'
__module__ = 'cwm_list'

Methods inherited from term.BuiltIn:
__init__(self, resource, fragid)

Methods inherited from term.Fragment:
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.
reification(self, sink, why=None)
Describe myself in RDF to the given context
 
[ reify:uri "http://example.org/#whatever"]
representation(self, base=None)
 Optimize output if prefixes available
uriref(self)
uriref2(self, base)

Methods inherited from term.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
debugString(self, already)
occurringIn(self, vars)
substituteEquals(self, bindings, newRedirections)
Return this or a version of me with substitution made
substitution(self, bindings, why=None)
Return this or a version of me with subsitution made
unify(self, other, vars, existentials, bindings)
Unify this which may contain variables with the other,
which may contain existentials but not variables.
Return 0 if impossible.
return [({}, reason] if no new bindings
Return [( {var1: val1, var2: val2,...}, reason), ...] if match
value(self)
As a python value - by default, none exists, use self
 
class BI_last(term.LightBuiltIn, term.Function)
       
  
Method resolution order:
BI_last
term.LightBuiltIn
term.BuiltIn
term.Fragment
term.Term
term.Function

Methods defined here:
evalObj(self, subj, queue, bindings, proof, query)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'cwm_list'

Methods inherited from term.BuiltIn:
__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.

Methods inherited from term.Fragment:
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.
reification(self, sink, why=None)
Describe myself in RDF to the given context
 
[ reify:uri "http://example.org/#whatever"]
representation(self, base=None)
 Optimize output if prefixes available
uriref(self)
uriref2(self, base)

Methods inherited from term.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
debugString(self, already)
occurringIn(self, vars)
substituteEquals(self, bindings, newRedirections)
Return this or a version of me with substitution made
substitution(self, bindings, why=None)
Return this or a version of me with subsitution made
unify(self, other, vars, existentials, bindings)
Unify this which may contain variables with the other,
which may contain existentials but not variables.
Return 0 if impossible.
return [({}, reason] if no new bindings
Return [( {var1: val1, var2: val2,...}, reason), ...] if match
value(self)
As a python value - by default, none exists, use self
 
class BI_rest(term.LightBuiltIn, term.Function)
       
  
Method resolution order:
BI_rest
term.LightBuiltIn
term.BuiltIn
term.Fragment
term.Term
term.Function

Methods defined here:
evalObj(self, subj, queue, bindings, proof, query)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'cwm_list'

Methods inherited from term.BuiltIn:
__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.

Methods inherited from term.Fragment:
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.
reification(self, sink, why=None)
Describe myself in RDF to the given context
 
[ reify:uri "http://example.org/#whatever"]
representation(self, base=None)
 Optimize output if prefixes available
uriref(self)
uriref2(self, base)

Methods inherited from term.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
debugString(self, already)
occurringIn(self, vars)
substituteEquals(self, bindings, newRedirections)
Return this or a version of me with substitution made
substitution(self, bindings, why=None)
Return this or a version of me with subsitution made
unify(self, other, vars, existentials, bindings)
Unify this which may contain variables with the other,
which may contain existentials but not variables.
Return 0 if impossible.
return [({}, reason] if no new bindings
Return [( {var1: val1, var2: val2,...}, reason), ...] if match
value(self)
As a python value - by default, none exists, use self
 
Functions
            
register(store)
 
Data
             ListOperationsNamespace = 'http://www.w3.org/2000/10/swap/list#'
List_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
Logic_NS = 'http://www.w3.org/2000/10/swap/log#'
__file__ = './cwm_list.pyc'
__name__ = 'cwm_list'