Esempio n. 1
0
    def test_default_chain(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        s.add_title("alt root", "en")

        s2 = SchemaNode()
        s2.key = "default"
        s2.default = True
        s2.append_to(s)

        j = JaggedArrayNode()
        j.key = "default"
        j.depth = 1
        j.default = True
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.append_to(s2)

        s.validate()

        assert s.has_numeric_continuation()
        assert s2.has_numeric_continuation()
        assert j.has_numeric_continuation()
        assert not s.has_titled_continuation()
        assert not s2.has_titled_continuation()
        assert not j.has_titled_continuation()
Esempio n. 2
0
    def test_default_chain(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        s.add_title("שורש", "he", primary=True)
        s.add_title("alt root", "en")

        s2 = SchemaNode()
        s2.key = "default"
        s2.default = True
        s2.append_to(s)

        j = JaggedArrayNode()
        j.key = "default"
        j.depth = 1
        j.default = True
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.append_to(s2)

        s.validate()

        assert s.has_numeric_continuation()
        assert s2.has_numeric_continuation()
        assert j.has_numeric_continuation()
        assert not s.has_titled_continuation()
        assert not s2.has_titled_continuation()
        assert not j.has_titled_continuation()
Esempio n. 3
0
def construct_index():
    root = SchemaNode()
    root.add_title('Chesed LeAvraham', 'en', primary=True)
    root.add_title(u'חסד לאברהם', 'he', primary=True)
    root.key = 'Chesed LeAvraham'

    intro = JaggedArrayNode()
    intro.add_title('Introduction', 'en', primary=True)
    intro.add_title(u'הקדמה', 'he', primary=True)
    intro.key = 'Introduction'
    intro.depth = 1
    intro.sectionNames = ['Paragraph']
    intro.addressTypes = ['Integer']
    intro.validate()
    root.append(intro)

    even = JaggedArrayNode()
    even.add_title('Even Shetiya', 'en', primary=True)
    even.add_title(u'אבן שתיה', 'he', primary=True)
    even.key = 'Even Shetiya'
    even.sectionNames = ['Maayan']
    even.depth = 1
    even.addressTypes = ['Integer']

    maayanot = [u'עין כל', u'עין הקורא', u'עין הארץ', u'עין יעקב', u'עין משפט', u'עין גנים', u'עין גדי']
    for i, title in enumerate(maayanot):
        node = JaggedArrayNode()
        node.add_title('Maayan {}'.format(i+1), 'en', primary=True)
        node.add_title(title, 'he', primary=True)
        node.key = 'Maayan {}'.format(i+1)
        node.depth = 2
        node.sectionNames = ['Nahar', 'Paragraph']
        node.addressTypes = ['Integer', 'Integer']
        node.validate()
        even.append(node)
    even.validate()
    root.append(even)

    breichat = JaggedArrayNode()
    breichat.add_title('Breichat Avraham', 'en', primary=True)
    breichat.add_title(u'בריכת אברהם', 'he', primary=True)
    breichat.key = 'Breichat Avraham'
    breichat.depth = 2
    breichat.sectionNames = ['Shoket', 'Paragraph']
    breichat.addressTypes = ['Integer', 'Integer']
    breichat.validate()
    root.append(breichat)

    root.validate()
    return {
        'title': 'Chesed LeAvraham',
        'categories': ['Kabbalah'],
        'schema': root.serialize()
    }
Esempio n. 4
0
    def test_presentation_and_default(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)

        j2 = JaggedArrayNode()
        j2.key = "default"
        j2.default = True
        j2.depth = 1
        j2.sectionNames = ["Foo"]
        j2.addressTypes = ["Integer"]
        s.append(j2)

        assert not s.has_titled_continuation()

        j = JaggedArrayNode()
        j.key = "child1"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.add_title("Child 1", "en", primary=True)
        j.add_title("Sweet Child", "en", presentation="alone")
        j.add_title("Sweet Child of Mine", "en", presentation="both")
        s.append(j)

        s.validate()

        assert s.has_titled_continuation()
        assert s.has_numeric_continuation()
        assert not j.has_titled_continuation()
        assert not j2.has_titled_continuation()
        assert j2.has_numeric_continuation()
        assert j.has_numeric_continuation()

        td = s.title_dict()
        assert len(td) == 7

        target = {
            'root': j2,
            'root, Child 1': j,
            'root, Sweet Child of Mine': j,
            'root Child 1': j,
            'root Sweet Child of Mine': j,
            'Sweet Child of Mine': j,
            'Sweet Child': j,
        }

        assert td == target
Esempio n. 5
0
    def test_presentation_and_default(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)

        j2 = JaggedArrayNode()
        j2.key = "default"
        j2.default = True
        j2.depth = 1
        j2.sectionNames = ["Foo"]
        j2.addressTypes = ["Integer"]
        s.append(j2)

        assert not s.has_titled_continuation()

        j = JaggedArrayNode()
        j.key = "child1"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.add_title("Child 1", "en", primary=True)
        j.add_title("Sweet Child", "en", presentation="alone")
        j.add_title("Sweet Child of Mine", "en", presentation="both")
        s.append(j)

        s.validate()

        assert s.has_titled_continuation()
        assert s.has_numeric_continuation()
        assert not j.has_titled_continuation()
        assert not j2.has_titled_continuation()
        assert j2.has_numeric_continuation()
        assert j.has_numeric_continuation()

        td = s.title_dict()
        assert len(td) == 7

        target = {
            'root': j2,
            'root, Child 1': j,
            'root, Sweet Child of Mine': j,
            'root Child 1': j,
            'root Sweet Child of Mine': j,
            'Sweet Child of Mine': j,
            'Sweet Child': j,
        }

        assert td == target
Esempio n. 6
0
    def test_validate_children(self):
        """
        Does validate fall through to children?
        """
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        j = JaggedArrayNode()
        j.add_title("child", "en", primary=True)
        j.key = "child"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.append_to(s)

        with pytest.raises(IndexSchemaError):
            s.validate()
Esempio n. 7
0
    def test_validate_children(self):
        """
        Does validate fall through to children?
        """
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        j = JaggedArrayNode()
        j.add_title("child", "en", primary=True)
        j.key = "child"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.append_to(s)

        with pytest.raises(IndexSchemaError):
            s.validate()
Esempio n. 8
0
    def test_terms_and_he(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        s.add_title("שרש", "he", primary=True)

        j = JaggedArrayNode()
        j.key = "bereshit"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.add_shared_term("Bereshit")
        j.append_to(s)

        j2 = JaggedArrayNode()
        j2.key = "noah"
        j2.depth = 1
        j2.sectionNames = ["Foo"]
        j2.addressTypes = ["Integer"]
        j2.add_shared_term("Noach")
        j2.append_to(s)

        s.validate()

        td = s.title_dict("he")
        assert len(td) == 5

        target = {
            'שרש': s,
            'שרש, בראשית': j,
            'שרש, נח': j2,
            'שרש בראשית': j,
            'שרש נח': j2,
        }

        assert td == target
Esempio n. 9
0
    def test_terms_and_he(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        s.add_title(u"שרש", "he", primary=True)

        j = JaggedArrayNode()
        j.key = "bereshit"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.add_shared_term("Bereshit")
        j.append_to(s)

        j2 = JaggedArrayNode()
        j2.key = "noah"
        j2.depth = 1
        j2.sectionNames = ["Foo"]
        j2.addressTypes = ["Integer"]
        j2.add_shared_term("Noach")
        j2.append_to(s)

        s.validate()

        td = s.title_dict("he")
        assert len(td) == 5

        target = {
            u'שרש': s,
            u'שרש, בראשית': j,
            u'שרש, נח': j2,
            u'שרש בראשית': j,
            u'שרש נח': j2,
        }

        assert td == target
Esempio n. 10
0
    def test_grandchild_presentation(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        s.add_title("alt root", "en")

        s2 = SchemaNode()
        s2.key = "l2"
        s2.add_title("Level 2", "en", primary=True)
        s2.add_title("Level 2 Alone", "en", presentation="alone")
        s2.add_title("Level 2 Both", "en", presentation="both")
        s2.append_to(s)

        j = JaggedArrayNode()
        j.key = "child1"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.add_title("Level 3a", "en", primary=True)
        j.add_title("Level 3a alone", "en", presentation="alone")
        j.add_title("Level 3a both", "en", presentation="both")
        j.append_to(s2)

        j2 = JaggedArrayNode()
        j2.key = "child2"
        j2.depth = 1
        j2.sectionNames = ["Foo"]
        j2.addressTypes = ["Integer"]
        j2.add_title("Level 3b", "en", primary=True)
        j2.add_title("Level 3b alone", "en", presentation="alone")
        j2.add_title("Level 3b both", "en", presentation="both")
        j2.append_to(s2)

        s.validate()

        assert not s.has_numeric_continuation()
        assert not s2.has_numeric_continuation()

        td = s.title_dict()
        assert len(td) == 96

        target = {
            "root": s,
            "alt root": s,
            "Level 2 Alone": s2,
            "Level 3b alone": j2,
            "Level 3a alone": j,
            "Level 2 Both": s2,
            "Level 3a both": j,
            "Level 3b both": j2,

            # combined, with comma separator
            "root, Level 2 Both": s2,
            "root, Level 2": s2,
            "alt root, Level 2 Both": s2,
            "alt root, Level 2": s2,
            "root, Level 2 Both, Level 3a": j,
            "root, Level 2, Level 3a": j,
            "alt root, Level 2 Both, Level 3a": j,
            "alt root, Level 2, Level 3a": j,
            "Level 2 Alone, Level 3a": j,
            "Level 2 Both, Level 3a": j,
            "root, Level 2 Both, Level 3a both": j,
            "root, Level 2, Level 3a both": j,
            "alt root, Level 2 Both, Level 3a both": j,
            "alt root, Level 2, Level 3a both": j,
            "Level 2 Alone, Level 3a both": j,
            "Level 2 Both, Level 3a both": j,
            "root, Level 2 Both, Level 3b": j2,
            "root, Level 2, Level 3b": j2,
            "alt root, Level 2 Both, Level 3b": j2,
            "alt root, Level 2, Level 3b": j2,
            "Level 2 Alone, Level 3b": j2,
            "Level 2 Both, Level 3b": j2,
            "root, Level 2 Both, Level 3b both": j2,
            "root, Level 2, Level 3b both": j2,
            "alt root, Level 2 Both, Level 3b both": j2,
            "alt root, Level 2, Level 3b both": j2,
            "Level 2 Alone, Level 3b both": j2,
            "Level 2 Both, Level 3b both": j2,

            # combined, with space separator
            "root Level 2 Both": s2,
            "root Level 2": s2,
            "alt root Level 2 Both": s2,
            "alt root Level 2": s2,
            "root Level 2 Both Level 3a": j,
            "root Level 2 Level 3a": j,
            "alt root Level 2 Both Level 3a": j,
            "alt root Level 2 Level 3a": j,
            "Level 2 Alone Level 3a": j,
            "Level 2 Both Level 3a": j,
            "root Level 2 Both Level 3a both": j,
            "root Level 2 Level 3a both": j,
            "alt root Level 2 Both Level 3a both": j,
            "alt root Level 2 Level 3a both": j,
            "Level 2 Alone Level 3a both": j,
            "Level 2 Both Level 3a both": j,
            "root Level 2 Both Level 3b": j2,
            "root Level 2 Level 3b": j2,
            "alt root Level 2 Both Level 3b": j2,
            "alt root Level 2 Level 3b": j2,
            "Level 2 Alone Level 3b": j2,
            "Level 2 Both Level 3b": j2,
            "root Level 2 Both Level 3b both": j2,
            "root Level 2 Level 3b both": j2,
            "alt root Level 2 Both Level 3b both": j2,
            "alt root Level 2 Level 3b both": j2,
            "Level 2 Alone Level 3b both": j2,
            "Level 2 Both Level 3b both": j2,

            # combined, space, comma
            "root Level 2 Both, Level 3a": j,
            "root Level 2, Level 3a": j,
            "alt root Level 2 Both, Level 3a": j,
            "alt root Level 2, Level 3a": j,
            "root Level 2 Both, Level 3a both": j,
            "root Level 2, Level 3a both": j,
            "alt root Level 2 Both, Level 3a both": j,
            "alt root Level 2, Level 3a both": j,
            "root Level 2 Both, Level 3b": j2,
            "root Level 2, Level 3b": j2,
            "alt root Level 2 Both, Level 3b": j2,
            "alt root Level 2, Level 3b": j2,
            "root Level 2 Both, Level 3b both": j2,
            "root Level 2, Level 3b both": j2,
            "alt root Level 2 Both, Level 3b both": j2,
            "alt root Level 2, Level 3b both": j2,

            # combined, comma, space
            "root, Level 2 Both Level 3a": j,
            "root, Level 2 Level 3a": j,
            "alt root, Level 2 Both Level 3a": j,
            "alt root, Level 2 Level 3a": j,
            "root, Level 2 Both Level 3a both": j,
            "root, Level 2 Level 3a both": j,
            "alt root, Level 2 Both Level 3a both": j,
            "alt root, Level 2 Level 3a both": j,
            "root, Level 2 Both Level 3b": j2,
            "root, Level 2 Level 3b": j2,
            "alt root, Level 2 Both Level 3b": j2,
            "alt root, Level 2 Level 3b": j2,
            "root, Level 2 Both Level 3b both": j2,
            "root, Level 2 Level 3b both": j2,
            "alt root, Level 2 Both Level 3b both": j2,
            "alt root, Level 2 Level 3b both": j2,
        }

        assert td == target
Esempio n. 11
0
def post():

    root = SchemaNode()
    root.add_title('Pardes Rimonim', 'en', primary=True)
    root.add_title(u'פרדס רימונים', 'he', primary=True)
    root.key = 'Pardes Rimonim'

    anode = JaggedArrayNode()
    anode.add_title("Author's Introduction", 'en', primary=True)
    anode.add_title(u'הקדמת המחבר', 'he', primary=True)
    anode.key = "Author's Introduction"
    anode.depth = 1
    anode.addressTypes = ['Integer']
    anode.sectionNames = ['Paragraph']
    root.append(anode)

    inode = JaggedArrayNode()
    inode.add_title("Index", 'en', primary=True)
    inode.add_title(u'סימני הספר', 'he', primary=True)
    inode.key = "Index"
    inode.depth = 2
    inode.addressTypes = ['Integer', 'Integer']
    inode.sectionNames = ['Gate', 'Chapter']
    root.append(inode)

    pnode = JaggedArrayNode()
    pnode.add_title("A Prayer", 'en', primary=True)
    pnode.add_title(u'בקשה', 'he', primary=True)
    pnode.key = "A Prayer"
    pnode.depth = 1
    pnode.addressTypes = ['Integer']
    pnode.sectionNames = ['Paragraph']
    root.append(pnode)

    dnode = JaggedArrayNode()
    dnode.default = True
    dnode.key = 'default'
    dnode.depth = 3
    dnode.addressTypes = ['Integer', 'Integer', 'Integer']
    dnode.sectionNames = ['Gate', 'Chapter', 'Paragraph']
    root.append(dnode)
    root.validate()

    index = {
        "pubDate": "1651",
        "title": "Pardes Rimonim",
        "pubPlace": "Amsterdam",
        "enDesc":
        "Pardes Rimonim (Orchard of Pomegranates) is a primary text of Kabbalah composed by the Jewish mystic Moses ben Jacob Cordovero in Safed. It is composed of thirteen gates or sections each subdivided into chapters. He indicates in his introduction that the work is based upon notes he took during his study of the Zohar, the foundational work of the Kabbalahand was designed \"in order not to become lost and confused in its [the Zohar] depths\". The work is an encyclopaedic summary of the Kabbalah, including an effort to \"elucidate all the tenets of the Cabala, such as the doctrines of the sefirot, emanation, the divine names, the import and significance of the alphabet, etc.\" Pardes Rimonim was the first comprehensive exposition of Medieval Kabbalah, though its rationally influenced scheme was superseded by the subsequent 16th century Safed mythological scheme of Isaac Luria.",
        "era": "RI",
        "authors": ["Moshe Cordovero"],
        "categories": ["Kabbalah"],
        'schema': root.serialize()
    }
    version = {
        'versionTitle': 'Pardes Rimonim',
        'versionSource':
        'http://www.hebrew.grimoar.cz/kordovero/pardes_rimonim.htm',
        'language': 'he',
        'text': parse()
    }
    post_index(index)
    post_text('Pardes Rimonim', version, index_count='on', skip_links=1)
Esempio n. 12
0
    def test_grandchild_presentation(self):
        s = SchemaNode()
        s.key = "root"
        s.add_title("root", "en", primary=True)
        s.add_title("alt root", "en")

        s2 = SchemaNode()
        s2.key = "l2"
        s2.add_title("Level 2", "en", primary=True)
        s2.add_title("Level 2 Alone", "en", presentation="alone")
        s2.add_title("Level 2 Both", "en", presentation="both")
        s2.append_to(s)

        j = JaggedArrayNode()
        j.key = "child1"
        j.depth = 1
        j.sectionNames = ["Foo"]
        j.addressTypes = ["Integer"]
        j.add_title("Level 3a", "en", primary=True)
        j.add_title("Level 3a alone", "en", presentation="alone")
        j.add_title("Level 3a both", "en", presentation="both")
        j.append_to(s2)

        j2 = JaggedArrayNode()
        j2.key = "child2"
        j2.depth = 1
        j2.sectionNames = ["Foo"]
        j2.addressTypes = ["Integer"]
        j2.add_title("Level 3b", "en", primary=True)
        j2.add_title("Level 3b alone", "en", presentation="alone")
        j2.add_title("Level 3b both", "en", presentation="both")
        j2.append_to(s2)

        s.validate()

        assert not s.has_numeric_continuation()
        assert not s2.has_numeric_continuation()

        td = s.title_dict()
        assert len(td) == 96

        target = {
            "root": s,
            "alt root": s,
            "Level 2 Alone": s2,
            "Level 3b alone": j2,
            "Level 3a alone": j,
            "Level 2 Both": s2,
            "Level 3a both": j,
            "Level 3b both": j2,

            # combined, with comma separator
            "root, Level 2 Both": s2,
            "root, Level 2": s2,
            "alt root, Level 2 Both": s2,
            "alt root, Level 2": s2,

            "root, Level 2 Both, Level 3a": j,
            "root, Level 2, Level 3a": j,
            "alt root, Level 2 Both, Level 3a": j,
            "alt root, Level 2, Level 3a": j,
            "Level 2 Alone, Level 3a": j,
            "Level 2 Both, Level 3a": j,

            "root, Level 2 Both, Level 3a both": j,
            "root, Level 2, Level 3a both": j,
            "alt root, Level 2 Both, Level 3a both": j,
            "alt root, Level 2, Level 3a both": j,
            "Level 2 Alone, Level 3a both": j,
            "Level 2 Both, Level 3a both": j,

            "root, Level 2 Both, Level 3b": j2,
            "root, Level 2, Level 3b": j2,
            "alt root, Level 2 Both, Level 3b": j2,
            "alt root, Level 2, Level 3b": j2,
            "Level 2 Alone, Level 3b": j2,
            "Level 2 Both, Level 3b": j2,

            "root, Level 2 Both, Level 3b both": j2,
            "root, Level 2, Level 3b both": j2,
            "alt root, Level 2 Both, Level 3b both": j2,
            "alt root, Level 2, Level 3b both": j2,
            "Level 2 Alone, Level 3b both": j2,
            "Level 2 Both, Level 3b both": j2,

            # combined, with space separator
            "root Level 2 Both": s2,
            "root Level 2": s2,
            "alt root Level 2 Both": s2,
            "alt root Level 2": s2,

            "root Level 2 Both Level 3a": j,
            "root Level 2 Level 3a": j,
            "alt root Level 2 Both Level 3a": j,
            "alt root Level 2 Level 3a": j,
            "Level 2 Alone Level 3a": j,
            "Level 2 Both Level 3a": j,

            "root Level 2 Both Level 3a both": j,
            "root Level 2 Level 3a both": j,
            "alt root Level 2 Both Level 3a both": j,
            "alt root Level 2 Level 3a both": j,
            "Level 2 Alone Level 3a both": j,
            "Level 2 Both Level 3a both": j,

            "root Level 2 Both Level 3b": j2,
            "root Level 2 Level 3b": j2,
            "alt root Level 2 Both Level 3b": j2,
            "alt root Level 2 Level 3b": j2,
            "Level 2 Alone Level 3b": j2,
            "Level 2 Both Level 3b": j2,

            "root Level 2 Both Level 3b both": j2,
            "root Level 2 Level 3b both": j2,
            "alt root Level 2 Both Level 3b both": j2,
            "alt root Level 2 Level 3b both": j2,
            "Level 2 Alone Level 3b both": j2,
            "Level 2 Both Level 3b both": j2,

            # combined, space, comma
            "root Level 2 Both, Level 3a": j,
            "root Level 2, Level 3a": j,
            "alt root Level 2 Both, Level 3a": j,
            "alt root Level 2, Level 3a": j,
            "root Level 2 Both, Level 3a both": j,
            "root Level 2, Level 3a both": j,
            "alt root Level 2 Both, Level 3a both": j,
            "alt root Level 2, Level 3a both": j,
            "root Level 2 Both, Level 3b": j2,
            "root Level 2, Level 3b": j2,
            "alt root Level 2 Both, Level 3b": j2,
            "alt root Level 2, Level 3b": j2,
            "root Level 2 Both, Level 3b both": j2,
            "root Level 2, Level 3b both": j2,
            "alt root Level 2 Both, Level 3b both": j2,
            "alt root Level 2, Level 3b both": j2,

            # combined, comma, space
            "root, Level 2 Both Level 3a": j,
            "root, Level 2 Level 3a": j,
            "alt root, Level 2 Both Level 3a": j,
            "alt root, Level 2 Level 3a": j,
            "root, Level 2 Both Level 3a both": j,
            "root, Level 2 Level 3a both": j,
            "alt root, Level 2 Both Level 3a both": j,
            "alt root, Level 2 Level 3a both": j,
            "root, Level 2 Both Level 3b": j2,
            "root, Level 2 Level 3b": j2,
            "alt root, Level 2 Both Level 3b": j2,
            "alt root, Level 2 Level 3b": j2,
            "root, Level 2 Both Level 3b both": j2,
            "root, Level 2 Level 3b both": j2,
            "alt root, Level 2 Both Level 3b both": j2,
            "alt root, Level 2 Level 3b both": j2,

        }

        assert td == target
Esempio n. 13
0
def post():

    root = SchemaNode()
    root.add_title('Pardes Rimonim', 'en', primary=True)
    root.add_title(u'פרדס רימונים', 'he', primary=True)
    root.key = 'Pardes Rimonim'

    anode = JaggedArrayNode()
    anode.add_title("Author's Introduction", 'en', primary=True)
    anode.add_title(u'הקדמת המחבר', 'he', primary=True)
    anode.key = "Author's Introduction"
    anode.depth = 1
    anode.addressTypes = ['Integer']
    anode.sectionNames = ['Paragraph']
    root.append(anode)

    inode = JaggedArrayNode()
    inode.add_title("Index", 'en', primary=True)
    inode.add_title(u'סימני הספר', 'he', primary=True)
    inode.key = "Index"
    inode.depth = 2
    inode.addressTypes = ['Integer', 'Integer']
    inode.sectionNames = ['Gate', 'Chapter']
    root.append(inode)

    pnode = JaggedArrayNode()
    pnode.add_title("A Prayer", 'en', primary=True)
    pnode.add_title(u'בקשה', 'he', primary=True)
    pnode.key = "A Prayer"
    pnode.depth = 1
    pnode.addressTypes = ['Integer']
    pnode.sectionNames = ['Paragraph']
    root.append(pnode)

    dnode = JaggedArrayNode()
    dnode.default = True
    dnode.key = 'default'
    dnode.depth = 3
    dnode.addressTypes = ['Integer', 'Integer', 'Integer']
    dnode.sectionNames = ['Gate', 'Chapter', 'Paragraph']
    root.append(dnode)
    root.validate()

    index = {
        "pubDate": "1651",
        "title": "Pardes Rimonim",
        "pubPlace": "Amsterdam",
        "enDesc": "Pardes Rimonim (Orchard of Pomegranates) is a primary text of Kabbalah composed by the Jewish mystic Moses ben Jacob Cordovero in Safed. It is composed of thirteen gates or sections each subdivided into chapters. He indicates in his introduction that the work is based upon notes he took during his study of the Zohar, the foundational work of the Kabbalahand was designed \"in order not to become lost and confused in its [the Zohar] depths\". The work is an encyclopaedic summary of the Kabbalah, including an effort to \"elucidate all the tenets of the Cabala, such as the doctrines of the sefirot, emanation, the divine names, the import and significance of the alphabet, etc.\" Pardes Rimonim was the first comprehensive exposition of Medieval Kabbalah, though its rationally influenced scheme was superseded by the subsequent 16th century Safed mythological scheme of Isaac Luria.",
        "era": "RI",
        "authors": ["Moshe Cordovero"],
        "categories": ["Kabbalah"],
        'schema': root.serialize()
    }
    version = {
        'versionTitle': 'Pardes Rimonim',
        'versionSource': 'http://www.hebrew.grimoar.cz/kordovero/pardes_rimonim.htm',
        'language': 'he',
        'text': parse()
    }
    post_index(index)
    post_text('Pardes Rimonim', version, index_count='on', skip_links=1)