Closed andrecastro0o closed 3 years ago
<ontology2smw.classes.SMWCategoryORProp object at 0x7f3a9eb48f60>.__dict__
{'item':
(rdflib.term.URIRef('http://purl.obolibrary.org/obo/BFO_0000001'),
rdflib.term.URIRef('http://www.w3.org/2002/07/owl#Class'),
rdflib.term.Literal('entity', lang='en'),
None,
rdflib.term.URIRef('http://www.w3.org/2002/07/owl#Thing'),
None),
'item_dict':
{
'term': rdflib.term.URIRef('http://purl.obolibrary.org/obo/BFO_0000001'),
'termType': rdflib.term.URIRef('http://www.w3.org/2002/07/owl#Class'),
'label': rdflib.term.Literal('entity', lang='en'),
'subclassof': rdflib.term.URIRef('http://www.w3.org/2002/07/owl#Thing')},
'term': rdflib.term.URIRef('http://purl.obolibrary.org/obo/BFO_0000001'),
'term_name': 'BFO_0000001',
'query': <ontology2smw.classes.QueryOntology object at 0x7f3aa543ddd8>,
'namespace': rdflib.term.URIRef('http://purl.obolibrary.org/obo/'),
'namespace_prefix': 'obo',
'query_nsmanager': <rdflib.namespace.NamespaceManager object at
0x7f3a9f367f28>,
'resource_type': 'Category',
'prop_datatype': None,
'wikipage_name': 'Category:BFO_0000001',
'wikipage_content': '\nImported from [[Imported from::obo:BFO_0000001]]\n\nEquivalent URI [[Equivalent URI::http://purl.obolibrary.org/obo/BFO_0000001]]\n\n\nSubcategory of [[:Category:Thing]] [[Category:Thing]]\n\n\nTerm description: [[Has property description::entity@en]]\n\n[[Category:Imported vocabulary]] [[Category:OBO]]'
}
in the code self.item
is never used, but only self.item_dict
hence it could make sense to remove self.item
Which I did in d61bfbb523559b35e9c896b938c6dc4af7617a38
Is calling mw_property.j2 or mw_category.j2
Rendering:
Currently
{'term_dict': {
'term': rdflib.term.URIRef('http://purl.obolibrary.org/obo/BFO_0000001'),
'termType': rdflib.term.URIRef('http://www.w3.org/2002/07/owl#Class'),
'label': rdflib.term.Literal('entity', lang='en'),
'subclassof': rdflib.term.URIRef('http://www.w3.org/2002/07/owl#Thing')},
'term': rdflib.term.URIRef('http://purl.obolibrary.org/obo/BFO_0000001'),
'term_name': 'BFO_0000001',
'query': <ontology2smw.classes.QueryOntology object at 0x7fbb02189e48>,
'namespace': rdflib.term.URIRef('http://purl.obolibrary.org/obo/'),
'namespace_prefix': 'obo', 'query_nsmanager': <rdflib.namespace.NamespaceManager object at 0x7fbaf3f2ff28>, 'resource_type': 'Category',
'prop_datatype': None,
'wikipage_name': 'Category:BFO_0000001',
'wikipage_content': '\nImported from [[Imported from::obo:BFO_0000001]]\n\nEquivalent URI [[Equivalent URI::http://purl.obolibrary.org/obo/BFO_0000001]]\n\n\nSubcategory of [[:Category:Thing]] [[Category:Thing]]\n\n\nTerm description: [[Has property description::entity@en]]\n\n[[Category:Imported vocabulary]] [[Category:OBO]]'
}
31
I believe there is a bit duplicate data in the objects that are created from
specially the passing of data to the Jinja template.
Investigate & Correct