예제 #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
예제 #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, ))
예제 #3
0
 def __init__(self,msg):
     Error.__init__(self, ("SPARQL Error: %s." % msg))
예제 #4
0
 def __init__(self, msg):
     Error.__init__(self, ("SPARQL Error: %s." % msg))