home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / python-support / python-rdflib / rdflib / sparql / bison / Triples.py < prev    next >
Encoding:
Python Source  |  2007-04-04  |  556 b   |  18 lines

  1. class PropertyValue(object):
  2.     def __init__(self,property,objects):
  3.         self.property = property
  4.         self.objects = objects
  5.         #print
  6.     def __repr__(self):
  7.         return "%s(%s)"%(self.property,self.objects)
  8.  
  9. class ParsedConstrainedTriples(object):
  10.     """
  11.     A list of Resources associated with a constraint
  12.     """
  13.     def __init__(self,triples,constraint):
  14.         self.triples = triples
  15.         self.constraint = constraint
  16.  
  17.     def __repr__(self):
  18.         return "%s%s"%(self.triples,self.constraint and ' %s'%self.constraint or '')