Revision 61452
Added by Sandro La Bruzzo over 2 years ago
modules/dli-api/branches/ES_7/v2/responseModel.py | ||
---|---|---|
106 | 106 |
if title is not None and len(title): |
107 | 107 |
if title[0] == '"' and title[-1] == '"': |
108 | 108 |
title = title[1:-1] |
109 |
identifier = [dict(ID=x.identifier, IDScheme=x.schema, IDURL=resolveIdentifier(x.identifier, x.schema)) for x in
|
|
109 |
identifier = [dict(ID=x.identifier, IDScheme=x.schema, IDURL=x.url) for x in
|
|
110 | 110 |
item.identifier] |
111 | 111 |
identifier.append(dict(ID=item.dnetIdentifier, IDScheme='D-Net Identifier', IDURL='http://scholexplorer.openaire.eu/index.html#/detail/%s'%item.dnetIdentifier)) |
112 | 112 |
creator = [] |
... | ... | |
132 | 132 |
log = logging.getLogger("scholexplorer") |
133 | 133 |
start = time() |
134 | 134 |
for item in response.hits: |
135 |
current_item = {'LinkPublicationDate': now.strftime("%Y-%m-%d"), 'HarvestDate': now.strftime("%Y-%m-%d"),
|
|
135 |
current_item = {'LinkPublicationDate': item.publicationDate, 'HarvestDate': item.publicationDate,
|
|
136 | 136 |
"LinkProvider": []} |
137 | 137 |
for linkProvider in item.linkprovider: |
138 | 138 |
current_item['LinkProvider'].append(ScholixProviderType(name=linkProvider.name, |
modules/dli-api/branches/ES_7/eu/dnetlib/ScholixConnector.py | ||
---|---|---|
125 | 125 |
q = q & item |
126 | 126 |
log.debug("REQUEST CREATED {}".format(q)) |
127 | 127 |
search_object = Search(using=self.connection_pool.get_connection(), index=self.index_name).doc_type('scholix').query(q) |
128 |
print("SONO QUIIII") |
|
129 |
print (search_object.to_dict()) |
|
130 | 128 |
log.debug("Page request size is {}".format(page)) |
131 | 129 |
if page > 9999: |
132 | 130 |
return [] |
Also available in: Unified diff
updated api to use correct linkPublicationDate