Permalink
Browse files

consistently use full decoded RDF name

  • Loading branch information...
1 parent a434afe commit c58163c1716e9aaf703eed31bab5ce9cf15c4573 @indeyets indeyets committed Mar 11, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 handlers.py
View
@@ -81,7 +81,7 @@ def __init__(self, mgd, rm, input):
self.rdf_map = {}
full_name = Handler.canonicalRdfName(self.rdf_map, self.input['a'])
- self.mgd_type_name = self.decodeRdfClass(self.input['a'])
+ self.mgd_type_name = self.decodeRdfClass(full_name)
def handle(self):
qstor = Midgard.QueryStorage(dbclass=self.mgd_type_name)
@@ -97,7 +97,8 @@ def handle(self):
if 'order' in self.input:
for order in self.input['order']:
for key, direction in order.items():
- qprop = Midgard.QueryProperty(property = self.decodeRdfProperty(self.mgd_type_name, key))
+ full_name = Handler.canonicalRdfName(self.rdf_map, key)
+ qprop = Midgard.QueryProperty(property = self.decodeRdfProperty(self.mgd_type_name, full_name))
qprop.validate()
sel.add_order(qprop, direction)
@@ -124,7 +125,8 @@ def decodeConstraint(self, constraint_dict):
value = Midgard.QueryValue()
value.set_value(constraint_dict[2])
- property = Midgard.QueryProperty(property = self.decodeRdfProperty(self.mgd_type_name, constraint_dict[0]))
+ full_name = Handler.canonicalRdfName(self.rdf_map, constraint_dict[0])
+ property = Midgard.QueryProperty(property = self.decodeRdfProperty(self.mgd_type_name, full_name))
property.validate()
constraint = Midgard.QueryConstraint(property = property,

0 comments on commit c58163c

Please sign in to comment.