cliffxuan / fuxi

Automatically exported from code.google.com/p/fuxi
0 stars 0 forks source link

infixOWL Restriction.serialize defect #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 2 rdflib graphs: first empty (g1), the second (g2) has Restriction (r)
on a DatatypeProperty
2. r.serialize(g1)
3. in g1 the datatypeProperty is also ObjectProperty (the creation of the
copy of the property does not set the type of property)

What is the expected output? What do you see instead?
g1 has a copy of the property that is ONLY datatypeProperty

What version of the product are you using? On what operating system?
latest

Please provide any additional information below.
correct the serialize method in the Restriction class to copy type of
property (default is objectProperty)

Original issue reported on code.google.com by xjar...@gmail.com on 19 Feb 2010 at 7:12

GoogleCodeExporter commented 9 years ago
first line can be exchange to
prop_type = self.graph.triples((self.onProperty, RDF.type, None)).next()[2]
Property(self.onProperty,graph=self.graph,baseType=prop_type).serialize(graph)
to fix the problem (more or less)

Original comment by xjar...@gmail.com on 19 Feb 2010 at 8:40

GoogleCodeExporter commented 9 years ago
See: 
http://code.google.com/p/fuxi/source/detail?r=781be253fe4b15304b8679b84993794322
47a148

Original comment by chime...@gmail.com on 1 Aug 2010 at 6:07