Logo Search packages:      
Sourcecode: zeitgeist version File versions

def _zeitgeist::engine::base::ReferencingProxyItem::__init__ (   self,
  uri,
  subject = None 
)

Create a new ReferencingProxyItem. The 'subject' argument
   may be a 'str', 'unicode', 'URI', 'Item', or 'ProxyItem'

Definition at line 296 of file base.py.

00296                                             :
            """Create a new ReferencingProxyItem. The 'subject' argument
               may be a 'str', 'unicode', 'URI', 'Item', or 'ProxyItem'"""
            super(ReferencingProxyItem,self).__init__(uri)
            
            # Resolve the subject_id from a uri string or URI object
            if isinstance(subject, str) or isinstance(subject, unicode):
                  uri = URI.lookup_or_create(subject)
                  uri.resolve()
                  self.subject_id = uri.id
            elif isinstance(subject, URI):
                  subject.resolve()
                  self.subject_id = subject.id
            elif isinstance(subject, Item):
                  self.subject_id = subject.uri.id
            elif isinstance(subject, ProxyItem):
                  self.subject_id = subject.item.uri.id
            elif subject is None:
                  pass
            else:
                  raise TypeError("Expected 'str', 'unicode', 'URI', 'Item', "
                                          "or 'ProxyItem', got %s" % type(subject))
      
      @classmethod
      def subjects_of(klass, uri):


Generated by  Doxygen 1.6.0   Back to index