Remove incomplete reconciliation response parsing. It's not exposed in the API yet and changed from Refine 2.0 to 2.1

This commit is contained in:
Paul Makepeace 2011-07-21 17:03:17 +00:00
parent 2b8456ba34
commit 8e07662e65
2 changed files with 0 additions and 28 deletions

View File

@ -211,9 +211,6 @@ def RowsResponseFactory(column_index):
self.index = row_response['i'] self.index = row_response['i']
self.row = [c['v'] if c else None self.row = [c['v'] if c else None
for c in row_response['cells']] for c in row_response['cells']]
# list of reconciliation ids indexing into self.recons
self.recon = [c.get('r', None) if c else None
for c in row_response['cells']]
def __getitem__(self, column): def __getitem__(self, column):
# Trailing nulls seem to be stripped from row data # Trailing nulls seem to be stripped from row data
try: try:
@ -237,27 +234,6 @@ def RowsResponseFactory(column_index):
self.start = response['start'] self.start = response['start']
self.limit = response['limit'] self.limit = response['limit']
self.total = response['total'] self.total = response['total']
self.pool = response['pool']
self.recons = self.pool['recons']
#"1307457513974512303": {
# "id": 1307457513974512303,
# "service": "http://.../reconcile/",
# "identifierSpace": "http://.../ns/authority",
# "schemaSpace": "http://.../ns/type",
# # j for judgment
# "j": "none", # "matched"
# # c for candidates. Indexes into self.recon_candidates
# "c": ["/domain/type/id", ...]
#}
# Recon data structure changed after Refine 2.0
if 'reconCandidates' in self.pool:
self.recon_candidates = self.pool['reconCandidates']
#"/domain/type/id": {
# "id": "/domain/type/id",
# "name": "...",
# "score": 0.439394,
# "types": ["/domain/type"]
#}
self.rows = self.RefineRows(response['rows']) self.rows = self.RefineRows(response['rows'])
return RowsResponse return RowsResponse

View File

@ -33,10 +33,6 @@ class RefineRowsTest(unittest.TestCase):
u'mode': u'row-based', u'mode': u'row-based',
u'filtered': 10, u'filtered': 10,
u'total': 10, u'total': 10,
u'pool': {
u'recons': {},
u'reconCandidates': {}
}
}) })
self.assertEqual(len(response.rows), 1) self.assertEqual(len(response.rows), 1)
# test iteration # test iteration