Esempio n. 1
0
 def build_index(self, base_title, he_base_title):
     """
     Builds the root schema node for the commentary
     :return: serialized index
     """
     node = JaggedArrayNode()
     he_author = self.get_author()
     en_author = commentatorNames[he_author]
     node.add_primary_titles('{} on {}'.format(en_author, base_title),
                             u'{} על {}'.format(he_author, he_base_title))
     node.add_structure(['Chapter', 'Halakhah', 'Comment'])
     node.validate()
     return {
         'title':
         '{} on {}'.format(en_author, base_title),
         'categories':
         ['Tanaitic', 'Commentary', en_author, "Masechtot Ketanot"],
         'schema':
         node.serialize(),
         'collective_title':
         en_author,
         'dependence':
         "Commentary",
         'base_text_titles': [base_title]
     }
Esempio n. 2
0
    def get_base_index(en_title, he_title):
        node = JaggedArrayNode()
        node.add_primary_titles(en_title, he_title)
        node.add_structure(['Chapter', 'Halakhah'])
        node.validate()

        return {
            'title': en_title,
            'categories': ["Tanaitic", "Masechtot Ketanot"],
            'schema': node.serialize()
        }
Esempio n. 3
0
    def get_base_index(en_title, he_title):
        node = JaggedArrayNode()
        node.add_primary_titles(en_title, he_title)
        node.add_structure(['Chapter', 'Halakhah'])
        node.validate()

        return {
            'title': en_title,
            'categories': ["Masechtot Ketanot"],
            'schema': node.serialize()
        }
Esempio n. 4
0
 def commentary_ja_node(en_title, he_title):
     """
     Each commentary is a complex text, with a root schema and depth 3 JAnodes for each tractate. The JAnode for each
     tractate is essentially identical across commentaries. The root schema is what defines the particular
     commentator.
     :param en_title: English Title of base text
     :param he_title: Hebrew Title of base text
     :return: JaggedArrayNode
     """
     node = JaggedArrayNode()
     node.add_primary_titles(en_title, he_title)
     node.add_structure(['Chapter', 'Halakhah', 'Comment'])
     node.validate()
     return node
Esempio n. 5
0
 def commentary_ja_node(en_title, he_title):
     """
     Each commentary is a complex text, with a root schema and depth 3 JAnodes for each tractate. The JAnode for each
     tractate is essentially identical across commentaries. The root schema is what defines the particular
     commentator.  Deprecated - schema system has changed.
     :param en_title: English Title of base text
     :param he_title: Hebrew Title of base text
     :return: JaggedArrayNode
     """
     raise NotImplementedError("Don't use me!")
     node = JaggedArrayNode()
     node.add_primary_titles(en_title, he_title)
     node.add_structure(['Chapter', 'Halakhah', 'Comment'])
     node.validate()
     return node
Esempio n. 6
0
 def build_index(self, base_title, he_base_title):
     """
     Builds the root schema node for the commentary
     :return: serialized index
     """
     node = JaggedArrayNode()
     he_author = self.get_author()
     en_author = commentatorNames[he_author]
     node.add_primary_titles('{} on {}'.format(en_author, base_title), u'{} על {}'.format(he_author, he_base_title))
     node.add_structure(['Chapter', 'Halakhah', 'Comment'])
     node.validate()
     return {
         'title': '{} on {}'.format(en_author, base_title),
         'categories': ['Tanaitic', 'Commentary', en_author, "Masechtot Ketanot"],
         'schema': node.serialize(),
         'collective_title': en_author,
         'dependence': "Commentary",
         'base_text_titles': [base_title]
     }