Skip to content

Commit

Permalink
Updated pid_resolution algorithm
Browse files Browse the repository at this point in the history
Updated pid_resolution algorithm to include complete set of identifiers associated w.r.t. dataset identifier family
  • Loading branch information
rushirajnenuji committed Jan 20, 2022
1 parent 305f459 commit c2f5b73
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/d1_metrics_service/d1_metrics_service/pid_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def _fetch(url, an_id):
resMap.append(an_id)

params = {'wt':(None,'json'),
'fl':(None,'documents,resourceMap'),
'fl':(None,'documents,resourceMap,seriesId,id'),
'rows':(None,1000)
}
params['fq'] = (None,"((id:" + quoteTerm(an_id) + ") OR (seriesId:" + quoteTerm(an_id) + "))")
Expand Down Expand Up @@ -776,12 +776,20 @@ def eg_getResolvePids():
pprint(res, indent=2)


def test_getResolvePids():
pids = ["oai:figshare.com:article/7438598", ]
res = getResolvePIDs(pids)
#res = getResolvePIDs(pids)
pprint(res, indent=2)


#change verbosity of the urllib3.connectionpool logging
#logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)
logging.basicConfig(level=logging.DEBUG, format='%(threadName)10s %(name)18s: %(message)s')
# eg_pidsAndSid()
# eg_getObsolescenceChain()
# print("==eg: getResolvePids==")
getPortalCollectionQueryFromSolr(portalLabel="DBO")
test_getResolvePids()
# getPortalCollectionQueryFromSolr(portalLabel="DBO")
# eg_getResolvePids()
# getPortalCollectionQuery(url="https://dev.nceas.ucsb.edu/knb/d1/mn/v2/query/solr/?", portalLabel="portal-test")

1 comment on commit c2f5b73

@rushirajnenuji
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference: #83

Please sign in to comment.