postpath - a url broken in to a list (postpath from twisted)
    e.g. ["127.0.0.1:8888", "albums", "2", "3", "44", "99"]

    Decode the postpath list, and deconstruct the

    * Page
    * Item
    * subpage   (Archives)
    * subitem   (Archives)

    code::

        import gallery
        test =["127.0.0.1:8888", "albums", "2", "3", "44", "99"]
        gallery.new_decode_semantic_url(test)
        ctx={}
        test =["127.0.0.1:8888", "albums", "2", "3", "44", "99"]
        postpath, ctx["surl"] = gallery.new_decode_semantic_url(test)

def parse_uri(self, postpath=None):
        """
    postpath - a url broken in to a list (postpath from twisted)
    e.g. ["127.0.0.1:8888", "albums", "2", "3", "44", "99"]

    Decode the postpath list, and deconstruct the

    * Page
    * Item
    * subpage   (Archives)
    * subitem   (Archives)

    code::

        import gallery
        test =["127.0.0.1:8888", "albums", "2", "3", "44", "99"]
        gallery.new_decode_semantic_url(test)
        ctx={}
        test =["127.0.0.1:8888", "albums", "2", "3", "44", "99"]
        postpath, ctx["surl"] = gallery.new_decode_semantic_url(test)

        """
        def find_next_empty():
            """
            return next open slot key
            """
            for x in self.slots.keys():
                if self.slots[x] == None:
                    return x

        if postpath == None:
            self._current_dir = postpath
            return

        self.original_uri = copy.deepcopy(postpath)
        path_to_parse = postpath
        self.slots = collections.OrderedDict([('page', None),
                                              ('item', None),
                                              ('subpage', None),
                                              ('subitem', None)])
        self._current_dir = None
        if path_to_parse in [[], '', None]:
            self._current_dir = postpath

        for x_postpath in range(0, len(postpath)):
            if is_int(postpath[x_postpath].strip()):
                self.slots[find_next_empty()] = int(postpath[x_postpath])

        for removal in self.slots.keys():
            if self.slots[removal] != None:
                postpath.remove(str(self.slots[removal]))

        self._current_dir = postpath