Beispiel #1
0
def uriForPrefix(pre):
    pre = str(pre)
    ns = apirdflib.getNamespaces()
    for n in ns:
        pref, pth = n
        if pre == pref:
            return pth
    log.error("Requested unknown prefix %s:" % pre)
    return None
Beispiel #2
0
def uriForPrefix(pre):
    pre = str(pre)
    ns = apirdflib.getNamespaces()
    for n in ns:
        pref, pth = n
        if pre == pref:
            return pth
    log.warning("Requested unknown prefix %s:" % pre)
    return None
Beispiel #3
0
def prefixFromUri(uri):
    uri = str(uri)
    ns = apirdflib.getNamespaces()
    for n in ns:
        pref, pth = n
        if uri.startswith(str(pth)):
            return pref
    log.error("Requested unknown namespace uri %s" % uri)
    return None
Beispiel #4
0
def prefixFromUri(uri):
    uri = str(uri)
    ns = apirdflib.getNamespaces()
    for n in ns:
        pref, pth = n
        if uri.startswith(str(pth)):
            return pref
    log.warning("Requested unknown namespace uri %s" % uri)
    return None