author | Sylvain <syt@logilab.fr> |
Wed, 11 Feb 2009 17:54:55 +0100 | |
changeset 599 | 9ef680acd92a |
parent 561 | 4bbeb62ba955 |
permissions | -rw-r--r-- |
561
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
1 |
from logilab.mtconverter import html_escape |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
2 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
3 |
from cubicweb.common.view import EntityView |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
4 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
5 |
from urlparse import urlparse |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
6 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
7 |
class LinkedDataProjectView(EntityView): |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
8 |
id = 'project_linked_data' |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
9 |
title = _('Project linked data') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
10 |
accepts = ('Project',) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
11 |
templatable = False |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
12 |
content_type = 'text/xml' |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
13 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
14 |
def call(self): |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
15 |
'''display all project attribut and project dependencies and external project (in doap format) if |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
16 |
it is related to''' |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
17 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
18 |
self.w(u'<?xml version="1.0" encoding="%s"?>\n' % self.req.encoding) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
19 |
self.w(u'''<rdf:RDF |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
20 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
21 |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
22 |
xmlns:owl="http://www.w3.org/2002/07/owl#" |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
23 |
xmlns:doap="http://usefulinc.com/ns/doap#" |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
24 |
>\n''') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
25 |
for i in xrange(self.rset.rowcount): |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
26 |
self.cell_call(row=i, col=0) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
27 |
self.w(u'</rdf:RDF>\n') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
28 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
29 |
def cell_call(self, row, col): |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
30 |
self.wview('project_linked_data_item', self.rset, row=row, col=col) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
31 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
32 |
class LinkedDataProjectItemView(EntityView): |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
33 |
id = 'project_linked_data_item' |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
34 |
accepts = ('Project',) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
35 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
36 |
def cell_call(self, row, col): |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
37 |
entity = self.complete_entity(row, col) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
38 |
self.w(u'<Project rdf:about="%s">\n' % html_escape(entity.absolute_url())) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
39 |
self.w(u' <name>%s</name>\n' % html_escape(unicode(entity.dc_title()))) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
40 |
self.w(u' <doap:created>%s</doap:created>\n' % (entity.creation_date.strftime('%Y-%m-%d'))) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
41 |
self.w(u' <summary>%s</summary>\n' % html_escape(unicode(entity.summary))) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
42 |
self.w(u' <doap:description>%s</doap:description>\n' % html_escape(unicode(entity.description))) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
43 |
self.w(u' <url>%s</url>\n' % html_escape(entity.url or entity.absolute_url())) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
44 |
if entity.modification_date: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
45 |
self.w(u'<doap:revision>%s</doap:revision>\n'% (entity.modification_date.strftime('%Y-%m-%d'))) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
46 |
if entity.vcsurl: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
47 |
self.w(u'''<vcurl> |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
48 |
<doap:browse rdf:resource="%s" /> |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
49 |
</vcurl>''' % html_escape(entity.vcsurl)) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
50 |
if entity.reporturl: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
51 |
self.w(u'<reporturl>"%s"</vcurl>' % html_escape(entity.vcsurl)) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
52 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
53 |
if entity.downloadurl: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
54 |
self.w(u' <doap:file-release>%s</doap:file-release>\n' % html_escape(entity.downloadurl)) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
55 |
liste = urlparse(entity.absolute_url()) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
56 |
internal_address = liste[1] |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
57 |
for externalproject in entity.uses: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
58 |
self.w(u'<uses>\n') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
59 |
if externalproject.e_schema == 'ExtProject': |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
60 |
if externalproject.absolute_url().find(internal_address) > 0: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
61 |
self.w(u'<!--wrong external url-->') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
62 |
self.w(u' <ExtProject>%s</ExtProject>'% externalproject.absolute_url()) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
63 |
else: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
64 |
self.w(u'<Project>%s</Project>'% externalproject.absolute_url()) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
65 |
self.w(u'</uses>\n') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
66 |
for externalproject in entity.recommends: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
67 |
self.w(u'<recommends>\n') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
68 |
if externalproject.e_schema == 'ExtProject': |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
69 |
if externalproject.absolute_url().find(internal_address) > 0: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
70 |
self.w(u'<!--wrong external url-->') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
71 |
self.w(u'<ExtProject>%s</ExtProject>'% externalproject.absolute_url()) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
72 |
else: |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
73 |
self.w(u'<Project>%s</Project>'% externalproject.absolute_url()) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
74 |
self.w(u'%s</recommends>'% externalproject.absolute_url()) |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
75 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
76 |
self.w(u'</Project>\n') |
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
77 |
|
4bbeb62ba955
add a linked data view for project. this linked data view will be extended to pertinent entities in the future. We remark that we use doap format if it exists (doap:created, doap:description ...), we use our own vocabulary (available in tbox view) if doap does not supports it.
Laure Bourgois <Laure.Bourgois@logilab.fr>
parents:
diff
changeset
|
78 |