87 for item in xy.xeq('%s %s' % (entity.e_schema.type, rtype)): |
87 for item in xy.xeq('%s %s' % (entity.e_schema.type, rtype)): |
88 add( (cwuri, urijoin(item[1]), Literal(value)) ) |
88 add( (cwuri, urijoin(item[1]), Literal(value)) ) |
89 except xy.UnsupportedVocabulary: |
89 except xy.UnsupportedVocabulary: |
90 pass |
90 pass |
91 else: |
91 else: |
92 for related in entity.related(rtype, role, entities=True): |
92 try: |
93 if role == 'subject': |
93 for related in entity.related(rtype, role, entities=True, safe=True): |
94 add( (cwuri, CW[rtype], URIRef(related.cwuri)) ) |
94 if role == 'subject': |
95 try: |
95 add( (cwuri, CW[rtype], URIRef(related.cwuri)) ) |
96 for item in xy.xeq('%s %s' % (entity.e_schema.type, rtype)): |
96 try: |
97 add( (cwuri, urijoin(item), URIRef(related.cwuri)) ) |
97 for item in xy.xeq('%s %s' % (entity.e_schema.type, rtype)): |
98 except xy.UnsupportedVocabulary: |
98 add( (cwuri, urijoin(item), URIRef(related.cwuri)) ) |
99 pass |
99 except xy.UnsupportedVocabulary: |
100 else: |
100 pass |
101 add( (URIRef(related.cwuri), CW[rtype], cwuri) ) |
101 else: |
|
102 add( (URIRef(related.cwuri), CW[rtype], cwuri) ) |
|
103 except Unauthorized: |
|
104 pass |
102 |
105 |
103 |
|