Ejemplo n.º 1
0
    def __init__(self, value, lang='', datatype=''):
        if normalize and value:
            if not isinstance(value, unicode):
                value = unicode(value)
            if value != normalize("NFC", value):
                raise Error("value must be in NFC normalized form.")

        if datatype:
            lang = ''
        self.language = lang
        self.datatype = datatype
Ejemplo n.º 2
0
 def path(self, node, position, newline=False):
     if not (self.p_squared(node, position, newline)
             or self.p_default(node, position, newline)):
         raise Error("Cannot serialize node '%s'" % (node, ))
Ejemplo n.º 3
0
 def __init__(self,msg):
     Error.__init__(self, ("SPARQL Error: %s." % msg))
Ejemplo n.º 4
0
 def __init__(self, msg):
     Error.__init__(self, ("SPARQL Error: %s." % msg))