def __init__(self, parser, parent, adder, atts): HandlerBase.__init__(self, parser, parent, adder) self.subject = None self.anonymous = 0 if atts.has_key("about"): self.subject = atts["about"] elif atts.has_key("ID"): self.subject = "#" + atts["ID"] elif atts.has_key(ABOUT_ATTRIBUTE): self.subject = atts[ABOUT_ATTRIBUTE] elif atts.has_key(ID_ATTRIBUTE): self.subject = "#" + atts[ID_ATTRIBUTE] else: self.subject = ANON + generate_uri() self.anonymous = 1 self.subject = absolutize(self.parser.GetBase(), self.subject) for att in atts.keys(): if att == "about" or att == "ID" or \ att == ABOUT_ATTRIBUTE or att == ID_ATTRIBUTE: pass else: new_att = join(split(att, "^"), "") self.adder(self.subject, new_att, atts[att], anonymous_subject=self.anonymous, literal_object=1)
def __init__(self, parser): HandlerBase.__init__(self, parser, None) self.data = '' args = "rednode, request, response, processor" self.codestr = '''\ def _tmp(%s): ''' % args
def __init__(self, parser, parent, adder, name, atts): HandlerBase.__init__(self, parser, parent, adder) self.predicate = join(split(name, "^"), "") self.literal = 0 self.anonymous_object = 0 if atts.has_key("resource"): self.object = atts["resource"] self.object = absolutize(self.parser.GetBase(), self.object) for att in atts.keys(): if att == "resource": pass else: new_att = join(split(att, "^"), "") self.adder(self.object, new_att, atts[att], literal_object=1) elif atts.has_key(RESOURCE_ATTRIBUTE): self.object = atts[RESOURCE_ATTRIBUTE] self.object = absolutize(self.parser.GetBase(), self.object) for att in atts.keys(): if att == RESOURCE_ATTRIBUTE: pass else: new_att = join(split(att, "^"), "") self.adder(self.object, new_att,atts[att], literal_object=1) else: self.object = "" self.literal = 1
def __init__(self, parser, parent, adder, atts): HandlerBase.__init__(self, parser, parent, adder) self.literal = 0 if atts.has_key("resource"): self.value = atts["resource"] self.value = absolutize(self.parser.GetBase(), self.value) elif atts.has_key(RESOURCE_ATTRIBUTE): self.value = atts[RESOURCE_ATTRIBUTE] self.value = absolutize(self.parser.GetBase(), self.value) else: self.value = "" self.literal = 1
def __init__(self, parser, parent): HandlerBase.__init__(self, parser, parent,) self.data = ""
def __init__(self, parser, parent, adder): HandlerBase.__init__(self, parser, parent, adder)
def __init__(self, parser, parent, adder): AbstractHandlerBase.__init__(self, parser, parent) self.adder = adder
def __init__(self, parser, parent, globals={}): AbstractHandlerBase.__init__(self, parser, parent) self.globals = globals