def loadRelations(self, indexFirst=False):
     self.log_statement('loadRelations')
     cursor = self._db.cursor()
     cursor.execute("""
         insert into %s
         select distinct subject, subject_term, predicate, predicate_term,
                                         object, object_term, context, context_term
         from triples where predicate != %s and object_term != 'L'""" %
                    (self.binaryRelations,
                     str(normalizeNode(RDF.type, self.useSignedInts))))
Esempio n. 2
0
 def loadRelations(self, indexFirst=False):
     self.log_statement('loadRelations')
     cursor = self._db.cursor()
     cursor.execute("""
         insert into %s
         select distinct subject, subject_term, predicate, predicate_term,
                                         object, object_term, context, context_term
         from triples where predicate != %s and object_term != 'L'""" %
             (self.binaryRelations,
              str(normalizeNode(RDF.type, self.useSignedInts))))
 def loadAssociativeBox(self, indexFirst=False):
     self.log_statement('loadAssociativeBox')
     cursor = self._db.cursor()
     cursor.execute("""
         insert into %s
         select distinct subject as member, subject_term as member_term,
                                         object as class, object_term as class_term,
                                         context, context_term
         from triples where predicate = %s and predicate_term = 'U'""" %
                    (self.aboxAssertions,
                     str(normalizeNode(RDF.type, self.useSignedInts))))
Esempio n. 4
0
 def loadAssociativeBox(self, indexFirst=False):
     self.log_statement('loadAssociativeBox')
     cursor = self._db.cursor()
     cursor.execute("""
         insert into %s
         select distinct subject as member, subject_term as member_term,
                                         object as class, object_term as class_term,
                                         context, context_term
         from triples where predicate = %s and predicate_term = 'U'""" %
             (self.aboxAssertions,
              str(normalizeNode(RDF.type, self.useSignedInts))))
    def loadRelations(self, indexFirst=False):
        self._loadTable(self.binaryRelations)
        return

        cursor = self._db.cursor()
        sql = """
            insert into %s
            select subject, subject_term, predicate, predicate_term,
                         object, object_term, context, context_term
            from triples
            where predicate != %s and object_term != 'L'
            group by subject, predicate, object, context
        """ % (self.binaryRelations,
               str(normalizeNode(RDF.type, self.useSignedInts)))
        log.debug(sql)
        cursor.execute(sql)
Esempio n. 6
0
 def loadRelations(self, indexFirst=False):
     self._loadTable(self.binaryRelations)
     return
     
     cursor = self._db.cursor()
     sql = """
         insert into %s
         select subject, subject_term, predicate, predicate_term,
                      object, object_term, context, context_term
         from triples
         where predicate != %s and object_term != 'L'
         group by subject, predicate, object, context
     """ % (self.binaryRelations,
                  str(normalizeNode(RDF.type, self.useSignedInts)))
     print >> sys.stderr, sql
     cursor.execute(sql)
    def loadAssociativeBox(self, indexFirst=False):
        self._loadTable(self.aboxAssertions)
        return

        cursor = self._db.cursor()
        sql = """
            insert into %s
            select subject as member, subject_term as member_term,
                         object as class, object_term as class_term,
                         context, context_term
            from triples
            where predicate = %s and predicate_term = 'U'
            group by subject, object, context
        """ % (self.aboxAssertions,
               str(normalizeNode(RDF.type, self.useSignedInts)))
        log.debug(sql)
        cursor.execute(sql)
Esempio n. 8
0
 def loadAssociativeBox(self, indexFirst=False):
     self._loadTable(self.aboxAssertions)
     return
     
     cursor = self._db.cursor()
     sql = """
         insert into %s
         select subject as member, subject_term as member_term,
                      object as class, object_term as class_term,
                      context, context_term
         from triples
         where predicate = %s and predicate_term = 'U'
         group by subject, object, context
     """ % (self.aboxAssertions,
                  str(normalizeNode(RDF.type, self.useSignedInts)))
     print >> sys.stderr, sql
     cursor.execute(sql)