# Path: src/franz/openrdf/util/uris.py
# def getLocalNameIndex(uri):
# def asURIString(value):
# 
# Path: src/franz/openrdf/util/strings.py
# def encode_ntriple_string(string):
# def uri_escape_match(match):
# def encode_ntriple_uri(uri):
# def ntriples_unescape(text):
# def uriref(string):
# def nodeid(string):
# def literal(string):
# def to_bytes(text):
#     def to_native_string(text):
#     def to_native_string(text):
# ESCAPES = [
#     # Replacements will be performed sequentially, so backslash 
#     # must be the first character on the list
#     (chr(0x5C), r'\\'),  
#     (chr(0x0A), r'\n'),
#     (chr(0x0D), r'\r'),
#     (chr(0x22), r'\"'),
# ]


import sys
import builtins
import weakref
import six
from six import python_2_unicode_compatible
from ..util import uris, strings
    
    def getValue(self):
        return self.getURI()

    value = property(getValue)
    
    def getLocalName(self):
        pos = uris.getLocalNameIndex(self.getURI())
        return self.uri[pos:]
    
    localname = property(getLocalName)

    def getNamespace(self):
        pos = uris.getLocalNameIndex(self.getURI())
        return self.uri[:pos]

    def split(self):
        """
        Split into a namespace + local name pair.
        """
        pos = uris.getLocalNameIndex(self.uri)
        return self.uri[:pos], self.uri[pos:]

    namespace = property(getNamespace)

    def toNTriples(self):
        """
        Return an NTriples representation of a resource, in this case, wrap
        it in angle brackets.
        """

# Path: src/franz/openrdf/util/uris.py
# def getLocalNameIndex(uri):
# def asURIString(value):
# 
# Path: src/franz/openrdf/util/strings.py
# def encode_ntriple_string(string):
# def uri_escape_match(match):
# def encode_ntriple_uri(uri):
# def ntriples_unescape(text):
# def uriref(string):
# def nodeid(string):
# def literal(string):
# def to_bytes(text):
#     def to_native_string(text):
#     def to_native_string(text):
# ESCAPES = [
#     # Replacements will be performed sequentially, so backslash 
#     # must be the first character on the list
#     (chr(0x5C), r'\\'),  
#     (chr(0x0A), r'\n'),
#     (chr(0x0D), r'\r'),
#     (chr(0x22), r'\"'),
# ]


# Path: src/franz/openrdf/model/value.py
import sys
import builtins
import weakref
import six
from six import python_2_unicode_compatible
from ..util import uris, strings

    
    def getValue(self):
        return self.getURI()

    value = property(getValue)
    
    def getLocalName(self):
        pos = uris.getLocalNameIndex(self.getURI())
        return self.uri[pos:]
    
    localname = property(getLocalName)

    def getNamespace(self):
        pos = uris.getLocalNameIndex(self.getURI())
        return self.uri[:pos]

    def split(self):
        """
        Split into a namespace + local name pair.
        """
        pos = uris.getLocalNameIndex(self.uri)
        return self.uri[:pos], self.uri[pos:]

    namespace = property(getNamespace)

    def toNTriples(self):
        """
        Return an NTriples representation of a resource, in this case, wrap
        it in angle brackets.
        """

        return strings.encode_ntriple_uri(self.uri)