Esempio n. 1
0
 def write(self):
     triples = []
     for proceedings in self.data['proceedings']:
         if len(proceedings['related']) > 0:
             resource = create_proceedings_uri(proceedings['volume_number'])
             for related in proceedings['related']:
                 related_resource = create_proceedings_uri(related)
                 triples.append((resource, RDFS.seeAlso, related_resource))
     self.write_triples(triples)
 def write(self):
     triples = []
     for proceedings in self.data['proceedings']:
         if len(proceedings['related']) > 0:
             resource = create_proceedings_uri(proceedings['volume_number'])
             for related in proceedings['related']:
                 related_resource = create_proceedings_uri(related)
                 triples.append((resource, RDFS.seeAlso, related_resource))
     self.write_triples(triples)
    def write(self):
        triples = []
        for proceedings in self.data['proceedings']:
            if len(proceedings['related']) > 0:
                resource = create_proceedings_uri(proceedings['volume_number'])
                for related in proceedings['related']:
                    related_url = "http://ceur-ws.org/Vol-%s/" % related
                    if len(config.input_urls) > 1 and related_url not in config.input_urls:
                        config.input_urls.append(related_url)
                    #     # self.spider.add_task(Task('initial', url=related_url))

                    related_resource = create_proceedings_uri(related)
                    triples.append((resource, RDFS.seeAlso, related_resource))
        self.write_triples(triples)
Esempio n. 4
0
    def write(self):
        triples = []
        for proceedings in self.data['proceedings']:
            if len(proceedings['related']) > 0:
                resource = create_proceedings_uri(proceedings['volume_number'])
                for related in proceedings['related']:
                    related_url = "http://ceur-ws.org/Vol-%s/" % related
                    if len(config.input_urls
                           ) > 1 and related_url not in config.input_urls:
                        config.input_urls.append(related_url)
                    #     # self.spider.add_task(Task('initial', url=related_url))

                    related_resource = create_proceedings_uri(related)
                    triples.append((resource, RDFS.seeAlso, related_resource))
        self.write_triples(triples)
 def begin_template(self):
     self.data['volume_number'] = WorkshopPageParser.extract_volume_number(self.task.url)
     self.data['proceedings'] = create_proceedings_uri(self.data['volume_number'])
     workshops = [w for w in self.graph.objects(self.data['proceedings'], BIBO.presentedAt)]
     if len(workshops) > 1:
         self.data['workshops'] = workshops
     else:
         raise DataNotFound('Skipping http://ceur-ws.org/Vol-%s/ proceedings, because it\'s not joint'
                            % self.data['volume_number'])
Esempio n. 6
0
 def begin_template(self):
     self.data['volume_number'] = WorkshopPageParser.extract_volume_number(self.task.url)
     self.data['proceedings'] = create_proceedings_uri(self.data['volume_number'])
     workshops = [w for w in self.graph.objects(self.data['proceedings'], BIBO.presentedAt)]
     if len(workshops) > 1:
         self.data['workshops'] = workshops
     else:
         raise DataNotFound('Skipping http://ceur-ws.org/Vol-%s/ proceedings, because it\'s not joint'
                            % self.data['volume_number'])
    def write(self):
        triples = []
        proceedings = create_proceedings_uri(self.data['volume_number'])
        conference = URIRef(config.id['conference'] + urllib.quote(self.data['acronym'] + "-" + self.data['year']))
        triples.append((conference, RDF.type, SWC.OrganizedEvent))
        triples.append((conference, RDFS.label, Literal(self.data['acronym'], datatype=XSD.string)))
        triples.append((conference, TIMELINE.atDate, Literal(self.data['year'], datatype=XSD.gYear)))
        for workshop in self.graph.objects(proceedings, BIBO.presentedAt):
            triples.append((workshop, SWC.isSubEventOf, conference))

        self.write_triples(triples)
Esempio n. 8
0
    def write(self):
        triples = []
        proceedings = create_proceedings_uri(self.data['volume_number'])
        conference = URIRef(config.id['conference'] + urllib.quote(self.data['acronym'] + "-" + self.data['year']))
        triples.append((conference, RDF.type, SWRC.Conference))
        triples.append((conference, BIBO.shortTitle, Literal(self.data['acronym'], datatype=XSD.string)))
        triples.append((conference, TIMELINE.atDate, Literal(self.data['year'], datatype=XSD.gYear)))
        for workshop in self.graph.objects(proceedings, BIBO.presentedAt):
            triples.append((workshop, SWC.isSubEventOf, conference))

        self.write_triples(triples)
Esempio n. 9
0
    def begin_template(self):
        self.data['volume_number'] = WorkshopPageParser.extract_volume_number(self.task.url)
        self.data['proceedings'] = create_proceedings_uri(self.data['volume_number'])

        self.editors = []
        for editor in self.graph.objects(self.data['proceedings'], FOAF.maker):
            editor_name = self.graph.value(editor, FOAF.name)
            if(editor_name.split(' ', 1)[0].find('.') > 0):
                self.editors.append((editor, editor_name))
        if len(self.editors) == 0:
            raise DataNotFound('Skipping http://ceur-ws.org/Vol-%s/, because the name are okay'
                              % self.data['volume_number'])
 def begin_template(self):
     self.data['workshop'] = self.task.url
     self.data['volume_number'] = self.extract_volume_number(self.task.url)
     proceedings = create_proceedings_uri(self.data['volume_number'])
     self.data['workshops'] = []
     for workshop in self.graph.objects(proceedings, BIBO.presentedAt):
         try:
             label = self.graph.objects(workshop, BIBO.shortTitle).next()
             self.data['workshops'].append((workshop, label.toPython()))
         except StopIteration:
             pass
         except:
             traceback.print_exc()
Esempio n. 11
0
 def begin_template(self):
     self.data['workshop'] = self.task.url
     self.data['volume_number'] = self.extract_volume_number(self.task.url)
     proceedings = create_proceedings_uri(self.data['volume_number'])
     self.data['workshops'] = []
     for workshop in self.graph.objects(proceedings, BIBO.presentedAt):
         try:
             label = self.graph.objects(workshop, BIBO.shortTitle).next()
             self.data['workshops'].append((workshop, label.toPython()))
         except StopIteration:
             pass
         except:
             traceback.print_exc()
Esempio n. 12
0
    def begin_template(self):
        self.data['volume_number'] = WorkshopPageParser.extract_volume_number(self.task.url)
        self.data['proceedings'] = create_proceedings_uri(self.data['volume_number'])

        self.editors = []

        for editor in self.graph.objects(self.data['proceedings'], FOAF.maker):
            editor_name = self.graph.value(editor, FOAF.name)
            if editor_name.split(' ', 1)[0].find('.') > 0:
                self.editors.append((editor, editor_name))
        if len(self.editors) == 0:
            raise DataNotFound('Skipping http://ceur-ws.org/Vol-%s/, because the name are okay'
                              % self.data['volume_number'])
    def write(self):
        triples = []
        proceedings = create_proceedings_uri(self.data['volume_number'])
        workshops = self.graph.objects(proceedings, BIBO.presentedAt)
        proceedings_related = self.graph.objects(proceedings, RDFS.seeAlso)
        workshops_related = []
        for p_related in proceedings_related:
            map(workshops_related.append, self.graph.objects(p_related, BIBO.presentedAt))

        for workshop in workshops:
            for workshop_related in workshops_related:
                if self.is_related(workshop, workshop_related):
                    triples.append((workshop, RDFS.seeAlso, workshop_related))

        self.write_triples(triples)
Esempio n. 14
0
    def write(self):
        triples = []
        proceedings = create_proceedings_uri(self.data['volume_number'])
        workshops = self.graph.objects(proceedings, BIBO.presentedAt)
        proceedings_related = self.graph.objects(proceedings, RDFS.seeAlso)
        workshops_related = []
        for p_related in proceedings_related:
            map(workshops_related.append, self.graph.objects(p_related, BIBO.presentedAt))

        for workshop in workshops:
            for workshop_related in workshops_related:
                if self.is_related(workshop, workshop_related):
                    triples.append((workshop, RDFS.seeAlso, workshop_related))

        self.write_triples(triples)
 def begin_template(self):
     self.data['volume_number'] = WorkshopPageParser.extract_volume_number(self.task.url)
     self.data['proceedings'] = create_proceedings_uri(self.data['volume_number'])
Esempio n. 16
0
 def begin_template(self):
     self.data['volume_number'] = WorkshopPageParser.extract_volume_number(self.task.url)
     self.data['proceedings'] = create_proceedings_uri(self.data['volume_number'])