diff --git a/freeze.txt b/freeze.txt index cfa19c2b7f..c0cac218c9 100644 --- a/freeze.txt +++ b/freeze.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -190,7 +190,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.1 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-accounts/requirements.txt b/modules/invenio-accounts/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-accounts/requirements.txt +++ b/modules/invenio-accounts/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-accounts/requirements2.txt b/modules/invenio-accounts/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-accounts/requirements2.txt +++ b/modules/invenio-accounts/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-communities/requirements.txt b/modules/invenio-communities/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-communities/requirements.txt +++ b/modules/invenio-communities/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-communities/requirements2.txt b/modules/invenio-communities/requirements2.txt index d5d089311f..aa3d83f677 100644 --- a/modules/invenio-communities/requirements2.txt +++ b/modules/invenio-communities/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/invenio-db/requirements.txt b/modules/invenio-db/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-db/requirements.txt +++ b/modules/invenio-db/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-db/requirements2.txt b/modules/invenio-db/requirements2.txt index d5d089311f..aa3d83f677 100644 --- a/modules/invenio-db/requirements2.txt +++ b/modules/invenio-db/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/invenio-deposit/invenio_deposit/static/templates/invenio_deposit/decorators/array.html b/modules/invenio-deposit/invenio_deposit/static/templates/invenio_deposit/decorators/array.html index d172a1d5a5..f95b7e5a6c 100644 --- a/modules/invenio-deposit/invenio_deposit/static/templates/invenio_deposit/decorators/array.html +++ b/modules/invenio-deposit/invenio_deposit/static/templates/invenio_deposit/decorators/array.html @@ -22,14 +22,29 @@
  • -
    - +
    +
    + +
    +
    +
    +
    + +
  • diff --git a/modules/invenio-deposit/requirements.txt b/modules/invenio-deposit/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-deposit/requirements.txt +++ b/modules/invenio-deposit/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-deposit/requirements2.txt b/modules/invenio-deposit/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-deposit/requirements2.txt +++ b/modules/invenio-deposit/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-files-rest/requirements.txt b/modules/invenio-files-rest/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-files-rest/requirements.txt +++ b/modules/invenio-files-rest/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-files-rest/requirements2.txt b/modules/invenio-files-rest/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-files-rest/requirements2.txt +++ b/modules/invenio-files-rest/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-iiif/requirements.txt b/modules/invenio-iiif/requirements.txt index 0edfb7ee7c..41f6eef560 100644 --- a/modules/invenio-iiif/requirements.txt +++ b/modules/invenio-iiif/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-iiif/requirements2.txt b/modules/invenio-iiif/requirements2.txt index 34c1ea2d51..2329bdc904 100644 --- a/modules/invenio-iiif/requirements2.txt +++ b/modules/invenio-iiif/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest>=4.2.0 pytest-mock==3.6.1 diff --git a/modules/invenio-indexer/requirements.txt b/modules/invenio-indexer/requirements.txt index 79cf819b85..c22a4a8dce 100644 --- a/modules/invenio-indexer/requirements.txt +++ b/modules/invenio-indexer/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -113,8 +113,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-indexer/requirements2.txt b/modules/invenio-indexer/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-indexer/requirements2.txt +++ b/modules/invenio-indexer/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-mail/requirements.txt b/modules/invenio-mail/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-mail/requirements.txt +++ b/modules/invenio-mail/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-mail/requirements2.txt b/modules/invenio-mail/requirements2.txt index 34c1ea2d51..2329bdc904 100644 --- a/modules/invenio-mail/requirements2.txt +++ b/modules/invenio-mail/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest>=4.2.0 pytest-mock==3.6.1 diff --git a/modules/invenio-oaiharvester/invenio_oaiharvester/tasks.py b/modules/invenio-oaiharvester/invenio_oaiharvester/tasks.py index dbc8d21794..1c3e5d0df5 100644 --- a/modules/invenio-oaiharvester/invenio_oaiharvester/tasks.py +++ b/modules/invenio-oaiharvester/invenio_oaiharvester/tasks.py @@ -445,6 +445,7 @@ def sigterm_handler(*args): nonlocal pause pause = True signal.signal(signal.SIGTERM, sigterm_handler) + _errormsg = [] while True: records, rtoken = harvester_list_records( harvesting.base_url, @@ -459,6 +460,9 @@ def sigterm_handler(*args): try: process_item(record, harvesting, counter, request_info) db.session.commit() + except ValueError as ex: + _errormsg.append(str(ex)) + event_counter('error_items', counter) except Exception as ex: current_app.logger.debug(traceback.format_exc()) current_app.logger.error( @@ -473,6 +477,8 @@ def sigterm_handler(*args): elif pause is True: harvest_log.status = 'Suspended' break + if _errormsg: + harvest_log.errmsg = '\n'.join(_errormsg)[:255] except Exception as ex: db.session.rollback() harvest_log.status = 'Failed' diff --git a/modules/invenio-oaiharvester/requirements.txt b/modules/invenio-oaiharvester/requirements.txt index f95a33d762..88c554f773 100644 --- a/modules/invenio-oaiharvester/requirements.txt +++ b/modules/invenio-oaiharvester/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-oaiharvester/requirements2.txt b/modules/invenio-oaiharvester/requirements2.txt index 10ada9f40e..843e732329 100644 --- a/modules/invenio-oaiharvester/requirements2.txt +++ b/modules/invenio-oaiharvester/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-oaiserver/invenio_oaiserver/response.py b/modules/invenio-oaiserver/invenio_oaiserver/response.py index 3e91ca6d00..88e10a1209 100644 --- a/modules/invenio-oaiserver/invenio_oaiserver/response.py +++ b/modules/invenio-oaiserver/invenio_oaiserver/response.py @@ -350,6 +350,9 @@ def is_private_index(record): paths = pickle.loads(pickle.dumps(record.get('path'), -1)) return not Indexes.is_public_state_and_not_in_future(paths) +def is_draft_workflow(record): + """Check workflow is draft""" + return record.get("_deposit",{}).get("status") == "draft" def is_private_index_by_public_list(item_path, public_index_ids): """Check index of workflow is private.""" @@ -419,10 +422,12 @@ def getrecord(**kwargs): # Harvest is private # or New activity + # or Draft activity if path_list and (_is_output == HARVEST_PRIVATE or (is_exists_doi(record) and (_is_output == PRIVATE_INDEX or is_pubdate_in_future(record))) or - is_new_workflow(record)): + is_new_workflow(record) or + is_draft_workflow(record)): return error([('idDoesNotExist', 'No matching identifier')]) # Item is deleted # or Harvest is public & Item is private @@ -441,27 +446,32 @@ def getrecord(**kwargs): ) return e_tree - _sets = list(set(record.get('path', [])+record['_oai'].get('sets', []))) - header( - e_record, - identifier=pid_object.pid_value, - datestamp=record.updated, - sets=_sets - ) - e_metadata = SubElement(e_record, - etree.QName(NS_OAIPMH, 'metadata')) + try: + _sets = list(set(record.get('path', [])+record['_oai'].get('sets', []))) + header( + e_record, + identifier=pid_object.pid_value, + datestamp=record.updated, + sets=_sets + ) + e_metadata = SubElement(e_record, + etree.QName(NS_OAIPMH, 'metadata')) + + etree_record = pickle.loads(pickle.dumps(record, -1)) - etree_record = pickle.loads(pickle.dumps(record, -1)) + if not etree_record.get('system_identifier_doi', None): + etree_record['system_identifier_doi'] = get_identifier(record) - if not etree_record.get('system_identifier_doi', None): - etree_record['system_identifier_doi'] = get_identifier(record) + # Merge licensetype and licensefree + etree_record = handle_license_free(etree_record) - # Merge licensetype and licensefree - etree_record = handle_license_free(etree_record) + root = record_dumper(pid_object, {'_source': etree_record}) - root = record_dumper(pid_object, {'_source': etree_record}) + e_metadata.append(root) + except Exception as ex: + current_app.logger.error("BaseException: {}".format(ex)) + return error([('idDoesNotExist', 'No matching identifier')]) - e_metadata.append(root) return e_tree @@ -548,6 +558,8 @@ def listidentifiers(**kwargs): except NoResultFound: current_app.logger.error( "NoResultFound: object_uuid: {}".format(pid_object.object_uuid)) + except Exception as ex: + current_app.logger.error("BaseException: {}".format(ex)) if len(e_listidentifiers) == 0: return error(get_error_code_msg(), **kwargs) @@ -632,6 +644,13 @@ def listrecords(**kwargs): deleted=True ) else: + etree_record = pickle.loads(pickle.dumps(record, -1)) + if not etree_record.get('system_identifier_doi', None): + etree_record['system_identifier_doi'] = get_identifier(record) + # Merge licensetype and licensefree + etree_record = handle_license_free(etree_record) + _record_serializer = record_dumper(pid, {'_source': etree_record}) + e_record = SubElement( e_listrecords, etree.QName(NS_OAIPMH, 'record')) _sets = list(set(record.get('path', []) + @@ -644,15 +663,7 @@ def listrecords(**kwargs): ) e_metadata = SubElement(e_record, etree.QName(NS_OAIPMH, 'metadata')) - etree_record = pickle.loads(pickle.dumps(record, -1)) - if not etree_record.get('system_identifier_doi', None): - etree_record['system_identifier_doi'] = get_identifier( - record) - - # Merge licensetype and licensefree - etree_record = handle_license_free(etree_record) - e_metadata.append(record_dumper( - pid, {'_source': etree_record})) + e_metadata.append(_record_serializer) except PIDDoesNotExistError: current_app.logger.error( @@ -662,6 +673,8 @@ def listrecords(**kwargs): except NoResultFound: current_app.logger.error( "NoResultFound: object_uuid: {}".format(pid_object.object_uuid)) + except BaseException as ex: + current_app.logger.error("BaseException: {}".format(ex)) # Check tag not exist. if len(e_listrecords) == 0: diff --git a/modules/invenio-oaiserver/requirements.txt b/modules/invenio-oaiserver/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-oaiserver/requirements.txt +++ b/modules/invenio-oaiserver/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-oaiserver/requirements2.txt b/modules/invenio-oaiserver/requirements2.txt index 34c1ea2d51..2329bdc904 100644 --- a/modules/invenio-oaiserver/requirements2.txt +++ b/modules/invenio-oaiserver/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest>=4.2.0 pytest-mock==3.6.1 diff --git a/modules/invenio-oaiserver/tests/conftest.py b/modules/invenio-oaiserver/tests/conftest.py index 5ec6b2c9c4..f5ebc7010b 100644 --- a/modules/invenio-oaiserver/tests/conftest.py +++ b/modules/invenio-oaiserver/tests/conftest.py @@ -74,10 +74,10 @@ def base_app(instance_path): JSONSCHEMAS_HOST='inveniosoftware.org', TESTING=True, SECRET_KEY='CHANGE_ME', - SQLALCHEMY_DATABASE_URI=os.environ.get('SQLALCHEMY_DATABASE_URI', - 'sqlite:///test.db'), - #SQLALCHEMY_DATABASE_URI=os.getenv('SQLALCHEMY_DATABASE_URI', - # 'postgresql+psycopg2://invenio:dbpass123@postgresql:5432/wekotest'), + #SQLALCHEMY_DATABASE_URI=os.environ.get('SQLALCHEMY_DATABASE_URI', + # 'sqlite:///test.db'), + SQLALCHEMY_DATABASE_URI=os.getenv('SQLALCHEMY_DATABASE_URI', + 'postgresql+psycopg2://invenio:dbpass123@postgresql:5432/wekotest'), SQLALCHEMY_TRACK_MODIFICATIONS=True, SERVER_NAME='app', OAISERVER_ID_PREFIX='oai:inveniosoftware.org:recid/', diff --git a/modules/invenio-oaiserver/tests/test_response.py b/modules/invenio-oaiserver/tests/test_response.py index 9444eec88a..b51d429ed4 100644 --- a/modules/invenio-oaiserver/tests/test_response.py +++ b/modules/invenio-oaiserver/tests/test_response.py @@ -32,6 +32,10 @@ from invenio_oaiserver.models import Identify, OAISet from invenio_oaiserver.utils import HARVEST_PRIVATE, OUTPUT_HARVEST, PRIVATE_INDEX, datetime_to_datestamp +from invenio_pidstore import current_pidstore +from invenio_records import Record +from invenio_oaiserver.provider import OAIIDProvider + from invenio_oaiserver.response import ( NS_DC, NS_OAIDC, NS_OAIPMH,NS_JPCOAR, is_private_index, @@ -52,7 +56,8 @@ create_files_url, get_identifier, header, - identify + identify, + is_draft_workflow ) @@ -65,84 +70,143 @@ # record = {"path": "example_path"} # res = is_private_index(record) +# .tox/c1/bin/pytest --cov=invenio_oaiserver tests/test_response.py::test_is_draft_workflow -vv -s -v --cov-branch --cov-report=term --basetemp=/code/modules/invenio-oaiserver/.tox/c1/tmp +def test_is_draft_workflow(): + not_draft = { + "_oai": {"id": "oai:weko3.example.org:000000001","sets": ["1706242675706"]}, + "path": ["1706242675706"], + "owner": "1", + "recid": "1", + "title": ["not_draft"], + "pubdate": {"attribute_name": "PubDate","attribute_value": "2024-01-17"}, + "_buckets": {"deposit": "8b98e578-9cdc-47a8-bfdb-60ab6a25ccf9"}, + "_deposit": { + "id": "1", + "pid": { + "type": "depid", + "value": "1", + "revision_id": 0 + }, + "owner": "1", + "owners": [ + 1 + ], + "status": "published", + "created_by": 1, + "owners_ext": { + "email": "wekosoftware@nii.ac.jp", + "username": "", + "displayname": "" + } + }, + "item_title": "not_draft", + "author_link": [], + "item_type_id": "15", + "publish_date": "2024-01-17", + "control_number": "139", + "publish_status": "0", + "weko_shared_id": -1, + "item_1617186331708": {"attribute_name": "Title","attribute_value_mlt": [{"subitem_1551255647225": "not_draft","subitem_1551255648112": "ja"}]}, + "item_1617258105262": {"attribute_name": "Resource Type","attribute_value_mlt": [{"resourceuri": "http://purl.org/coar/resource_type/c_5794","resourcetype": "conference paper"}]}, + "relation_version_is_last": True + } + + result = is_draft_workflow(not_draft) + assert result == False + + draft = { + "_oai": {"id": "oai:weko3.example.org:000000001","sets": ["1706242675706"]}, + "path": ["1706242675706"], + "owner": "1", + "recid": "1", + "title": ["not_draft"], + "pubdate": {"attribute_name": "PubDate","attribute_value": "2024-01-17"}, + "_buckets": {"deposit": "8b98e578-9cdc-47a8-bfdb-60ab6a25ccf9"}, + "_deposit": { + "id": "1", + "pid": { + "type": "depid", + "value": "1", + "revision_id": 0 + }, + "owner": "1", + "owners": [ + 1 + ], + "status": "draft", + "created_by": 1 + }, + "item_title": "not_draft", + "author_link": [], + "item_type_id": "15", + "publish_date": "2024-01-17", + "control_number": "139", + "publish_status": "0", + "weko_shared_id": -1, + "item_1617186331708": {"attribute_name": "Title","attribute_value_mlt": [{"subitem_1551255647225": "not_draft","subitem_1551255648112": "ja"}]}, + "item_1617258105262": {"attribute_name": "Resource Type","attribute_value_mlt": [{"resourceuri": "http://purl.org/coar/resource_type/c_5794","resourcetype": "conference paper"}]}, + "relation_version_is_last": True + } + + result = is_draft_workflow(draft) + assert result == True + # def getrecord -# .tox/c1/bin/pytest --cov=invenio_oaiserver tests/test_response.py::test_getrecord -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/invenio-oaiserver/.tox/c1/tmp -def test_getrecord(app, records, item_type, mock_execute, db, mocker): - """Test of method which creates OAI-PMH response for verb GetRecord.""" +# .tox/c1/bin/pytest --cov=invenio_oaiserver tests/test_response.py::test_getrecord -vv -s -v --cov-branch --cov-report=term --basetemp=/code/modules/invenio-oaiserver/.tox/c1/tmp +def test_getrecord(app, db, item_type, mocker): with app.app_context(): identify = Identify( - outPutSetting=True - ) - index_metadata = { - "id": 1557819692844, - "parent": 0, - "position": 0, - "index_name": "コンテンツタイプ (Contents Type)", - "index_name_english": "Contents Type", - "index_link_name": "", - "index_link_name_english": "New Index", - "index_link_enabled": False, - "more_check": False, - "display_no": 5, - "harvest_public_state": True, - "display_format": 1, - "image_name": "", - "public_state": True, - "recursive_public_state": True, - "rss_status": False, - "coverpage_state": False, - "recursive_coverpage_check": False, - "browsing_role": "3,-98,-99", - "recursive_browsing_role": False, - "contribute_role": "1,2,3,4,-98,-99", - "recursive_contribute_role": False, - "browsing_group": "", - "recursive_browsing_group": False, - "recursive_contribute_group": False, - "owner_user_id": 1, - "item_custom_sort": {"2": 1} - } - index = Index(**index_metadata) + outPutSetting=True + ) + public_index_metadata = { + "id": "1", + "parent": 0, + "position": 0, + "index_name": "public_index", + "index_name_english": "public_index", + "display_no": 0, + "harvest_public_state": True, + "public_state": True, + "browsing_role": "3,-98,-99", + "recursive_browsing_role": False, + "contribute_role": "1,2,3,4,-98,-99", + "recursive_contribute_role": False, + "browsing_group": "", + "recursive_browsing_group": False, + "recursive_contribute_group": False, + "owner_user_id": 1, + "item_custom_sort": {"2": 1} + } + public_index = Index(**public_index_metadata) + private_index_metadata = { + "id": "2", + "parent": 0, + "position": 1, + "index_name": "private_index", + "index_name_english": "private_index", + "display_no": 0, + "harvest_public_state": True, + "public_state": False, + "browsing_role": "3,-98,-99", + "recursive_browsing_role": False, + "contribute_role": "1,2,3,4,-98,-99", + "recursive_contribute_role": False, + "browsing_group": "", + "recursive_browsing_group": False, + "recursive_contribute_group": False, + "owner_user_id": 1, + "item_custom_sort": {"2": 1} + } + private_index = Index(**private_index_metadata) mapping = Mapping.create( item_type_id=item_type.id, mapping={} ) with db.session.begin_nested(): db.session.add(identify) - db.session.add(index) - dummy_data = { - "hits": { - "total": 3, - "hits": [ - { - "_source": { - "_oai": {"id": str(records[0][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[0][2].id, - }, - { - "_source": { - "_oai": {"id": str(records[1][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[1][2].id, - }, - { - "_source": { - "_oai": {"id": str(records[2][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[2][2].id, - }, - ] - } - } - kwargs = dict( - metadataPrefix="jpcoar_1.0", - verb="GetRecord", - identifier=str(records[0][0]) - ) + db.session.add(public_index) + db.session.add(private_index) + db.session.commit() ns = {"root_name": "jpcoar", "namespaces":{'': 'https://github.com/JPCOAR/schema/blob/master/1.0/', 'dc': 'http://purl.org/dc/elements/1.1/', 'xs': 'http://www.w3.org/2001/XMLSchema', 'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'xml': 'http://www.w3.org/XML/1998/namespace', @@ -150,227 +214,201 @@ def test_getrecord(app, records, item_type, mock_execute, db, mocker): 'jpcoar': 'https://github.com/JPCOAR/schema/blob/master/1.0/', 'dcterms': 'http://purl.org/dc/terms/', 'datacite': 'https://schema.datacite.org/meta/kernel-4/', 'rioxxterms': 'http://www.rioxx.net/schema/v2.0/rioxxterms/'}} - mocker.patch("invenio_oaiserver.response.to_utc",side_effect=lambda x:x) + mocker.patch("weko_records_ui.utils.to_utc",side_effect=lambda x:x) mocker.patch("weko_index_tree.utils.get_user_groups",return_value=[]) mocker.patch("weko_index_tree.utils.check_roles",return_value=True) - mocker.patch("invenio_oaiserver.response.get_identifier",return_value=None) mocker.patch("weko_schema_ui.schema.cache_schema",return_value=ns) - with patch("invenio_oaiserver.query.OAIServerSearch.execute",return_value=mock_execute(dummy_data)): - # not identify - with patch("invenio_oaiserver.response.OaiIdentify.get_all",return_value=None): - res = getrecord(**kwargs) - assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" - - # output setting of identity = false - identify = Identify( - outPutSetting=False + mocker.patch("weko_deposit.api.get_record_without_version",side_effect=lambda x:x) + + def create_record(recid, title, path, pub_date, pub_status, is_draft, is_doi,is_exist_sysidt=False): + record_data = { + "_oai":{ + "id":"", + "sets":path + }, + "item_type_id":item_type.id, + "path":path, + "publish_date":pub_date, + "publish_status":pub_status, + "_deposit": { + "id": recid, + "pid": { + "type": "depid", + "value": "", + "revision_id": 0 + }, + "status": "published" if not is_draft else "draft", + "created_by": 1 + }, + "item_title": title, + "recid":recid + } + if is_exist_sysidt: + record_data["system_identifier_doi"] = { + "attribute_name":"Identifier", + "attribute_value_mlt":[ + { + "subitem_systemidt_identifer":"https://test.org/records:{}".format(recid), + "subitem_systemidt_identifier_type":"URI" + } + ] + } + rec_uuid = uuid.uuid4() + pid = current_pidstore.minters['recid'](rec_uuid, record_data) + oai_val = "oai:weko3.example.org:{:08}".format(int(pid.pid_value)) + record_data["_oai"]["id"] = oai_val + record_metadata = RecordMetadata(id=rec_uuid,json=record_data) + db.session.add(record_metadata) + oai = OAIIDProvider.create( + object_type='oai', + object_uuid=rec_uuid, + pid_value=oai_val + ).pid + if is_doi: + doi = PersistentIdentifier( + pid_type="doi", + pid_value="https://doi.org/2500/{:010}".format(int(pid.pid_value)), + status=PIDStatus.REGISTERED, + object_type="rec", + object_uuid=rec_uuid + ) + db.session.add(doi) + else: + doi = None + db.session.commit() + return record_metadata, pid, oai, doi + + # identify.outPutSetting is false + identify = Identify( + outPutSetting=False + ) + with patch("invenio_oaiserver.response.OaiIdentify.get_all",return_value=identify): + kwargs = dict( + metadataPrefix="jpcoar_1.0", + verb="GetRecord", + identifier="oai:test.org:000001" ) - with patch("invenio_oaiserver.response.OaiIdentify.get_all",return_value=identify): - res = getrecord(**kwargs) - assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + + # harvest is private(_is_output=2) + record = create_record("1","harvest_is_private", ["100"], "2000-11-11", "0",False,False) + kwargs = dict( + metadataPrefix='jpcoar_1.0', + verb="GetRecord", + identifier=str(record[2].pid_value) + ) + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + + # pubdate is feature(record.json._source._item_metadata.system_identifier_doi.attrivute_value_mlt.subitem_systemidt_identifier_type=doi, record.publish_date is feature,) + record = create_record("2","xx", ["1"], "2100-11-11", "0",False,True) + kwargs = dict( + metadataPrefix='jpcoar_1.0', + verb="GetRecord", + identifier=str(record[2].pid_value) + ) + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + + # new activity(record.publish_status=2) + record = create_record("3","xx",["1"],"2000-11-11","2",False,False) + kwargs = dict( + metadataPrefix='jpcoar_1.0', + verb="GetRecord", + identifier=str(record[2].pid_value) + ) + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" - # harvest setting of index = private - with patch("invenio_oaiserver.response.is_output_harvest",return_value=HARVEST_PRIVATE): - res = getrecord(**kwargs) - assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + # draft activity(record._deposit.status=draft) + record = create_record("4","xx",["1"],"2000-11-11","2",True,False) + kwargs = dict( + metadataPrefix='jpcoar_1.0', + verb="GetRecord", + identifier=str(record[2].pid_value) + ) + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" - # path is none - dummy_data = { - "hits": { - "total": 1, - "hits": [ - { - "_source": { - "_oai": {"id": str(records[2][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[1][2].id, - } - ] - } - } + ## harvest is public, item is private(record.path not in index_list) + record = create_record("5","xx",["2"],"2000-11-11","0",False,False) kwargs = dict( metadataPrefix='jpcoar_1.0', verb="GetRecord", - identifier=str(records[1][0]) + identifier=str(record[2].pid_value) ) - with patch("invenio_oaiserver.query.OAIServerSearch.execute",return_value=mock_execute(dummy_data)): - res = getrecord(**kwargs) - identifier = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()', - namespaces=NAMESPACES) - assert identifier == [str(records[1][0])] - header = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header[@status="deleted"]', - namespaces=NAMESPACES) - assert len(header) == 1 - - # publish_status = 0 (public item) - dummy_data = { - "hits": { - "total": 1, - "hits": [ - { - "_source": { - "_oai": {"id": str(records[2][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[2][2].id, - } - ] - } - } + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header",namespaces=NAMESPACES)[0].attrib["status"] == "deleted" + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()",namespaces=NAMESPACES) == [record[2].pid_value] + + # harvest is public, workflow is private(record.publish_status=1) + record = create_record("6","xx",["1"],"2000-11-11","1",False,False) + kwargs = dict( metadataPrefix='jpcoar_1.0', verb="GetRecord", - identifier=str(records[2][0]) + identifier=str(record[2].pid_value) ) - with patch("invenio_oaiserver.query.OAIServerSearch.execute",return_value=mock_execute(dummy_data)): - # not etree_record.get("system_identifier_doi") - with patch("invenio_oaiserver.response.is_exists_doi",return_value=False): - res = getrecord(**kwargs) - identifier = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()', - namespaces=NAMESPACES) - assert identifier == [str(records[2][0])] - datestamp = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:datestamp/text()', - namespaces=NAMESPACES) - assert datestamp == [datetime_to_datestamp(records[2][0].updated)] - - # private index - with patch("invenio_oaiserver.response.is_output_harvest",return_value=PRIVATE_INDEX): - res = getrecord(**kwargs) - identifier = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()', - namespaces=NAMESPACES) - assert identifier == [str(records[2][0])] - header = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header[@status="deleted"]', - namespaces=NAMESPACES) - assert len(header) == 1 + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header",namespaces=NAMESPACES)[0].attrib["status"] == "deleted" + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()",namespaces=NAMESPACES) == [record[2].pid_value] - kwargs = dict( - metadataPrefix='jpcoar_1.0', - verb="GetRecord", - identifier=str(records[3][0]) - ) - # etree_record.get("system_identifier_doi") - with patch("invenio_oaiserver.response.is_exists_doi",return_value=True): - res = getrecord(**kwargs) - identifier = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()', - namespaces=NAMESPACES) - assert identifier == [] - assert len(res.xpath('/x:OAI-PMH/x:GetRecord/x:record/x:metadata', - namespaces=NAMESPACES)) == 0 - - # private index - with patch("invenio_oaiserver.response.is_output_harvest",return_value=PRIVATE_INDEX): - res = getrecord(**kwargs) - assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" - - # publish_status = 2 (new item) - dummy_data = { - "hits": { - "total": 1, - "hits": [ - { - "_source": { - "_oai": {"id": str(records[4][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[4][2].id, - } - ] - } - } + # harvest is public, workflow is deleted(record.publish_status=-1) + record = create_record("7","xx",["1"],"2000-11-11","-1",False,False) kwargs = dict( metadataPrefix='jpcoar_1.0', verb="GetRecord", - identifier=str(records[4][0]) + identifier=str(record[2].pid_value) ) - with patch("invenio_oaiserver.query.OAIServerSearch.execute",return_value=mock_execute(dummy_data)): - # not etree_record.get("system_identifier_doi") - with patch("invenio_oaiserver.response.is_exists_doi",return_value=False): - res = getrecord(**kwargs) - assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header",namespaces=NAMESPACES)[0].attrib["status"] == "deleted" + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()",namespaces=NAMESPACES) == [record[2].pid_value] - kwargs = dict( - metadataPrefix='jpcoar_1.0', - verb="GetRecord", - identifier=str(records[4][0]) - ) - # etree_record.get("system_identifier_doi") - with patch("invenio_oaiserver.response.is_exists_doi",return_value=True): - res = getrecord(**kwargs) - assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + # harvest is public, publish is feature(record.publish_date is feature) + record = create_record("8","xx",["1"],"2100-11-11","0",False,False) + kwargs = dict( + metadataPrefix='jpcoar_1.0', + verb="GetRecord", + identifier=str(record[2].pid_value) + ) + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header",namespaces=NAMESPACES)[0].attrib["status"] == "deleted" + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()",namespaces=NAMESPACES) == [record[2].pid_value] - # publish_status = -1 (deleted item) - dummy_data = { - "hits": { - "total": 1, - "hits": [ - { - "_source": { - "_oai": {"id": str(records[4][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[5][2].id, - } - ] - } - } + # system_identifier_doi is not exists + record = create_record("9","xx",["1"],"2000-11-11","0",False,False) kwargs = dict( metadataPrefix='jpcoar_1.0', verb="GetRecord", - identifier=str(records[5][0]) + identifier=str(record[2].pid_value) ) - with patch("invenio_oaiserver.query.OAIServerSearch.execute",return_value=mock_execute(dummy_data)): - # not etree_record.get("system_identifier_doi") - with patch("invenio_oaiserver.response.is_exists_doi",return_value=False): - res = getrecord(**kwargs) - identifier = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()', - namespaces=NAMESPACES) - assert identifier == [str(records[5][0])] - header = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header[@status="deleted"]', - namespaces=NAMESPACES) - assert len(header) == 1 + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()",namespaces=NAMESPACES) == [record[2].pid_value] + assert len(res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:metadata",namespaces=NAMESPACES)) == 1 + + # system_identifier_doi is exists + record = create_record("10","xx",["1"],"2000-11-11","0",False,False,True) + kwargs = dict( + metadataPrefix='jpcoar_1.0', + verb="GetRecord", + identifier=str(record[2].pid_value) + ) + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()",namespaces=NAMESPACES) == [record[2].pid_value] + assert len(res.xpath("/x:OAI-PMH/x:GetRecord/x:record/x:metadata",namespaces=NAMESPACES)) == 1 - # publish_status = 1 (private item) - dummy_data = { - "hits": { - "total": 1, - "hits": [ - { - "_source": { - "_oai": {"id": str(records[4][0])}, - "_updated": "2022-01-01T10:10:10" - }, - "_id": records[6][2].id, - } - ] - } - } + # exception is raised + record = create_record("11","xx",["1"],"2000-11-11","0",False,False) kwargs = dict( metadataPrefix='jpcoar_1.0', verb="GetRecord", - identifier=str(records[6][0]) + identifier=str(record[2].pid_value) ) - with patch("invenio_oaiserver.query.OAIServerSearch.execute",return_value=mock_execute(dummy_data)): - # not etree_record.get("system_identifier_doi") - with patch("invenio_oaiserver.response.is_exists_doi",return_value=False): - res = getrecord(**kwargs) - identifier = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header/x:identifier/text()', - namespaces=NAMESPACES) - assert identifier == [str(records[6][0])] - header = res.xpath( - '/x:OAI-PMH/x:GetRecord/x:record/x:header[@status="deleted"]', - namespaces=NAMESPACES) - assert len(header) == 1 + with patch("invenio_oaiserver.response.pickle.loads",side_effect=Exception): + res = getrecord(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "idDoesNotExist" + def test_getrecord_future_item(app,records,item_type,mock_execute,db,mocker): @@ -760,6 +798,10 @@ def total(self): with patch("invenio_oaiserver.response.WekoRecord.get_record_by_uuid",side_effect=NoResultFound()): res=listidentifiers(**kwargs) assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "noRecordsMatch" + # raise Exception + with patch("invenio_oaiserver.response.WekoRecord.get_record_by_uuid",side_effect=Exception()): + res=listidentifiers(**kwargs) + assert res.xpath("/x:OAI-PMH/x:error",namespaces=NAMESPACES)[0].attrib["code"] == "noRecordsMatch" # .tox/c1/bin/pytest --cov=invenio_oaiserver tests/test_response.py::test_listrecords -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/invenio-oaiserver/.tox/c1/tmp diff --git a/modules/invenio-oauth2server/requirements.txt b/modules/invenio-oauth2server/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-oauth2server/requirements.txt +++ b/modules/invenio-oauth2server/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-oauth2server/requirements2.txt b/modules/invenio-oauth2server/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-oauth2server/requirements2.txt +++ b/modules/invenio-oauth2server/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-previewer/requirements.txt b/modules/invenio-previewer/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-previewer/requirements.txt +++ b/modules/invenio-previewer/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-previewer/requirements2.txt b/modules/invenio-previewer/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-previewer/requirements2.txt +++ b/modules/invenio-previewer/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-queues/requirements.txt b/modules/invenio-queues/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-queues/requirements.txt +++ b/modules/invenio-queues/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-queues/requirements2.txt b/modules/invenio-queues/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-queues/requirements2.txt +++ b/modules/invenio-queues/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-records-rest/invenio_records_rest/serializers/base.py b/modules/invenio-records-rest/invenio_records_rest/serializers/base.py index 15c31f8910..c3a878df70 100644 --- a/modules/invenio-records-rest/invenio_records_rest/serializers/base.py +++ b/modules/invenio-records-rest/invenio_records_rest/serializers/base.py @@ -181,7 +181,8 @@ def get_mapping(item_type_id): if k in item_type_mapping: v = item_type_mapping.get(k) prop_hidden = meta_option.get(k, {}).get('option', {}).get('hidden', False) - if not v or not isinstance(v.get('jpcoar_mapping'), dict) \ + if not v or not isinstance(v, dict) \ + or not isinstance(v.get('jpcoar_mapping'), dict) \ or prop_hidden: continue for k1, v1 in v.get('jpcoar_mapping').items(): diff --git a/modules/invenio-records-rest/invenio_records_rest/views.py b/modules/invenio-records-rest/invenio_records_rest/views.py index ef6ac3cf10..ede7355e4c 100644 --- a/modules/invenio-records-rest/invenio_records_rest/views.py +++ b/modules/invenio-records-rest/invenio_records_rest/views.py @@ -1135,7 +1135,7 @@ def put(self, pid, record, **kwargs): if index.cid not in can_edit_indexes: can_edit_indexes.append(str(index.cid)) path = record.get('path', []) - data['index'] = list(set(path) - set(can_edit_indexes)) + data.get('index', []) + data['index'] = list(set(list(set(path) - set(can_edit_indexes)) + data.get('index', []))) record.clear() record.update(data) record.commit() @@ -1146,6 +1146,7 @@ def put(self, pid, record, **kwargs): except BaseException as e: db.session.rollback() current_app.logger.error(traceback.format_exc()) + return self.make_response(None, None, 500) return self.make_response( pid, record, links_factory=self.links_factory) diff --git a/modules/invenio-records-rest/requirements.txt b/modules/invenio-records-rest/requirements.txt index f6ce9f4a31..ac5d969d92 100644 --- a/modules/invenio-records-rest/requirements.txt +++ b/modules/invenio-records-rest/requirements.txt @@ -34,7 +34,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -112,8 +112,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest-mock==3.6.1 python-dateutil==2.6.1 diff --git a/modules/invenio-records-rest/requirements2.txt b/modules/invenio-records-rest/requirements2.txt index b662f19160..28675cf4ee 100644 --- a/modules/invenio-records-rest/requirements2.txt +++ b/modules/invenio-records-rest/requirements2.txt @@ -49,7 +49,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -192,7 +192,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/invenio-records/requirements.txt b/modules/invenio-records/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-records/requirements.txt +++ b/modules/invenio-records/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-records/requirements2.txt b/modules/invenio-records/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-records/requirements2.txt +++ b/modules/invenio-records/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-resourcesyncclient/requirements.txt b/modules/invenio-resourcesyncclient/requirements.txt index dc468127d5..f62098adfb 100644 --- a/modules/invenio-resourcesyncclient/requirements.txt +++ b/modules/invenio-resourcesyncclient/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-resourcesyncclient/requirements2.txt b/modules/invenio-resourcesyncclient/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/invenio-resourcesyncclient/requirements2.txt +++ b/modules/invenio-resourcesyncclient/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/invenio-resourcesyncserver/invenio_resourcesyncserver/query.py b/modules/invenio-resourcesyncserver/invenio_resourcesyncserver/query.py index 557e4af144..f2d381b557 100644 --- a/modules/invenio-resourcesyncserver/invenio_resourcesyncserver/query.py +++ b/modules/invenio-resourcesyncserver/invenio_resourcesyncserver/query.py @@ -27,6 +27,7 @@ from invenio_search import RecordsSearch from weko_index_tree.api import Indexes from weko_schema_ui.models import PublishStatus +from weko_search_ui.utils import execute_search_with_pagination from .config import WEKO_ROOT_INDEX @@ -36,14 +37,13 @@ def get_items_by_index_tree(index_tree_id): records_search = RecordsSearch() records_search = records_search.with_preference_param().params( version=False) + records_search = records_search.sort({"control_number": {"order": "asc"}}) records_search._index[0] = current_app.config['SEARCH_UI_SEARCH_INDEX'] search_instance = item_path_search_factory( search=records_search, index_id=index_tree_id ) - search_result = search_instance.execute().to_dict() - - return search_result.get('hits').get('hits') + return execute_search_with_pagination(search_instance, -1) def get_item_changes_by_index(index_tree_id, date_from, date_until): @@ -58,9 +58,7 @@ def get_item_changes_by_index(index_tree_id, date_from, date_until): date_from=date_from, date_until=date_until ) - search_result = search_instance.execute().to_dict() - - return search_result.get('hits').get('hits') + return execute_search_with_pagination(search_instance, -1) def item_path_search_factory(search, index_id="0"): @@ -224,11 +222,13 @@ def _get_index_search_query(_date_from: str, _date_until: str) -> dict: ] } }, - "sort": { - "_updated": { - "order": "asc" + "sort": [ + { + "_updated": { + "order": "asc" + } } - }, + ], "post_filter": { "bool": { "must": [ diff --git a/modules/invenio-resourcesyncserver/requirements.txt b/modules/invenio-resourcesyncserver/requirements.txt index dc468127d5..f62098adfb 100644 --- a/modules/invenio-resourcesyncserver/requirements.txt +++ b/modules/invenio-resourcesyncserver/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-resourcesyncserver/requirements2.txt b/modules/invenio-resourcesyncserver/requirements2.txt index d5d089311f..aa3d83f677 100644 --- a/modules/invenio-resourcesyncserver/requirements2.txt +++ b/modules/invenio-resourcesyncserver/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/invenio-resourcesyncserver/tests/conftest.py b/modules/invenio-resourcesyncserver/tests/conftest.py index 435ec9281f..7a2fa7caa4 100644 --- a/modules/invenio-resourcesyncserver/tests/conftest.py +++ b/modules/invenio-resourcesyncserver/tests/conftest.py @@ -690,6 +690,30 @@ def es(app): list(current_search.delete(ignore=[404])) +@pytest.fixture() +def esindex(app): + current_search_client.indices.delete(index="test-*") + with open("tests/data/item-v1.0.0.json", "r") as f: + mapping = json.load(f) + try: + current_search_client.indices.create( + app.config["INDEXER_DEFAULT_INDEX"], body=mapping + ) + current_search_client.indices.put_alias( + index=app.config["INDEXER_DEFAULT_INDEX"], name="test-weko" + ) + except: + current_search_client.indices.create("test-weko-items", body=mapping) + current_search_client.indices.put_alias( + index="test-weko-items", name="test-weko" + ) + + try: + yield current_search_client + finally: + current_search_client.indices.delete(index="test-*") + + @pytest.yield_fixture() def i18n_app(app): with app.test_request_context( @@ -727,10 +751,18 @@ def indices(app, db): ) testIndexMore = Index(index_name="testIndexMore",parent=33,public_state=True,id='more') testIndexPrivate = Index(index_name="testIndexPrivate",public_state=False,id=55) + testIndexSix = Index( + index_name="testIndexSix", + browsing_role="1,2,3,4,-98,-99", + public_state=True, + id=66, + position=4 + ) db.session.add(testIndexThree) db.session.add(testIndexThreeChild) - + db.session.add(testIndexSix) + return { 'index_dict': dict(testIndexThree), 'index_non_dict': testIndexThree, diff --git a/modules/invenio-resourcesyncserver/tests/data/item-v1.0.0.json b/modules/invenio-resourcesyncserver/tests/data/item-v1.0.0.json new file mode 100644 index 0000000000..5f1817ad97 --- /dev/null +++ b/modules/invenio-resourcesyncserver/tests/data/item-v1.0.0.json @@ -0,0 +1,1221 @@ +{ + "settings": { + "number_of_shards": 1, + "number_of_replicas": 1, + "index.mapping.total_fields.limit": 50000, + "analysis": { + "tokenizer": { + "ja_tokenizer": { + "type": "kuromoji_tokenizer", + "mode": "search" + }, + "ngram_tokenizer": { + "type": "nGram", + "min_gram": 1, + "max_gram": 3, + "token_chars": [ + "letter", + "digit" + ] + } + }, + "char_filter": { + "weko_char_filter": { + "type": "mapping", + "mappings_path": "kui.txt" + } + }, + "analyzer": { + "default": { + "tokenizer": "ngram_tokenizer", + "filter": [ + "kuromoji_baseform", + "kuromoji_part_of_speech", + "cjk_width", + "stop", + "kuromoji_stemmer", + "lowercase" + ], + "char_filter": [ + "weko_char_filter" + ] + }, + "ngram_analyzer": { + "type": "custom", + "char_filter": [ + "weko_char_filter", + "html_strip" + ], + "tokenizer": "ngram_tokenizer", + "filter": [ + "cjk_width", + "lowercase" + ] + }, + "wk_analyzer": { + "type": "custom", + "char_filter": [ + "html_strip" + ], + "tokenizer": "standard", + "filter": [ + "standard", + "lowercase", + "stop", + "cjk_width" + ] + }, + "paths": { + "tokenizer": "path_hierarchy" + } + } + } + }, + "mappings": { + "item-v1.0.0": { + "properties": { + "path": { + "type": "keyword", + "index": true, + "fields": { + "tree": { + "type": "text", + "fielddata": true, + "analyzer": "paths" + } + } + }, + "item_type_id": { + "type": "keyword", + "index": true + }, + "itemtype": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "fielddata": true, + "copy_to": [ + "search_other" + ] + }, + "publish_status": { + "type": "keyword", + "index": true + }, + "publish_date": { + "type": "date", + "format": "yyyy-MM-dd||yyyy-MM||yyyy" + }, + "_created": { + "type": "date" + }, + "_updated": { + "type": "date" + }, + "_oai": { + "type": "object", + "properties": { + "id": { + "type": "keyword", + "index": true + }, + "sets": { + "type": "keyword", + "index": true + }, + "updated": { + "type": "date" + } + } + }, + "control_number": { + "type": "keyword", + "index": true + }, + "title": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_title" + ] + }, + "feedback_mail_list": { + "type": "nested", + "properties": { + "author_id": { + "type": "keyword", + "index": true + }, + "email": { + "type": "keyword", + "index": true + } + } + }, + "alternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_title" + ] + }, + "creator": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "creatorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "familyName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "givenName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "creatorAlternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "affiliation": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "affiliationName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + } + } + }, + "contributor": { + "type": "object", + "properties": { + "@attributes": { + "type": "object", + "properties": { + "contributorType": { + "type": "keyword" + } + } + }, + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "contributorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "familyName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "givenName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "contributorAlternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "affiliation": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "affiliationName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + } + } + }, + "accessRights": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "apc": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "rights": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "rightsHolder": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "rightsHolderName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "subject": { + "type": "object", + "properties": { + "value": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "subjectScheme": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "description": { + "type": "object", + "properties": { + "value": { + "type": "keyword", + "ignore_above": 256, + "copy_to": [ + "search_des" + ] + }, + "descriptionType": { + "type": "keyword" + } + } + }, + "publisher": { + "type": "text", + "copy_to": [ + "search_publisher" + ] + }, + "date": { + "type": "nested", + "properties": { + "dateType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + }, + "value": { + "type": "keyword" + } + } + }, + "language": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "version": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "versionType": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "identifierRegistration": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "relation": { + "type": "object", + "properties": { + "relatedIdentifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "relatedTitle": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "relationType": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "index": true + }, + "item_links": { + "type": "keyword", + "index": true + }, + "item_title": { + "type": "keyword", + "index": true + } + } + } + } + }, + "temporal": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "text1": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text2": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text3": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text4": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text5": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text6": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text7": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text8": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text9": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text10": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text11": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text12": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text13": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text14": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text15": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text16": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text17": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text18": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text19": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text20": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text21": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text22": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text23": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text24": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text25": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text26": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text27": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text28": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text29": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text30": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "integer_range1":{ + "type": "integer_range" + }, + "integer_range2":{ + "type": "integer_range" + }, + "integer_range3":{ + "type": "integer_range" + }, + "integer_range4":{ + "type": "integer_range" + }, + "integer_range5":{ + "type": "integer_range" + }, + "float_range1":{ + "type": "float_range" + }, + "float_range2":{ + "type": "float_range" + }, + "float_range3":{ + "type": "float_range" + }, + "float_range4":{ + "type": "float_range" + }, + "float_range5":{ + "type": "float_range" + }, + "geo_point1":{ + "type": "geo_point" + }, + "date_range1":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range2":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range3":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range4":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range5":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + + "geo_shape1":{ + "type" : "geo_shape" + }, + "geoLocation": { + "type": "object", + "properties": { + "geoLocationPoint": { + "type": "object", + "properties": { + "pointLongitude": { + "type": "geo_point" + }, + "pointLatitude": { + "type": "geo_point" + } + } + }, + "geoLocationBox": { + "type": "object", + "properties": { + "westBoundLongitude": { + "type": "geo_point" + }, + "eastBoundLongitude": { + "type": "geo_point" + }, + "southBoundLatitude": { + "type": "geo_point" + }, + "northBoundLatitude": { + "type": "geo_point" + } + } + }, + "geoLocationPlace": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + } + } + }, + "fundingReference": { + "type": "object", + "properties": { + "funderIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "funderName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "awardNumber": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "awardTitle": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "sourceIdentifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "sourceTitle": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + }, + "copy_to": [ + "search_other" + ] + }, + "author_link": { + "type": "text", + "fields" : { + "raw" : { + "type" : "keyword", + "ignore_above" : 256 + } + } + }, + "volume": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "issue": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "numPages": { + "type": "text" + }, + "pageStart": { + "type": "text" + }, + "pageEnd": { + "type": "text" + }, + "dissertationNumber": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "degreeName": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + }, + "copy_to": [ + "search_other" + ] + }, + "dateGranted": { + "type": "keyword" + }, + "degreeGrantor": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "degreeGrantorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other", + "dgName" + ] + } + } + }, + "conference": { + "type": "object", + "properties": { + "conferenceName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferenceSequence": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferencePlace": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferenceCountry": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "file": { + "type": "object", + "properties": { + "URI": { + "type": "nested", + "properties": { + "value": { + "type": "text" + }, + "objectType": { + "type": "keyword", + "index": true + } + } + }, + "mimeType": { + "type": "keyword", + "index": true + }, + "extent": { + "type": "keyword", + "index": true + }, + "date": { + "type": "nested", + "properties": { + "dateType": { + "type": "keyword", + "index": true + }, + "value": { + "type": "keyword" + } + } + }, + "version": { + "type": "text" + } + } + }, + "content": { + "type": "nested", + "properties": { + "file_id": { + "type": "keyword", + "index": true + }, + "groups": { + "type": "keyword", + "index": true + }, + "file_name": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "display_name": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "license_notation": { + "type": "text" + }, + "file": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true, + "fields": { + "ja": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true + } + } + }, + "attachment": { + "properties": { + "content": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true, + "fields": { + "ja": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true + } + } + } + } + } + } + }, + "weko_creator_id": { + "type": "text", + "fielddata": true, + "index": true + }, + "weko_id": { + "type": "text", + "fielddata": true, + "index": true + }, + "search_title": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_creator": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_contributor": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_other": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_identifier": { + "type": "text" + }, + "search_attr": { + "type": "text" + }, + "search_string": { + "type": "text" + }, + "search_publisher": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_des": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "dgName": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + } + }, + "dynamic_templates": [ + { + "weko_id": { + "match_mapping_type": "string", + "match_pattern": "regex", + "match": "^weko_id$", + "mapping": { + "type": "text", + "fielddata": true, + "index": false, + "copy_to": "weko_id" + } + } + }, + { + "string": { + "match_mapping_type": "string", + "mapping": { + "type": "text", + "index": false, + "copy_to": "search_string", + "fields": { + "raw": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + { + "date_string": { + "match_mapping_type": "date", + "mapping": { + "type": "text", + "index": false, + "copy_to": "search_string", + "fields": { + "raw": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + } + ] + } + } +} diff --git a/modules/invenio-resourcesyncserver/tests/test_query.py b/modules/invenio-resourcesyncserver/tests/test_query.py index c8e4a98462..20a423e029 100644 --- a/modules/invenio-resourcesyncserver/tests/test_query.py +++ b/modules/invenio-resourcesyncserver/tests/test_query.py @@ -4,6 +4,7 @@ import pytest import unittest import datetime +from elasticsearch import helpers from mock import patch, MagicMock, Mock from flask import current_app, make_response, request from flask_login import current_user @@ -18,19 +19,43 @@ # def get_items_by_index_tree(index_tree_id): -def test_get_items_by_index_tree(i18n_app, indices): +# def get_item_changes_by_index(index_tree_id, date_from, date_until): +# .tox/c1/bin/pytest --cov=invenio_resourcesyncserver tests/test_query.py::test_get_items_by_index_tree -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/invenio-resourcesyncserver/.tox/c1/tmp +def test_get_items_by_index_tree(i18n_app, indices, esindex): index_tree_id = 33 + date_from = (datetime.datetime.now() - datetime.timedelta(days=3)).isoformat() + date_until = datetime.datetime.now().isoformat() assert get_items_by_index_tree(index_tree_id) == [] + assert get_item_changes_by_index(index_tree_id, date_from, date_until) == [] + def _generate_es_data(num, start_datetime=datetime.datetime.now()): + for i in range(num): + doc = { + "_index": i18n_app.config['INDEXER_DEFAULT_INDEX'], + "_type": "item-v1.0.0", + "_id": f"2d1a2520-9080-437f-a304-230adc8{i:05d}", + "_source": { + "_item_metadata": { + "title": [f"test_title_{i}"], + }, + "relation_version_is_last": True, + "path": ["66"], + "control_number": f"{i:05d}", + "_created": (start_datetime + datetime.timedelta(seconds=i) - datetime.timedelta(days=2)).isoformat(), + "_updated": (start_datetime + datetime.timedelta(seconds=i) - datetime.timedelta(days=1)).isoformat(), + "publish_date": (datetime.datetime.now() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'), + "publish_status": "0", + }, + } + yield doc -# def get_item_changes_by_index(index_tree_id, date_from, date_until): -def test_get_item_changes_by_index(i18n_app, indices, es): - index_tree_id = 33 - date_from = datetime.datetime.now() - datetime.timedelta(days=3) - date_until = datetime.datetime.now() + generate_data_num = 20002 + helpers.bulk(esindex, _generate_es_data(generate_data_num), refresh='true') - assert get_item_changes_by_index(index_tree_id, date_from, date_until) + # result over 10000 + assert len(get_items_by_index_tree(66)) == generate_data_num + assert len(get_item_changes_by_index(66, date_from, date_until)) == generate_data_num # def item_path_search_factory(search, index_id="0"): diff --git a/modules/invenio-s3/requirements.txt b/modules/invenio-s3/requirements.txt index 3241ab301f..7a42a8bd0d 100644 --- a/modules/invenio-s3/requirements.txt +++ b/modules/invenio-s3/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -113,8 +113,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-s3/requirements2.txt b/modules/invenio-s3/requirements2.txt index 0f56704dd2..714434175b 100644 --- a/modules/invenio-s3/requirements2.txt +++ b/modules/invenio-s3/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -192,7 +192,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-invenio==1.2.1 diff --git a/modules/invenio-stats/invenio_stats/queries.py b/modules/invenio-stats/invenio_stats/queries.py index b12a5b48c5..c9e0a92fbd 100644 --- a/modules/invenio-stats/invenio_stats/queries.py +++ b/modules/invenio-stats/invenio_stats/queries.py @@ -485,8 +485,8 @@ def build_query(self, start_date, end_date, **kwargs): time_range['gte'] = start_date.isoformat() if end_date is not None: time_range['lte'] = end_date.isoformat() - time_range['time_zone'] = current_app.config[ - 'STATS_WEKO_DEFAULT_TIMEZONE'] + time_range['time_zone'] = str( + current_app.config['STATS_WEKO_DEFAULT_TIMEZONE']()) agg_query = agg_query.filter( 'range', **{self.time_field: time_range}) diff --git a/modules/invenio-stats/invenio_stats/utils.py b/modules/invenio-stats/invenio_stats/utils.py index 9df62e7e4e..814b58fb14 100644 --- a/modules/invenio-stats/invenio_stats/utils.py +++ b/modules/invenio-stats/invenio_stats/utils.py @@ -525,7 +525,7 @@ def Calculation(res, data_list): data_list.update({item['ip']: item}) elif 'top-view-total' in res: for item in res['top-view-total']['buckets']: - data_list.update({'count': item['value']}) + data_list.update({item['date']:{'count': item['value']}}) else: data = {} data['errors'] = str(res) @@ -1277,7 +1277,7 @@ def get_new_items(cls, **kwargs): end_date = kwargs.get('end_date') params = { 'start_date': start_date, - 'end_date': end_date + 'T23:59:59', + 'end_date': end_date, 'agg_size': str(kwargs.get('agg_size', 10)), 'must_not': kwargs.get('must_not', ''), 'new_items': True diff --git a/modules/invenio-stats/requirements.txt b/modules/invenio-stats/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/invenio-stats/requirements.txt +++ b/modules/invenio-stats/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/invenio-stats/requirements2.txt b/modules/invenio-stats/requirements2.txt index f4ea2db295..eb732bbb0b 100644 --- a/modules/invenio-stats/requirements2.txt +++ b/modules/invenio-stats/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-invenio==1.2.1 diff --git a/modules/invenio-stats/tests/test_utils.py b/modules/invenio-stats/tests/test_utils.py index a60f878ddb..5276484b02 100644 --- a/modules/invenio-stats/tests/test_utils.py +++ b/modules/invenio-stats/tests/test_utils.py @@ -404,15 +404,21 @@ def test_query_common_reports_helper(app, es): assert res=={'date': '2022-10-01-2022-10-10', 'all': {'localhost': {'host': 'name2', 'ip': 'localhost', 'count': 2}}} _res = { - 'buckets': [ + "interval": "year", + "key_type": "date", + "start_date": None, + "end_date": None, + "buckets": [ { - 'value': 2 + "key": 1704034800000, + "date": "2024-01-01T00:00:00.000+09:00", + "value": 56.0 } ] } with patch('invenio_stats.queries.ESDateHistogramQuery.run', return_value=_res): res = QueryCommonReportsHelper.get(event='top_page_access', year=2022, month=-1) - assert res=={'date': 'all', 'all': {'count': 2}} + assert res=={'date': 'all', 'all': {'2024-01-01T00:00:00.000+09:00':{'count':56.0}}} _res = { 'buckets': [ diff --git a/modules/weko-accounts/requirements.txt b/modules/weko-accounts/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-accounts/requirements.txt +++ b/modules/weko-accounts/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-accounts/requirements2.txt b/modules/weko-accounts/requirements2.txt index 327cf19a16..a0f1f2402a 100644 --- a/modules/weko-accounts/requirements2.txt +++ b/modules/weko-accounts/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest>=4.2.0 pytest-mock==3.6.1 diff --git a/modules/weko-accounts/tests/test_views.py b/modules/weko-accounts/tests/test_views.py index c0616b3d75..39c7ea0772 100644 --- a/modules/weko-accounts/tests/test_views.py +++ b/modules/weko-accounts/tests/test_views.py @@ -9,7 +9,8 @@ from weko_accounts.views import ( _has_admin_access, init_menu, - _redirect_method + _redirect_method, + urlencode, ) def set_session(client,data): with client.session_transaction() as session: @@ -333,4 +334,13 @@ def test_shib_stub_login(client,mocker): def test_shib_logout(client, mocker): mocker.patch("weko_accounts.views.ShibUser.shib_user_logout") res = client.get(url_for("weko_accounts.shib_logout")) - assert res.data == bytes("logout success","utf-8") \ No newline at end of file + assert res.data == bytes("logout success","utf-8") + +# def urlencode(value): +# .tox/c1/bin/pytest --cov=weko_accounts tests/test_views.py::test_urlencode -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-accounts/.tox/c1/tmp +def test_urlencode(app): + app.jinja_env.filters["urlencode"] = urlencode + # test urlencode + template = app.jinja_env.from_string('{{"http://localhost:5000/weko/accounts/shib/login?SHIB_ATTR_SESSION_ID=1111&next=/next_page"|urlencode}}') + actual = template.render() + assert actual == "http%3A%2F%2Flocalhost%3A5000%2Fweko%2Faccounts%2Fshib%2Flogin%3FSHIB_ATTR_SESSION_ID%3D1111%26next%3D%2Fnext_page" \ No newline at end of file diff --git a/modules/weko-admin/requirements.txt b/modules/weko-admin/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-admin/requirements.txt +++ b/modules/weko-admin/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-admin/requirements2.txt b/modules/weko-admin/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-admin/requirements2.txt +++ b/modules/weko-admin/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-admin/tests/conftest.py b/modules/weko-admin/tests/conftest.py index 9212587e9a..28d1d8cc9f 100644 --- a/modules/weko-admin/tests/conftest.py +++ b/modules/weko-admin/tests/conftest.py @@ -60,7 +60,7 @@ from invenio_mail.models import MailConfig from invenio_pidrelations import InvenioPIDRelations from invenio_pidstore import InvenioPIDStore -from invenio_search import RecordsSearch,InvenioSearch +from invenio_search import RecordsSearch,InvenioSearch,current_search_client from invenio_oaiserver.ext import InvenioOAIServer from invenio_records.ext import InvenioRecords from invenio_records.models import RecordMetadata @@ -134,8 +134,9 @@ def base_app(instance_path, cache_config,request ,search_class): 'SQLALCHEMY_DATABASE_URI', 'sqlite:///test.db'), #SQLALCHEMY_DATABASE_URI=os.getenv('SQLALCHEMY_DATABASE_URI', # 'postgresql+psycopg2://invenio:dbpass123@postgresql:5432/wekotest'), - SEARCH_ELASTIC_HOSTS=os.environ.get( - 'SEARCH_ELASTIC_HOSTS', None), + #SEARCH_ELASTIC_HOSTS=os.environ.get( + # 'SEARCH_ELASTIC_HOSTS', None), + SEARCH_ELASTIC_HOSTS=os.environ.get("SEARCH_ELASTIC_HOSTS", "elasticsearch"), SQLALCHEMY_TRACK_MODIFICATIONS=True, SQLALCHEMY_ECHO=False, TEST_USER_EMAIL='test_user@example.com', @@ -188,8 +189,9 @@ def base_app(instance_path, cache_config,request ,search_class): FlaskCeleryExt(app_) WekoSearchUI(app_) WekoSchemaUI(app_) - search = InvenioSearch(app_, client=MockEs()) - search.register_mappings(search_class.Meta.index, 'tests.mock_module.mappings') + #search = InvenioSearch(app_, client=MockEs()) + InvenioSearch(app_) + #search.register_mappings(search_class.Meta.index, 'tests.mock_module.mappings') InvenioIndexer(app_) InvenioRecords(app_, client=MockEs()) InvenioOAIServer(app_) @@ -285,6 +287,31 @@ def admin_db(admin_app): db_.session.remove() db_.drop_all() + +@pytest.fixture() +def esindex(app): + current_search_client.indices.delete(index="test-*") + with open("tests/data/item-v1.0.0.json","r") as f: + mapping = json.load(f) + + try: + current_search_client.indices.create( + app.config["INDEXER_DEFAULT_INDEX"], body=mapping + ) + current_search_client.indices.put_alias( + index=app.config["INDEXER_DEFAULT_INDEX"], name="test-weko" + ) + except: + current_search_client.indices.create("test-weko-items", body=mapping) + current_search_client.indices.put_alias( + index="test-weko-items", name="test-weko" + ) + + try: + yield current_search_client + finally: + current_search_client.indices.delete(index="test-*") + @pytest.fixture def script_info(app): return ScriptInfo(create_app=lambda info: app) @@ -439,7 +466,6 @@ def site_info(db): site_name=[{"name":"name11"}], notify={"name":"notify11"}, google_tracking_id_user="11", - addthis_user_id="12", ogp_image="/var/tmp/test_dir", ogp_image_name="test ogp image name1" ) @@ -755,6 +781,7 @@ def admin_settings(db): settings.append(AdminSettings(id=7,name="display_stats_settings",settings={"display_stats":False})) settings.append(AdminSettings(id=8,name='convert_pdf_settings',settings={"path":"/tmp/file","pdf_ttl":1800})) settings.append(AdminSettings(id=9,name="elastic_reindex_settings",settings={"has_errored": False})) + settings.append(AdminSettings(id=10,name="report_email_schedule_settings",settings={"details":"","enabled":False,"frequency":"daily"})) db.session.add_all(settings) db.session.commit() return settings diff --git a/modules/weko-admin/tests/data/item-v1.0.0.json b/modules/weko-admin/tests/data/item-v1.0.0.json new file mode 100644 index 0000000000..8c6dc68cac --- /dev/null +++ b/modules/weko-admin/tests/data/item-v1.0.0.json @@ -0,0 +1,1222 @@ +{ + "settings": { + "number_of_shards": 1, + "number_of_replicas": 1, + "index.mapping.total_fields.limit": 50000, + "analysis": { + "tokenizer": { + "ja_tokenizer": { + "type": "kuromoji_tokenizer", + "mode": "search" + }, + "ngram_tokenizer": { + "type": "nGram", + "min_gram": 1, + "max_gram": 3, + "token_chars": [ + "letter", + "digit" + ] + } + }, + "char_filter": { + "weko_char_filter": { + "type": "mapping", + "mappings_path": "kui.txt" + } + }, + "analyzer": { + "default": { + "tokenizer": "ngram_tokenizer", + "filter": [ + "kuromoji_baseform", + "kuromoji_part_of_speech", + "cjk_width", + "stop", + "kuromoji_stemmer", + "lowercase" + ], + "char_filter": [ + "weko_char_filter" + ] + }, + "ngram_analyzer": { + "type": "custom", + "char_filter": [ + "weko_char_filter", + "html_strip" + ], + "tokenizer": "ngram_tokenizer", + "filter": [ + "cjk_width", + "lowercase" + ] + }, + "wk_analyzer": { + "type": "custom", + "char_filter": [ + "html_strip" + ], + "tokenizer": "standard", + "filter": [ + "standard", + "lowercase", + "stop", + "cjk_width" + ] + }, + "paths": { + "tokenizer": "path_hierarchy" + } + } + } + }, + "mappings": { + "item-v1.0.0": { + "properties": { + "path": { + "type": "keyword", + "index": true, + "fields": { + "tree": { + "type": "text", + "fielddata": true, + "analyzer": "paths" + } + } + }, + "item_type_id": { + "type": "keyword", + "index": true + }, + "itemtype": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "fielddata": true, + "copy_to": [ + "search_other" + ] + }, + "publish_status": { + "type": "keyword", + "index": true + }, + "publish_date": { + "type": "date", + "format": "yyyy-MM-dd||yyyy-MM||yyyy" + }, + "_created": { + "type": "date" + }, + "_updated": { + "type": "date" + }, + "_oai": { + "type": "object", + "properties": { + "id": { + "type": "keyword", + "index": true + }, + "sets": { + "type": "keyword", + "index": true + }, + "updated": { + "type": "date" + } + } + }, + "control_number": { + "type": "keyword", + "index": true + }, + "title": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_title" + ] + }, + "feedback_mail_list": { + "type": "nested", + "properties": { + "author_id": { + "type": "keyword", + "index": true + }, + "email": { + "type": "keyword", + "index": true + } + } + }, + "alternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_title" + ] + }, + "creator": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "creatorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "familyName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "givenName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "creatorAlternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "affiliation": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "affiliationName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + } + } + }, + "contributor": { + "type": "object", + "properties": { + "@attributes": { + "type": "object", + "properties": { + "contributorType": { + "type": "keyword" + } + } + }, + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "contributorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "familyName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "givenName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "contributorAlternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "affiliation": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "affiliationName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + } + } + }, + "accessRights": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "apc": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "rights": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "rightsHolder": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "rightsHolderName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "subject": { + "type": "object", + "properties": { + "value": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "subjectScheme": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "description": { + "type": "object", + "properties": { + "value": { + "type": "keyword", + "ignore_above": 256, + "copy_to": [ + "search_des" + ] + }, + "descriptionType": { + "type": "keyword" + } + } + }, + "publisher": { + "type": "text", + "copy_to": [ + "search_publisher" + ] + }, + "date": { + "type": "nested", + "properties": { + "dateType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + }, + "value": { + "type": "keyword" + } + } + }, + "language": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "version": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "versionType": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "identifierRegistration": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "relation": { + "type": "object", + "properties": { + "relatedIdentifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "relatedTitle": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "relationType": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "index": true + }, + "item_links": { + "type": "keyword", + "index": true + }, + "item_title": { + "type": "keyword", + "index": true + } + } + } + } + }, + "temporal": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "text1": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text2": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text3": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text4": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text5": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text6": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text7": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text8": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text9": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text10": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text11": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text12": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text13": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text14": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text15": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text16": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text17": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text18": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text19": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text20": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text21": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text22": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text23": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text24": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text25": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text26": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text27": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text28": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text29": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text30": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "integer_range1":{ + "type": "integer_range" + }, + "integer_range2":{ + "type": "integer_range" + }, + "integer_range3":{ + "type": "integer_range" + }, + "integer_range4":{ + "type": "integer_range" + }, + "integer_range5":{ + "type": "integer_range" + }, + "float_range1":{ + "type": "float_range" + }, + "float_range2":{ + "type": "float_range" + }, + "float_range3":{ + "type": "float_range" + }, + "float_range4":{ + "type": "float_range" + }, + "float_range5":{ + "type": "float_range" + }, + "geo_point1":{ + "type": "geo_point" + }, + "date_range1":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range2":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range3":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range4":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range5":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + + "geo_shape1":{ + "type" : "geo_shape" + }, + "geoLocation": { + "type": "object", + "properties": { + "geoLocationPoint": { + "type": "object", + "properties": { + "pointLongitude": { + "type": "geo_point" + }, + "pointLatitude": { + "type": "geo_point" + } + } + }, + "geoLocationBox": { + "type": "object", + "properties": { + "westBoundLongitude": { + "type": "geo_point" + }, + "eastBoundLongitude": { + "type": "geo_point" + }, + "southBoundLatitude": { + "type": "geo_point" + }, + "northBoundLatitude": { + "type": "geo_point" + } + } + }, + "geoLocationPlace": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + } + } + }, + "fundingReference": { + "type": "object", + "properties": { + "funderIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "funderName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "awardNumber": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "awardTitle": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "sourceIdentifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "sourceTitle": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + }, + "copy_to": [ + "search_other" + ] + }, + "author_link": { + "type": "text", + "fields" : { + "raw" : { + "type" : "keyword", + "ignore_above" : 256 + } + } + }, + "volume": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "issue": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "numPages": { + "type": "text" + }, + "pageStart": { + "type": "text" + }, + "pageEnd": { + "type": "text" + }, + "dissertationNumber": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "degreeName": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + }, + "copy_to": [ + "search_other" + ] + }, + "dateGranted": { + "type": "keyword" + }, + "degreeGrantor": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "degreeGrantorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other", + "dgName" + ] + } + } + }, + "conference": { + "type": "object", + "properties": { + "conferenceName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferenceSequence": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferencePlace": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferenceCountry": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "file": { + "type": "object", + "properties": { + "URI": { + "type": "nested", + "properties": { + "value": { + "type": "text" + }, + "objectType": { + "type": "keyword", + "index": true + } + } + }, + "mimeType": { + "type": "keyword", + "index": true + }, + "extent": { + "type": "keyword", + "index": true + }, + "date": { + "type": "nested", + "properties": { + "dateType": { + "type": "keyword", + "index": true + }, + "value": { + "type": "keyword" + } + } + }, + "version": { + "type": "text" + } + } + }, + "content": { + "type": "nested", + "properties": { + "file_id": { + "type": "keyword", + "index": true + }, + "groups": { + "type": "keyword", + "index": true + }, + "file_name": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "display_name": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "license_notation": { + "type": "text" + }, + "file": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true, + "fields": { + "ja": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true + } + } + }, + "attachment": { + "properties": { + "content": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true, + "fields": { + "ja": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true + } + } + } + } + } + } + }, + "weko_creator_id": { + "type": "text", + "fielddata": true, + "index": true + }, + "weko_id": { + "type": "text", + "fielddata": true, + "index": true + }, + "search_title": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_creator": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_contributor": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_other": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_identifier": { + "type": "text" + }, + "search_attr": { + "type": "text" + }, + "search_string": { + "type": "text" + }, + "search_publisher": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_des": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "dgName": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + } + }, + "dynamic_templates": [ + { + "weko_id": { + "match_mapping_type": "string", + "match_pattern": "regex", + "match": "^weko_id$", + "mapping": { + "type": "text", + "fielddata": true, + "index": false, + "copy_to": "weko_id" + } + } + }, + { + "string": { + "match_mapping_type": "string", + "mapping": { + "type": "text", + "index": false, + "copy_to": "search_string", + "fields": { + "raw": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + { + "date_string": { + "match_mapping_type": "date", + "mapping": { + "type": "text", + "index": false, + "copy_to": "search_string", + "fields": { + "raw": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + } + ] + } + } + } + \ No newline at end of file diff --git a/modules/weko-admin/tests/test_admin.py b/modules/weko-admin/tests/test_admin.py index 502418217a..88a4c50cec 100644 --- a/modules/weko-admin/tests/test_admin.py +++ b/modules/weko-admin/tests/test_admin.py @@ -1,6 +1,7 @@ import os from os.path import dirname, join +import uuid from flask import url_for,current_app,make_response from flask_admin import Admin from mock import patch @@ -21,6 +22,7 @@ from invenio_accounts.testutils import login_user_via_session, create_test_user from invenio_access.models import ActionUsers from invenio_communities.models import Community +from invenio_search import current_search_client from weko_index_tree.models import IndexStyle,Index from weko_admin.admin import StyleSettingView,LogAnalysisSettings,ItemExportSettingsView,IdentifierSettingView,\ @@ -179,44 +181,110 @@ def test_cmp_files(self,app,client,mocker): class TestReportView: # def index(self): # .tox/c1/bin/pytest --cov=weko_admin tests/test_admin.py::TestReportView::test_index -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-admin/.tox/c1/tmp - def test_index(self,client,indexes,users,admin_settings,statistic_email_addrs,mocker): + def test_index(self,client,db,users,admin_settings,statistic_email_addrs,esindex,mocker): login_user_via_session(client,email=users[0]["email"]) url = url_for("report.index") - agg={ - "took": 274, - "timed_out": False, - "_shards": { - "total": 1, - "successful": 1, - "skipped": 0, - "failed": 0 - }, - "hits": { - "total": 2, - "max_score": 0.0, - "hits": [ - ] - }, - "aggregations": { - "aggs_public": { - "doc_count": 1 - } + + def make_index(id, parent, position, index_name, index_name_english,public_state,public_date): + return Index( + id=id, + parent=parent,position=position, + index_name=index_name,index_name_english=index_name_english, + public_state=public_state,public_date=public_date + ) + def create_record(recid, item_title, pubdate, publish_status, paths): + metadata = { + "item_1617186331708": {"attribute_name": "Title","attribute_value_mlt": [{"subitem_1551255647225": item_title,"subitem_1551255648112": "ja"}]}, + "item_1617258105262": {"attribute_name": "Resource Type","attribute_value_mlt": [{"resourcetype": "conference paper","resourceuri": "http://purl.org/coar/resource_type/c_5794"}]}, + "pubdate": {"attribute_name": "PubDate","attribute_value": pubdate}, + "item_title": item_title, + "item_type_id": "1", + "control_number": str(recid), + "author_link": [], + "_oai": {"id": "oai:weko3.example.org:{0:08}".format(recid),"sets": paths}, + "weko_shared_id": -1, + "owner": "1", + "publish_date": pubdate, + "title": [item_title], + "relation_version_is_last": True, + "path": paths, + "publish_status": publish_status } - } - mocker.patch("invenio_stats.utils.get_aggregations",return_value=agg) + es_data = { + "type":["conference paper"], + "title":metadata["title"], + "control_number":metadata["control_number"], + "_oai":metadata["_oai"], + "_item_metadata":metadata, + "itemtype":"", + "publish_date":metadata["publish_date"], + "path":paths, + "publish_status":publish_status, + "_created": "2024-01-17T05:37:57.652396+00:00", + "_updated": "2024-01-17T05:37:57.652396+00:00", + "feedback_mail_list":[], + "relation_version_is_last":True + } + + current_search_client.index( + index=current_app.config["INDEXER_DEFAULT_INDEX"], + doc_type="item-v1.0.0", + id=uuid.uuid4(), + body=es_data, + refresh="true" + ) + + # indexes is [] mock_render = mocker.patch("weko_admin.admin.ReportView.render",return_value=make_response()) - test = { - "total":2, - "open":1, - "private":1 - } client.get(url) args,kwargs = mock_render.call_args + test = {"total":0,"open":0,"private":0} assert args[0] == "weko_admin/admin/report.html" assert kwargs["result"] == test assert [email.email_address for email in kwargs["emails"]] == ["test.taro@test.org"] - assert kwargs["current_schedule"] == {'frequency': 'daily', 'details': '', 'enabled': False} + assert kwargs["current_schedule"] == {"details":"","enabled":False,"frequency":"daily"} + with db.session.begin_nested(): + db.session.add(make_index(1,0,0,'公開','publish',True,None)) + db.session.add(make_index(11,1,0,'公開_公開','publish',True,None)) + db.session.add(make_index(12,1,1,'公開_未公開','publish_notpublish',False,None)) + db.session.add(make_index(13,1,2,'公開_未来公開','publish_feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.add(make_index(2,0,1,'非公開','notpublish',False,None)) + db.session.add(make_index(21,2,0,'非公開_公開','notpublish_publish',True,None)) + db.session.add(make_index(22,2,1,'非公開_非公開','notpublish_notpublish',False,None)) + db.session.add(make_index(23,2,2,'非公開_未来公開','notpublish_feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.add(make_index(3,0,2,'未来公開','feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.add(make_index(31,3,0,'未来公開_公開','feature_publish',True,None)) + db.session.add(make_index(32,3,1,'未来公開_非公開','feature_notpublish',False,None)) + db.session.add(make_index(33,3,2,'未来公開_未来公開','feature_feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.commit() + + + create_record(1,"公開インデックス下公開アイテム","2024-01-12","0",["1"]) + create_record(2,"公開インデックス下非公開アイテム","2024-01-12","1",["1"]) + create_record(3,"公開インデックス下未来公開アイテム","2100-01-12","0",["1"]) + create_record(4,"非公開インデックス下公開アイテム","2024-01-12","0",["2"]) + create_record(5,"非公開インデックス下非公開アイテム","2024-01-12","1",["2"]) + create_record(6,"非公開インデックス下未来公開アイテム","2100-01-12","0",["2"]) + create_record(7,"未来公開インデックス下公開アイテム","2024-01-12","0",["3"]) + create_record(8,"未来公開インデックス下非公開アイテム","2024-01-12","1",["3"]) + create_record(9,"未来公開インデックス下未来公開アイテム","2100-01-12","0",["3"]) + create_record(10,"非公開_公開インデックス下公開アイテム","2024-01-12","0",["21"]) + create_record(11,"非公開_未来公開インデックス下公開アイテム","2024-01-12","0",["23"]) + create_record(12,"公開+非公開インデックス下公開アイテム","2024-01-12","0",["1", "2"]) + create_record(13,"非公開+未来公開インデックス下公開アイテム","2024-01-12","0",["2","3"]) + create_record(14,"非公開+非公開_公開インデックス下公開アイテム","2024-01-12","0",["2", "21"]) + + mock_render = mocker.patch("weko_admin.admin.ReportView.render",return_value=make_response()) + client.get(url) + args,kwargs = mock_render.call_args + test = {"total":14,"open":2,"private":12} + assert args[0] == "weko_admin/admin/report.html" + assert kwargs["result"] == test + assert [email.email_address for email in kwargs["emails"]] == ["test.taro@test.org"] + assert kwargs["current_schedule"] == {"details":"","enabled":False,"frequency":"daily"} + + # raise Error with patch("weko_index_tree.api.Indexes.get_public_indexes_list",return_value=[]): with patch("invenio_stats.utils.get_aggregations",return_value={}): with patch("weko_admin.admin.ReportView.render",side_effect=Exception("test_error")): diff --git a/modules/weko-admin/tests/test_models.py b/modules/weko-admin/tests/test_models.py index 25bf39dd9d..f3d97ec569 100644 --- a/modules/weko-admin/tests/test_models.py +++ b/modules/weko-admin/tests/test_models.py @@ -811,7 +811,7 @@ def test_update(self, app, site_info, mocker): {"notify_name":"test_notify2","language":"ja"} ], "copy_right":"new_copyright","description":"this is new description","keyword":"test new keyword","favicon":"test,favicon", - "favicon_name":"test favicon","google_tracking_id_user":"test_tracking","addthis_user_id":"test_addthis_user", + "favicon_name":"test favicon","google_tracking_id_user":"test_tracking", "ogp_image":"false" } SiteInfo.update(data) @@ -831,7 +831,7 @@ def test_update(self, app, site_info, mocker): {"notify_name":"test_notify2","language":"ja"} ], "copy_right":"new_copyright","description":"this is new description","keyword":"test new keyword","favicon":"test,favicon", - "favicon_name":"test favicon","google_tracking_id_user":"test_tracking","addthis_user_id":"test_addthis_user", + "favicon_name":"test favicon","google_tracking_id_user":"test_tracking", "ogp_image":"/var/tmp/new_dir", "ogp_image_name":"new ogp image name" } @@ -853,7 +853,7 @@ def test_update(self, app, site_info, mocker): {"notify_name":"new_notify2","language":"ja"} ], "copy_right":"new_copyright","description":"this is new description","keyword":"test new keyword","favicon":"test,favicon", - "favicon_name":"test favicon","google_tracking_id_user":"test_tracking","addthis_user_id":"test_addthis_user", + "favicon_name":"test favicon","google_tracking_id_user":"test_tracking", "ogp_image":"" } SiteInfo.update(data) diff --git a/modules/weko-admin/tests/test_utils.py b/modules/weko-admin/tests/test_utils.py index c3c10df4da..87d385d035 100644 --- a/modules/weko-admin/tests/test_utils.py +++ b/modules/weko-admin/tests/test_utils.py @@ -1428,7 +1428,6 @@ def test_validation_site_info(mocker): 'favicon_name': 'JAIRO Cloud icon', 'notify': [{'language': 'en', 'notify_name': ''}], 'google_tracking_id_user': 'test_tracking_id', - 'addthis_user_id': 'ra-5d8af23e9a3a2633', 'ogp_image': '', 'ogp_image_name': '', } @@ -1447,7 +1446,6 @@ def test_format_site_info_data(): ], 'copy_right': 'test copy right ', 'google_tracking_id_user': 'test_tracking_id', - 'addthis_user_id': 'ra-5d8af23e9a3a2633', 'keyword': 'test_keyword1\ntest_keyword2', 'description': 'this is test description', 'favicon_name': 'JAIRO Cloud icon', @@ -1468,7 +1466,6 @@ def test_format_site_info_data(): 'favicon_name': 'JAIRO Cloud icon', 'notify': [{'language': 'en', 'notify_name': ''}], 'google_tracking_id_user': 'test_tracking_id', - 'addthis_user_id': 'ra-5d8af23e9a3a2633', 'ogp_image': '', 'ogp_image_name': '', } @@ -2232,30 +2229,27 @@ def test_overwrite_the_memory_config_with_db(app,client,site_info): site_name=[{"name":"test_site_info"}], notify={"name":"test_notify"}, google_tracking_id_user="test_tracking_id1", - addthis_user_id="ra-5d8af23e9a3a2633_1", ) site_info_google2 = SiteInfo( site_name=[{"name":"test_site_info"}], notify={"name":"test_notify"}, google_tracking_id_user="test_tracking_id2", - addthis_user_id="ra-5d8af23e9a3a2633_2", ) app = Flask("test_weko_admin_app") # site_info is None overwrite_the_memory_config_with_db(app, None) - # site_info.google_tracking_id_user, addthis_user_id is not exist + # site_info.google_tracking_id_user is not exist overwrite_the_memory_config_with_db(app, site_info_not_google) - # GOOGLE_TRACKING_ID_USER, ADDTHIS_USER_ID is not exist + # GOOGLE_TRACKING_ID_USER is not exist overwrite_the_memory_config_with_db(app, site_info_google1) assert app.config["GOOGLE_TRACKING_ID_USER"] == "test_tracking_id1" - assert app.config["ADDTHIS_USER_ID"] == "ra-5d8af23e9a3a2633_1" overwrite_the_memory_config_with_db(app, site_info_google2) assert app.config["GOOGLE_TRACKING_ID_USER"] == "test_tracking_id2" - assert app.config["ADDTHIS_USER_ID"] == "ra-5d8af23e9a3a2633_2" + import json import pytest from flask import current_app, make_response, request, url_for diff --git a/modules/weko-admin/tests/test_views.py b/modules/weko-admin/tests/test_views.py index fa31f275bb..4310e3c4b8 100644 --- a/modules/weko-admin/tests/test_views.py +++ b/modules/weko-admin/tests/test_views.py @@ -650,16 +650,15 @@ def test_get_site_info(api,db,users,site_info,mocker): with patch("weko_admin.views.SiteInfo.get",return_value=None): res = api.get(url) assert res.status_code == 200 - assert response_data(res) == {"google_tracking_id_user":"test_google_tracking_id","addthis_user_id":"test_addthis_user_id"} + assert response_data(res) == {"google_tracking_id_user":"test_google_tracking_id"} current_app.config.pop("GOOGLE_TRACKING_ID_USER") - current_app.config.pop("ADDTHIS_USER_ID") res = api.get(url) assert res.status_code == 200 assert response_data(res) == {} current_app.config["GOOGLE_TRACKING_ID_USER"] = "test_tracking_id" - current_app.config["ADDTHIS_USER_ID"] = "ra-5d8af23e9a3a2633" + test = { "copy_right":"test_copy_right1", "description":"test site info1.", @@ -669,7 +668,6 @@ def test_get_site_info(api,db,users,site_info,mocker): "site_name":[{"name":"name11"}], "notify":{"name":"notify11"}, "google_tracking_id_user":"11", - "addthis_user_id":"12", "ogp_image":"http://test_server/api/admin/ogp_image", "ogp_image_name":"test ogp image name1" } @@ -686,7 +684,6 @@ def test_get_site_info(api,db,users,site_info,mocker): "site_name":{"name":"name21"}, "notify":{"name":"notify21"}, "google_tracking_id_user":None, - "addthis_user_id":None, } SiteInfo.query.delete() db.session.commit() @@ -697,7 +694,6 @@ def test_get_site_info(api,db,users,site_info,mocker): assert response_data(res) == test current_app.config.pop("GOOGLE_TRACKING_ID_USER") - current_app.config.pop("ADDTHIS_USER_ID") test = { "copy_right":"test_copy_right2", "description":"test site info2.", @@ -707,7 +703,6 @@ def test_get_site_info(api,db,users,site_info,mocker): "site_name":{"name":"name21"}, "notify":{"name":"notify21"}, "google_tracking_id_user":None, - "addthis_user_id":None, } res = api.get(url) assert response_data(res) == test diff --git a/modules/weko-admin/weko_admin/config.py b/modules/weko-admin/weko_admin/config.py index 7f773dd66d..8d4fb238ea 100644 --- a/modules/weko-admin/weko_admin/config.py +++ b/modules/weko-admin/weko_admin/config.py @@ -477,7 +477,7 @@ 'mappingFlg': False, 'mappingName': ''}, - {'id': 'id', 'contents': '', 'contents_value': {'en': 'ID', 'ja': 'ID'}, 'useable_status': True, 'mapping': ['identifier', 'URI', 'fullTextURL', 'selfDOI', 'ISBN', 'ISSN', 'NCID', 'pmid', 'doi', 'NAID', 'ichushi'], + {'id': 'id', 'contents': '', 'contents_value': {'en': 'ID', 'ja': 'ID'}, 'useable_status': True, 'mapping': ['identifier', 'URI', 'fullTextURL', 'selfDOI', 'ISBN', 'ISSN', 'NCID', 'PMID', 'DOI', 'NAID', 'ICHUSHI'], 'sche_or_attr':[{'id': 'identifier', 'contents': 'identifier', 'checkStus': False}, {'id': 'URI', 'contents': 'URI', 'checkStus': False}, {'id': 'fullTextURL', @@ -487,10 +487,10 @@ {'id': 'ISBN', 'contents': 'ISBN', 'checkStus': False}, {'id': 'ISSN', 'contents': 'ISSN', 'checkStus': False}, {'id': 'NCID', 'contents': 'NCID', 'checkStus': False}, - {'id': 'pmid', 'contents': 'pmid', 'checkStus': False}, - {'id': 'doi', 'contents': 'doi', 'checkStus': False}, + {'id': 'PMID', 'contents': 'PMID', 'checkStus': False}, + {'id': 'DOI', 'contents': 'DOI', 'checkStus': False}, {'id': 'NAID', 'contents': 'NAID', 'checkStus': False}, - {'id': 'ichushi', 'contents': 'ichushi', 'checkStus': False}, + {'id': 'ICHUSHI', 'contents': 'ICHUSHI', 'checkStus': False}, ], 'default_display': True, 'inputType': 'text', 'inputVal': '', 'mappingFlg': True, 'mappingName': 'id_attr'}, @@ -615,11 +615,14 @@ {'id': 'version', 'contents': '', 'contents_value': {'en': 'Author Version Flag', 'ja': '著者版フラグ'}, 'useable_status': True, 'mapping': [], 'options':[ - {'id': 'accepted', 'contents': 'accepted'}, - {'id': 'published', 'contents': 'published'}, - {'id': 'draft', 'contents': 'draft'}, - {'id': 'submitted', 'contents': 'submitted'}, - {'id': 'updated', 'contents': 'updated'} + {'id': 'AO', 'contents': 'AO'}, + {'id': 'SMUR', 'contents': 'SMUR'}, + {'id': 'AM', 'contents': 'AM'}, + {'id': 'P', 'contents': 'P'}, + {'id': 'VoR', 'contents': 'VoR'}, + {'id': 'CVoR', 'contents': 'CVoR'}, + {'id': 'EVoR', 'contents': 'EVoR'}, + {'id': 'NA', 'contents': 'NA'} ], 'default_display': True, 'inputType': 'selectbox', 'inputVal': '', 'mappingFlg': False, 'mappingName': ''}, {'id': 'dissno', 'contents': '', diff --git a/modules/weko-admin/weko_admin/models.py b/modules/weko-admin/weko_admin/models.py index fbaac1d6a0..b524b9bba4 100644 --- a/modules/weko-admin/weko_admin/models.py +++ b/modules/weko-admin/weko_admin/models.py @@ -270,7 +270,7 @@ class AdminLangSettings(db.Model): __tablename__ = 'admin_lang_settings' - lang_code = db.Column(db.String(3), primary_key=True, nullable=False, + lang_code = db.Column(db.String(5), primary_key=True, nullable=False, unique=True) lang_name = db.Column(db.String(30), nullable=False) @@ -1330,12 +1330,6 @@ class SiteInfo(db.Model): ) """tracking id.""" - addthis_user_id = db.Column( - db.Text, - nullable=True - ) - """add this id.""" - ogp_image = db.Column( db.Text, nullable=True @@ -1404,8 +1398,6 @@ def update(cls, site_info): query_object.notify = notify query_object.google_tracking_id_user = escape(site_info.get( "google_tracking_id_user").strip()) - query_object.addthis_user_id = escape(site_info.get( - "addthis_user_id").strip()) ogp_image_data = site_info.get("ogp_image").strip() if ogp_image_data and request.url_root not in ogp_image_data: url_ogp_image = update_ogp_image(ogp_image_data, diff --git a/modules/weko-admin/weko_admin/static/js/weko_admin/site_info.js b/modules/weko-admin/weko_admin/static/js/weko_admin/site_info.js index b82e015588..83c7476f91 100644 --- a/modules/weko-admin/weko_admin/static/js/weko_admin/site_info.js +++ b/modules/weko-admin/weko_admin/static/js/weko_admin/site_info.js @@ -29,7 +29,6 @@ const select_icon_file_label = document.getElementById("select_icon_file_label") const select_file_name_label = document.getElementById("select_file_name_label").value; const success_mess = document.getElementById("success_mess").value; const google_tracking_id_user_label = document.getElementById("google_tracking_id_user_label").value; -const addthis_user_id_label = document.getElementById("addthis_user_id_label").value; const ogp_image_label = document.getElementById("ogp_image_label").value; const lang_code_ja = 'ja' class MainLayout extends React.Component { @@ -45,7 +44,6 @@ class MainLayout extends React.Component { favicon_name: "", favicon: "", google_tracking_id_user: "", - addthis_user_id: "", ogp_image: "", ogp_image_name: "", notify: [], @@ -188,7 +186,7 @@ class MainLayout extends React.Component { } handleSave() { - const { site_name, copy_right, keyword, description, favicon_name, favicon, notify, google_tracking_id_user, addthis_user_id, ogp_image, ogp_image_name } = this.state + const { site_name, copy_right, keyword, description, favicon_name, favicon, notify, google_tracking_id_user, ogp_image, ogp_image_name } = this.state const validate = this.handleValidation() console.log("validate", validate) if (validate.status) { @@ -210,7 +208,6 @@ class MainLayout extends React.Component { site_name: new_site_name, copy_right: copy_right, google_tracking_id_user: google_tracking_id_user, - addthis_user_id: addthis_user_id, keyword: keyword, description: description, favicon_name: favicon_name, @@ -425,7 +422,7 @@ class MainLayout extends React.Component { }) } render() { - const {errors,site_name,list_lang_register,copy_right,description,keyword, favicon,favicon_name,success, show_alert, list_error, notify, google_tracking_id_user, addthis_user_id, ogp_image, ogp_image_name} = this.state + const {errors,site_name,list_lang_register,copy_right,description,keyword, favicon,favicon_name,success, show_alert, list_error, notify, google_tracking_id_user, ogp_image, ogp_image_name} = this.state return (
    { @@ -601,22 +598,6 @@ class MainLayout extends React.Component {
    -
    -
    - -
    -
    - { - this.handleChange('addthis_user_id', e.target.value) - }} - /> -
    -
    diff --git a/modules/weko-admin/weko_admin/templates/weko_admin/admin/site_info.html b/modules/weko-admin/weko_admin/templates/weko_admin/admin/site_info.html index 237b11aac5..f1506d9876 100644 --- a/modules/weko-admin/weko_admin/templates/weko_admin/admin/site_info.html +++ b/modules/weko-admin/weko_admin/templates/weko_admin/admin/site_info.html @@ -64,6 +64,5 @@ - {%- endblock body %} diff --git a/modules/weko-admin/weko_admin/utils.py b/modules/weko-admin/weko_admin/utils.py index ca6818d1dd..9e3a1edb5a 100644 --- a/modules/weko-admin/weko_admin/utils.py +++ b/modules/weko-admin/weko_admin/utils.py @@ -961,7 +961,7 @@ def build_mail_data_to_string(cls, data, system_default_language): result += '[閲覧回数] : ' + str( cls.convert_download_count_to_int( item['detail_view'])) + '\n' - result += '[ファイルダウンロード回数] : ' + file_down_str + result += '[ファイルダウンロード回数] : \n' + file_down_str else: result += '[Title] : ' + item['title'] + '\n' @@ -1612,7 +1612,6 @@ def format_site_info_data(site_info): result['notify'] = notify result['google_tracking_id_user'] = site_info.get( 'google_tracking_id_user') - result['addthis_user_id'] = site_info.get('addthis_user_id') result['ogp_image'] = site_info.get('ogp_image') result['ogp_image_name'] = site_info.get('ogp_image_name') return result @@ -2263,13 +2262,6 @@ def overwrite_the_memory_config_with_db(app, site_info): 'GOOGLE_TRACKING_ID_USER', site_info.google_tracking_id_user, ) - if site_info.addthis_user_id: - if 'ADDTHIS_USER_ID' in app.config: - del app.config['ADDTHIS_USER_ID'] - app.config.setdefault( - 'ADDTHIS_USER_ID', - site_info.addthis_user_id, - ) def elasticsearch_reindex( is_db_to_es ): """ diff --git a/modules/weko-admin/weko_admin/views.py b/modules/weko-admin/weko_admin/views.py index 7dcd4a1bc7..3a0596837c 100644 --- a/modules/weko-admin/weko_admin/views.py +++ b/modules/weko-admin/weko_admin/views.py @@ -566,10 +566,6 @@ def get_site_info(): 'GOOGLE_TRACKING_ID_USER'] except BaseException: pass - try: - result['addthis_user_id'] = current_app.config['ADDTHIS_USER_ID'] - except BaseException: - pass return jsonify(result) result['copy_right'] = site_info.copy_right @@ -580,7 +576,6 @@ def get_site_info(): result['site_name'] = site_info.site_name result['notify'] = site_info.notify result['google_tracking_id_user'] = site_info.google_tracking_id_user - result['addthis_user_id'] = site_info.addthis_user_id if site_info.ogp_image and site_info.ogp_image_name: ts = time.time() diff --git a/modules/weko-authors/requirements.txt b/modules/weko-authors/requirements.txt index 3432b222e5..4429200166 100644 --- a/modules/weko-authors/requirements.txt +++ b/modules/weko-authors/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-authors/requirements2.txt b/modules/weko-authors/requirements2.txt index 34c1ea2d51..2329bdc904 100644 --- a/modules/weko-authors/requirements2.txt +++ b/modules/weko-authors/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest>=4.2.0 pytest-mock==3.6.1 diff --git a/modules/weko-authors/tests/test_admin.py b/modules/weko-authors/tests/test_admin.py index 209168a5fc..d4570f38e8 100644 --- a/modules/weko-authors/tests/test_admin.py +++ b/modules/weko-authors/tests/test_admin.py @@ -1,5 +1,6 @@ # .tox/c1/bin/pytest --cov=weko_authors tests/test_admin.py -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-authors/.tox/c1/tmp +from datetime import datetime from flask import url_for,make_response,json from mock import patch import pytest @@ -290,20 +291,27 @@ def successful(self): def failed(self): return self.state == "FAILURE" + class MockFileInstance(): + def __init__(self,date): + self.updated_at = date + @property + def updated(self): + return self.updated_at + login_user_via_session(client=client, email=users[0]['email']) url = url_for('authors/export.check_status') current_cache.set("weko_authors_export_status",{"key":"authors_export_status","task_id":"test_task"}) current_cache.set("weko_authors_exported_url",{"key":"authors_exported_url","file_uri":"test_file.txt"}) mocker.patch("weko_authors.admin.export_all.AsyncResult",return_value=MockAsyncResult("test_id","SUCCESS","result")) res = client.get(url) - test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'key': 'authors_exported_url'}} + test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'filename': '', 'key': 'authors_exported_url'}} assert json.loads(res.data)==test # not task.result current_cache.set("weko_authors_export_status",{"key":"authors_export_status","task_id":"test_task"}) mocker.patch("weko_authors.admin.export_all.AsyncResult",return_value=MockAsyncResult("test_id","SUCCESS",{})) res = client.get(url) - test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'error': 'export_fail', 'key': 'authors_exported_url'}} + test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'error': 'export_fail', 'filename': '', 'key': 'authors_exported_url'}} assert json.loads(res.data)==test # not task is success,failed,revoked @@ -311,20 +319,29 @@ def failed(self): current_cache.set("weko_authors_exported_url",{"key":"authors_exported_url","file_uri":"test_file.txt"}) mocker.patch("weko_authors.admin.export_all.AsyncResult",return_value=MockAsyncResult("test_id","STARTED",{})) res = client.get(url) - test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'key': 'authors_export_status', "task_id": "test_task"}} + test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'filename': '', 'key': 'authors_export_status', "task_id": "test_task"}} assert json.loads(res.data) == test # not exist get_export_status current_cache.delete("weko_authors_export_status") current_cache.set("weko_authors_exported_url",{"key":"authors_exported_url","file_uri":"test_file.txt"}) res = client.get(url) - test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'key': 'authors_exported_url'}} + test = {'code': 200, 'data': {'download_link': 'http://app/admin/authors/export/download/Creator_export_all', 'filename': '', 'key': 'authors_exported_url'}} assert json.loads(res.data) == test # exist weko_authors_export_status,not exist weko_authors_export_status[task_id] current_cache.set("weko_authors_export_status",{"key":"authors_export_status"}) res = client.get(url) - test = {'code': 200, 'data': {'download_link': '', 'key': 'authors_export_status'}} + test = {'code': 200, 'data': {'download_link': '', 'filename': '', 'key': 'authors_export_status'}} + assert json.loads(res.data) == test + + # get file instance + mocker_get_by_uri = mocker.patch("weko_authors.admin.FileInstance.get_by_uri") + expected_date = datetime.now() + mocker_get_by_uri.return_value = MockFileInstance(expected_date) + res = client.get(url) + expected_filename = "Creator_export_all_" + expected_date.strftime("%Y%m%d%H%M") + ".tsv" + test = {'code': 200, 'data': {'download_link': '', 'filename': expected_filename, 'key': 'authors_export_status'}} assert json.loads(res.data) == test diff --git a/modules/weko-authors/weko_authors/admin.py b/modules/weko-authors/weko_authors/admin.py index d889fd49f3..729daba97d 100644 --- a/modules/weko-authors/weko_authors/admin.py +++ b/modules/weko-authors/weko_authors/admin.py @@ -107,8 +107,11 @@ def download(self): data = get_export_url() if data.get('file_uri'): file_instance = FileInstance.get_by_uri(data.get('file_uri')) - file_name = WEKO_AUTHORS_EXPORT_FILE_NAME + '.' + \ + file_name = "{}_{}.{}".format( + WEKO_AUTHORS_EXPORT_FILE_NAME, + file_instance.updated.strftime("%Y%m%d%H%M"), current_app.config.get('WEKO_ADMIN_OUTPUT_FORMAT', 'tsv').lower() + ) return file_instance.send_file( file_name, mimetype='application/octet-stream', @@ -138,6 +141,14 @@ def check_status(self): # set download_link status['download_link'] = url_for( 'authors/export.download', _external=True) + status['filename'] = '' + file_instance = FileInstance.get_by_uri(status.get('file_uri', '')) + if file_instance: + status['filename'] = "{}_{}.{}".format( + WEKO_AUTHORS_EXPORT_FILE_NAME, + file_instance.updated.strftime("%Y%m%d%H%M"), + current_app.config.get('WEKO_ADMIN_OUTPUT_FORMAT', 'tsv').lower() + ) if not status.get('file_uri'): status['download_link'] = '' if 'file_uri' in status: diff --git a/modules/weko-authors/weko_authors/static/js/weko_authors/app-author-export.chunk.js b/modules/weko-authors/weko_authors/static/js/weko_authors/app-author-export.chunk.js index be46847845..7210ba2d34 100644 --- a/modules/weko-authors/weko_authors/static/js/weko_authors/app-author-export.chunk.js +++ b/modules/weko-authors/weko_authors/static/js/weko_authors/app-author-export.chunk.js @@ -1,3 +1,3 @@ -/*! For license information please see 2.cccf5892.chunk.js.LICENSE.txt */ -(this["webpackJsonpapp-author-export"]=this["webpackJsonpapp-author-export"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(391)},function(e,t,n){var r=n(3),o=n(18).f,i=n(23),a=n(20),u=n(104),l=n(134),c=n(67);e.exports=function(e,t){var n,s,f,d,p,h=e.target,v=e.global,y=e.stat;if(n=v?r:y?r[h]||u(h,{}):(r[h]||{}).prototype)for(s in t){if(d=t[s],f=e.noTargetGet?(p=o(n,s))&&p.value:n[s],!c(v?s:h+(y?".":"#")+s,e.forced)&&void 0!==f){if(typeof d===typeof f)continue;l(d,f)}(e.sham||f&&f.sham)&&i(d,"sham",!0),a(n,s,d,e)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(131))},function(e,t,n){"use strict";e.exports=n(397)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(11),o=n(132),i=n(7),a=n(35),u=Object.defineProperty;t.f=r?u:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return u(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(22);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;tk;k++)if((p||k in x)&&(b=E(m=x[k],k,w),e))if(t)_[k]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return k;case 2:l.call(_,m)}else switch(e){case 4:return!1;case 7:l.call(_,m)}return f?-1:c||s?s:_}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(11),o=n(13),i=n(42);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(63),o=n(22);e.exports=function(e){return r(o(e))}},function(e,t,n){var r,o,i,a=n(133),u=n(3),l=n(6),c=n(23),s=n(16),f=n(106),d=n(81),p=n(65),h=u.WeakMap;if(a){var v=f.state||(f.state=new h),y=v.get,g=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},o=function(e){return y.call(v,e)||{}},i=function(e){return g.call(v,e)}}else{var b=d("state");p[b]=!0,r=function(e,t){return t.facade=e,c(e,b,t),t},o=function(e){return s(e,b)?e[b]:{}},i=function(e){return s(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(22),o=/"/g;e.exports=function(e,t,n,i){var a=String(r(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(i).replace(o,""")+'"'),u+">"+a+""}},function(e,t,n){var r=n(2);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);var o=function(e){var t=Object(r.useRef)(e);return Object(r.useEffect)((function(){t.current=e}),[e]),t};function i(e){var t=o(e);return Object(r.useCallback)((function(){return t.current&&t.current.apply(t,arguments)}),[t])}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(135),o=n(3),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(16),o=n(14),i=n(81),a=n(116),u=i("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,u)?e[u]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(33);function o(e,t){return function(e){var t=Object(r.a)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var i=/([A-Z])/g;var a=/^ms-/;function u(e){return function(e){return e.replace(i,"-$1").toLowerCase()}(e).replace(a,"-ms-")}var l=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;t.a=function(e,t){var n="",r="";if("string"===typeof t)return e.style.getPropertyValue(u(t))||o(e).getPropertyValue(u(t));Object.keys(t).forEach((function(o){var i=t[o];i||0===i?!function(e){return!(!e||!l.test(e))}(o)?n+=u(o)+": "+i+";":r+=o+"("+i+") ":e.style.removeProperty(u(o))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=!1},function(e,t,n){var r=n(13).f,o=n(16),i=n(9)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n(5);var r=n(0),o=n.n(r),i=o.a.createContext({});i.Consumer,i.Provider;function a(e,t){var n=Object(r.useContext)(i);return e||n[t]||t}},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(11),a=n(127),u=n(10),l=n(169),c=n(47),s=n(42),f=n(23),d=n(12),p=n(171),h=n(186),v=n(35),y=n(16),g=n(75),m=n(6),b=n(44),w=n(56),x=n(50).f,E=n(187),S=n(21).forEach,k=n(58),O=n(13),_=n(18),T=n(25),C=n(89),P=T.get,j=T.set,N=O.f,A=_.f,R=Math.round,L=o.RangeError,I=l.ArrayBuffer,M=l.DataView,F=u.NATIVE_ARRAY_BUFFER_VIEWS,U=u.TYPED_ARRAY_TAG,D=u.TypedArray,z=u.TypedArrayPrototype,B=u.aTypedArrayConstructor,V=u.isTypedArray,W="BYTES_PER_ELEMENT",H="Wrong length",$=function(e,t){for(var n=0,r=t.length,o=new(B(e))(r);r>n;)o[n]=t[n++];return o},q=function(e,t){N(e,t,{get:function(){return P(this)[t]}})},Q=function(e){var t;return e instanceof I||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},Y=function(e,t){return V(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},G=function(e,t){return Y(e,t=v(t,!0))?s(2,e[t]):A(e,t)},K=function(e,t,n){return!(Y(e,t=v(t,!0))&&m(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?N(e,t,n):(e[t]=n.value,e)};i?(F||(_.f=G,O.f=K,q(z,"buffer"),q(z,"byteOffset"),q(z,"byteLength"),q(z,"length")),r({target:"Object",stat:!0,forced:!F},{getOwnPropertyDescriptor:G,defineProperty:K}),e.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,u=e+(n?"Clamped":"")+"Array",l="get"+e,s="set"+e,v=o[u],y=v,g=y&&y.prototype,O={},_=function(e,t){N(e,t,{get:function(){return function(e,t){var n=P(e);return n.view[l](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=P(e);n&&(r=(r=R(r))<0?0:r>255?255:255&r),o.view[s](t*i+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};F?a&&(y=t((function(e,t,n,r){return c(e,y,u),C(m(t)?Q(t)?void 0!==r?new v(t,h(n,i),r):void 0!==n?new v(t,h(n,i)):new v(t):V(t)?$(y,t):E.call(y,t):new v(p(t)),e,y)})),w&&w(y,D),S(x(v),(function(e){e in y||f(y,e,v[e])})),y.prototype=g):(y=t((function(e,t,n,r){c(e,y,u);var o,a,l,s=0,f=0;if(m(t)){if(!Q(t))return V(t)?$(y,t):E.call(y,t);o=t,f=h(n,i);var v=t.byteLength;if(void 0===r){if(v%i)throw L(H);if((a=v-f)<0)throw L(H)}else if((a=d(r)*i)+f>v)throw L(H);l=a/i}else l=p(t),o=new I(a=l*i);for(j(e,{buffer:o,byteOffset:f,byteLength:a,length:l,view:new M(o)});s"+e+""},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}h=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):function(){var e,t=c("iframe");return t.style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F}();for(var e=a.length;e--;)delete h.prototype[a[e]];return h()};u[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=o(e),n=new d,d.prototype=null,n[f]=e):n=h(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(30);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(9),o=n(44),i=n(13),a=r("unscopables"),u=Array.prototype;void 0==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),e.exports=function(e){u[a][e]=!0}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";t.a=!("undefined"===typeof window||!window.document||!window.document.createElement)},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(392)},function(e,t,n){var r=n(136),o=n(109).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(29),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){"use strict";var r=n(35),o=n(13),i=n(42);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r=n(65),o=n(6),i=n(16),a=n(13).f,u=n(64),l=n(76),c=u("meta"),s=0,f=Object.isExtensible||function(){return!0},d=function(e){a(e,c,{value:{objectID:"O"+ ++s,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,c)){if(!f(e))return"F";if(!t)return"E";d(e)}return e[c].objectID},getWeakData:function(e,t){if(!i(e,c)){if(!f(e))return!0;if(!t)return!1;d(e)}return e[c].weakData},onFreeze:function(e){return l&&p.REQUIRED&&f(e)&&!i(e,c)&&d(e),e}};r[c]=!0},function(e,t,n){var r=n(7),o=n(30),i=n(9)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(7),o=n(164);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){var r=n(43),o=n(3);e.exports="process"==r(o.process)},function(e,t,n){"use strict";var r=n(31),o=n(13),i=n(9),a=n(11),u=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[u]&&n(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(22),o="["+n(91)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),u=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},function(e,t,n){"use strict";var r=n(97),o=n(78);t.a=function(e,t,n,i){return Object(r.a)(e,t,n,i),function(){Object(o.a)(e,t,n,i)}}},function(e,t,n){"use strict";var r=n(5),o=n(15),i=n(17),a=n.n(i),u=n(0),l=n.n(u);function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(8);var s=n(49),f=n.n(s),d=!1,p=l.a.createContext(null),h="unmounted",v="exited",y="entering",g="entered",m="exiting",b=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=v,r.appearStatus=y):o=g:o=t.unmountOnExit||t.mountOnEnter?h:v,r.state={status:o},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===h?{status:v}:null};var o=r.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==y&&n!==g&&(t=y):n!==y&&n!==g||(t=m)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===y?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===v&&this.setState({status:h})},o.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[f.a.findDOMNode(this),r],i=o[0],a=o[1],u=this.getTimeouts(),l=r?u.appear:u.enter;!e&&!n||d?this.safeSetState({status:g},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:y},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:g},(function(){t.props.onEntered(i,a)}))}))})))},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:f.a.findDOMNode(this);t&&!d?(this.props.onExit(r),this.safeSetState({status:m},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:v},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:v},(function(){e.props.onExited(r)}))},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:f.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===h)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l.a.createElement(p.Provider,{value:null},"function"===typeof n?n(e,r):l.a.cloneElement(l.a.Children.only(n),r))},r}(l.a.Component);function w(){}b.contextType=p,b.propTypes={},b.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:w,onEntering:w,onEntered:w,onExit:w,onExiting:w,onExited:w},b.UNMOUNTED=h,b.EXITED=v,b.ENTERING=y,b.ENTERED=g,b.EXITING=m;var x=b,E=n(34),S=n(101);function k(e,t){var n=Object(E.a)(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function O(e,t){var n=k(e,"transitionDuration"),r=k(e,"transitionDelay"),o=Object(S.a)(e,(function(n){n.target===e&&(o(),t(n))}),n+r)}var _,T=["className","children"],C=((_={}).entering="show",_.entered="show",_),P=l.a.forwardRef((function(e,t){var n=e.className,i=e.children,c=Object(o.a)(e,T),s=Object(u.useCallback)((function(e){!function(e){e.offsetHeight}(e),c.onEnter&&c.onEnter(e)}),[c]);return l.a.createElement(x,Object(r.a)({ref:t,addEndListener:O},c,{onEnter:s}),(function(e,t){return l.a.cloneElement(i,Object(r.a)({},t,{className:a()("fade",n,i.props.className,C[e])}))}))}));P.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},P.displayName="Fade";t.a=P},function(e,t,n){var r=n(2),o=n(43),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t){e.exports={}},function(e,t,n){var r=n(24),o=n(12),i=n(51),a=function(e){return function(t,n,a){var u,l=r(t),c=o(l.length),s=i(a,c);if(e&&n!=n){for(;c>s;)if((u=l[s++])!=u)return!0}else for(;c>s;s++)if((e||s in l)&&l[s]===n)return e||s||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(2),o=/#|\.prototype\./,i=function(e,t){var n=u[a(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},u=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(43);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(136),o=n(109);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(6),o=n(68),i=n(9)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(2),o=n(9),i=n(72),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r,o,i=n(3),a=n(82),u=i.process,l=u&&u.versions,c=l&&l.v8;c?o=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t){e.exports={}},function(e,t,n){var r=n(75),o=n(73),i=n(9)("iterator");e.exports=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(113),o=n(43),i=n(9)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(2);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(7),o=n(112),i=n(12),a=n(45),u=n(74),l=n(158),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var s,f,d,p,h,v,y,g=n&&n.that,m=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),w=!(!n||!n.INTERRUPTED),x=a(t,g,1+m+w),E=function(e){return s&&l(s),new c(!0,e)},S=function(e){return m?(r(e),w?x(e[0],e[1],E):x(e[0],e[1])):w?x(e,E):x(e)};if(b)s=e;else{if("function"!=typeof(f=u(e)))throw TypeError("Target is not iterable");if(o(f)){for(d=0,p=i(e.length);p>d;d++)if((h=S(e[d]))&&h instanceof c)return h;return new c(!1)}s=f.call(e)}for(v=s.next;!(y=v.call(s)).done;){try{h=S(y.value)}catch(k){throw l(s),k}if("object"==typeof h&&h&&h instanceof c)return h}return new c(!1)}},function(e,t,n){"use strict";t.a=function(e,t,n,r){var o=r&&"boolean"!==typeof r?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function u(e){r(a,o,i,u,l,"next",e)}function l(e){r(a,o,i,u,l,"throw",e)}u(void 0)}))}}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(107),o=n(64),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var r=n(31);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(9)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(u){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(u){}return n}},function(e,t,n){var r=n(29),o=n(22),i=function(e){return function(t,n){var i,a,u=String(o(t)),l=r(n),c=u.length;return l<0||l>=c?e?"":void 0:(i=u.charCodeAt(l))<55296||i>56319||l+1===c||(a=u.charCodeAt(l+1))<56320||a>57343?e?u.charAt(l):i:e?u.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,u,l=a(e),c=1;c=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){var r=n(30),o=n(14),i=n(63),a=n(12),u=function(e){return function(t,n,u,l){r(n);var c=o(t),s=i(c),f=a(c.length),d=e?f-1:0,p=e?-1:1;if(u<2)for(;;){if(d in s){l=s[d],d+=p;break}if(d+=p,e?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;e?d>=0:f>d;d+=p)d in s&&(l=n(l,s[d],d,c));return l}};e.exports={left:u(!1),right:u(!0)}},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(67),a=n(20),u=n(54),l=n(77),c=n(47),s=n(6),f=n(2),d=n(83),p=n(37),h=n(89);e.exports=function(e,t,n){var v=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),g=v?"set":"add",m=o[e],b=m&&m.prototype,w=m,x={},E=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!s(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!s(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!s(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof m||!(y||b.forEach&&!f((function(){(new m).entries().next()})))))w=n.getConstructor(t,e,v,g),u.REQUIRED=!0;else if(i(e,!0)){var S=new w,k=S[g](y?{}:-0,1)!=S,O=f((function(){S.has(1)})),_=d((function(e){new m(e)})),T=!y&&f((function(){for(var e=new m,t=5;t--;)e[g](t,t);return!e.has(-0)}));_||((w=t((function(t,n){c(t,w,e);var r=h(new m,t,w);return void 0!=n&&l(n,r[g],{that:r,AS_ENTRIES:v}),r}))).prototype=b,b.constructor=w),(O||T)&&(E("delete"),E("has"),v&&E("get")),(T||k)&&E(g),y&&b.clear&&delete b.clear}return x[e]=w,r({global:!0,forced:w!=m},x),p(w,e),y||n.setStrong(w,e,v),w}},function(e,t,n){var r=n(6),o=n(56);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},function(e,t){var n=Math.expm1,r=Math.exp;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:n},function(e,t){e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(36),o=n(3),i=n(2);e.exports=r||!i((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete o[e]}))},function(e,t,n){"use strict";var r=n(7);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(93),o=n(122),i=RegExp.prototype.exec,a=String.prototype.replace,u=i,l=function(){var e=/a/,t=/b*/g;return i.call(e,"a"),i.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),c=o.UNSUPPORTED_Y||o.BROKEN_CARET,s=void 0!==/()??/.exec("")[1];(l||s||c)&&(u=function(e){var t,n,o,u,f=this,d=c&&f.sticky,p=r.call(f),h=f.source,v=0,y=e;return d&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),y=String(e).slice(f.lastIndex),f.lastIndex>0&&(!f.multiline||f.multiline&&"\n"!==e[f.lastIndex-1])&&(h="(?: "+h+")",y=" "+y,v++),n=new RegExp("^(?:"+h+")",p)),s&&(n=new RegExp("^"+h+"$(?!\\s)",p)),l&&(t=f.lastIndex),o=i.call(d?n:f,y),d?o?(o.input=o.input.slice(v),o[0]=o[0].slice(v),o.index=f.lastIndex,f.lastIndex+=o[0].length):f.lastIndex=0:l&&o&&(f.lastIndex=f.global?o.index+o[0].length:t),s&&o&&o.length>1&&a.call(o[0],n,(function(){for(u=1;u")})),s="$0"==="a".replace(/./,"$0"),f=i("replace"),d=!!/./[f]&&""===/./[f]("a","$0"),p=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=i(e),v=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),y=v&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!v||!y||"replace"===e&&(!c||!s||d)||"split"===e&&!p){var g=/./[h],m=n(h,""[e],(function(e,t,n,r,o){return t.exec===a?v&&!o?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:s,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),b=m[0],w=m[1];r(String.prototype,e,b),r(RegExp.prototype,h,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}f&&u(RegExp.prototype[h],"sham",!0)}},function(e,t,n){var r=n(43),o=n(94);e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var i=n.call(e,t);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";var r=n(48),o=!1,i=!1;try{var a={get passive(){return o=!0},get once(){return i=o=!0}};r.a&&(window.addEventListener("test",a,a),window.removeEventListener("test",a,!0))}catch(u){}t.a=function(e,t,n,r){if(r&&"boolean"!==typeof r&&!i){var a=r.once,u=r.capture,l=n;!i&&a&&(l=n.__once||function e(r){this.removeEventListener(t,e,u),n.call(this,r)},n.__once=l),e.addEventListener(t,l,o?r:u)}e.addEventListener(t,n,r)}},function(e,t,n){"use strict";var r=n(5),o=n(15),i=n(8),a=n.n(i),u=n(0),l=n.n(u),c=n(17),s=n.n(c),f=["label","onClick","className"],d={label:a.a.string.isRequired,onClick:a.a.func},p=l.a.forwardRef((function(e,t){var n=e.label,i=e.onClick,a=e.className,u=Object(o.a)(e,f);return l.a.createElement("button",Object(r.a)({ref:t,type:"button",className:s()("close",a),onClick:i},u),l.a.createElement("span",{"aria-hidden":"true"},"\xd7"),l.a.createElement("span",{className:"sr-only"},n))}));p.displayName="CloseButton",p.propTypes=d,p.defaultProps={label:"Close"},t.a=p},function(e,t,n){"use strict";var r=n(5),o=n(0),i=n.n(o),a=n(17),u=n.n(a);t.a=function(e){return i.a.forwardRef((function(t,n){return i.a.createElement("div",Object(r.a)({},t,{ref:n,className:u()(t.className,e)}))}))}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(34),o=n(61);function i(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}(e,"transitionend",!0)}),t+n),a=Object(o.a)(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),a()}}function a(e,t,n,a){null==n&&(n=function(e){var t=Object(r.a)(e,"transitionDuration")||"",n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}(e)||0);var u=i(e,n,a),l=Object(o.a)(e,"transitionend",t);return function(){u(),l()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e){var t=function(e){var t=Object(r.useRef)(e);return t.current=e,t}(e);Object(r.useEffect)((function(){return function(){return t.current()}}),[])}},function(e,t,n){var r=n(3),o=n(6),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(3),o=n(23);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(106),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(3),o=n(104),i="__core-js_shared__",a=r[i]||o(i,{});e.exports=a},function(e,t,n){var r=n(36),o=n(106);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.0",mode:r?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(31),o=n(50),i=n(110),a=n(7);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(2);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(9),o=n(73),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r={};r[n(9)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){"use strict";var r=n(84).charAt,o=n(25),i=n(115),a="String Iterator",u=o.set,l=o.getterFor(a);i(String,"String",(function(e){u(this,{type:a,string:String(e),index:0})}),(function(){var e,t=l(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(1),o=n(162),i=n(32),a=n(56),u=n(37),l=n(23),c=n(20),s=n(9),f=n(36),d=n(73),p=n(163),h=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,y=s("iterator"),g="keys",m="values",b="entries",w=function(){return this};e.exports=function(e,t,n,s,p,x,E){o(n,t,s);var S,k,O,_=function(e){if(e===p&&N)return N;if(!v&&e in P)return P[e];switch(e){case g:case m:case b:return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",C=!1,P=e.prototype,j=P[y]||P["@@iterator"]||p&&P[p],N=!v&&j||_(p),A="Array"==t&&P.entries||j;if(A&&(S=i(A.call(new e)),h!==Object.prototype&&S.next&&(f||i(S)===h||(a?a(S,h):"function"!=typeof S[y]&&l(S,y,w)),u(S,T,!0,!0),f&&(d[T]=w))),p==m&&j&&j.name!==m&&(C=!0,N=function(){return j.call(this)}),f&&!E||P[y]===N||l(P,y,N),d[t]=N,p)if(k={values:_(m),keys:x?N:_(g),entries:_(b)},E)for(O in k)(v||C||!(O in P))&&c(P,O,k[O]);else r({target:t,proto:!0,forced:v||C},k);return k}},function(e,t,n){var r=n(2);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(14),o=n(51),i=n(12);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);c>u;)t[u++]=e;return t}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var r=n(29),o=n(22);e.exports="".repeat||function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){var r,o,i,a=n(3),u=n(2),l=n(45),c=n(139),s=n(103),f=n(179),d=n(57),p=a.location,h=a.setImmediate,v=a.clearImmediate,y=a.process,g=a.MessageChannel,m=a.Dispatch,b=0,w={},x="onreadystatechange",E=function(e){if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},S=function(e){return function(){E(e)}},k=function(e){E(e.data)},O=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};h&&v||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return w[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},v=function(e){delete w[e]},d?r=function(e){y.nextTick(S(e))}:m&&m.now?r=function(e){m.now(S(e))}:g&&!f?(i=(o=new g).port2,o.port1.onmessage=k,r=l(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&p&&"file:"!==p.protocol&&!u(O)?(r=O,a.addEventListener("message",k,!1)):r=x in s("script")?function(e){c.appendChild(s("script")).onreadystatechange=function(){c.removeChild(this),E(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:h,clear:v}},function(e,t,n){var r=n(6),o=n(43),i=n(9)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){"use strict";var r=n(2);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r=n(121);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(9)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(o){}}return!1}},function(e,t,n){"use strict";var r=n(84).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(2),o=n(91);e.exports=function(e){return r((function(){return!!o[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||o[e].name!==e}))}},function(e,t,n){var r=n(3),o=n(2),i=n(83),a=n(10).NATIVE_ARRAY_BUFFER_VIEWS,u=r.ArrayBuffer,l=r.Int8Array;e.exports=!a||!o((function(){l(1)}))||!o((function(){new l(-1)}))||!i((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||o((function(){return 1!==new l(new u(2),1,void 0).length}))},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,u){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],s=0;(l=new Error(t.replace(/%s/g,(function(){return c[s++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;ti;)o.push(arguments[i++]);if(r=t,(p(t)||void 0!==e)&&!ae(e))return d(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ae(t))return t}),o[1]=t,q.apply(null,o)}});$.prototype[B]||T($.prototype,B,$.prototype.valueOf),M($,z),N[D]=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(11),o=n(2),i=n(103);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(3),o=n(105),i=r.WeakMap;e.exports="function"===typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(16),o=n(108),i=n(18),a=n(13);e.exports=function(e,t){for(var n=o(t),u=a.f,l=i.f,c=0;cl;)r(u,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(111);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(11),o=n(13),i=n(7),a=n(69);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),u=r.length,l=0;u>l;)o.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(31);e.exports=r("document","documentElement")},function(e,t,n){var r=n(24),o=n(50).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(t){return a.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(9);t.f=r},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(3),a=n(16),u=n(6),l=n(13).f,c=n(134),s=i.Symbol;if(o&&"function"==typeof s&&(!("description"in s.prototype)||void 0!==s().description)){var f={},d=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof d?new s(e):void 0===e?s():s(e);return""===e&&(f[t]=!0),t};c(d,s);var p=d.prototype=s.prototype;p.constructor=d;var h=p.toString,v="Symbol(test)"==String(s("test")),y=/^Symbol\((.*)\)[^)]+$/;l(p,"description",{configurable:!0,get:function(){var e=u(this)?this.valueOf():this,t=h.call(e);if(a(f,e))return"";var n=v?t.slice(7,-1):t.replace(y,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},function(e,t,n){n(19)("asyncIterator")},function(e,t,n){n(19)("hasInstance")},function(e,t,n){n(19)("isConcatSpreadable")},function(e,t,n){n(19)("iterator")},function(e,t,n){n(19)("match")},function(e,t,n){n(19)("replace")},function(e,t,n){n(19)("search")},function(e,t,n){n(19)("species")},function(e,t,n){n(19)("split")},function(e,t,n){n(19)("toPrimitive")},function(e,t,n){n(19)("toStringTag")},function(e,t,n){n(19)("unscopables")},function(e,t,n){"use strict";var r=n(1),o=n(2),i=n(68),a=n(6),u=n(14),l=n(12),c=n(52),s=n(70),f=n(71),d=n(9),p=n(72),h=d("isConcatSpreadable"),v=9007199254740991,y="Maximum allowed index exceeded",g=p>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),m=f("concat"),b=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!g||!m},{concat:function(e){var t,n,r,o,i,a=u(this),f=s(a,0),d=0;for(t=-1,r=arguments.length;tv)throw TypeError(y);for(n=0;n=v)throw TypeError(y);c(f,d++,i)}return f.length=d,f}})},function(e,t,n){var r=n(1),o=n(157);r({target:"Array",stat:!0,forced:!n(83)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(45),o=n(14),i=n(200),a=n(112),u=n(12),l=n(52),c=n(74);e.exports=function(e){var t,n,s,f,d,p,h=o(e),v="function"==typeof this?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,m=void 0!==g,b=c(h),w=0;if(m&&(g=r(g,y>2?arguments[2]:void 0,2)),void 0==b||v==Array&&a(b))for(n=new v(t=u(h.length));t>w;w++)p=m?g(h[w],w):h[w],l(n,w,p);else for(d=(f=b.call(h)).next,n=new v;!(s=d.call(f)).done;w++)p=m?i(f,g,[s.value,w],!0):s.value,l(n,w,p);return n.length=w,n}},function(e,t,n){var r=n(7);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},function(e,t,n){var r=n(3);n(37)(r.JSON,"JSON",!0)},function(e,t,n){n(37)(Math,"Math",!0)},function(e,t,n){var r=n(113),o=n(20),i=n(201);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(163).IteratorPrototype,o=n(44),i=n(42),a=n(37),u=n(73),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,c,!1,!0),u[c]=l,e}},function(e,t,n){"use strict";var r,o,i,a=n(2),u=n(32),l=n(23),c=n(16),s=n(9),f=n(36),d=s("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0);var h=void 0==r||a((function(){var e={};return r[d].call(e)!==e}));h&&(r={}),f&&!h||c(r,d)||l(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(6);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(206);function o(){}var i=null,a={};function u(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("Promise constructor's argument is not a function");this._U=0,this._V=0,this._W=null,this._X=null,e!==o&&p(e,this)}function l(e,t){for(;3===e._V;)e=e._W;if(u._Y&&u._Y(e),0===e._V)return 0===e._U?(e._U=1,void(e._X=t)):1===e._U?(e._U=2,void(e._X=[e._X,t])):void e._X.push(t);!function(e,t){r((function(){var n=1===e._V?t.onFulfilled:t.onRejected;if(null!==n){var r=function(e,t){try{return e(t)}catch(n){return i=n,a}}(n,e._W);r===a?s(t.promise,i):c(t.promise,r)}else 1===e._V?c(t.promise,e._W):s(t.promise,e._W)}))}(e,t)}function c(e,t){if(t===e)return s(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"===typeof t||"function"===typeof t)){var n=function(e){try{return e.then}catch(t){return i=t,a}}(t);if(n===a)return s(e,i);if(n===e.then&&t instanceof u)return e._V=3,e._W=t,void f(e);if("function"===typeof n)return void p(n.bind(t),e)}e._V=1,e._W=t,f(e)}function s(e,t){e._V=2,e._W=t,u._Z&&u._Z(e,t),f(e)}function f(e){if(1===e._U&&(l(e,e._X),e._X=null),2===e._U){for(var t=0;t2?arguments[2]:void 0,f=a((void 0===s?u:o(s,u))-c,u-l),d=1;for(c0;)c in n?n[l]=n[c]:delete n[l],l+=d,c+=d;return n}},function(e,t,n){"use strict";var r=n(68),o=n(12),i=n(45);e.exports=function e(t,n,a,u,l,c,s,f){for(var d,p=l,h=0,v=!!s&&i(s,f,3);h0&&r(d))p=e(t,n,d,o(d.length),p,c-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[p]=d}p++}h++}return p}},function(e,t,n){"use strict";var r=n(24),o=n(29),i=n(12),a=n(53),u=Math.min,l=[].lastIndexOf,c=!!l&&1/[1].lastIndexOf(1,-0)<0,s=a("lastIndexOf"),f=c||!s;e.exports=f?function(e){if(c)return l.apply(this,arguments)||0;var t=r(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:l},function(e,t,n){"use strict";var r=n(3),o=n(11),i=n(170),a=n(23),u=n(59),l=n(2),c=n(47),s=n(29),f=n(12),d=n(171),p=n(232),h=n(32),v=n(56),y=n(50).f,g=n(13).f,m=n(117),b=n(37),w=n(25),x=w.get,E=w.set,S="ArrayBuffer",k="DataView",O="Wrong index",_=r.ArrayBuffer,T=_,C=r.DataView,P=C&&C.prototype,j=Object.prototype,N=r.RangeError,A=p.pack,R=p.unpack,L=function(e){return[255&e]},I=function(e){return[255&e,e>>8&255]},M=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},F=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},U=function(e){return A(e,23,4)},D=function(e){return A(e,52,8)},z=function(e,t){g(e.prototype,t,{get:function(){return x(this)[t]}})},B=function(e,t,n,r){var o=d(n),i=x(e);if(o+t>i.byteLength)throw N(O);var a=x(i.buffer).bytes,u=o+i.byteOffset,l=a.slice(u,u+t);return r?l:l.reverse()},V=function(e,t,n,r,o,i){var a=d(n),u=x(e);if(a+t>u.byteLength)throw N(O);for(var l=x(u.buffer).bytes,c=a+u.byteOffset,s=r(+o),f=0;fq;)(W=$[q++])in T||a(T,W,_[W]);H.constructor=T}v&&h(P)!==j&&v(P,j);var Q=new C(new T(2)),Y=P.setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||u(P,{setInt8:function(e,t){Y.call(this,e,t<<24>>24)},setUint8:function(e,t){Y.call(this,e,t<<24>>24)}},{unsafe:!0})}else T=function(e){c(this,T,S);var t=d(e);E(this,{bytes:m.call(new Array(t),0),byteLength:t}),o||(this.byteLength=t)},C=function(e,t,n){c(this,C,k),c(e,T,k);var r=x(e).byteLength,i=s(t);if(i<0||i>r)throw N("Wrong offset");if(i+(n=void 0===n?r-i:f(n))>r)throw N("Wrong length");E(this,{buffer:e,byteLength:n,byteOffset:i}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},o&&(z(T,"byteLength"),z(C,"buffer"),z(C,"byteLength"),z(C,"byteOffset")),u(C.prototype,{getInt8:function(e){return B(this,1,e)[0]<<24>>24},getUint8:function(e){return B(this,1,e)[0]},getInt16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=B(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return F(B(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return F(B(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return R(B(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return R(B(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){V(this,1,e,L,t)},setUint8:function(e,t){V(this,1,e,L,t)},setInt16:function(e,t){V(this,2,e,I,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){V(this,2,e,I,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){V(this,4,e,M,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){V(this,4,e,M,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){V(this,4,e,U,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){V(this,8,e,D,t,arguments.length>2?arguments[2]:void 0)}});b(T,S),b(C,k),e.exports={ArrayBuffer:T,DataView:C}},function(e,t){e.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},function(e,t,n){var r=n(29),o=n(12);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var r=n(13).f,o=n(44),i=n(59),a=n(45),u=n(47),l=n(77),c=n(115),s=n(58),f=n(11),d=n(54).fastKey,p=n(25),h=p.set,v=p.getterFor;e.exports={getConstructor:function(e,t,n,c){var s=e((function(e,r){u(e,s,t),h(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),f||(e.size=0),void 0!=r&&l(r,e[c],{that:e,AS_ENTRIES:n})})),p=v(t),y=function(e,t,n){var r,o,i=p(e),a=g(e,t);return a?a.value=n:(i.last=a={index:o=d(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),f?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},g=function(e,t){var n,r=p(e),o=d(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(s.prototype,{clear:function(){for(var e=p(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=this,n=p(t),r=g(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),f?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=p(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),i(s.prototype,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),f&&r(s.prototype,"size",{get:function(){return p(this).size}}),s},setStrong:function(e,t,n){var r=t+" Iterator",o=v(t),i=v(r);c(e,t,(function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),s(t)}}},function(e,t){var n=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:n(1+e)}},function(e,t,n){var r=n(6),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){"use strict";var r=n(11),o=n(2),i=n(69),a=n(110),u=n(80),l=n(14),c=n(63),s=Object.assign,f=Object.defineProperty;e.exports=!s||o((function(){if(r&&1!==s({b:1},s(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=s({},e)[n]||i(s({},t)).join("")!=o}))?function(e,t){for(var n=l(e),o=arguments.length,s=1,f=a.f,d=u.f;o>s;)for(var p,h=c(arguments[s++]),v=f?i(h).concat(f(h)):i(h),y=v.length,g=0;y>g;)p=v[g++],r&&!d.call(h,p)||(n[p]=h[p]);return n}:s},function(e,t,n){var r=n(11),o=n(69),i=n(24),a=n(80).f,u=function(e){return function(t){for(var n,u=i(t),l=o(u),c=l.length,s=0,f=[];c>s;)n=l[s++],r&&!a.call(u,n)||f.push(e?[n,u[n]]:u[n]);return f}};e.exports={entries:u(!0),values:u(!1)}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(3);e.exports=r.Promise},function(e,t,n){var r=n(82);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r,o,i,a,u,l,c,s,f=n(3),d=n(18).f,p=n(120).set,h=n(179),v=n(292),y=n(57),g=f.MutationObserver||f.WebKitMutationObserver,m=f.document,b=f.process,w=f.Promise,x=d(f,"queueMicrotask"),E=x&&x.value;E||(r=function(){var e,t;for(y&&(e=b.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():i=void 0,n}}i=void 0,e&&e.enter()},h||y||v||!g||!m?w&&w.resolve?(c=w.resolve(void 0),s=c.then,a=function(){s.call(c,r)}):a=y?function(){b.nextTick(r)}:function(){p.call(f,r)}:(u=!0,l=m.createTextNode(""),new g(r).observe(l,{characterData:!0}),a=function(){l.data=u=!u})),e.exports=E||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},function(e,t,n){var r=n(7),o=n(6),i=n(182);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(30),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";var r=n(1),o=n(94);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){var r=n(12),o=n(119),i=n(22),a=Math.ceil,u=function(e){return function(t,n,u){var l,c,s=String(i(t)),f=s.length,d=void 0===u?" ":String(u),p=r(n);return p<=f||""==d?s:(l=p-f,(c=o.call(d,a(l/d.length))).length>l&&(c=c.slice(0,l)),e?s+c:c+s)}};e.exports={start:u(!1),end:u(!0)}},function(e,t,n){var r=n(82);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){var r=n(345);e.exports=function(e,t){var n=r(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){var r=n(14),o=n(12),i=n(74),a=n(112),u=n(45),l=n(10).aTypedArrayConstructor;e.exports=function(e){var t,n,c,s,f,d,p=r(e),h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=i(p);if(void 0!=g&&!a(g))for(d=(f=g.call(p)).next,p=[];!(s=d.call(f)).done;)p.push(s.value);for(y&&h>2&&(v=u(v,arguments[2],2)),n=o(p.length),c=new(l(this))(n),t=0;n>t;t++)c[t]=y?v(p[t],t):p[t];return c}},function(e,t,n){"use strict";var r=n(59),o=n(54).getWeakData,i=n(7),a=n(6),u=n(47),l=n(77),c=n(21),s=n(16),f=n(25),d=f.set,p=f.getterFor,h=c.find,v=c.findIndex,y=0,g=function(e){return e.frozen||(e.frozen=new m)},m=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};m.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,c){var f=e((function(e,r){u(e,f,t),d(e,{type:t,id:y++,frozen:void 0}),void 0!=r&&l(r,e[c],{that:e,AS_ENTRIES:n})})),h=p(t),v=function(e,t,n){var r=h(e),a=o(i(t),!0);return!0===a?g(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?g(t).delete(e):n&&s(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?g(t).has(e):n&&s(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=h(this);if(a(e)){var n=o(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),f}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(2),o=n(9),i=n(36),a=o("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),i&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://\u0442\u0435\u0441\u0442").host||"#%D0%B1"!==new URL("http://a#\u0431").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(e,t,n){"use strict";n(86);var r=n(1),o=n(31),i=n(190),a=n(20),u=n(59),l=n(37),c=n(162),s=n(25),f=n(47),d=n(16),p=n(45),h=n(75),v=n(7),y=n(6),g=n(44),m=n(42),b=n(389),w=n(74),x=n(9),E=o("fetch"),S=o("Headers"),k=x("iterator"),O="URLSearchParams",_="URLSearchParamsIterator",T=s.set,C=s.getterFor(O),P=s.getterFor(_),j=/\+/g,N=Array(4),A=function(e){return N[e-1]||(N[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},R=function(e){try{return decodeURIComponent(e)}catch(t){return e}},L=function(e){var t=e.replace(j," "),n=4;try{return decodeURIComponent(t)}catch(r){for(;n;)t=t.replace(A(n--),R);return t}},I=/[!'()~]|%20/g,M={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},F=function(e){return M[e]},U=function(e){return encodeURIComponent(e).replace(I,F)},D=function(e,t){if(t)for(var n,r,o=t.split("&"),i=0;i0?arguments[0]:void 0,s=this,p=[];if(T(s,{type:O,entries:p,updateURL:function(){},updateSearchParams:z}),void 0!==c)if(y(c))if("function"===typeof(e=w(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((a=(i=(o=b(v(r.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:u.value+""})}else for(l in c)d(c,l)&&p.push({key:l,value:c[l]+""});else D(p,"string"===typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},H=W.prototype;u(H,{append:function(e,t){B(arguments.length,2);var n=C(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){B(arguments.length,1);for(var t=C(this),n=t.entries,r=e+"",o=0;oe.key){o.splice(t,0,e);break}t===n&&o.push(e)}r.updateURL()},forEach:function(e){for(var t,n=C(this).entries,r=p(e,arguments.length>1?arguments[1]:void 0,3),o=0;o1&&(y(t=arguments[1])&&(n=t.body,h(n)===O&&((r=t.headers?new S(t.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=g(t,{body:m(0,String(n)),headers:m(0,r)}))),o.push(t)),E.apply(this,o)}}),e.exports={URLSearchParams:W,getState:C}},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(N){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),a=new C(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return j()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=s(e,t,n);if("normal"===l.type){if(r=n.done?h:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(N){return{type:"throw",arg:N}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={};function y(){}function g(){}function m(){}var b={};b[i]=function(){return this};var w=Object.getPrototypeOf,x=w&&w(w(P([])));x&&x!==n&&r.call(x,i)&&(b=x);var E=m.prototype=y.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,i,a,u){var l=s(e[o],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=s(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function P(e){if(e){var n=e[i];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1024){for(var t=0,n=o.length-i;t-1};function f(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!==typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function v(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=y(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():l&&a&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="";var n=this.headers.get("content-type");n?n.indexOf("json")>=0&&"string"!==typeof this._bodyInit&&(this._bodyInit=this._bodyText):"string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8")},a&&(this.blob=function(){var e=v(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=v(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),this.text=function(){var e=v(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=y(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function E(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function S(e){var t=new h;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t}function k(e,t){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}x.prototype.clone=function(){return new x(this,{body:this._bodyInit})},b.call(x.prototype),b.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:0,statusText:""});return e.type="error",e};var O=[301,302,303,307,308];k.redirect=function(e,t){if(-1===O.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})};var _=r.DOMException;try{new _}catch(C){(_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function T(e,t){return new Promise((function(n,o){var i=new x(e,t);if(i.signal&&i.signal.aborted)return o(new _("Aborted","AbortError"));var u=new XMLHttpRequest;function c(){u.abort()}u.onload=function(){var e={status:u.status,statusText:u.statusText,headers:S(u.getAllResponseHeaders()||"")};e.url="responseURL"in u?u.responseURL:e.headers.get("X-Request-URL");var t="response"in u?u.response:u.responseText;setTimeout((function(){n(new k(t,e))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new _("Aborted","AbortError"))}),0)},u.open(i.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?u.withCredentials=!0:"omit"===i.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":l&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!t||"object"!==typeof t.headers||t.headers instanceof h?i.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){u.setRequestHeader(e,d(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",c),u.onreadystatechange=function(){4===u.readyState&&i.signal.removeEventListener("abort",c)}),u.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}T.polyfill=!0,r.fetch||(r.fetch=T,r.Headers=h,r.Request=x,r.Response=k)},function(e,t,n){"use strict";n(130),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(156),n(217),n(218),n(86),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(233),n(235),n(236),n(159),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(160),n(255),n(256),n(257),n(258),n(260),n(261),n(262),n(263),n(264),n(265),n(267),n(269),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(161),n(290),n(291),n(295),n(296),n(297),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(183),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(114),n(318),n(319),n(320),n(321),n(322),n(323),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(384),n(385),n(386),n(387),n(390),n(191),n(192)},function(e,t,n){var r=n(1),o=n(166),i=n(46);r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},function(e,t,n){var r=n(1),o=n(117),i=n(46);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";var r=n(1),o=n(21).filter;r({target:"Array",proto:!0,forced:!n(71)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(1),o=n(21).find,i=n(46),a="find",u=!0;a in[]&&Array(1).find((function(){u=!1})),r({target:"Array",proto:!0,forced:u},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},function(e,t,n){"use strict";var r=n(1),o=n(21).findIndex,i=n(46),a="findIndex",u=!0;a in[]&&Array(1).findIndex((function(){u=!1})),r({target:"Array",proto:!0,forced:u},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i(a)},function(e,t,n){"use strict";var r=n(1),o=n(167),i=n(14),a=n(12),u=n(29),l=n(70);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=i(this),n=a(t.length),r=l(t,0);return r.length=o(r,t,t,n,0,void 0===e?1:u(e)),r}})},function(e,t,n){"use strict";var r=n(1),o=n(167),i=n(14),a=n(12),u=n(30),l=n(70);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=i(this),r=a(n.length);return u(e),(t=l(n,0)).length=o(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){"use strict";var r=n(1),o=n(66).includes,i=n(46);r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,n){"use strict";var r=n(1),o=n(66).indexOf,i=n(53),a=[].indexOf,u=!!a&&1/[1].indexOf(1,-0)<0,l=i("indexOf");r({target:"Array",proto:!0,forced:u||!l},{indexOf:function(e){return u?a.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(1),o=n(63),i=n(24),a=n(53),u=[].join,l=o!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:l||!c},{join:function(e){return u.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(1),o=n(168);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},function(e,t,n){"use strict";var r=n(1),o=n(21).map;r({target:"Array",proto:!0,forced:!n(71)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(1),o=n(2),i=n(52);r({target:"Array",stat:!0,forced:o((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),o=n(87).left,i=n(53),a=n(72),u=n(57);r({target:"Array",proto:!0,forced:!i("reduce")||!u&&a>79&&a<83},{reduce:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(1),o=n(87).right,i=n(53),a=n(72),u=n(57);r({target:"Array",proto:!0,forced:!i("reduceRight")||!u&&a>79&&a<83},{reduceRight:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(1),o=n(6),i=n(68),a=n(51),u=n(12),l=n(24),c=n(52),s=n(9),f=n(71)("slice"),d=s("species"),p=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,s,f=l(this),v=u(f.length),y=a(e,v),g=a(void 0===t?v:t,v);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[d])&&(n=void 0):n=void 0,n===Array||void 0===n))return p.call(f,y,g);for(r=new(void 0===n?Array:n)(h(g-y,0)),s=0;yp)throw TypeError(h);for(s=l(m,r),v=0;vb-r+n;v--)delete m[v-1]}else if(n>r)for(v=b-r;v>w;v--)g=v+n-1,(y=v+r-1)in m?m[g]=m[y]:delete m[g];for(v=0;v>1,v=23===t?r(2,-24)-r(2,-77):0,y=e<0||0===e&&1/e<0?1:0,g=0;for((e=n(e))!=e||e===1/0?(c=e!=e?1:0,l=p):(l=o(i(e)/a),e*(s=r(2,-l))<1&&(l--,s*=2),(e+=l+h>=1?v/s:v*r(2,1-h))*s>=2&&(l++,s/=2),l+h>=p?(c=0,l=p):l+h>=1?(c=(e*s-1)*r(2,t),l+=h):(c=e*r(2,h-1)*r(2,t),l=0));t>=8;f[g++]=255&c,c/=256,t-=8);for(l=l<0;f[g++]=255&l,l/=256,d-=8);return f[--g]|=128*y,f},unpack:function(e,t){var n,o=e.length,i=8*o-t-1,a=(1<>1,l=i-7,c=o-1,s=e[c--],f=127&s;for(s>>=7;l>0;f=256*f+e[c],c--,l-=8);for(n=f&(1<<-l)-1,f>>=-l,l+=t;l>0;n=256*n+e[c],c--,l-=8);if(0===f)f=1-u;else{if(f===a)return n?NaN:s?-1/0:1/0;n+=r(2,t),f-=u}return(s?-1:1)*n*r(2,f-t)}}},function(e,t,n){var r=n(23),o=n(234),i=n(9)("toPrimitive"),a=Date.prototype;i in a||r(a,i,o)},function(e,t,n){"use strict";var r=n(7),o=n(35);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),"number"!==e)}},function(e,t,n){"use strict";var r=n(6),o=n(13),i=n(32),a=n(9)("hasInstance"),u=Function.prototype;a in u||o.f(u,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(11),o=n(13).f,i=Function.prototype,a=i.toString,u=/^\s*function ([^ (]*)/,l="name";r&&!(l in i)&&o(i,l,{configurable:!0,get:function(){try{return a.call(this).match(u)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(88),o=n(172);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},function(e,t,n){var r=n(1),o=n(173),i=Math.acosh,a=Math.log,u=Math.sqrt,l=Math.LN2;r({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(1/0)!=1/0},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?a(e)+l:o(e-1+u(e-1)*u(e+1))}})},function(e,t,n){var r=n(1),o=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(o&&1/o(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):i(t+a(t*t+1)):t}})},function(e,t,n){var r=n(1),o=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:i((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),o=n(118),i=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(e){return o(e=+e)*a(i(e),1/3)}})},function(e,t,n){var r=n(1),o=Math.floor,i=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-o(i(e+.5)*a):32}})},function(e,t,n){var r=n(1),o=n(90),i=Math.cosh,a=Math.abs,u=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(e){var t=o(a(e)-1)+1;return(t+1/(t*u*u))*(u/2)}})},function(e,t,n){var r=n(1),o=n(90);r({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},function(e,t,n){n(1)({target:"Math",stat:!0},{fround:n(246)})},function(e,t,n){var r=n(118),o=Math.abs,i=Math.pow,a=i(2,-52),u=i(2,-23),l=i(2,127)*(2-u),c=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=o(e),s=r(e);return il||n!=n?s*(1/0):s*n}},function(e,t,n){var r=n(1),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,u=0,l=arguments.length,c=0;u0?(r=n/c)*r:n;return c===1/0?1/0:c*a(o)}})},function(e,t,n){var r=n(1),o=n(2),i=Math.imul;r({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(e){return o(e)*i}})},function(e,t,n){n(1)({target:"Math",stat:!0},{log1p:n(173)})},function(e,t,n){var r=n(1),o=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(e){return o(e)/i}})},function(e,t,n){n(1)({target:"Math",stat:!0},{sign:n(118)})},function(e,t,n){var r=n(1),o=n(2),i=n(90),a=Math.abs,u=Math.exp,l=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(i(e)-i(-e))/2:(u(e-1)-u(-e-1))*(l/2)}})},function(e,t,n){var r=n(1),o=n(90),i=Math.exp;r({target:"Math",stat:!0},{tanh:function(e){var t=o(e=+e),n=o(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(1),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:o)(e)}})},function(e,t,n){"use strict";var r=n(11),o=n(3),i=n(67),a=n(20),u=n(16),l=n(43),c=n(89),s=n(35),f=n(2),d=n(44),p=n(50).f,h=n(18).f,v=n(13).f,y=n(60).trim,g="Number",m=o.Number,b=m.prototype,w=l(d(b))==g,x=function(e){var t,n,r,o,i,a,u,l,c=s(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=y(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(a=(i=c.slice(2)).length,u=0;uo)return NaN;return parseInt(i,r)}return+c};if(i(g,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var E,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(w?f((function(){b.valueOf.call(n)})):l(n)!=g)?c(new m(x(t)),n,S):x(t)},k=r?p(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),O=0;k.length>O;O++)u(m,E=k[O])&&!u(S,E)&&v(S,E,h(m,E));S.prototype=b,b.constructor=S,a(o,g,S)}},function(e,t,n){n(1)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){n(1)({target:"Number",stat:!0},{isFinite:n(259)})},function(e,t,n){var r=n(3).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&r(e)}},function(e,t,n){n(1)({target:"Number",stat:!0},{isInteger:n(174)})},function(e,t,n){n(1)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),o=n(174),i=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){n(1)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){n(1)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),o=n(266);r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},function(e,t,n){var r=n(3),o=n(60).trim,i=n(91),a=r.parseFloat,u=1/a(i+"-0")!==-1/0;e.exports=u?function(e){var t=o(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){var r=n(1),o=n(268);r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},function(e,t,n){var r=n(3),o=n(60).trim,i=n(91),a=r.parseInt,u=/^[+-]?0[Xx]/,l=8!==a(i+"08")||22!==a(i+"0x16");e.exports=l?function(e,t){var n=o(String(e));return a(n,t>>>0||(u.test(n)?16:10))}:a},function(e,t,n){"use strict";var r=n(1),o=n(29),i=n(270),a=n(119),u=n(2),l=1..toFixed,c=Math.floor,s=function e(t,n,r){return 0===n?r:n%2===1?e(t,n-1,r*t):e(t*t,n/2,r)},f=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=c(o/1e7)},d=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=c(r/t),r=r%t*1e7},p=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=String(e[t]);n=""===n?r:n+a.call("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!u((function(){l.call({})}))},{toFixed:function(e){var t,n,r,u,l=i(this),c=o(e),h=[0,0,0,0,0,0],v="",y="0";if(c<0||c>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*s(2,69,1))-69)<0?l*s(2,-t,1):l/s(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(h,0,n),r=c;r>=7;)f(h,1e7,0),r-=7;for(f(h,s(10,r,1),0),r=t-1;r>=23;)d(h,1<<23),r-=23;d(h,1<0?v+((u=y.length)<=c?"0."+a.call("0",c-u)+y:y.slice(0,u-c)+"."+y.slice(u-c)):v+y}})},function(e,t,n){var r=n(43);e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){var r=n(1),o=n(175);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(92),a=n(14),u=n(30),l=n(13);o&&r({target:"Object",proto:!0,forced:i},{__defineGetter__:function(e,t){l.f(a(this),e,{get:u(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(92),a=n(14),u=n(30),l=n(13);o&&r({target:"Object",proto:!0,forced:i},{__defineSetter__:function(e,t){l.f(a(this),e,{set:u(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(1),o=n(176).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){var r=n(1),o=n(76),i=n(2),a=n(6),u=n(54).onFreeze,l=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!o},{freeze:function(e){return l&&a(e)?l(u(e)):e}})},function(e,t,n){var r=n(1),o=n(77),i=n(52);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return o(e,(function(e,n){i(t,e,n)}),{AS_ENTRIES:!0}),t}})},function(e,t,n){var r=n(1),o=n(2),i=n(24),a=n(18).f,u=n(11),l=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||l,sham:!u},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){var r=n(1),o=n(11),i=n(108),a=n(24),u=n(18),l=n(52);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=u.f,c=i(r),s={},f=0;c.length>f;)void 0!==(n=o(r,t=c[f++]))&&l(s,t,n);return s}})},function(e,t,n){var r=n(1),o=n(2),i=n(140).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){var r=n(1),o=n(2),i=n(14),a=n(32),u=n(116);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){n(1)({target:"Object",stat:!0},{is:n(177)})},function(e,t,n){var r=n(1),o=n(2),i=n(6),a=Object.isExtensible;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isExtensible:function(e){return!!i(e)&&(!a||a(e))}})},function(e,t,n){var r=n(1),o=n(2),i=n(6),a=Object.isFrozen;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isFrozen:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){var r=n(1),o=n(2),i=n(6),a=Object.isSealed;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isSealed:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){var r=n(1),o=n(14),i=n(69);r({target:"Object",stat:!0,forced:n(2)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(92),a=n(14),u=n(35),l=n(32),c=n(18).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(e){var t,n=a(this),r=u(e,!0);do{if(t=c(n,r))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var r=n(1),o=n(11),i=n(92),a=n(14),u=n(35),l=n(32),c=n(18).f;o&&r({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(e){var t,n=a(this),r=u(e,!0);do{if(t=c(n,r))return t.set}while(n=l(n))}})},function(e,t,n){var r=n(1),o=n(6),i=n(54).onFreeze,a=n(76),u=n(2),l=Object.preventExtensions;r({target:"Object",stat:!0,forced:u((function(){l(1)})),sham:!a},{preventExtensions:function(e){return l&&o(e)?l(i(e)):e}})},function(e,t,n){var r=n(1),o=n(6),i=n(54).onFreeze,a=n(76),u=n(2),l=Object.seal;r({target:"Object",stat:!0,forced:u((function(){l(1)})),sham:!a},{seal:function(e){return l&&o(e)?l(i(e)):e}})},function(e,t,n){var r=n(1),o=n(176).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r,o,i,a,u=n(1),l=n(36),c=n(3),s=n(31),f=n(178),d=n(20),p=n(59),h=n(37),v=n(58),y=n(6),g=n(30),m=n(47),b=n(105),w=n(77),x=n(83),E=n(55),S=n(120).set,k=n(180),O=n(181),_=n(293),T=n(182),C=n(294),P=n(25),j=n(67),N=n(9),A=n(57),R=n(72),L=N("species"),I="Promise",M=P.get,F=P.set,U=P.getterFor(I),D=f,z=c.TypeError,B=c.document,V=c.process,W=s("fetch"),H=T.f,$=H,q=!!(B&&B.createEvent&&c.dispatchEvent),Q="function"==typeof PromiseRejectionEvent,Y="unhandledrejection",G=j(I,(function(){if(!(b(D)!==String(D))){if(66===R)return!0;if(!A&&!Q)return!0}if(l&&!D.prototype.finally)return!0;if(R>=51&&/native code/.test(D))return!1;var e=D.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),K=G||!x((function(e){D.all(e).catch((function(){}))})),X=function(e){var t;return!(!y(e)||"function"!=typeof(t=e.then))&&t},Z=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;k((function(){for(var r=e.value,o=1==e.state,i=0;n.length>i;){var a,u,l,c=n[i++],s=o?c.ok:c.fail,f=c.resolve,d=c.reject,p=c.domain;try{s?(o||(2===e.rejection&&ne(e),e.rejection=1),!0===s?a=r:(p&&p.enter(),a=s(r),p&&(p.exit(),l=!0)),a===c.promise?d(z("Promise-chain cycle")):(u=X(a))?u.call(a,f,d):f(a)):d(r)}catch(h){p&&!l&&p.exit(),d(h)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ee(e)}))}},J=function(e,t,n){var r,o;q?((r=B.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!Q&&(o=c["on"+e])?o(r):e===Y&&_("Unhandled promise rejection",n)},ee=function(e){S.call(c,(function(){var t,n=e.facade,r=e.value;if(te(e)&&(t=C((function(){A?V.emit("unhandledRejection",r,n):J(Y,n,r)})),e.rejection=A||te(e)?2:1,t.error))throw t.value}))},te=function(e){return 1!==e.rejection&&!e.parent},ne=function(e){S.call(c,(function(){var t=e.facade;A?V.emit("rejectionHandled",t):J("rejectionhandled",t,e.value)}))},re=function(e,t,n){return function(r){e(t,r,n)}},oe=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Z(e,!0))},ie=function e(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw z("Promise can't be resolved itself");var o=X(n);o?k((function(){var r={done:!1};try{o.call(n,re(e,r,t),re(oe,r,t))}catch(i){oe(r,i,t)}})):(t.value=n,t.state=1,Z(t,!1))}catch(i){oe({done:!1},i,t)}}};G&&(D=function(e){m(this,D,I),g(e),r.call(this);var t=M(this);try{e(re(ie,t),re(oe,t))}catch(n){oe(t,n)}},(r=function(e){F(this,{type:I,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(D.prototype,{then:function(e,t){var n=U(this),r=H(E(this,D));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=A?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Z(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r,t=M(e);this.promise=e,this.resolve=re(ie,t),this.reject=re(oe,t)},T.f=H=function(e){return e===D||e===i?new o(e):$(e)},l||"function"!=typeof f||(a=f.prototype.then,d(f.prototype,"then",(function(e,t){var n=this;return new D((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof W&&u({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return O(D,W.apply(c,arguments))}}))),u({global:!0,wrap:!0,forced:G},{Promise:D}),h(D,I,!1,!0),v(I),i=s(I),u({target:I,stat:!0,forced:G},{reject:function(e){var t=H(this);return t.reject.call(void 0,e),t.promise}}),u({target:I,stat:!0,forced:l||G},{resolve:function(e){return O(l&&this===i?D:this,e)}}),u({target:I,stat:!0,forced:K},{all:function(e){var t=this,n=H(t),r=n.resolve,o=n.reject,i=C((function(){var n=g(t.resolve),i=[],a=0,u=1;w(e,(function(e){var l=a++,c=!1;i.push(void 0),u++,n.call(t,e).then((function(e){c||(c=!0,i[l]=e,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=H(t),r=n.reject,o=C((function(){var o=g(t.resolve);w(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(e,t,n){var r=n(82);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(3);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var r=n(1),o=n(36),i=n(178),a=n(2),u=n(31),l=n(55),c=n(181),s=n(20);r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,u("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),o||"function"!=typeof i||i.prototype.finally||s(i.prototype,"finally",u("Promise").prototype.finally)},function(e,t,n){var r=n(1),o=n(31),i=n(30),a=n(7),u=n(2),l=o("Reflect","apply"),c=Function.apply;r({target:"Reflect",stat:!0,forced:!u((function(){l((function(){}))}))},{apply:function(e,t,n){return i(e),a(n),l?l(e,t,n):c.call(e,t,n)}})},function(e,t,n){var r=n(1),o=n(31),i=n(30),a=n(7),u=n(6),l=n(44),c=n(298),s=n(2),f=o("Reflect","construct"),d=s((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),p=!s((function(){f((function(){}))})),h=d||p;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(p&&!d)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var o=n.prototype,s=l(u(o)?o:Object.prototype),h=Function.apply.call(e,s,t);return u(h)?h:s}})},function(e,t,n){"use strict";var r=n(30),o=n(6),i=[].slice,a={},u=function(e,t,n){if(!(t in a)){for(var r=[],o=0;o-1)&&(t=t.replace(/y/g,""));var u=a(x?new g(e,t):g(e,t),r?this:m,S);return E&&n&&h(u,{sticky:n}),u},k=function(e){e in S||u(S,e,{configurable:!0,get:function(){return g[e]},set:function(t){g[e]=t}})},O=l(g),_=0;O.length>_;)k(O[_++]);m.constructor=S,S.prototype=m,d(o,"RegExp",S)}v("RegExp")},function(e,t,n){var r=n(11),o=n(13),i=n(93),a=n(122).UNSUPPORTED_Y;r&&("g"!=/./g.flags||a)&&o.f(RegExp.prototype,"flags",{configurable:!0,get:i})},function(e,t,n){"use strict";var r=n(20),o=n(7),i=n(2),a=n(93),u="toString",l=RegExp.prototype,c=l.toString,s=i((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),f=c.name!=u;(s||f)&&r(RegExp.prototype,u,(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in l)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(88),o=n(172);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},function(e,t,n){"use strict";var r=n(1),o=n(84).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(18).f,i=n(12),a=n(123),u=n(22),l=n(124),c=n(36),s="".endsWith,f=Math.min,d=l("endsWith");r({target:"String",proto:!0,forced:!(!c&&!d&&!!function(){var e=o(String.prototype,"endsWith");return e&&!e.writable}())&&!d},{endsWith:function(e){var t=String(u(this));a(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),o=void 0===n?r:f(i(n),r),l=String(e);return s?s.call(t,l,o):t.slice(o-l.length,o)===l}})},function(e,t,n){var r=n(1),o=n(51),i=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(1),o=n(123),i=n(22);r({target:"String",proto:!0,forced:!n(124)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(95),o=n(7),i=n(12),a=n(22),u=n(125),l=n(96);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=o(e),c=String(this);if(!a.global)return l(a,c);var s=a.unicode;a.lastIndex=0;for(var f,d=[],p=0;null!==(f=l(a,c));){var h=String(f[0]);d[p]=h,""===h&&(a.lastIndex=u(c,i(a.lastIndex),s)),p++}return 0===p?null:d}]}))},function(e,t,n){"use strict";var r=n(1),o=n(184).end;r({target:"String",proto:!0,forced:n(185)},{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(1),o=n(184).start;r({target:"String",proto:!0,forced:n(185)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(1),o=n(24),i=n(12);r({target:"String",stat:!0},{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(t[u++])),u=O&&(k+=g.slice(O,C)+R,O=C+T.length)}return k+g.slice(O)}]}))},function(e,t,n){var r=n(14),o=Math.floor,i="".replace,a=/\$([$&'`]|\d\d?|<[^>]*>)/g,u=/\$([$&'`]|\d\d?)/g;e.exports=function(e,t,n,l,c,s){var f=n+e.length,d=l.length,p=u;return void 0!==c&&(c=r(c),p=a),i.call(s,p,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":a=c[i.slice(1,-1)];break;default:var u=+i;if(0===u)return r;if(u>d){var s=o(u/10);return 0===s?r:s<=d?void 0===l[s-1]?i.charAt(1):l[s-1]+i.charAt(1):r}a=l[u-1]}return void 0===a?"":a}))}},function(e,t,n){"use strict";var r=n(95),o=n(7),i=n(22),a=n(177),u=n(96);r("search",1,(function(e,t,n){return[function(t){var n=i(this),r=void 0==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=o(e),l=String(this),c=i.lastIndex;a(c,0)||(i.lastIndex=0);var s=u(i,l);return a(i.lastIndex,c)||(i.lastIndex=c),null===s?-1:s.index}]}))},function(e,t,n){"use strict";var r=n(95),o=n(121),i=n(7),a=n(22),u=n(55),l=n(125),c=n(12),s=n(96),f=n(94),d=n(2),p=[].push,h=Math.min,v=4294967295,y=!d((function(){return!RegExp(v,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),i=void 0===n?v:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!o(e))return t.call(r,e,i);for(var u,l,c,s=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,y=new RegExp(e.source,d+"g");(u=f.call(y,r))&&!((l=y.lastIndex)>h&&(s.push(r.slice(h,u.index)),u.length>1&&u.index=i));)y.lastIndex===u.index&&y.lastIndex++;return h===r.length?!c&&y.test("")||s.push(""):s.push(r.slice(h)),s.length>i?s.slice(0,i):s}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=a(this),i=void 0==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var a=n(r,e,this,o,r!==t);if(a.done)return a.value;var f=i(e),d=String(this),p=u(f,RegExp),g=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),b=new p(y?f:"^(?:"+f.source+")",m),w=void 0===o?v:o>>>0;if(0===w)return[];if(0===d.length)return null===s(b,d)?[d]:[];for(var x=0,E=0,S=[];E1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(1),o=n(60).trim;r({target:"String",proto:!0,forced:n(126)("trim")},{trim:function(){return o(this)}})},function(e,t,n){"use strict";var r=n(1),o=n(60).end,i=n(126)("trimEnd"),a=i?function(){return o(this)}:"".trimEnd;r({target:"String",proto:!0,forced:i},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(1),o=n(60).start,i=n(126)("trimStart"),a=i?function(){return o(this)}:"".trimStart;r({target:"String",proto:!0,forced:i},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("anchor")},{anchor:function(e){return o(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("big")},{big:function(){return o(this,"big","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("blink")},{blink:function(){return o(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("bold")},{bold:function(){return o(this,"b","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("fixed")},{fixed:function(){return o(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("fontcolor")},{fontcolor:function(e){return o(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("fontsize")},{fontsize:function(e){return o(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("italics")},{italics:function(){return o(this,"i","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("link")},{link:function(e){return o(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("small")},{small:function(){return o(this,"small","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("strike")},{strike:function(){return o(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("sub")},{sub:function(){return o(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(26);r({target:"String",proto:!0,forced:n(27)("sup")},{sup:function(){return o(this,"sup","","")}})},function(e,t,n){n(39)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){var r=n(29);e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){n(39)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(39)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(39)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(39)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(39)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(39)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){n(39)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(39)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){"use strict";var r=n(10),o=n(166),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return o.call(i(this),e,t,arguments.length>2?arguments[2]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=n(21).every,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=n(117),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(e){return o.apply(i(this),arguments)}))},function(e,t,n){"use strict";var r=n(10),o=n(21).filter,i=n(358),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(e){var t=o(a(this),e,arguments.length>1?arguments[1]:void 0);return i(this,t)}))},function(e,t,n){var r=n(10).aTypedArrayConstructor,o=n(55);e.exports=function(e,t){for(var n=o(e,e.constructor),i=0,a=t.length,u=new(r(n))(a);a>i;)u[i]=t[i++];return u}},function(e,t,n){"use strict";var r=n(10),o=n(21).find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=n(21).findIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=n(21).forEach,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(e){o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(127);(0,n(10).exportTypedArrayStaticMethod)("from",n(187),r)},function(e,t,n){"use strict";var r=n(10),o=n(66).includes,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=n(66).indexOf,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(3),o=n(10),i=n(86),a=n(9)("iterator"),u=r.Uint8Array,l=i.values,c=i.keys,s=i.entries,f=o.aTypedArray,d=o.exportTypedArrayMethod,p=u&&u.prototype[a],h=!!p&&("values"==p.name||void 0==p.name),v=function(){return l.call(f(this))};d("entries",(function(){return s.call(f(this))})),d("keys",(function(){return c.call(f(this))})),d("values",v,!h),d(a,v,!h)},function(e,t,n){"use strict";var r=n(10),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].join;i("join",(function(e){return a.apply(o(this),arguments)}))},function(e,t,n){"use strict";var r=n(10),o=n(168),i=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(e){return o.apply(i(this),arguments)}))},function(e,t,n){"use strict";var r=n(10),o=n(21).map,i=n(55),a=r.aTypedArray,u=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(e){return o(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(u(i(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var r=n(10),o=n(127),i=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(i(this))(t);t>e;)n[e]=arguments[e++];return n}),o)},function(e,t,n){"use strict";var r=n(10),o=n(87).left,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=n(87).right,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(e){return o(i(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=this,n=o(t).length,r=a(n/2),i=0;i1?arguments[1]:void 0,1),n=this.length,r=a(e),u=o(r.length),c=0;if(u+t>n)throw RangeError("Wrong length");for(;ci;)s[i]=n[i++];return s}),i((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var r=n(10),o=n(21).some,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){"use strict";var r=n(10),o=r.aTypedArray,i=r.exportTypedArrayMethod,a=[].sort;i("sort",(function(e){return a.call(o(this),e)}))},function(e,t,n){"use strict";var r=n(10),o=n(12),i=n(51),a=n(55),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(e,t){var n=u(this),r=n.length,l=i(e,r);return new(a(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,o((void 0===t?r:i(t,r))-l))}))},function(e,t,n){"use strict";var r=n(3),o=n(10),i=n(2),a=r.Int8Array,u=o.aTypedArray,l=o.exportTypedArrayMethod,c=[].toLocaleString,s=[].slice,f=!!a&&i((function(){c.call(new a(1))}));l("toLocaleString",(function(){return c.apply(f?s.call(u(this)):u(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var r=n(10).exportTypedArrayMethod,o=n(2),i=n(3).Uint8Array,a=i&&i.prototype||{},u=[].toString,l=[].join;o((function(){u.call({})}))&&(u=function(){return l.call(this)});var c=a.toString!=u;r("toString",u,c)},function(e,t,n){"use strict";var r,o=n(3),i=n(59),a=n(54),u=n(88),l=n(188),c=n(6),s=n(25).enforce,f=n(133),d=!o.ActiveXObject&&"ActiveXObject"in o,p=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=e.exports=u("WeakMap",h,l);if(f&&d){r=l.getConstructor(h,"WeakMap",!0),a.REQUIRED=!0;var y=v.prototype,g=y.delete,m=y.has,b=y.get,w=y.set;i(y,{delete:function(e){if(c(e)&&!p(e)){var t=s(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(c(e)&&!p(e)){var t=s(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen.has(e)}return m.call(this,e)},get:function(e){if(c(e)&&!p(e)){var t=s(this);return t.frozen||(t.frozen=new r),m.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!p(e)){var n=s(this);n.frozen||(n.frozen=new r),m.call(this,e)?w.call(this,e,t):n.frozen.set(e,t)}else w.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(88)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(188))},function(e,t,n){var r=n(3),o=n(189),i=n(383),a=n(23);for(var u in o){var l=r[u],c=l&&l.prototype;if(c&&c.forEach!==i)try{a(c,"forEach",i)}catch(s){c.forEach=i}}},function(e,t,n){"use strict";var r=n(21).forEach,o=n(53)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(3),o=n(189),i=n(86),a=n(23),u=n(9),l=u("iterator"),c=u("toStringTag"),s=i.values;for(var f in o){var d=r[f],p=d&&d.prototype;if(p){if(p[l]!==s)try{a(p,l,s)}catch(v){p[l]=s}if(p[c]||a(p,c,f),o[f])for(var h in i)if(p[h]!==i[h])try{a(p,h,i[h])}catch(v){p[h]=i[h]}}}},function(e,t,n){var r=n(1),o=n(3),i=n(120);r({global:!0,bind:!0,enumerable:!0,forced:!o.setImmediate||!o.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){var r=n(1),o=n(3),i=n(180),a=n(57),u=o.process;r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=a&&u.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";n(114);var r,o=n(1),i=n(11),a=n(190),u=n(3),l=n(138),c=n(20),s=n(47),f=n(16),d=n(175),p=n(157),h=n(84).codeAt,v=n(388),y=n(37),g=n(191),m=n(25),b=u.URL,w=g.URLSearchParams,x=g.getState,E=m.set,S=m.getterFor("URL"),k=Math.floor,O=Math.pow,_="Invalid scheme",T="Invalid host",C="Invalid port",P=/[A-Za-z]/,j=/[\d+-.A-Za-z]/,N=/\d/,A=/^(0x|0X)/,R=/^[0-7]+$/,L=/^\d+$/,I=/^[\dA-Fa-f]+$/,M=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,F=/[\u0000\t\u000A\u000D #/:?@[\\]]/,U=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,D=/[\t\u000A\u000D]/g,z=function(e,t){var n,r,o;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return T;if(!(n=V(t.slice(1,-1))))return T;e.host=n}else if(K(e)){if(t=v(t),M.test(t))return T;if(null===(n=B(t)))return T;e.host=n}else{if(F.test(t))return T;for(n="",r=p(t),o=0;o4)return e;for(n=[],r=0;r1&&"0"==o.charAt(0)&&(i=A.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?L:8==i?R:I).test(o))return e;a=parseInt(o,i)}n.push(a)}for(r=0;r=O(256,5-t))return null}else if(a>255)return null;for(u=n.pop(),r=0;r6)return;for(r=0;d();){if(o=null,r>0){if(!("."==d()&&r<4))return;f++}if(!N.test(d()))return;for(;N.test(d());){if(i=parseInt(d(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}l[c]=256*l[c]+o,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==d()){if(f++,!d())return}else if(d())return;l[c++]=t}else{if(null!==s)return;f++,s=++c}}if(null!==s)for(a=c-s,c=7;0!=c&&a>0;)u=l[c],l[c--]=l[s+a-1],l[s+--a]=u;else if(8!=c)return;return l},W=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},H={},$=d({},H,{" ":1,'"':1,"<":1,">":1,"`":1}),q=d({},$,{"#":1,"?":1,"{":1,"}":1}),Q=d({},q,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(e,t){var n=h(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(e){return f(G,e.scheme)},X=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},J=function(e,t){var n;return 2==e.length&&P.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&J(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&J(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},oe={},ie={},ae={},ue={},le={},ce={},se={},fe={},de={},pe={},he={},ve={},ye={},ge={},me={},be={},we={},xe={},Ee={},Se={},ke=function(e,t,n,o){var i,a,u,l,c,s=n||re,d=0,h="",v=!1,y=!1,g=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(U,"")),t=t.replace(D,""),i=p(t);d<=i.length;){switch(a=i[d],s){case re:if(!a||!P.test(a)){if(n)return _;s=ie;continue}h+=a.toLowerCase(),s=oe;break;case oe:if(a&&(j.test(a)||"+"==a||"-"==a||"."==a))h+=a.toLowerCase();else{if(":"!=a){if(n)return _;h="",s=ie,d=0;continue}if(n&&(K(e)!=f(G,h)||"file"==h&&(X(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=h,n)return void(K(e)&&G[e.scheme]==e.port&&(e.port=null));h="","file"==e.scheme?s=ye:K(e)&&o&&o.scheme==e.scheme?s=ae:K(e)?s=se:"/"==i[d+1]?(s=ue,d++):(e.cannotBeABaseURL=!0,e.path.push(""),s=xe)}break;case ie:if(!o||o.cannotBeABaseURL&&"#"!=a)return _;if(o.cannotBeABaseURL&&"#"==a){e.scheme=o.scheme,e.path=o.path.slice(),e.query=o.query,e.fragment="",e.cannotBeABaseURL=!0,s=Se;break}s="file"==o.scheme?ye:le;continue;case ae:if("/"!=a||"/"!=i[d+1]){s=le;continue}s=fe,d++;break;case ue:if("/"==a){s=de;break}s=we;continue;case le:if(e.scheme=o.scheme,a==r)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query;else if("/"==a||"\\"==a&&K(e))s=ce;else if("?"==a)e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query="",s=Ee;else{if("#"!=a){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.path.pop(),s=we;continue}e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,e.path=o.path.slice(),e.query=o.query,e.fragment="",s=Se}break;case ce:if(!K(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=o.username,e.password=o.password,e.host=o.host,e.port=o.port,s=we;continue}s=de}else s=fe;break;case se:if(s=fe,"/"!=a||"/"!=h.charAt(d+1))continue;d++;break;case fe:if("/"!=a&&"\\"!=a){s=de;continue}break;case de:if("@"==a){v&&(h="%40"+h),v=!0,u=p(h);for(var m=0;m65535)return C;e.port=K(e)&&x===G[e.scheme]?null:x,h=""}if(n)return;s=be;continue}return C}h+=a;break;case ye:if(e.scheme="file","/"==a||"\\"==a)s=ge;else{if(!o||"file"!=o.scheme){s=we;continue}if(a==r)e.host=o.host,e.path=o.path.slice(),e.query=o.query;else if("?"==a)e.host=o.host,e.path=o.path.slice(),e.query="",s=Ee;else{if("#"!=a){ee(i.slice(d).join(""))||(e.host=o.host,e.path=o.path.slice(),te(e)),s=we;continue}e.host=o.host,e.path=o.path.slice(),e.query=o.query,e.fragment="",s=Se}}break;case ge:if("/"==a||"\\"==a){s=me;break}o&&"file"==o.scheme&&!ee(i.slice(d).join(""))&&(J(o.path[0],!0)?e.path.push(o.path[0]):e.host=o.host),s=we;continue;case me:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&J(h))s=we;else if(""==h){if(e.host="",n)return;s=be}else{if(l=z(e,h))return l;if("localhost"==e.host&&(e.host=""),n)return;h="",s=be}continue}h+=a;break;case be:if(K(e)){if(s=we,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(s=we,"/"!=a))continue}else e.fragment="",s=Se;else e.query="",s=Ee;break;case we:if(a==r||"/"==a||"\\"==a&&K(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=h).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(te(e),"/"==a||"\\"==a&&K(e)||e.path.push("")):ne(h)?"/"==a||"\\"==a&&K(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&J(h)&&(e.host&&(e.host=""),h=h.charAt(0)+":"),e.path.push(h)),h="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",s=Ee):"#"==a&&(e.fragment="",s=Se)}else h+=Y(a,q);break;case xe:"?"==a?(e.query="",s=Ee):"#"==a?(e.fragment="",s=Se):a!=r&&(e.path[0]+=Y(a,H));break;case Ee:n||"#"!=a?a!=r&&("'"==a&&K(e)?e.query+="%27":e.query+="#"==a?"%23":Y(a,H)):(e.fragment="",s=Se);break;case Se:a!=r&&(e.fragment+=Y(a,$))}d++}},Oe=function(e){var t,n,r=s(this,Oe,"URL"),o=arguments.length>1?arguments[1]:void 0,a=String(e),u=E(r,{type:"URL"});if(void 0!==o)if(o instanceof Oe)t=S(o);else if(n=ke(t={},String(o)))throw TypeError(n);if(n=ke(u,a,null,t))throw TypeError(n);var l=u.searchParams=new w,c=x(l);c.updateSearchParams(u.query),c.updateURL=function(){u.query=String(l)||null},i||(r.href=Te.call(r),r.origin=Ce.call(r),r.protocol=Pe.call(r),r.username=je.call(r),r.password=Ne.call(r),r.host=Ae.call(r),r.hostname=Re.call(r),r.port=Le.call(r),r.pathname=Ie.call(r),r.search=Me.call(r),r.searchParams=Fe.call(r),r.hash=Ue.call(r))},_e=Oe.prototype,Te=function(){var e=S(this),t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,u=e.query,l=e.fragment,c=t+":";return null!==o?(c+="//",X(e)&&(c+=n+(r?":"+r:"")+"@"),c+=W(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(c+="?"+u),null!==l&&(c+="#"+l),c},Ce=function(){var e=S(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(r){return"null"}return"file"!=t&&K(e)?t+"://"+W(e.host)+(null!==n?":"+n:""):"null"},Pe=function(){return S(this).scheme+":"},je=function(){return S(this).username},Ne=function(){return S(this).password},Ae=function(){var e=S(this),t=e.host,n=e.port;return null===t?"":null===n?W(t):W(t)+":"+n},Re=function(){var e=S(this).host;return null===e?"":W(e)},Le=function(){var e=S(this).port;return null===e?"":String(e)},Ie=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Me=function(){var e=S(this).query;return e?"?"+e:""},Fe=function(){return S(this).searchParams},Ue=function(){var e=S(this).fragment;return e?"#"+e:""},De=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(i&&l(_e,{href:De(Te,(function(e){var t=S(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);x(t.searchParams).updateSearchParams(t.query)})),origin:De(Ce),protocol:De(Pe,(function(e){var t=S(this);ke(t,String(e)+":",re)})),username:De(je,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.username="";for(var r=0;r>1,e+=u(e/t);e>455;r+=36)e=u(e/35);return u(r+36*e/(e+38))},f=function(e){var t,n,o=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n=55296&&o<=56319&&n=f&&nu((r-d)/g))throw RangeError(a);for(d+=(y-f)*g,f=y,t=0;tr)throw RangeError(a);if(n==f){for(var m=d,b=36;;b+=36){var w=b<=p?1:b>=p+26?26:b-p;if(m
    +
    + +
    + +
    +
    ' + message + '
    '); } + daysInMonth(year, month) { + switch(month){ + case 1: + return (year%4 == 0 && year%100) || year%400 == 0 ? 29:28; + case 8: case 3: case 5: case 10: + return 30; + default: + return 31; + } + } + validateDate(date_str){ + if (date_str){ + var dates = date_str.match(/^([0-9]{4})(0[1-9]|[1-9]|1[0-2])(0[1-9]|[1-9]|[1-2][0-9]|3[0-1])$/); + if (dates) { + const year = parseInt(dates[1]); + const month = parseInt(dates[2])-1; + const day = parseInt(dates[3]); + return day > this.daysInMonth(year, month); + }else{ + return true; + } + }else{ + return false; + } + } + validateFieldIsValid(widget_type) { if (widget_type === ACCESS_COUNTER) { let access_val = $('#Access_counter').val() || "0"; @@ -1524,6 +1620,14 @@ class ComponentButtonLayout extends React.Component { error: "The input value exceeds 9 digits." }; } + + let count_start_date = $('count_start_date').val(); + if (this.validateDate(count_start_date)){ + return { + status: false, + error: "Count start date is in invalid format." + }; + } } return { status: true, @@ -1903,6 +2007,8 @@ class MainLayout extends React.Component { constructor(props) { super(props); let dataLoader = this.props.data_load; + let nowDate = this.generateNowDate(this); + let nowDateStr = nowDate.getFullYear()+"-"+("0"+(nowDate.getMonth()+1)).slice(-2)+"-"+("0"+nowDate.getDate()).slice(-2); this.state = { repository: dataLoader.repository_id, widget_type: dataLoader.widget_type, @@ -1920,14 +2026,18 @@ class MainLayout extends React.Component { multiLangSetting: dataLoader.multiLangSetting, multiLanguageChange: false, accessInitValue: 0, + nowDate: nowDateStr, + countStartDate: nowDateStr, isDisableSaveBtn: false, fixedHeaderBackgroundColor: dataLoader.settings.fixedHeaderBackgroundColor || DEFAULT_BG_COLOR, fixedHeaderTextColor: dataLoader.settings.fixedHeaderTextColor || '#808080', }; + this.getValueOfField = this.getValueOfField.bind(this); this.storeMultiLangSetting = this.storeMultiLangSetting.bind(this); this.initEditData = this.initEditData.bind(this); this.accessCounterValidation = this.accessCounterValidation.bind(this); + this.generateNowDate = this.generateNowDate.bind(this); } getValueOfField(key, value) { @@ -1995,6 +2105,9 @@ class MainLayout extends React.Component { case 'accessInitValue': this.setState({accessInitValue: value}); break; + case 'countStartDate': + this.setState({countStartDate: value}); + break; case 'isDisableSaveBtn': this.setState({isDisableSaveBtn: value}); break; @@ -2013,8 +2126,10 @@ class MainLayout extends React.Component { } let multiLangData = this.state.multiLangSetting[selectedLang]; let accessInitValue = 0; + let countStartDate = this.state.nowDate; if ((this.state.widget_type + "") === ACCESS_COUNTER && multiLangData.description) { accessInitValue = multiLangData.description.access_counter + countStartDate = multiLangData.description.count_start_date } if (multiLangData) { if ([FREE_DESCRIPTION_TYPE, NOTICE_TYPE, ACCESS_COUNTER, HEADER_TYPE, FOOTER_TYPE].indexOf(this.state.widget_type) > -1) { @@ -2022,7 +2137,8 @@ class MainLayout extends React.Component { multiLanguageChange: true, label: multiLangData['label'], settings: multiLangData['description'], - accessInitValue: accessInitValue + accessInitValue: accessInitValue, + countStartDate: countStartDate }); } else { this.setState({ @@ -2058,12 +2174,18 @@ class MainLayout extends React.Component { setting["description"] = this.state.settings; } let accessInitValue = this.state.accessInitValue; + let countStartDate = this.state.countStartDate; if ((this.state.widget_type + "") === ACCESS_COUNTER) { if (setting.description.access_counter) { accessInitValue = setting.description.access_counter; } else { setting.description.access_counter = accessInitValue; } + if (setting.description.count_start_date){ + countStartDate = setting.description.count_start_date; + }else{ + setting.description.count_start_date = countStartDate; + } } if ((this.state.widget_type + "") === ACCESS_COUNTER && this.accessCounterValidation(setting)) { delete setting.description["access_counter"]; @@ -2090,14 +2212,16 @@ class MainLayout extends React.Component { settings: currentSetting, multiLanguageChange: true, language: newLanguage, - accessInitValue: accessInitValue + accessInitValue: accessInitValue, + countStartDate: countStartDate }); } else { this.setState({ label: currentLabel, multiLanguageChange: true, language: newLanguage, - accessInitValue: accessInitValue + accessInitValue: accessInitValue, + countStartDate: countStartDate }); } this.setState({ @@ -2123,6 +2247,23 @@ class MainLayout extends React.Component { return !other_message; } + generateNowDate() { + let now; + $.ajax({ + url: '/api/admin/get_server_date', + method: 'GET', + async: false, + success: function (data, status) { + now = new Date(data.year,data.month-1,data.day); + }, + error: function (data, status) { + now = new Date(); + now.setFullYear(now.getFullYear() - 1); + } + }); + return now; + } + render() { return (
    @@ -2245,7 +2386,10 @@ class MainLayout extends React.Component { data_load={this.state.settings} language={this.state.language} data_change={this.state.multiLanguageChange} - init_value={this.state.accessInitValue}/> + init_value={this.state.accessInitValue} + init_count={this.state.countStartDate} + now_date={this.state.nowDate} + />
    + {% assets "weko_admin_date_picker_js" %}{% endassets %} + {%- endblock javascript %} diff --git a/modules/weko-gridlayout/weko_gridlayout/templates/weko_gridlayout/admin/edit_widget_settings.html b/modules/weko-gridlayout/weko_gridlayout/templates/weko_gridlayout/admin/edit_widget_settings.html index 031096b22d..5413193389 100644 --- a/modules/weko-gridlayout/weko_gridlayout/templates/weko_gridlayout/admin/edit_widget_settings.html +++ b/modules/weko-gridlayout/weko_gridlayout/templates/weko_gridlayout/admin/edit_widget_settings.html @@ -71,4 +71,6 @@ {% endassets %} + {% assets "weko_admin_date_picker_js" %}{% endassets %} + {%- endblock javascript %} diff --git a/modules/weko-gridlayout/weko_gridlayout/utils.py b/modules/weko-gridlayout/weko_gridlayout/utils.py index 24525986b0..a50d31f700 100644 --- a/modules/weko-gridlayout/weko_gridlayout/utils.py +++ b/modules/weko-gridlayout/weko_gridlayout/utils.py @@ -167,6 +167,7 @@ def update_access_counter_item(item, data_result): item['preceding_message'] = data_result.get('preceding_message') item['following_message'] = data_result.get('following_message') item['other_message'] = data_result.get('other_message') + item['count_start_date'] = data_result.get('count_start_date') def update_new_arrivals_item(item, data_result): @@ -321,6 +322,8 @@ def _build_access_counter_setting_data(result, setting): setting.get('other_message')) or '' result['preceding_message'] = Markup.escape( setting.get('preceding_message')) or '' + result['count_start_date'] = Markup.escape( + setting.get('count_start_date')) or '' def _build_new_arrivals_setting_data(result, setting): @@ -495,6 +498,7 @@ def convert_data_to_edit_pack(data): result_settings['following_message'] = settings.get( 'following_message') result_settings['other_message'] = settings.get('other_message') + result_settings['count_start_date'] = settings.get('count_start_date') if widget_type == config.WEKO_GRIDLAYOUT_NEW_ARRIVALS_TYPE: result_settings['new_dates'] = settings.get('new_dates') result_settings['display_result'] = settings.get('display_result') diff --git a/modules/weko-gridlayout/weko_gridlayout/views.py b/modules/weko-gridlayout/weko_gridlayout/views.py index b9c8e43c75..a679dd576b 100644 --- a/modules/weko-gridlayout/weko_gridlayout/views.py +++ b/modules/weko-gridlayout/weko_gridlayout/views.py @@ -465,20 +465,30 @@ def _add_url_rule(url_or_urls): @blueprint_api.route('/access_counter_record/' - '/', methods=['GET']) -def get_access_counter_record(repository_id, current_language): + '//', methods=['GET']) +def get_access_counter_record(repository_id, path,current_language): """Get access Top page value.""" cached_data = current_cache.get('access_counter') - if not cached_data: + if path == "main": widget_design_setting = WidgetDesignServices.get_widget_design_setting( repository_id, current_language or get_default_language()) + else: + page_id = WidgetDesignPage.get_by_url("/"+path).id + widget_design_setting = WidgetDesignPageServices.get_widget_design_setting( + page_id, current_language or get_default_language()) + widget_ids = [str(widget.get("widget_id")) for widget in widget_design_setting.get("widget-settings",{}) + if widget.get("type")==WEKO_GRIDLAYOUT_ACCESS_COUNTER_TYPE ] + if not cached_data or set(list(json.loads(cached_data.data).keys()))!=set(widget_ids): result = {} # need to logic check if widget_design_setting.get('widget-settings'): for widget in widget_design_setting['widget-settings']: if str(widget.get('type')) == \ WEKO_GRIDLAYOUT_ACCESS_COUNTER_TYPE: - start_date = widget.get('created_date') + if widget.get('count_start_date'): + start_date = widget.get('count_start_date') + else: + start_date = widget.get('created_date') if start_date: end_date = date.today().strftime("%Y-%m-%d") diff --git a/modules/weko-groups/requirements.txt b/modules/weko-groups/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-groups/requirements.txt +++ b/modules/weko-groups/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-groups/requirements2.txt b/modules/weko-groups/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-groups/requirements2.txt +++ b/modules/weko-groups/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-handle/requirements.txt b/modules/weko-handle/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-handle/requirements.txt +++ b/modules/weko-handle/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-handle/requirements2.txt b/modules/weko-handle/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-handle/requirements2.txt +++ b/modules/weko-handle/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-index-tree/requirements.txt b/modules/weko-index-tree/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-index-tree/requirements.txt +++ b/modules/weko-index-tree/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-index-tree/requirements2.txt b/modules/weko-index-tree/requirements2.txt index e5bf1543f3..e16d1d80f4 100644 --- a/modules/weko-index-tree/requirements2.txt +++ b/modules/weko-index-tree/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-index-tree/tests/conftest.py b/modules/weko-index-tree/tests/conftest.py index 5030f23b9c..25e45b7159 100644 --- a/modules/weko-index-tree/tests/conftest.py +++ b/modules/weko-index-tree/tests/conftest.py @@ -745,6 +745,13 @@ def indices(app, db): id=45, position=1 ) + testIndexSix = Index( + index_name="testIndexSix", + browsing_role="1,2,3,4,-98,-99", + public_state=True, + id=66, + position=4 + ) db.session.add(testIndexOne) @@ -753,7 +760,8 @@ def indices(app, db): db.session.add(testIndexThreeChild) db.session.add(testIndexMore) db.session.add(testIndexPrivate) - + db.session.add(testIndexSix) + return { 'index_dict': dict(testIndexThree), 'index_non_dict': testIndexThree, diff --git a/modules/weko-index-tree/tests/test_api.py b/modules/weko-index-tree/tests/test_api.py index 46613e4282..068ac152eb 100644 --- a/modules/weko-index-tree/tests/test_api.py +++ b/modules/weko-index-tree/tests/test_api.py @@ -595,6 +595,34 @@ def test_update_set_info(i18n_app, db, users, test_indices): # def delete_set_info(cls, action, index_id, id_list): # def get_public_indexes_list(cls): +# .tox/c1/bin/pytest --cov=weko_index_tree tests/test_api.py::test_Indexes_get_public_indexes_list -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-index-tree/.tox/c1/tmp +def test_Indexes_get_public_indexes_list(i18n_app, db): + def make_index(id, parent, position, index_name, index_name_english,public_state,public_date): + return Index( + id=id, + parent=parent,position=position, + index_name=index_name,index_name_english=index_name_english, + public_state=public_state,public_date=public_date + ) + + with db.session.begin_nested(): + db.session.add(make_index(1,0,0,'公開','publish',True,None)) + db.session.add(make_index(11,1,0,'公開_公開','publish',True,None)) + db.session.add(make_index(12,1,1,'公開_未公開','publish_notpublish',False,None)) + db.session.add(make_index(13,1,2,'公開_未来公開','publish_feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.add(make_index(2,0,1,'非公開','notpublish',False,None)) + db.session.add(make_index(21,2,0,'非公開_公開','notpublish_publish',True,None)) + db.session.add(make_index(22,2,1,'非公開_非公開','notpublish_notpublish',False,None)) + db.session.add(make_index(23,2,2,'非公開_未来公開','notpublish_feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.add(make_index(3,0,2,'未来公開','feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.add(make_index(31,3,0,'未来公開_公開','feature_publish',True,None)) + db.session.add(make_index(32,3,1,'未来公開_非公開','feature_notpublish',False,None)) + db.session.add(make_index(33,3,2,'未来公開_未来公開','feature_feature',True,datetime.strptime("2100/09/21","%Y/%m/%d"))) + db.session.commit() + + result = Indexes.get_public_indexes_list() + assert result == ["1", "11"] + # .tox/c1/bin/pytest --cov=weko_index_tree tests/test_api.py::test_indexes_get_index_tree -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-index-tree/.tox/c1/tmp def test_indexes_get_index_tree(i18n_app, db, redis_connect, users, db_records, test_indices, communities): os.environ['INVENIO_WEB_HOST_NAME'] = "test" diff --git a/modules/weko-index-tree/tests/test_utils.py b/modules/weko-index-tree/tests/test_utils.py index 76da43b98c..db20eea63a 100644 --- a/modules/weko-index-tree/tests/test_utils.py +++ b/modules/weko-index-tree/tests/test_utils.py @@ -54,6 +54,7 @@ import redis from redis import sentinel +from elasticsearch import helpers from elasticsearch.exceptions import NotFoundError from elasticsearch_dsl.query import Bool, Exists, Q, QueryString from flask import Markup, current_app, session @@ -477,13 +478,47 @@ def test_check_doi_in_index(i18n_app, indices, db_records): #*** def get_record_in_es_of_index(index_id, recursively=True): +#*** def check_doi_in_index_and_child_index(index_id, recursively=True): +# .tox/c1/bin/pytest --cov=weko_index_tree tests/test_utils.py::test_get_record_in_es_of_index -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-index-tree/.tox/c1/tmp def test_get_record_in_es_of_index(i18n_app, indices, db_records, esindex): # Test 1 assert not get_record_in_es_of_index(44, recursively=False) + assert not check_doi_in_index_and_child_index(44, recursively=False) # Test 2 # assert get_record_in_es_of_index(33) + def _generate_es_data(num, start_datetime=datetime.now()): + for i in range(num): + doc = { + "_index": i18n_app.config['INDEXER_DEFAULT_INDEX'], + "_type": "item-v1.0.0", + "_id": f"2d1a2520-9080-437f-a304-230adc8{i:05d}", + "_source": { + "_item_metadata": { + "title": [f"test_title_{i}"], + }, + "relation_version_is_last": True, + "path": ["66"], + "control_number": f"{i:05d}", + "_created": (start_datetime + timedelta(seconds=i)).isoformat(), + "publish_status": "0", + }, + } + if i % 2 == 0: + doc["_source"]["identifierRegistration"] = { + "identifierType": "DOI", + "value": f"10.9999/test_doi_{i:05d}", + } + yield doc + + generate_data_num = 30002 + helpers.bulk(esindex.client, _generate_es_data(generate_data_num), refresh='true') + + # result over 10000 + assert len(get_record_in_es_of_index(66)) == generate_data_num + assert len(check_doi_in_index_and_child_index(66)) == int(generate_data_num / 2) + # def check_doi_in_list_record_es(index_id): # .tox/c1/bin/pytest --cov=weko_index_tree tests/test_utils.py::test_check_doi_in_list_record_es -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-index-tree/.tox/c1/tmp @@ -542,16 +577,6 @@ def test_check_index_permissions(app, db, users, test_indices, db_records): assert check_index_permissions(index_path_list=["1", "2"], is_check_doi=True)==True -# *** def check_doi_in_index_and_child_index(index_id, recursively=True): -# def test_check_doi_in_index_and_child_index(i18n_app, indices, esindex, db_records, records2): -def test_check_doi_in_index_and_child_index(i18n_app, users, indices, esindex): - # Test 1 - assert len(check_doi_in_index_and_child_index(33, recursively=True)) == 0 - - # Test 2 - # assert len(check_doi_in_index_and_child_index(33, recursively=True)) > 0 - - #+++ def __get_redis_store(): def test___get_redis_store(i18n_app): assert __get_redis_store() @@ -640,7 +665,7 @@ def test_get_doi_items_in_index(app): # def get_editing_items_in_index(index_id, recursively=False): -# .tox/c1/bin/pytest --cov=weko_index_tree tests/test_utils.py::test_save_index_trees_to_redis -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-index-tree/.tox/c1/tmp +# .tox/c1/bin/pytest --cov=weko_index_tree tests/test_utils.py::test_get_editing_items_in_index -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-index-tree/.tox/c1/tmp def test_get_editing_items_in_index(app): _es_data = [ { @@ -657,12 +682,17 @@ def test_get_editing_items_in_index(app): with patch("weko_index_tree.utils.get_record_in_es_of_index", return_value=_es_data): with patch("weko_items_ui.utils.check_item_is_being_edit", return_value=True): with patch("invenio_pidstore.models.PersistentIdentifier.get", return_value=True): - res = get_editing_items_in_index(0) - assert res == ["1", "2"] - + with patch("weko_workflow.utils.bulk_check_an_item_is_locked", return_value=["1", "2"]): + res = get_editing_items_in_index(0) + assert res == ["1", "2"] + with patch("weko_items_ui.utils.check_item_is_being_edit", return_value=False): with patch("invenio_pidstore.models.PersistentIdentifier.get", return_value=True): - with patch("weko_workflow.utils.check_an_item_is_locked", return_value=False): + with patch("weko_workflow.utils.bulk_check_an_item_is_locked", return_value=["1"]): + res = get_editing_items_in_index(0) + assert res == ["1"] + + with patch("weko_workflow.utils.bulk_check_an_item_is_locked", return_value=[]): res = get_editing_items_in_index(0) assert res == [] diff --git a/modules/weko-index-tree/weko_index_tree/utils.py b/modules/weko-index-tree/weko_index_tree/utils.py index 700cb1afca..0a0b81003d 100644 --- a/modules/weko-index-tree/weko_index_tree/utils.py +++ b/modules/weko-index-tree/weko_index_tree/utils.py @@ -592,7 +592,9 @@ def get_record_in_es_of_index(index_id, recursively=True): @param index_id: @return: """ + from weko_search_ui.utils import execute_search_with_pagination from .api import Indexes + if recursively: child_idx = Indexes.get_child_list_recursive(index_id) else: @@ -601,6 +603,7 @@ def get_record_in_es_of_index(index_id, recursively=True): query_string = "relation_version_is_last:true" search = RecordsSearch( index=current_app.config['SEARCH_UI_SEARCH_INDEX']) + search = search.sort({"control_number": {"order": "asc"}}) must_query = [ QueryString(query=query_string), Q("terms", path=child_idx), @@ -612,9 +615,7 @@ def get_record_in_es_of_index(index_id, recursively=True): search = search.query( Bool(filter=must_query) ) - records = search.execute().to_dict().get('hits', {}).get('hits', []) - - return records + return execute_search_with_pagination(search, max_result_size=-1) def check_doi_in_list_record_es(index_id): @@ -818,15 +819,18 @@ def check_doi_in_index_and_child_index(index_id, recursively=True): Args: index_id (list): Record list. """ + from weko_search_ui.utils import execute_search_with_pagination from .api import Indexes if recursively: child_idx = Indexes.get_child_list_recursive(index_id) else: child_idx = [index_id] + query_string = "relation_version_is_last:true AND publish_status: {}".format(PublishStatus.PUBLIC.value) search = RecordsSearch( index=current_app.config['SEARCH_UI_SEARCH_INDEX']) + search = search.sort({"control_number": {"order": "asc"}}) must_query = [ QueryString(query=query_string), Q("terms", path=child_idx), @@ -836,8 +840,7 @@ def check_doi_in_index_and_child_index(index_id, recursively=True): search = search.query( Bool(filter=must_query) ) - records = search.execute().to_dict().get('hits', {}).get('hits', []) - return records + return execute_search_with_pagination(search, max_result_size=-1) def __get_redis_store(): @@ -1014,19 +1017,21 @@ def get_editing_items_in_index(index_id, recursively=False): @return: """ from weko_items_ui.utils import check_item_is_being_edit - from weko_workflow.utils import check_an_item_is_locked + from weko_workflow.utils import bulk_check_an_item_is_locked result = [] records = get_record_in_es_of_index(index_id, recursively) - for record in records: - item_id = record.get('_source', {}).get( - '_item_metadata', {}).get('control_number') - if check_item_is_being_edit( - PersistentIdentifier.get('recid', item_id)) or \ - check_an_item_is_locked(int(item_id)): + item_ids = [ + record.get('_source', {}).get('_item_metadata', {}).get('control_number') + for record in records + ] + for item_id in item_ids: + if check_item_is_being_edit(PersistentIdentifier.get('recid', item_id)): result.append(item_id) - return result + result.extend(bulk_check_an_item_is_locked(item_ids)) + + return sorted(list(set(result))) def save_index_trees_to_redis(tree, lang=None): """save inde_tree to redis for roles diff --git a/modules/weko-indextree-journal/coverage.xml b/modules/weko-indextree-journal/coverage.xml index 9c4ca131fd..a7781cb7fa 100644 --- a/modules/weko-indextree-journal/coverage.xml +++ b/modules/weko-indextree-journal/coverage.xml @@ -1,12 +1,12 @@ - + /code/modules/weko-indextree-journal/weko_indextree_journal - + @@ -115,7 +115,7 @@ - + @@ -179,10 +179,10 @@ - - - - + + + + @@ -365,7 +365,7 @@ - + @@ -446,7 +446,7 @@ - + @@ -459,7 +459,7 @@ - + @@ -501,7 +501,7 @@ - + @@ -512,45 +512,45 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - + @@ -563,87 +563,87 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -658,7 +658,7 @@ - + @@ -680,33 +680,33 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + - - + + - - - - - - - + + + + + + + diff --git a/modules/weko-indextree-journal/requirements.txt b/modules/weko-indextree-journal/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-indextree-journal/requirements.txt +++ b/modules/weko-indextree-journal/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-indextree-journal/requirements2.txt b/modules/weko-indextree-journal/requirements2.txt index 4a7e47ef20..73622de27c 100644 --- a/modules/weko-indextree-journal/requirements2.txt +++ b/modules/weko-indextree-journal/requirements2.txt @@ -49,7 +49,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-indextree-journal/tests/test_rest.py b/modules/weko-indextree-journal/tests/test_rest.py index 39a33c64b4..00f066c866 100644 --- a/modules/weko-indextree-journal/tests/test_rest.py +++ b/modules/weko-indextree-journal/tests/test_rest.py @@ -64,7 +64,7 @@ def test_create_blueprint(instance_path): instance_path=instance_path) app.config.update( SQLALCHEMY_DATABASE_URI=os.environ.get( - "SQLALCHEMY_DATABASE_URI", "sqlite:///test.db" + "SQLALCHEMY_DATABASE_URI", "postgresql+psycopg2://invenio:dbpass123@postgresql:5432/wekotest" ), TESTING=True, SERVER_NAME="TEST_SERVER", @@ -136,7 +136,9 @@ def test_get(self, app,client_rest, db, test_journals,users): test = '{"access_type":"F","coverage_depth":"abstract","coverage_notes":"","date_first_issue_online":"2022-01-01","date_last_issue_online":"2022-01-01","date_monograph_published_online":"","date_monograph_published_print":"","deleted":"","embargo_info":"","first_author":"","first_editor":"","ichushi_code":"","id":1,"index_id":1,"is_output":true,"jstage_code":"","language":"en","monograph_edition":"","monograph_volume":"","ncid":"","ndl_bibid":"","ndl_callno":"","num_first_issue_online":"","num_first_vol_online":"","num_last_issue_online":"","num_last_vol_online":"","online_identifier":"","owner_user_id":0,"parent_publication_title_id":"","preceding_publication_title_id":"","print_identifier":"","publication_title":"test journal 1","publication_type":"serial","publisher_name":"","title_alternative":"","title_id":1,"title_transcription":"","title_url":"search?search_type=2&q=1"}' view = JournalActionResource(ctx) res = view.get(1) - assert '"title_url":"search?search_type=2&q=1"' in str(res.data,"utf-8") + data = json.loads(res.data.decode("utf-8")) + assert "title_url" in data + assert "search?search_type=2&q=1" in data["title_url"] res = view.get(0) assert str(res.data,"utf-8") == "[]\n" diff --git a/modules/weko-items-autofill/coverage.xml b/modules/weko-items-autofill/coverage.xml index be47edce43..8444f06ca2 100644 --- a/modules/weko-items-autofill/coverage.xml +++ b/modules/weko-items-autofill/coverage.xml @@ -1,12 +1,12 @@ - + /code/modules/weko-items-autofill/weko_items_autofill - + @@ -162,7 +162,7 @@ - + @@ -292,12 +292,12 @@ - - - - - - + + + + + + @@ -380,11 +380,12 @@ - - + + + - - + + @@ -788,14 +789,14 @@ - - - - - - - - + + + + + + + + diff --git a/modules/weko-items-autofill/requirements.txt b/modules/weko-items-autofill/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-items-autofill/requirements.txt +++ b/modules/weko-items-autofill/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-items-autofill/requirements2.txt b/modules/weko-items-autofill/requirements2.txt index d5d089311f..aa3d83f677 100644 --- a/modules/weko-items-autofill/requirements2.txt +++ b/modules/weko-items-autofill/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-items-autofill/tests/data/itemtypes/mapping.json b/modules/weko-items-autofill/tests/data/itemtypes/mapping.json index 544398f5da..6b7eac3e90 100644 --- a/modules/weko-items-autofill/tests/data/itemtypes/mapping.json +++ b/modules/weko-items-autofill/tests/data/itemtypes/mapping.json @@ -132,5 +132,6 @@ }, "test_item15":{ "jpcoar_mapping":{"volume": { "@value": "test15_subitem1" } } - } + }, + "test_itemxx":"" } \ No newline at end of file diff --git a/modules/weko-items-autofill/tests/test_api.py b/modules/weko-items-autofill/tests/test_api.py index bde22cfbc8..9783e5a7ea 100644 --- a/modules/weko-items-autofill/tests/test_api.py +++ b/modules/weko-items-autofill/tests/test_api.py @@ -127,7 +127,7 @@ def test__init__(self): def test_create_endpoint(self): cini = CiNiiURL("test_naid") result = cini._create_endpoint() - assert result == "naid/test_naid.json" + assert result == "crid/test_naid.json" # def _create_url(self): @@ -136,7 +136,7 @@ def test_create_url(self,mocker): mocker.patch("weko_items_autofill.api.CiNiiURL._create_endpoint",return_value="naid/test_naid.json") cini = CiNiiURL("test_naid") result = cini._create_url() - assert result == "https://ci.nii.ac.jp/naid/test_naid.json" + assert result == "https://cir.nii.ac.jp/naid/test_naid.json" # def url(self): @@ -154,7 +154,7 @@ def test_do_http_request(self,mocker): mock_get = mocker.patch("weko_items_autofill.api.requests.get") cini = CiNiiURL("test_naid") cini._do_http_request() - mock_get.assert_called_with("https://ci.nii.ac.jp/naid/test_naid.json", + mock_get.assert_called_with("https://cir.nii.ac.jp/crid/test_naid.json", timeout=5,proxies={"http":"test_http_proxy","https":"test_https_proxy"}) diff --git a/modules/weko-items-autofill/tests/test_utils.py b/modules/weko-items-autofill/tests/test_utils.py index 2ce9f89bbd..492253d2dc 100644 --- a/modules/weko-items-autofill/tests/test_utils.py +++ b/modules/weko-items-autofill/tests/test_utils.py @@ -236,7 +236,7 @@ def test_get_title_pubdate_path(app, itemtypes): } # not reached break - all_false_mapping = {"test1": {}, "test2": {}} + all_false_mapping = {"test1": {}, "test2": {}, "test3":""} with patch( "weko_items_autofill.utils.Mapping.get_record", return_value=all_false_mapping ): @@ -479,6 +479,8 @@ def test_pack_data_with_multiple_type_cinii(): assert result == [ {"@value": "13402625", "@type": "PISSN"}, ] + result = pack_data_with_multiple_type_cinii(data, "test_type1", "test_type2") + assert result == [] # def get_cinii_creator_data(data): @@ -487,10 +489,14 @@ def test_get_cinii_creator_data(): data = json_data("data/cinii_response_sample1.json")['response']['creator'] result = get_cinii_creator_data(data) test = [ - {"@value":"テスト 太郎", "@language":"ja"}, - {"@value":"TEST Taro", "@language":"en"}, - {"@value":"テスト 三郎", "@language":"ja"}, - {"@value":"TEST Saburo", "@language":"en"}, + [ + {"@value":"テスト 太郎", "@language":"ja"}, + {"@value":"TEST Taro", "@language":"en"} + ], + [ + {"@value":"テスト 三郎", "@language":"ja"}, + {"@value":"TEST Saburo", "@language":"en"} + ], ] assert result == test @@ -499,10 +505,14 @@ def test_get_cinii_creator_data(): def test_get_cinii_contributor_data(): data = json_data("data/cinii_response_sample1.json")['response']["contributor"] test = [ - {"@value": "テスト 次郎", "@language": "ja"}, - {"@value": "TEST Ziro", "@language": "en"}, - {"@value": "テスト 花子", "@language": "ja"}, - {"@value": "TEST Hanako", "@language": "en"}, + [ + {"@value": "テスト 次郎", "@language": "ja"}, + {"@value": "TEST Ziro", "@language": "en"} + ], + [ + {"@value": "テスト 花子", "@language": "ja"}, + {"@value": "TEST Hanako", "@language": "en"} + ], ] result = get_cinii_contributor_data(data) assert result == test @@ -623,6 +633,10 @@ def test_get_cinii_data_by_key(app): result = get_cinii_data_by_key(api, "key") assert result == {} + api = {"response": None} + result = get_cinii_data_by_key(api, "key") + assert result == {} + api = json_data("data/cinii_response_sample1.json") test = { "title": [ @@ -635,16 +649,24 @@ def test_get_cinii_data_by_key(app): {"@value": "別タイトル", "@language": "ja"}, ], "creator": [ - {"@value": "テスト 太郎", "@language": "ja"}, - {"@value": "TEST Taro", "@language": "en"}, - {"@value": "テスト 三郎", "@language": "ja"}, - {"@value": "TEST Saburo", "@language": "en"}, + [ + {"@value": "テスト 太郎", "@language": "ja"}, + {"@value": "TEST Taro", "@language": "en"} + ], + [ + {"@value": "テスト 三郎", "@language": "ja"}, + {"@value": "TEST Saburo", "@language": "en"} + ], ], "contributor": [ - {"@value": "テスト 次郎", "@language": "ja"}, - {"@value": "TEST Ziro", "@language": "en"}, - {"@value": "テスト 花子", "@language": "ja"}, - {"@value": "TEST Hanako", "@language": "en"} + [ + {"@value": "テスト 次郎", "@language": "ja"}, + {"@value": "TEST Ziro", "@language": "en"} + ], + [ + {"@value": "テスト 花子", "@language": "ja"}, + {"@value": "TEST Hanako", "@language": "en"} + ], ], "description": [ {"@value": "this is test abstract.", "@type": "Abstract", "@language": "en"}, @@ -1688,11 +1710,11 @@ def test_get_workflow_journal(app, db, actions): db.session.commit() # not exist journal - result = get_workflow_journal(100) + result = get_workflow_journal(str(100)) assert result == None # exist journal - result = get_workflow_journal(1) + result = get_workflow_journal(str(1)) assert result == {"key": "value"} diff --git a/modules/weko-items-ui/requirements.txt b/modules/weko-items-ui/requirements.txt index 73ef065254..f62f1a4583 100644 --- a/modules/weko-items-ui/requirements.txt +++ b/modules/weko-items-ui/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-items-ui/requirements2.txt b/modules/weko-items-ui/requirements2.txt index 4cfceb72d6..059381f7f9 100644 --- a/modules/weko-items-ui/requirements2.txt +++ b/modules/weko-items-ui/requirements2.txt @@ -49,7 +49,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-items-ui/tests/conftest.py b/modules/weko-items-ui/tests/conftest.py index c7afc3669c..a4d23fc53e 100644 --- a/modules/weko-items-ui/tests/conftest.py +++ b/modules/weko-items-ui/tests/conftest.py @@ -90,7 +90,7 @@ from sqlalchemy_utils.functions import create_database, database_exists from weko_admin import WekoAdmin from weko_admin.config import WEKO_ADMIN_DEFAULT_ITEM_EXPORT_SETTINGS -from weko_admin.models import SessionLifetime,RankingSettings +from weko_admin.models import SessionLifetime,RankingSettings,Identifier from weko_deposit import WekoDeposit from weko_deposit.api import WekoIndexer from weko_deposit.config import DEPOSIT_RECORDS_API,WEKO_DEPOSIT_ITEMS_CACHE_PREFIX @@ -514,6 +514,38 @@ def users(app, db): ] +@pytest.fixture() +def identifier(db): + identifier_info = { + "Root Index":{ + "JaLC": "1234", + "Crossref": "2345", + "DataCite": "3456", + "NDL JaLC": "4567", + } + } + identifiers = [] + for index, info in identifier_info.items(): + identifiers.append(Identifier( + repository=index, + jalc_flag=True, + jalc_crossref_flag=True, + jalc_datacite_flag=True, + ndl_jalc_flag=True, + jalc_doi=info["JaLC"], + jalc_crossref_doi=info["Crossref"], + jalc_datacite_doi=info["DataCite"], + ndl_jalc_doi=info["NDL JaLC"], + suffix="", + created_userId=1, + created_date=datetime.strptime("2018/07/28 0:00:00", "%Y/%m/%d %H:%M:%S"), + updated_userId=1, + updated_date=datetime.strptime("2018/07/28 0:00:00", "%Y/%m/%d %H:%M:%S"), + )) + db.session.add_all(identifiers) + db.session.commit() + return identifier_info + @pytest.fixture() def db_oaischema(app, db): diff --git a/modules/weko-items-ui/tests/data/itemtype_mapping.json b/modules/weko-items-ui/tests/data/itemtype_mapping.json index 18bbafed87..77e080d3a8 100644 --- a/modules/weko-items-ui/tests/data/itemtype_mapping.json +++ b/modules/weko-items-ui/tests/data/itemtype_mapping.json @@ -1 +1 @@ -{"pubdate": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": "", "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": ""}, "system_file": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"system_file": {"URI": {"@value": "subitem_systemfile_filename_uri", "@attributes": {"label": "subitem_systemfile_filename_label", "objectType": "subitem_systemfile_filename_type"}}, "date": {"@value": "subitem_systemfile_datetime_date", "@attributes": {"dateType": "subitem_systemfile_datetime_type"}}, "extent": {"@value": "subitem_systemfile_size"}, "version": {"@value": "subitem_systemfile_version"}, "mimeType": {"@value": "subitem_systemfile_mimetype"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"system_file": {"URI": {"@value": "subitem_systemfile_filename_uri", "@attributes": {"label": "subitem_systemfile_filename_label", "objectType": "subitem_systemfile_filename_type"}}, "date": {"@value": "subitem_systemfile_datetime_date", "@attributes": {"dateType": "subitem_systemfile_datetime_type"}}, "extent": {"@value": "subitem_systemfile_size"}, "version": {"@value": "subitem_systemfile_version"}, "mimeType": {"@value": "subitem_systemfile_mimetype"}}}}, "item_1617186331708": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"title": {"@value": "subitem_1551255647225", "@attributes": {"xml:lang": "subitem_1551255648112"}}}, "junii2_mapping": "", "oai_dc_mapping": {"title": {"@value": "subitem_1551255647225"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"title": {"@value": "subitem_1551255647225", "@attributes": {"xml:lang": "subitem_1551255648112"}}}}, "item_1617186385884": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"alternative": {"@value": "subitem_1551255720400", "@attributes": {"xml:lang": "subitem_1551255721061"}}}, "junii2_mapping": "", "oai_dc_mapping": {"title": {"@value": "subitem_1551255720400"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"alternative": {"@value": "subitem_1551255720400", "@attributes": {"xml:lang": "subitem_1551255721061"}}}}, "item_1617186419668": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"creator": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "affiliation": {"nameIdentifier": {"@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme"}}, "affiliationName": {"@value": "creatorAffiliations.affiliationNames.affiliationName", "@attributes": {"xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang"}}}, "creatorName": {"@value": "creatorNames.creatorName", "@attributes": {"xml:lang": "creatorNames.creatorNameLang"}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "creatorAlternative": {"@value": "creatorAlternatives.creatorAlternative", "@attributes": {"xml:lang": "creatorAlternatives.creatorAlternativeLang"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"creator": {"@value": "creatorNames.creatorName,nameIdentifiers.nameIdentifier"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"creator": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "affiliation": {"nameIdentifier": {"@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme"}}, "affiliationName": {"@value": "creatorAffiliations.affiliationNames.affiliationName", "@attributes": {"xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang"}}}, "creatorName": {"@value": "creatorNames.creatorName", "@attributes": {"xml:lang": "creatorNames.creatorNameLang"}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "creatorAlternative": {"@value": "creatorAlternatives.creatorAlternative", "@attributes": {"xml:lang": "creatorAlternatives.creatorAlternativeLang"}}}}}, "item_1617186476635": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"accessRights": {"@value": "subitem_1522299639480", "@attributes": {"rdf:resource": "subitem_1600958577026"}}}, "junii2_mapping": "", "oai_dc_mapping": {"rights": {"@value": "subitem_1522299639480"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"accessRights": {"@value": "subitem_1522299639480", "@attributes": {"rdf:resource": "subitem_1600958577026"}}}}, "item_1617186499011": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"rights": {"@value": "subitem_1522651041219", "@attributes": {"xml:lang": "subitem_1522650717957", "rdf:resource": "subitem_1522650727486"}}}, "junii2_mapping": "", "oai_dc_mapping": {"rights": {"@value": "subitem_1522651041219"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"rights": {"@value": "subitem_1522651041219", "@attributes": {"xml:lang": "subitem_1522650717957", "rdf:resource": "subitem_1522650727486"}}}}, "item_1617186609386": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"subject": {"@value": "subitem_1523261968819", "@attributes": {"xml:lang": "subitem_1522299896455", "subjectURI": "subitem_1522300048512", "subjectScheme": "subitem_1522300014469"}}}, "junii2_mapping": "", "oai_dc_mapping": {"subject": {"@value": "subitem_1523261968819"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"subject": {"@value": "subitem_1523261968819", "@attributes": {"xml:lang": "subitem_1522299896455", "subjectURI": "subitem_1522300048512", "subjectScheme": "subitem_1522300014469"}}}}, "item_1617186626617": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"description": {"@value": "subitem_description", "@attributes": {"xml:lang": "subitem_description_language", "descriptionType": "subitem_description_type"}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "subitem_description"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"description": {"@value": "subitem_description", "@attributes": {"xml:lang": "subitem_description_language", "descriptionType": "subitem_description_type"}}}}, "item_1617186643794": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"publisher": {"@value": "subitem_1522300316516", "@attributes": {"xml:lang": "subitem_1522300295150"}}}, "junii2_mapping": "", "oai_dc_mapping": {"publisher": {"@value": "subitem_1522300316516"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"publisher": {"@value": "subitem_1522300316516", "@attributes": {"xml:lang": "subitem_1522300295150"}}}}, "item_1617186660861": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"date": {"@value": "subitem_1522300722591", "@attributes": {"dateType": "subitem_1522300695726"}}}, "junii2_mapping": "", "oai_dc_mapping": {"date": {"@value": "subitem_1522300722591"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"date": {"@value": "subitem_1522300722591", "@attributes": {"dateType": "subitem_1522300695726"}}}}, "item_1617186702042": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"language": {"@value": "subitem_1551255818386"}}, "junii2_mapping": "", "oai_dc_mapping": {"language": {"@value": "subitem_1551255818386"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"language": {"@value": "subitem_1551255818386"}}}, "item_1617186783814": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_identifier_uri", "@attributes": {"identifierType": "subitem_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_identifier_uri"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_identifier_uri", "@attributes": {"identifierType": "subitem_identifier_type"}}}}, "item_1617186819068": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifierRegistration": {"@value": "subitem_identifier_reg_text", "@attributes": {"identifierType": "subitem_identifier_reg_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifierRegistration": {"@value": "subitem_identifier_reg_text", "@attributes": {"identifierType": "subitem_identifier_reg_type"}}}}, "item_1617186859717": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"temporal": {"@value": "subitem_1522658031721", "@attributes": {"xml:lang": "subitem_1522658018441"}}}, "junii2_mapping": "", "oai_dc_mapping": {"coverage": {"@value": "subitem_1522658031721"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"temporal": {"@value": "subitem_1522658031721", "@attributes": {"xml:lang": "subitem_1522658018441"}}}}, "item_1617186882738": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"geoLocation": {"geoLocationBox": {"eastBoundLongitude": {"@value": "subitem_geolocation_box.subitem_east_longitude"}, "northBoundLatitude": {"@value": "subitem_geolocation_box.subitem_north_latitude"}, "southBoundLatitude": {"@value": "subitem_geolocation_box.subitem_south_latitude"}, "westBoundLongitude": {"@value": "subitem_geolocation_box.subitem_west_longitude"}}, "geoLocationPlace": {"@value": "subitem_geolocation_place.subitem_geolocation_place_text"}, "geoLocationPoint": {"pointLatitude": {"@value": "subitem_geolocation_point.subitem_point_latitude"}, "pointLongitude": {"@value": "subitem_geolocation_point.subitem_point_longitude"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"coverage": {"@value": "subitem_geolocation_place.subitem_geolocation_place_text"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"geoLocation": {"geoLocationBox": {"eastBoundLongitude": {"@value": "subitem_geolocation_box.subitem_east_longitude"}, "northBoundLatitude": {"@value": "subitem_geolocation_box.subitem_north_latitude"}, "southBoundLatitude": {"@value": "subitem_geolocation_box.subitem_south_latitude"}, "westBoundLongitude": {"@value": "subitem_geolocation_box.subitem_west_longitude"}}, "geoLocationPlace": {"@value": "subitem_geolocation_place.subitem_geolocation_place_text"}, "geoLocationPoint": {"pointLatitude": {"@value": "subitem_geolocation_point.subitem_point_latitude"}, "pointLongitude": {"@value": "subitem_geolocation_point.subitem_point_longitude"}}}}}, "item_1617186901218": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"fundingReference": {"awardTitle": {"@value": "subitem_1522399651758.subitem_1522721929892", "@attributes": {"xml:lang": "subitem_1522399651758.subitem_1522721910626"}}, "funderName": {"@value": "subitem_1522399412622.subitem_1522737543681", "@attributes": {"xml:lang": "subitem_1522399412622.subitem_1522399416691"}}, "awardNumber": {"@value": "subitem_1522399571623.subitem_1522399628911", "@attributes": {"awardURI": "subitem_1522399571623.subitem_1522399585738"}}, "funderIdentifier": {"@value": "subitem_1522399143519.subitem_1522399333375", "@attributes": {"funderIdentifierType": "subitem_1522399143519.subitem_1522399281603"}}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"fundingReference": {"awardTitle": {"@value": "subitem_1522399651758.subitem_1522721929892", "@attributes": {"xml:lang": "subitem_1522399651758.subitem_1522721910626"}}, "funderName": {"@value": "subitem_1522399412622.subitem_1522737543681", "@attributes": {"xml:lang": "subitem_1522399412622.subitem_1522399416691"}}, "awardNumber": {"@value": "subitem_1522399571623.subitem_1522399628911", "@attributes": {"awardURI": "subitem_1522399571623.subitem_1522399585738"}}, "funderIdentifier": {"@value": "subitem_1522399143519.subitem_1522399333375", "@attributes": {"funderIdentifierType": "subitem_1522399143519.subitem_1522399281603"}}}}}, "item_1617186920753": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"sourceIdentifier": {"@value": "subitem_1522646572813", "@attributes": {"identifierType": "subitem_1522646500366"}}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1522646572813"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"sourceIdentifier": {"@value": "subitem_1522646572813", "@attributes": {"identifierType": "subitem_1522646500366"}}}}, "item_1617186941041": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"sourceTitle": {"@value": "subitem_1522650091861", "@attributes": {"xml:lang": "subitem_1522650068558"}}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1522650091861"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"sourceTitle": {"@value": "subitem_1522650091861", "@attributes": {"xml:lang": "subitem_1522650068558"}}}}, "item_1617186959569": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"volume": {"@value": "subitem_1551256328147"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256328147"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"volume": {"@value": "subitem_1551256328147"}}}, "item_1617186981471": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"issue": {"@value": "subitem_1551256294723"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256294723"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"issue": {"@value": "subitem_1551256294723"}}}, "item_1617186994930": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"numPages": {"@value": "subitem_1551256248092"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256248092"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"numPages": {"@value": "subitem_1551256248092"}}}, "item_1617187024783": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"pageStart": {"@value": "subitem_1551256198917"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256198917"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"pageStart": {"@value": "subitem_1551256198917"}}}, "item_1617187045071": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"pageEnd": {"@value": "subitem_1551256185532"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256185532"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"pageEnd": {"@value": "subitem_1551256185532"}}}, "item_1617187056579": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"date": {"@value": "bibliographicIssueDates.bibliographicIssueDate", "@attributes": {"dateType": "bibliographicIssueDates.bibliographicIssueDateType"}}, "issue": {"@value": "bibliographicIssueNumber"}, "volume": {"@value": "bibliographicVolumeNumber"}, "pageEnd": {"@value": "bibliographicPageEnd"}, "numPages": {"@value": "bibliographicNumberOfPages"}, "pageStart": {"@value": "bibliographicPageStart"}, "sourceTitle": {"@value": "bibliographic_titles.bibliographic_title", "@attributes": {"xml:lang": "bibliographic_titles.bibliographic_titleLang"}}}, "junii2_mapping": "", "oai_dc_mapping": {"date": {"@value": "bibliographicIssueDates.bibliographicIssueDate"}, "identifier": {"@value": "bibliographic_titles.bibliographic_title,bibliographicIssueNumber,bibliographicVolumeNumber,bibliographicPageEnd,bibliographicPageStart"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"date": {"@value": "bibliographicIssueDates.bibliographicIssueDate", "@attributes": {"dateType": "bibliographicIssueDates.bibliographicIssueDateType"}}, "issue": {"@value": "bibliographicIssueNumber"}, "volume": {"@value": "bibliographicVolumeNumber"}, "pageEnd": {"@value": "bibliographicPageEnd"}, "numPages": {"@value": "bibliographicNumberOfPages"}, "pageStart": {"@value": "bibliographicPageStart"}, "sourceTitle": {"@value": "bibliographic_titles.bibliographic_title", "@attributes": {"xml:lang": "bibliographic_titles.bibliographic_titleLang"}}}}, "item_1617187087799": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"dissertationNumber": {"@value": "subitem_1551256171004"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256171004"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"dissertationNumber": {"@value": "subitem_1551256171004"}}}, "item_1617187112279": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"degreeName": {"@value": "subitem_1551256126428", "@attributes": {"xml:lang": "subitem_1551256129013"}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "subitem_1551256126428"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"degreeName": {"@value": "subitem_1551256126428", "@attributes": {"xml:lang": "subitem_1551256129013"}}}}, "item_1617187136212": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"dateGranted": {"@value": "subitem_1551256096004"}}, "junii2_mapping": "", "oai_dc_mapping": {"date": {"@value": "subitem_1551256096004"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"dateGranted": {"@value": "subitem_1551256096004"}}}, "item_1617187187528": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"conference": {"conferenceDate": {"@value": "subitem_1599711699392.subitem_1599711704251", "@attributes": {"endDay": "subitem_1599711699392.subitem_1599711735410", "endYear": "subitem_1599711699392.subitem_1599711743722", "endMonth": "subitem_1599711699392.subitem_1599711739022", "startDay": "subitem_1599711699392.subitem_1599711712451", "xml:lang": "subitem_1599711699392.subitem_1599711745532", "startYear": "subitem_1599711699392.subitem_1599711731891", "startMonth": "subitem_1599711699392.subitem_1599711727603"}}, "conferenceName": {"@value": "subitem_1599711633003.subitem_1599711636923", "@attributes": {"xml:lang": "subitem_1599711633003.subitem_1599711645590"}}, "conferenceVenue": {"@value": "subitem_1599711758470.subitem_1599711769260", "@attributes": {"xml:lang": "subitem_1599711758470.subitem_1599711775943"}}, "conferenceCountry": {"@value": "subitem_1599711813532"}, "conferenceSponsor": {"@value": "subitem_1599711660052.subitem_1599711680082", "@attributes": {"xml:lang": "subitem_1599711660052.subitem_1599711686511"}}, "conferenceSequence": {"@value": "subitem_1599711655652"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"conference": {"conferenceDate": {"@value": "subitem_1599711699392.subitem_1599711704251", "@attributes": {"endDay": "subitem_1599711699392.subitem_1599711735410", "endYear": "subitem_1599711699392.subitem_1599711743722", "endMonth": "subitem_1599711699392.subitem_1599711739022", "startDay": "subitem_1599711699392.subitem_1599711712451", "xml:lang": "subitem_1599711699392.subitem_1599711745532", "startYear": "subitem_1599711699392.subitem_1599711731891", "startMonth": "subitem_1599711699392.subitem_1599711727603"}}, "conferenceName": {"@value": "subitem_1599711633003.subitem_1599711636923", "@attributes": {"xml:lang": "subitem_1599711633003.subitem_1599711645590"}}, "conferenceVenue": {"@value": "subitem_1599711758470.subitem_1599711769260", "@attributes": {"xml:lang": "subitem_1599711758470.subitem_1599711775943"}}, "conferenceCountry": {"@value": "subitem_1599711813532"}, "conferenceSponsor": {"@value": "subitem_1599711660052.subitem_1599711680082", "@attributes": {"xml:lang": "subitem_1599711660052.subitem_1599711686511"}}, "conferenceSequence": {"@value": "subitem_1599711655652"}}}}, "item_1617258105262": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"type": {"@value": "resourcetype", "@attributes": {"rdf:resource": "resourceuri"}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "resourceuri"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"type": {"@value": "resourcetype", "@attributes": {"rdf:resource": "resourceuri"}}}}, "item_1617265215918": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"versiontype": {"@value": "subitem_1522305645492", "@attributes": {"rdf:resource": "subitem_1600292170262"}}}, "junii2_mapping": "", "oai_dc_mapping": {"type": {"@value": "subitem_1522305645492"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"versiontype": {"@value": "subitem_1522305645492", "@attributes": {"rdf:resource": "subitem_1600292170262"}}}}, "item_1617349709064": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"contributor": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "@attributes": {"contributorType": "contributorType"}, "affiliation": {"nameIdentifier": {"@value": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationURI", "nameIdentifierScheme": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationScheme"}}, "affiliationName": {"@value": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationName", "@attributes": {"xml:lang": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationNameLang"}}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "contributorName": {"@value": "contributorNames.contributorName", "@attributes": {"xml:lang": "contributorNames.lang"}}, "contributorAlternative": {"@value": "contributorAlternatives.contributorAlternative", "@attributes": {"xml:lang": "contributorAlternatives.contributorAlternativeLang"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"contributor": {"@value": "contributorNames.contributorName,nameIdentifiers.nameIdentifier"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"contributor": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "@attributes": {"contributorType": "contributorType"}, "affiliation": {"nameIdentifier": {"@value": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationURI", "nameIdentifierScheme": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationScheme"}}, "affiliationName": {"@value": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationName", "@attributes": {"xml:lang": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationNameLang"}}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "contributorName": {"@value": "contributorNames.contributorName", "@attributes": {"xml:lang": "contributorNames.lang"}}, "contributorAlternative": {"@value": "contributorAlternatives.contributorAlternative", "@attributes": {"xml:lang": "contributorAlternatives.contributorAlternativeLang"}}}}}, "item_1617349808926": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"version": {"@value": "subitem_1523263171732"}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"version": {"@value": "subitem_1523263171732"}}}, "item_1617351524846": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"apc": {"@value": "subitem_1523260933860"}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"apc": {"@value": "subitem_1523260933860"}}}, "item_1617353299429": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"relation": {"@attributes": {"relationType": "subitem_1522306207484"}, "relatedTitle": {"@value": "subitem_1523320863692.subitem_1523320909613", "@attributes": {"xml:lang": "subitem_1523320863692.subitem_1523320867455"}}, "relatedIdentifier": {"@value": "subitem_1522306287251.subitem_1522306436033", "@attributes": {"identifierType": "subitem_1522306287251.subitem_1522306382014"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"relation": {"@value": "subitem_1522306287251.subitem_1522306436033,subitem_1523320863692.subitem_1523320909613"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"relation": {"@attributes": {"relationType": "subitem_1522306207484"}, "relatedTitle": {"@value": "subitem_1523320863692.subitem_1523320909613", "@attributes": {"xml:lang": "subitem_1523320863692.subitem_1523320867455"}}, "relatedIdentifier": {"@value": "subitem_1522306287251.subitem_1522306436033", "@attributes": {"identifierType": "subitem_1522306287251.subitem_1522306382014"}}}}}, "item_1617605131499": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"file": {"URI": {"@value": "url.url", "@attributes": {"label": "url.label", "objectType": "url.objectType"}}, "date": {"@value": "fileDate.fileDateValue", "@attributes": {"dateType": "fileDate.fileDateType"}}, "extent": {"@value": "filesize.value"}, "version": {"@value": "version"}, "mimeType": {"@value": "format"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"file": {"URI": {"@value": "url.url", "@attributes": {"label": "url.label", "objectType": "url.objectType"}}, "date": {"@value": "fileDate.fileDateValue", "@attributes": {"dateType": "fileDate.fileDateType"}}, "extent": {"@value": "filesize.value"}, "version": {"@value": "version"}, "mimeType": {"@value": "format"}}}}, "item_1617610673286": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"rightsHolder": {"nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "rightsHolderName": {"@value": "rightHolderNames.rightHolderName", "@attributes": {"xml:lang": "rightHolderNames.rightHolderLanguage"}}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"rightsHolder": {"nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "rightsHolderName": {"@value": "rightHolderNames.rightHolderName", "@attributes": {"xml:lang": "rightHolderNames.rightHolderLanguage"}}}}}, "item_1617620223087": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": "", "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": ""}, "item_1617944105607": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"degreeGrantor": {"nameIdentifier": {"@value": "subitem_1551256015892.subitem_1551256027296", "@attributes": {"nameIdentifierScheme": "subitem_1551256015892.subitem_1551256029891"}}, "degreeGrantorName": {"@value": "subitem_1551256037922.subitem_1551256042287", "@attributes": {"xml:lang": "subitem_1551256037922.subitem_1551256047619"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "subitem_1551256037922.subitem_1551256042287"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"degreeGrantor": {"nameIdentifier": {"@value": "subitem_1551256015892.subitem_1551256027296", "@attributes": {"nameIdentifierScheme": "subitem_1551256015892.subitem_1551256029891"}}, "degreeGrantorName": {"@value": "subitem_1551256037922.subitem_1551256042287", "@attributes": {"xml:lang": "subitem_1551256037922.subitem_1551256047619"}}}}}, "system_identifier_doi": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}}, "system_identifier_hdl": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}}, "system_identifier_uri": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}}} \ No newline at end of file +{"pubdate": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": "", "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": ""}, "system_file": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"system_file": {"URI": {"@value": "subitem_systemfile_filename_uri", "@attributes": {"label": "subitem_systemfile_filename_label", "objectType": "subitem_systemfile_filename_type"}}, "date": {"@value": "subitem_systemfile_datetime_date", "@attributes": {"dateType": "subitem_systemfile_datetime_type"}}, "extent": {"@value": "subitem_systemfile_size"}, "version": {"@value": "subitem_systemfile_version"}, "mimeType": {"@value": "subitem_systemfile_mimetype"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"system_file": {"URI": {"@value": "subitem_systemfile_filename_uri", "@attributes": {"label": "subitem_systemfile_filename_label", "objectType": "subitem_systemfile_filename_type"}}, "date": {"@value": "subitem_systemfile_datetime_date", "@attributes": {"dateType": "subitem_systemfile_datetime_type"}}, "extent": {"@value": "subitem_systemfile_size"}, "version": {"@value": "subitem_systemfile_version"}, "mimeType": {"@value": "subitem_systemfile_mimetype"}}}}, "item_1617186331708": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"title": {"@value": "subitem_1551255647225", "@attributes": {"xml:lang": "subitem_1551255648112"}}}, "junii2_mapping": "", "oai_dc_mapping": {"title": {"@value": "subitem_1551255647225"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"title": {"@value": "subitem_1551255647225", "@attributes": {"xml:lang": "subitem_1551255648112"}}}}, "item_1617186331709": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"title": {"@value": "subitem_1551255647226", "@attributes": {"xml:lang": "subitem_1551255648113"}}}, "junii2_mapping": "", "oai_dc_mapping": {"title": {"@value": "subitem_1551255647226"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"title": {"@value": "subitem_1551255647226", "@attributes": {"xml:lang": "subitem_1551255648113"}}}}, "item_1617186385884": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"alternative": {"@value": "subitem_1551255720400", "@attributes": {"xml:lang": "subitem_1551255721061"}}}, "junii2_mapping": "", "oai_dc_mapping": {"title": {"@value": "subitem_1551255720400"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"alternative": {"@value": "subitem_1551255720400", "@attributes": {"xml:lang": "subitem_1551255721061"}}}}, "item_1617186419668": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"creator": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "affiliation": {"nameIdentifier": {"@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme"}}, "affiliationName": {"@value": "creatorAffiliations.affiliationNames.affiliationName", "@attributes": {"xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang"}}}, "creatorName": {"@value": "creatorNames.creatorName", "@attributes": {"xml:lang": "creatorNames.creatorNameLang"}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "creatorAlternative": {"@value": "creatorAlternatives.creatorAlternative", "@attributes": {"xml:lang": "creatorAlternatives.creatorAlternativeLang"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"creator": {"@value": "creatorNames.creatorName,nameIdentifiers.nameIdentifier"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"creator": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "affiliation": {"nameIdentifier": {"@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme"}}, "affiliationName": {"@value": "creatorAffiliations.affiliationNames.affiliationName", "@attributes": {"xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang"}}}, "creatorName": {"@value": "creatorNames.creatorName", "@attributes": {"xml:lang": "creatorNames.creatorNameLang"}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "creatorAlternative": {"@value": "creatorAlternatives.creatorAlternative", "@attributes": {"xml:lang": "creatorAlternatives.creatorAlternativeLang"}}}}}, "item_1617186476635": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"accessRights": {"@value": "subitem_1522299639480", "@attributes": {"rdf:resource": "subitem_1600958577026"}}}, "junii2_mapping": "", "oai_dc_mapping": {"rights": {"@value": "subitem_1522299639480"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"accessRights": {"@value": "subitem_1522299639480", "@attributes": {"rdf:resource": "subitem_1600958577026"}}}}, "item_1617186499011": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"rights": {"@value": "subitem_1522651041219", "@attributes": {"xml:lang": "subitem_1522650717957", "rdf:resource": "subitem_1522650727486"}}}, "junii2_mapping": "", "oai_dc_mapping": {"rights": {"@value": "subitem_1522651041219"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"rights": {"@value": "subitem_1522651041219", "@attributes": {"xml:lang": "subitem_1522650717957", "rdf:resource": "subitem_1522650727486"}}}}, "item_1617186609386": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"subject": {"@value": "subitem_1523261968819", "@attributes": {"xml:lang": "subitem_1522299896455", "subjectURI": "subitem_1522300048512", "subjectScheme": "subitem_1522300014469"}}}, "junii2_mapping": "", "oai_dc_mapping": {"subject": {"@value": "subitem_1523261968819"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"subject": {"@value": "subitem_1523261968819", "@attributes": {"xml:lang": "subitem_1522299896455", "subjectURI": "subitem_1522300048512", "subjectScheme": "subitem_1522300014469"}}}}, "item_1617186626617": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"description": {"@value": "subitem_description", "@attributes": {"xml:lang": "subitem_description_language", "descriptionType": "subitem_description_type"}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "subitem_description"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"description": {"@value": "subitem_description", "@attributes": {"xml:lang": "subitem_description_language", "descriptionType": "subitem_description_type"}}}}, "item_1617186643794": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"publisher": {"@value": "subitem_1522300316516", "@attributes": {"xml:lang": "subitem_1522300295150"}}}, "junii2_mapping": "", "oai_dc_mapping": {"publisher": {"@value": "subitem_1522300316516"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"publisher": {"@value": "subitem_1522300316516", "@attributes": {"xml:lang": "subitem_1522300295150"}}}}, "item_1617186660861": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"date": {"@value": "subitem_1522300722591", "@attributes": {"dateType": "subitem_1522300695726"}}}, "junii2_mapping": "", "oai_dc_mapping": {"date": {"@value": "subitem_1522300722591"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"date": {"@value": "subitem_1522300722591", "@attributes": {"dateType": "subitem_1522300695726"}}}}, "item_1617186702042": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"language": {"@value": "subitem_1551255818386"}}, "junii2_mapping": "", "oai_dc_mapping": {"language": {"@value": "subitem_1551255818386"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"language": {"@value": "subitem_1551255818386"}}}, "item_1617186783814": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_identifier_uri", "@attributes": {"identifierType": "subitem_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_identifier_uri"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_identifier_uri", "@attributes": {"identifierType": "subitem_identifier_type"}}}}, "item_1617186819068": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifierRegistration": {"@value": "subitem_identifier_reg_text", "@attributes": {"identifierType": "subitem_identifier_reg_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifierRegistration": {"@value": "subitem_identifier_reg_text", "@attributes": {"identifierType": "subitem_identifier_reg_type"}}}}, "item_1617186859717": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"temporal": {"@value": "subitem_1522658031721", "@attributes": {"xml:lang": "subitem_1522658018441"}}}, "junii2_mapping": "", "oai_dc_mapping": {"coverage": {"@value": "subitem_1522658031721"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"temporal": {"@value": "subitem_1522658031721", "@attributes": {"xml:lang": "subitem_1522658018441"}}}}, "item_1617186882738": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"geoLocation": {"geoLocationBox": {"eastBoundLongitude": {"@value": "subitem_geolocation_box.subitem_east_longitude"}, "northBoundLatitude": {"@value": "subitem_geolocation_box.subitem_north_latitude"}, "southBoundLatitude": {"@value": "subitem_geolocation_box.subitem_south_latitude"}, "westBoundLongitude": {"@value": "subitem_geolocation_box.subitem_west_longitude"}}, "geoLocationPlace": {"@value": "subitem_geolocation_place.subitem_geolocation_place_text"}, "geoLocationPoint": {"pointLatitude": {"@value": "subitem_geolocation_point.subitem_point_latitude"}, "pointLongitude": {"@value": "subitem_geolocation_point.subitem_point_longitude"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"coverage": {"@value": "subitem_geolocation_place.subitem_geolocation_place_text"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"geoLocation": {"geoLocationBox": {"eastBoundLongitude": {"@value": "subitem_geolocation_box.subitem_east_longitude"}, "northBoundLatitude": {"@value": "subitem_geolocation_box.subitem_north_latitude"}, "southBoundLatitude": {"@value": "subitem_geolocation_box.subitem_south_latitude"}, "westBoundLongitude": {"@value": "subitem_geolocation_box.subitem_west_longitude"}}, "geoLocationPlace": {"@value": "subitem_geolocation_place.subitem_geolocation_place_text"}, "geoLocationPoint": {"pointLatitude": {"@value": "subitem_geolocation_point.subitem_point_latitude"}, "pointLongitude": {"@value": "subitem_geolocation_point.subitem_point_longitude"}}}}}, "item_1617186901218": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"fundingReference": {"awardTitle": {"@value": "subitem_1522399651758.subitem_1522721929892", "@attributes": {"xml:lang": "subitem_1522399651758.subitem_1522721910626"}}, "funderName": {"@value": "subitem_1522399412622.subitem_1522737543681", "@attributes": {"xml:lang": "subitem_1522399412622.subitem_1522399416691"}}, "awardNumber": {"@value": "subitem_1522399571623.subitem_1522399628911", "@attributes": {"awardURI": "subitem_1522399571623.subitem_1522399585738"}}, "funderIdentifier": {"@value": "subitem_1522399143519.subitem_1522399333375", "@attributes": {"funderIdentifierType": "subitem_1522399143519.subitem_1522399281603"}}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"fundingReference": {"awardTitle": {"@value": "subitem_1522399651758.subitem_1522721929892", "@attributes": {"xml:lang": "subitem_1522399651758.subitem_1522721910626"}}, "funderName": {"@value": "subitem_1522399412622.subitem_1522737543681", "@attributes": {"xml:lang": "subitem_1522399412622.subitem_1522399416691"}}, "awardNumber": {"@value": "subitem_1522399571623.subitem_1522399628911", "@attributes": {"awardURI": "subitem_1522399571623.subitem_1522399585738"}}, "funderIdentifier": {"@value": "subitem_1522399143519.subitem_1522399333375", "@attributes": {"funderIdentifierType": "subitem_1522399143519.subitem_1522399281603"}}}}}, "item_1617186920753": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"sourceIdentifier": {"@value": "subitem_1522646572813", "@attributes": {"identifierType": "subitem_1522646500366"}}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1522646572813"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"sourceIdentifier": {"@value": "subitem_1522646572813", "@attributes": {"identifierType": "subitem_1522646500366"}}}}, "item_1617186941041": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"sourceTitle": {"@value": "subitem_1522650091861", "@attributes": {"xml:lang": "subitem_1522650068558"}}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1522650091861"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"sourceTitle": {"@value": "subitem_1522650091861", "@attributes": {"xml:lang": "subitem_1522650068558"}}}}, "item_1617186959569": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"volume": {"@value": "subitem_1551256328147"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256328147"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"volume": {"@value": "subitem_1551256328147"}}}, "item_1617186981471": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"issue": {"@value": "subitem_1551256294723"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256294723"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"issue": {"@value": "subitem_1551256294723"}}}, "item_1617186994930": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"numPages": {"@value": "subitem_1551256248092"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256248092"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"numPages": {"@value": "subitem_1551256248092"}}}, "item_1617187024783": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"pageStart": {"@value": "subitem_1551256198917"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256198917"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"pageStart": {"@value": "subitem_1551256198917"}}}, "item_1617187045071": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"pageEnd": {"@value": "subitem_1551256185532"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256185532"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"pageEnd": {"@value": "subitem_1551256185532"}}}, "item_1617187056579": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"date": {"@value": "bibliographicIssueDates.bibliographicIssueDate", "@attributes": {"dateType": "bibliographicIssueDates.bibliographicIssueDateType"}}, "issue": {"@value": "bibliographicIssueNumber"}, "volume": {"@value": "bibliographicVolumeNumber"}, "pageEnd": {"@value": "bibliographicPageEnd"}, "numPages": {"@value": "bibliographicNumberOfPages"}, "pageStart": {"@value": "bibliographicPageStart"}, "sourceTitle": {"@value": "bibliographic_titles.bibliographic_title", "@attributes": {"xml:lang": "bibliographic_titles.bibliographic_titleLang"}}}, "junii2_mapping": "", "oai_dc_mapping": {"date": {"@value": "bibliographicIssueDates.bibliographicIssueDate"}, "identifier": {"@value": "bibliographic_titles.bibliographic_title,bibliographicIssueNumber,bibliographicVolumeNumber,bibliographicPageEnd,bibliographicPageStart"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"date": {"@value": "bibliographicIssueDates.bibliographicIssueDate", "@attributes": {"dateType": "bibliographicIssueDates.bibliographicIssueDateType"}}, "issue": {"@value": "bibliographicIssueNumber"}, "volume": {"@value": "bibliographicVolumeNumber"}, "pageEnd": {"@value": "bibliographicPageEnd"}, "numPages": {"@value": "bibliographicNumberOfPages"}, "pageStart": {"@value": "bibliographicPageStart"}, "sourceTitle": {"@value": "bibliographic_titles.bibliographic_title", "@attributes": {"xml:lang": "bibliographic_titles.bibliographic_titleLang"}}}}, "item_1617187087799": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"dissertationNumber": {"@value": "subitem_1551256171004"}}, "junii2_mapping": "", "oai_dc_mapping": {"identifier": {"@value": "subitem_1551256171004"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"dissertationNumber": {"@value": "subitem_1551256171004"}}}, "item_1617187112279": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"degreeName": {"@value": "subitem_1551256126428", "@attributes": {"xml:lang": "subitem_1551256129013"}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "subitem_1551256126428"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"degreeName": {"@value": "subitem_1551256126428", "@attributes": {"xml:lang": "subitem_1551256129013"}}}}, "item_1617187136212": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"dateGranted": {"@value": "subitem_1551256096004"}}, "junii2_mapping": "", "oai_dc_mapping": {"date": {"@value": "subitem_1551256096004"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"dateGranted": {"@value": "subitem_1551256096004"}}}, "item_1617187187528": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"conference": {"conferenceDate": {"@value": "subitem_1599711699392.subitem_1599711704251", "@attributes": {"endDay": "subitem_1599711699392.subitem_1599711735410", "endYear": "subitem_1599711699392.subitem_1599711743722", "endMonth": "subitem_1599711699392.subitem_1599711739022", "startDay": "subitem_1599711699392.subitem_1599711712451", "xml:lang": "subitem_1599711699392.subitem_1599711745532", "startYear": "subitem_1599711699392.subitem_1599711731891", "startMonth": "subitem_1599711699392.subitem_1599711727603"}}, "conferenceName": {"@value": "subitem_1599711633003.subitem_1599711636923", "@attributes": {"xml:lang": "subitem_1599711633003.subitem_1599711645590"}}, "conferenceVenue": {"@value": "subitem_1599711758470.subitem_1599711769260", "@attributes": {"xml:lang": "subitem_1599711758470.subitem_1599711775943"}}, "conferenceCountry": {"@value": "subitem_1599711813532"}, "conferenceSponsor": {"@value": "subitem_1599711660052.subitem_1599711680082", "@attributes": {"xml:lang": "subitem_1599711660052.subitem_1599711686511"}}, "conferenceSequence": {"@value": "subitem_1599711655652"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"conference": {"conferenceDate": {"@value": "subitem_1599711699392.subitem_1599711704251", "@attributes": {"endDay": "subitem_1599711699392.subitem_1599711735410", "endYear": "subitem_1599711699392.subitem_1599711743722", "endMonth": "subitem_1599711699392.subitem_1599711739022", "startDay": "subitem_1599711699392.subitem_1599711712451", "xml:lang": "subitem_1599711699392.subitem_1599711745532", "startYear": "subitem_1599711699392.subitem_1599711731891", "startMonth": "subitem_1599711699392.subitem_1599711727603"}}, "conferenceName": {"@value": "subitem_1599711633003.subitem_1599711636923", "@attributes": {"xml:lang": "subitem_1599711633003.subitem_1599711645590"}}, "conferenceVenue": {"@value": "subitem_1599711758470.subitem_1599711769260", "@attributes": {"xml:lang": "subitem_1599711758470.subitem_1599711775943"}}, "conferenceCountry": {"@value": "subitem_1599711813532"}, "conferenceSponsor": {"@value": "subitem_1599711660052.subitem_1599711680082", "@attributes": {"xml:lang": "subitem_1599711660052.subitem_1599711686511"}}, "conferenceSequence": {"@value": "subitem_1599711655652"}}}}, "item_1617258105262": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"type": {"@value": "resourcetype", "@attributes": {"rdf:resource": "resourceuri"}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "resourceuri"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"type": {"@value": "resourcetype", "@attributes": {"rdf:resource": "resourceuri"}}}}, "item_1617265215918": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"versiontype": {"@value": "subitem_1522305645492", "@attributes": {"rdf:resource": "subitem_1600292170262"}}}, "junii2_mapping": "", "oai_dc_mapping": {"type": {"@value": "subitem_1522305645492"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"versiontype": {"@value": "subitem_1522305645492", "@attributes": {"rdf:resource": "subitem_1600292170262"}}}}, "item_1617349709064": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"contributor": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "@attributes": {"contributorType": "contributorType"}, "affiliation": {"nameIdentifier": {"@value": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationURI", "nameIdentifierScheme": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationScheme"}}, "affiliationName": {"@value": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationName", "@attributes": {"xml:lang": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationNameLang"}}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "contributorName": {"@value": "contributorNames.contributorName", "@attributes": {"xml:lang": "contributorNames.lang"}}, "contributorAlternative": {"@value": "contributorAlternatives.contributorAlternative", "@attributes": {"xml:lang": "contributorAlternatives.contributorAlternativeLang"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"contributor": {"@value": "contributorNames.contributorName,nameIdentifiers.nameIdentifier"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"contributor": {"givenName": {"@value": "givenNames.givenName", "@attributes": {"xml:lang": "givenNames.givenNameLang"}}, "familyName": {"@value": "familyNames.familyName", "@attributes": {"xml:lang": "familyNames.familyNameLang"}}, "@attributes": {"contributorType": "contributorType"}, "affiliation": {"nameIdentifier": {"@value": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationNameIdentifier", "@attributes": {"nameIdentifierURI": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationURI", "nameIdentifierScheme": "contributorAffiliations.contributorAffiliationNameIdentifiers.contributorAffiliationScheme"}}, "affiliationName": {"@value": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationName", "@attributes": {"xml:lang": "contributorAffiliations.contributorAffiliationNames.contributorAffiliationNameLang"}}}, "nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "contributorName": {"@value": "contributorNames.contributorName", "@attributes": {"xml:lang": "contributorNames.lang"}}, "contributorAlternative": {"@value": "contributorAlternatives.contributorAlternative", "@attributes": {"xml:lang": "contributorAlternatives.contributorAlternativeLang"}}}}}, "item_1617349808926": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"version": {"@value": "subitem_1523263171732"}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"version": {"@value": "subitem_1523263171732"}}}, "item_1617351524846": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"apc": {"@value": "subitem_1523260933860"}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"apc": {"@value": "subitem_1523260933860"}}}, "item_1617353299429": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"relation": {"@attributes": {"relationType": "subitem_1522306207484"}, "relatedTitle": {"@value": "subitem_1523320863692.subitem_1523320909613", "@attributes": {"xml:lang": "subitem_1523320863692.subitem_1523320867455"}}, "relatedIdentifier": {"@value": "subitem_1522306287251.subitem_1522306436033", "@attributes": {"identifierType": "subitem_1522306287251.subitem_1522306382014"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"relation": {"@value": "subitem_1522306287251.subitem_1522306436033,subitem_1523320863692.subitem_1523320909613"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"relation": {"@attributes": {"relationType": "subitem_1522306207484"}, "relatedTitle": {"@value": "subitem_1523320863692.subitem_1523320909613", "@attributes": {"xml:lang": "subitem_1523320863692.subitem_1523320867455"}}, "relatedIdentifier": {"@value": "subitem_1522306287251.subitem_1522306436033", "@attributes": {"identifierType": "subitem_1522306287251.subitem_1522306382014"}}}}}, "item_1617605131499": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"file": {"URI": {"@value": "url.url", "@attributes": {"label": "url.label", "objectType": "url.objectType"}}, "date": {"@value": "fileDate.fileDateValue", "@attributes": {"dateType": "fileDate.fileDateType"}}, "extent": {"@value": "filesize.value"}, "version": {"@value": "version"}, "mimeType": {"@value": "format"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"file": {"URI": {"@value": "url.url", "@attributes": {"label": "url.label", "objectType": "url.objectType"}}, "date": {"@value": "fileDate.fileDateValue", "@attributes": {"dateType": "fileDate.fileDateType"}}, "extent": {"@value": "filesize.value"}, "version": {"@value": "version"}, "mimeType": {"@value": "format"}}}}, "item_1617610673286": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"rightsHolder": {"nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "rightsHolderName": {"@value": "rightHolderNames.rightHolderName", "@attributes": {"xml:lang": "rightHolderNames.rightHolderLanguage"}}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"rightsHolder": {"nameIdentifier": {"@value": "nameIdentifiers.nameIdentifier", "@attributes": {"nameIdentifierURI": "nameIdentifiers.nameIdentifierURI", "nameIdentifierScheme": "nameIdentifiers.nameIdentifierScheme"}}, "rightsHolderName": {"@value": "rightHolderNames.rightHolderName", "@attributes": {"xml:lang": "rightHolderNames.rightHolderLanguage"}}}}}, "item_1617620223087": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": "", "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": ""}, "item_1617944105607": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"degreeGrantor": {"nameIdentifier": {"@value": "subitem_1551256015892.subitem_1551256027296", "@attributes": {"nameIdentifierScheme": "subitem_1551256015892.subitem_1551256029891"}}, "degreeGrantorName": {"@value": "subitem_1551256037922.subitem_1551256042287", "@attributes": {"xml:lang": "subitem_1551256037922.subitem_1551256047619"}}}}, "junii2_mapping": "", "oai_dc_mapping": {"description": {"@value": "subitem_1551256037922.subitem_1551256042287"}}, "display_lang_type": "", "jpcoar_v1_mapping": {"degreeGrantor": {"nameIdentifier": {"@value": "subitem_1551256015892.subitem_1551256027296", "@attributes": {"nameIdentifierScheme": "subitem_1551256015892.subitem_1551256029891"}}, "degreeGrantorName": {"@value": "subitem_1551256037922.subitem_1551256042287", "@attributes": {"xml:lang": "subitem_1551256037922.subitem_1551256047619"}}}}}, "system_identifier_doi": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}}, "system_identifier_hdl": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}}, "system_identifier_uri": {"lom_mapping": "", "lido_mapping": "", "spase_mapping": "", "jpcoar_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}, "junii2_mapping": "", "oai_dc_mapping": "", "display_lang_type": "", "jpcoar_v1_mapping": {"identifier": {"@value": "subitem_systemidt_identifier", "@attributes": {"identifierType": "subitem_systemidt_identifier_type"}}}}} \ No newline at end of file diff --git a/modules/weko-items-ui/tests/helpers.py b/modules/weko-items-ui/tests/helpers.py index 20c7e61c65..c6b641df25 100644 --- a/modules/weko-items-ui/tests/helpers.py +++ b/modules/weko-items-ui/tests/helpers.py @@ -41,7 +41,7 @@ def create_record(record_data, item_data): rel = PIDRelation.create(parent,recid,2,0) db.session.add(rel) if(int(record_data["recid"])%2==1): - doi = PersistentIdentifier.create('doi', " https://doi.org/10.xyz/{}".format((str(record_data["recid"])).zfill(10)),object_type='rec', object_uuid=rec_uuid,status=PIDStatus.REGISTERED) + doi = PersistentIdentifier.create('doi', "https://doi.org/10.xyz/{}".format((str(record_data["recid"])).zfill(10)),object_type='rec', object_uuid=rec_uuid,status=PIDStatus.REGISTERED) else: parent = PersistentIdentifier.get('parent','parent:{}'.format((str(record_data["recid"])).split('.')[0])) rel = PIDRelation.create(parent,recid,2,(str(record_data["recid"])).split('.')[1]) diff --git a/modules/weko-items-ui/tests/test_utils.py b/modules/weko-items-ui/tests/test_utils.py index 72c22bae4a..9ef3d76503 100644 --- a/modules/weko-items-ui/tests/test_utils.py +++ b/modules/weko-items-ui/tests/test_utils.py @@ -20,6 +20,7 @@ from invenio_pidstore.models import PersistentIdentifier, PIDStatus from jsonschema import SchemaError, ValidationError from mock import patch +from werkzeug.exceptions import BadRequest from weko_deposit.api import WekoDeposit, WekoRecord from weko_records.api import FeedbackMailList, ItemTypes, Mapping from weko_records.models import ItemType, ItemTypeMapping, ItemTypeName @@ -7446,8 +7447,8 @@ def test_package_export_file(app): # def get_max_ins_feedback_mail(self): # def get_max_items(self, item_attrs): # def get_subs_item(self, -# .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp -def test_make_stats_file(app, users,db_itemtype, db_records,db_itemtype2,db_records2): +# .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file -vv -s -v --cov-branch --cov-report=term --cov--report --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp +def test_make_stats_file(app, db, users,db_itemtype, db_records,db_itemtype2,db_records2,identifier): app.config.update( EMAIL_DISPLAY_FLG=True, WEKO_RECORDS_UI_LICENSE_DICT=[ @@ -7642,11 +7643,44 @@ def test_make_stats_file(app, users,db_itemtype, db_records,db_itemtype2,db_reco list_item_role = {"1": {"weko_creator_id": "1", "weko_shared_id": -1}} with app.test_request_context(): - assert make_stats_file(item_type_id, [1], list_item_role) == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {1: ['1', 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) + assert make_stats_file(item_type_id, [1], list_item_role) == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {1: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) with app.test_request_context(): - assert make_stats_file(item_type_id, [1,2,3], list_item_role) == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {1: ['1', 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 2: ['2', 'Index(public_state = True,harvest_public_state = False)', 'private', '', '', '', '', 'Keep', '2022-08-20', 'title2', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 3: ['2', 'Index(public_state = True,harvest_public_state = False)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title2', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) - + assert make_stats_file(item_type_id, [1,2,3], list_item_role) == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {1: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 2: [2, 'Index(public_state = True,harvest_public_state = False)', 'private', '', '', '', '', 'Keep', '2022-08-20', 'title2', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 3: [2, 'Index(public_state = True,harvest_public_state = False)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title2', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) + + # test doi + def create_record_with_doi(recid, doi_type, doi_value=""): + """create item with doi""" + from tests.helpers import create_record + doi_prefix = identifier["Root Index"].get(doi_type,"") + if not doi_value: + doi_value = "{prefix}/{suffix}".format( + prefix=doi_prefix, + suffix="{:010}".format(recid) + ) + record_tmp = {"_oai": {"id": "oai:weko3.example.org:{:08}".format(recid), "sets": ["1"]}, "path": ["1"], "owner": "1", "recid": str(recid), "title": [f"record_with_doi: {recid}"], "pubdate": {"attribute_name": "PubDate", "attribute_value": "2022-08-20"}, "_buckets": {"deposit": "3e99cfca-098b-42ed-b8a0-20ddd09b3e02"}, "_deposit": {"id": str(recid), "pid": {"type": "depid", "value": str(recid), "revision_id": 0}, "owner": "1", "owners": [1], "status": "draft", "created_by": 1, "owners_ext": {"email": "wekosoftware@nii.ac.jp", "username": "", "displayname": ""}}, "item_title": f"record_with_doi: {recid}", "author_link": [], "item_type_id": "1", "publish_date": "2022-08-20", "publish_status": "0", "weko_shared_id": -1, "item_1617186331708": {"attribute_name": "Title", "attribute_value_mlt": [{"subitem_1551255647225": f"record_with_doi: {recid}", "subitem_1551255648112": "ja"}]}, "item_1617258105262": {"attribute_name": "Resource Type", "attribute_value_mlt": [{"resourceuri": "http://purl.org/coar/resource_type/c_5794", "resourcetype": "conference paper"}]}, "item_1617186819068":{"attribute_name":"","attribute_value_mlt":[{"subitem_identifier_reg_text":doi_value,"subitem_identifier_reg_type":doi_type}]},"relation_version_is_last": True} + item_tmp = {"id": str(recid), "pid": {"type": "depid", "value": str(recid), "revision_id": 0}, "lang": "ja", "owner": "1", "title": f"record_with_doi: {recid}", "owners": [1], "status": "published", "$schema": "/items/jsonschema/1", "pubdate": "2022-08-20", "created_by": 1, "owners_ext": {"email": "wekosoftware@nii.ac.jp", "username": "", "displayname": ""}, "shared_user_id": -1, "item_1617186331708": [{"subitem_1551255647225": f"record_with_doi: {recid}", "subitem_1551255648112": "ja"}], "item_1617258105262": {"resourceuri": "http://purl.org/coar/resource_type/c_5794", "resourcetype": "conference paper"},"item_1617186819068":[{"subitem_identifier_reg_text":doi_value,"subitem_identifier_reg_type":doi_type}]} + _,pid_recid,_,_,_,_ = create_record(record_tmp, item_tmp) + doi = PersistentIdentifier.query.filter_by(pid_type="doi",pid_value="https://doi.org/10.xyz/{:010}".format(recid)).one_or_none() + doi_url = f"https://doi.org/{doi_value}" + if doi: + doi.pid_value = doi_url + db.session.merge(doi) + else: + doi = PersistentIdentifier.create("doi",doi_url,object_type="rec",object_uuid=pid_recid.object_uuid,status=PIDStatus.REGISTERED) + db.session.add(doi) + db.session.commit() + + create_record_with_doi(10, "JaLC") # JaLC DOI + create_record_with_doi(11, "Crossref") # Crossref + create_record_with_doi(12, "DataCite") # DataCite + create_record_with_doi(13, "NDL JaLC") # NDL JaLC + create_record_with_doi(14, "JaLC","4567/0000000014") # JaLC, NDL JaLC prefix + + with app.test_request_context(): + res = make_stats_file(item_type_id, [10,11,12,13,14], list_item_role) + assert res == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {10: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'JaLC', '1234/0000000010', 'Keep', '2022-08-20', 'record_with_doi: 10', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '1234/0000000010', 'JaLC', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 11: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'Crossref', '2345/0000000011', 'Keep', '2022-08-20', 'record_with_doi: 11', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '2345/0000000011', 'Crossref', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 12: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'DataCite', '3456/0000000012', 'Keep', '2022-08-20', 'record_with_doi: 12', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '3456/0000000012', 'DataCite', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 13: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'NDL JaLC', '4567/0000000013', 'Keep', '2022-08-20', 'record_with_doi: 13', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '4567/0000000013', 'NDL JaLC', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], 14: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'NDL JaLC', '4567/0000000014', 'Keep', '2022-08-20', 'record_with_doi: 14', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '4567/0000000014', 'JaLC', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) + # .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file_issue33432 -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp def test_make_stats_file_issue33432(app, users,db_itemtype, db_records,db_itemtype2,db_records2): app.config.update( @@ -7843,7 +7877,7 @@ def test_make_stats_file_issue33432(app, users,db_itemtype, db_records,db_itemty list_item_role = {"2": {"weko_creator_id": "1", "weko_shared_id": -1}} with app.test_request_context(): - assert make_stats_file(item_type_id, [7], list_item_role) == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1554883918421.subitem_1551255647225', '.metadata.item_1554883918421.subitem_1551255648112', '.metadata.item_1554883961001.subitem_1551255818386', '.metadata.item_1554884042490.subitem_1522299896455', '.metadata.item_1554884042490.subitem_1522300014469', '.metadata.item_1554884042490.subitem_1522300048512', '.metadata.item_1554884042490.subitem_1523261968819', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1532070986701.creatorAlternatives[0].creatorAlternative', '.metadata.item_1532070986701.creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1532070986701.creatorMails[0].creatorMail', '.metadata.item_1532070986701.creatorNames[0].creatorName', '.metadata.item_1532070986701.creatorNames[0].creatorNameLang', '.metadata.item_1532070986701.familyNames[0].familyName', '.metadata.item_1532070986701.familyNames[0].familyNameLang', '.metadata.item_1532070986701.givenNames[0].givenName', '.metadata.item_1532070986701.givenNames[0].givenNameLang', '.metadata.item_1532070986701.nameIdentifiers[0].nameIdentifier', '.metadata.item_1532070986701.nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1532070986701.nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1532071014836.contributorAlternatives[0].contributorAlternative', '.metadata.item_1532071014836.contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1532071014836.contributorMails[0].contributorMail', '.metadata.item_1532071014836.contributorNames[0].contributorName', '.metadata.item_1532071014836.contributorNames[0].lang', '.metadata.item_1532071014836.contributorType', '.metadata.item_1532071014836.familyNames[0].familyName', '.metadata.item_1532071014836.familyNames[0].familyNameLang', '.metadata.item_1532071014836.givenNames[0].givenName', '.metadata.item_1532071014836.givenNames[0].givenNameLang', '.metadata.item_1532071014836.nameIdentifiers[0].nameIdentifier', '.metadata.item_1532071014836.nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1532071014836.nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1532071031458.subitem_1522299639480', '.metadata.item_1532071031458.subitem_1600958577026', '.metadata.item_1532071039842[0].subitem_1522650717957', '.metadata.item_1532071039842[0].subitem_1522650727486', '.metadata.item_1532071039842[0].subitem_1522651041219', '.metadata.item_1532071057095[0].subitem_1522299896455', '.metadata.item_1532071057095[0].subitem_1522300014469', '.metadata.item_1532071057095[0].subitem_1522300048512', '.metadata.item_1532071057095[0].subitem_1523261968819', '.metadata.item_1532071068215[0].subitem_1522657647525', '.metadata.item_1532071068215[0].subitem_1522657697257', '.metadata.item_1532071068215[0].subitem_1523262169140', '.metadata.item_1532071093517[0].subitem_1522300295150', '.metadata.item_1532071093517[0].subitem_1522300316516', '.metadata.item_1532071103206[0].subitem_1522300695726', '.metadata.item_1532071103206[0].subitem_1522300722591', '.metadata.item_1569380622649.resourcetype', '.metadata.item_1569380622649.resourceuri', '.metadata.item_1581493352241.subitem_1569224170590', '.metadata.item_1581493352241.subitem_1569224172438', '.metadata.item_1532071133483', '.metadata.item_1532071158138[0].subitem_1522306207484', '.metadata.item_1532071158138[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1532071158138[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1532071158138[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1532071158138[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1532071168802[0].subitem_1522658018441', '.metadata.item_1532071168802[0].subitem_1522658031721', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658252485', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658264346', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658270105', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658274386', '.metadata.item_1532071184504[0].subitem_1523321394401.subitem_1523321400758', '.metadata.item_1532071184504[0].subitem_1523321394401.subitem_1523321450098', '.metadata.item_1532071184504[0].subitem_1523321527273', '.metadata.item_1532071200841[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1532071200841[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1532071200841[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1532071200841[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1532071200841[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1532071200841[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1532071200841[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1532071200841[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1532071216312[0].subitem_1522652546580.subitem_1522652548920', '.metadata.item_1532071216312[0].subitem_1522652546580.subitem_1522652672693', '.metadata.item_1532071216312[0].subitem_1522652546580.subitem_1522652685531', '.metadata.item_1532071216312[0].subitem_1522652734962', '.metadata.item_1532071216312[0].subitem_1522652740098[0].subitem_1522722119299', '.metadata.item_1532071216312[0].subitem_1522652747880[0].subitem_1522722132466', '.metadata.item_1532071216312[0].subitem_1522652747880[0].subitem_1522739295711', '.metadata.item_1532071216312[0].subitem_1523325300505', '.file_path[0]', '.metadata.item_1600165182071[0].accessrole', '.metadata.item_1600165182071[0].date[0].dateType', '.metadata.item_1600165182071[0].date[0].dateValue', '.metadata.item_1600165182071[0].displaytype', '.metadata.item_1600165182071[0].filename', '.metadata.item_1600165182071[0].filesize[0].value', '.metadata.item_1600165182071[0].format', '.metadata.item_1600165182071[0].groupsprice[0].group', '.metadata.item_1600165182071[0].groupsprice[0].price', '.metadata.item_1600165182071[0].is_billing', '.metadata.item_1600165182071[0].licensefree', '.metadata.item_1600165182071[0].licensetype', '.metadata.item_1600165182071[0].url.label', '.metadata.item_1600165182071[0].url.objectType', '.metadata.item_1600165182071[0].url.url', '.metadata.item_1600165182071[0].version'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title.Title', 'Title.Language', 'Language.Language', 'Keyword.言語', 'Keyword.主題Scheme', 'Keyword.主題URI', 'Keyword.主題', 'Creator.作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator.作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator.作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator.作成者所属[0].所属機関名[0].所属機関名', 'Creator.作成者所属[0].所属機関名[0].言語', 'Creator.作成者別名[0].別名', 'Creator.作成者別名[0].言語', 'Creator.作成者メールアドレス[0].メールアドレス', 'Creator.作成者姓名[0].姓名', 'Creator.作成者姓名[0].言語', 'Creator.作成者姓[0].姓', 'Creator.作成者姓[0].言語', 'Creator.作成者名[0].名', 'Creator.作成者名[0].言語', 'Creator.作成者識別子[0].作成者識別子', 'Creator.作成者識別子[0].作成者識別子Scheme', 'Creator.作成者識別子[0].作成者識別子URI', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor.寄与者所属[0].所属機関識別子[0].言語', 'Contributor.寄与者別名[0].別名', 'Contributor.寄与者別名[0].言語', 'Contributor.寄与者メールアドレス[0].メールアドレス', 'Contributor.寄与者名[0].姓名', 'Contributor.寄与者名[0].言語', 'Contributor.寄与者タイプ', 'Contributor.寄与者姓[0].姓', 'Contributor.寄与者姓[0].言語', 'Contributor.寄与者名[0]. 名', 'Contributor.寄与者名[0].言語', 'Contributor.寄与者識別子[0].寄与者識別子', 'Contributor.寄与者識別子[0].寄与者識別子Scheme', 'Contributor.寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'Rights Information[0].言語', 'Rights Information[0].権利情報Resource', 'Rights Information[0].権利情報', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Content Description[0].内容記述タイプ', 'Content Description[0].内容記述', 'Content Description[0].言語', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Resource Type.Type', 'Resource Type.Resource', 'Identifier rRegistration.Identifier Registration', 'Identifier rRegistration.Identifier Registration Type', 'Version information', 'Related information[0].関連タイプ', 'Related information[0].関連識別子.識別子タイプ', 'Related information[0].関連識別子.関連識別子', 'Related information[0].関連名称[0].言語', 'Related information[0].関連名称[0].関連名称', 'Time Range[0].言語', 'Time Range[0].時間的範囲', 'Location Information[0].位置情報(空間). 西部経度', 'Location Information[0].位置情報(空間).東部経度', 'Location Information[0].位置情報(空間).南部緯度', 'Location Information[0].位置情報(空間).北部緯度', 'Location Information[0].位置情報(点).経度', 'Location Information[0].位置情報(点).緯度', 'Location Information[0].位置情報(自由記述)', 'Grant information[0].助成機関識別子.助成機関識別子タイプ', 'Grant information[0].助成機関識別子.助成機関識別子', 'Grant information[0].助成機関 名[0].言語', 'Grant information[0].助成機関 名[0].助成機関名', 'Grant information[0].研究課題番号.研究課題URI', 'Grant information[0].研究課題番号.研究課題番号', 'Grant information[0].研究課題名[0].言語', 'Grant information[0].研究課題名[0]. 研究課題名', 'File Information[0].本文URL.オブジェクトタイプ', 'File Information[0].本文URL.ラベル', 'File Information[0].本文URL.本文URL', 'File Information[0].フォーマット', 'File Information[0].サイズ[0].サイズ', 'File Information[0].日付[0].日付タイプ', 'File Information[0].日付[0].日付', 'File Information[0].バージョン情報', '.ファイルパス[0]', 'Billing File Information[0].アクセス', 'Billing File Information[0].日付[0].日付タイプ', 'Billing File Information[0].日付[0].日付', 'Billing File Information[0].表示形式', 'Billing File Information[0].表示名', 'Billing File Information[0].サイズ[0].サイズ', 'Billing File Information[0]. フォーマット', 'Billing File Information[0].グループ・価格[0].グループ', 'Billing File Information[0].グループ・価格[0].価格', 'Billing File Information[0].Is Billing', 'Billing File Information[0].自由ライセンス', 'Billing File Information[0].ライセンス', 'Billing File Information[0].本文URL.ラベル', 'Billing File Information[0].本文URL.オブジェクト タイプ', 'Billing File Information[0].本文URL.本文URL', 'Billing File Information[0].バージョン情報'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required', 'Required', 'Required', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {7: ['1', 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-25', 'タイトル', 'ja', 'jpn', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'A大学', 'ja', '', '', 'repoadmin@test.org', '寄与者', 'ja', 'ContactPerson', '', '', '', '', '', '', '', 'open access', 'http://purl.org/coar/access_right/c_abf2', 'ja', 'CC0', '一定期間後に事業の実施上有益な者に対しての提供を開始する。但しデータのクレジット表記を条件とする。', 'ja', 'NDC', '', '複合化学', 'abstract', '概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要', 'ja', '', '', '', '', 'dataset', 'http://purl.org/coar/resource_type/c_ddb1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Crossref Funder', 'https://dx.doi.org/10.13039/501100001863', 'ja', 'NEDO', '', '12345678', 'ja', 'プロジェクト', '', '', '', '', '1GB未満', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) + assert make_stats_file(item_type_id, [7], list_item_role) == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1554883918421.subitem_1551255647225', '.metadata.item_1554883918421.subitem_1551255648112', '.metadata.item_1554883961001.subitem_1551255818386', '.metadata.item_1554884042490.subitem_1522299896455', '.metadata.item_1554884042490.subitem_1522300014469', '.metadata.item_1554884042490.subitem_1522300048512', '.metadata.item_1554884042490.subitem_1523261968819', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1532070986701.creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1532070986701.creatorAlternatives[0].creatorAlternative', '.metadata.item_1532070986701.creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1532070986701.creatorMails[0].creatorMail', '.metadata.item_1532070986701.creatorNames[0].creatorName', '.metadata.item_1532070986701.creatorNames[0].creatorNameLang', '.metadata.item_1532070986701.familyNames[0].familyName', '.metadata.item_1532070986701.familyNames[0].familyNameLang', '.metadata.item_1532070986701.givenNames[0].givenName', '.metadata.item_1532070986701.givenNames[0].givenNameLang', '.metadata.item_1532070986701.nameIdentifiers[0].nameIdentifier', '.metadata.item_1532070986701.nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1532070986701.nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1532071014836.contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1532071014836.contributorAlternatives[0].contributorAlternative', '.metadata.item_1532071014836.contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1532071014836.contributorMails[0].contributorMail', '.metadata.item_1532071014836.contributorNames[0].contributorName', '.metadata.item_1532071014836.contributorNames[0].lang', '.metadata.item_1532071014836.contributorType', '.metadata.item_1532071014836.familyNames[0].familyName', '.metadata.item_1532071014836.familyNames[0].familyNameLang', '.metadata.item_1532071014836.givenNames[0].givenName', '.metadata.item_1532071014836.givenNames[0].givenNameLang', '.metadata.item_1532071014836.nameIdentifiers[0].nameIdentifier', '.metadata.item_1532071014836.nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1532071014836.nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1532071031458.subitem_1522299639480', '.metadata.item_1532071031458.subitem_1600958577026', '.metadata.item_1532071039842[0].subitem_1522650717957', '.metadata.item_1532071039842[0].subitem_1522650727486', '.metadata.item_1532071039842[0].subitem_1522651041219', '.metadata.item_1532071057095[0].subitem_1522299896455', '.metadata.item_1532071057095[0].subitem_1522300014469', '.metadata.item_1532071057095[0].subitem_1522300048512', '.metadata.item_1532071057095[0].subitem_1523261968819', '.metadata.item_1532071068215[0].subitem_1522657647525', '.metadata.item_1532071068215[0].subitem_1522657697257', '.metadata.item_1532071068215[0].subitem_1523262169140', '.metadata.item_1532071093517[0].subitem_1522300295150', '.metadata.item_1532071093517[0].subitem_1522300316516', '.metadata.item_1532071103206[0].subitem_1522300695726', '.metadata.item_1532071103206[0].subitem_1522300722591', '.metadata.item_1569380622649.resourcetype', '.metadata.item_1569380622649.resourceuri', '.metadata.item_1581493352241.subitem_1569224170590', '.metadata.item_1581493352241.subitem_1569224172438', '.metadata.item_1532071133483', '.metadata.item_1532071158138[0].subitem_1522306207484', '.metadata.item_1532071158138[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1532071158138[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1532071158138[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1532071158138[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1532071168802[0].subitem_1522658018441', '.metadata.item_1532071168802[0].subitem_1522658031721', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658252485', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658264346', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658270105', '.metadata.item_1532071184504[0].subitem_1522658250154.subitem_1522658274386', '.metadata.item_1532071184504[0].subitem_1523321394401.subitem_1523321400758', '.metadata.item_1532071184504[0].subitem_1523321394401.subitem_1523321450098', '.metadata.item_1532071184504[0].subitem_1523321527273', '.metadata.item_1532071200841[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1532071200841[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1532071200841[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1532071200841[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1532071200841[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1532071200841[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1532071200841[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1532071200841[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1532071216312[0].subitem_1522652546580.subitem_1522652548920', '.metadata.item_1532071216312[0].subitem_1522652546580.subitem_1522652672693', '.metadata.item_1532071216312[0].subitem_1522652546580.subitem_1522652685531', '.metadata.item_1532071216312[0].subitem_1522652734962', '.metadata.item_1532071216312[0].subitem_1522652740098[0].subitem_1522722119299', '.metadata.item_1532071216312[0].subitem_1522652747880[0].subitem_1522722132466', '.metadata.item_1532071216312[0].subitem_1522652747880[0].subitem_1522739295711', '.metadata.item_1532071216312[0].subitem_1523325300505', '.file_path[0]', '.metadata.item_1600165182071[0].accessrole', '.metadata.item_1600165182071[0].date[0].dateType', '.metadata.item_1600165182071[0].date[0].dateValue', '.metadata.item_1600165182071[0].displaytype', '.metadata.item_1600165182071[0].filename', '.metadata.item_1600165182071[0].filesize[0].value', '.metadata.item_1600165182071[0].format', '.metadata.item_1600165182071[0].groupsprice[0].group', '.metadata.item_1600165182071[0].groupsprice[0].price', '.metadata.item_1600165182071[0].is_billing', '.metadata.item_1600165182071[0].licensefree', '.metadata.item_1600165182071[0].licensetype', '.metadata.item_1600165182071[0].url.label', '.metadata.item_1600165182071[0].url.objectType', '.metadata.item_1600165182071[0].url.url', '.metadata.item_1600165182071[0].version'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title.Title', 'Title.Language', 'Language.Language', 'Keyword.言語', 'Keyword.主題Scheme', 'Keyword.主題URI', 'Keyword.主題', 'Creator.作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator.作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator.作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator.作成者所属[0].所属機関名[0].所属機関名', 'Creator.作成者所属[0].所属機関名[0].言語', 'Creator.作成者別名[0].別名', 'Creator.作成者別名[0].言語', 'Creator.作成者メールアドレス[0].メールアドレス', 'Creator.作成者姓名[0].姓名', 'Creator.作成者姓名[0].言語', 'Creator.作成者姓[0].姓', 'Creator.作成者姓[0].言語', 'Creator.作成者名[0].名', 'Creator.作成者名[0].言語', 'Creator.作成者識別子[0].作成者識別子', 'Creator.作成者識別子[0].作成者識別子Scheme', 'Creator.作成者識別子[0].作成者識別子URI', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor.寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor.寄与者所属[0].所属機関識別子[0].言語', 'Contributor.寄与者別名[0].別名', 'Contributor.寄与者別名[0].言語', 'Contributor.寄与者メールアドレス[0].メールアドレス', 'Contributor.寄与者名[0].姓名', 'Contributor.寄与者名[0].言語', 'Contributor.寄与者タイプ', 'Contributor.寄与者姓[0].姓', 'Contributor.寄与者姓[0].言語', 'Contributor.寄与者名[0]. 名', 'Contributor.寄与者名[0].言語', 'Contributor.寄与者識別子[0].寄与者識別子', 'Contributor.寄与者識別子[0].寄与者識別子Scheme', 'Contributor.寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'Rights Information[0].言語', 'Rights Information[0].権利情報Resource', 'Rights Information[0].権利情報', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Content Description[0].内容記述タイプ', 'Content Description[0].内容記述', 'Content Description[0].言語', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Resource Type.Type', 'Resource Type.Resource', 'Identifier rRegistration.Identifier Registration', 'Identifier rRegistration.Identifier Registration Type', 'Version information', 'Related information[0].関連タイプ', 'Related information[0].関連識別子.識別子タイプ', 'Related information[0].関連識別子.関連識別子', 'Related information[0].関連名称[0].言語', 'Related information[0].関連名称[0].関連名称', 'Time Range[0].言語', 'Time Range[0].時間的範囲', 'Location Information[0].位置情報(空間). 西部経度', 'Location Information[0].位置情報(空間).東部経度', 'Location Information[0].位置情報(空間).南部緯度', 'Location Information[0].位置情報(空間).北部緯度', 'Location Information[0].位置情報(点).経度', 'Location Information[0].位置情報(点).緯度', 'Location Information[0].位置情報(自由記述)', 'Grant information[0].助成機関識別子.助成機関識別子タイプ', 'Grant information[0].助成機関識別子.助成機関識別子', 'Grant information[0].助成機関 名[0].言語', 'Grant information[0].助成機関 名[0].助成機関名', 'Grant information[0].研究課題番号.研究課題URI', 'Grant information[0].研究課題番号.研究課題番号', 'Grant information[0].研究課題名[0].言語', 'Grant information[0].研究課題名[0]. 研究課題名', 'File Information[0].本文URL.オブジェクトタイプ', 'File Information[0].本文URL.ラベル', 'File Information[0].本文URL.本文URL', 'File Information[0].フォーマット', 'File Information[0].サイズ[0].サイズ', 'File Information[0].日付[0].日付タイプ', 'File Information[0].日付[0].日付', 'File Information[0].バージョン情報', '.ファイルパス[0]', 'Billing File Information[0].アクセス', 'Billing File Information[0].日付[0].日付タイプ', 'Billing File Information[0].日付[0].日付', 'Billing File Information[0].表示形式', 'Billing File Information[0].表示名', 'Billing File Information[0].サイズ[0].サイズ', 'Billing File Information[0]. フォーマット', 'Billing File Information[0].グループ・価格[0].グループ', 'Billing File Information[0].グループ・価格[0].価格', 'Billing File Information[0].Is Billing', 'Billing File Information[0].自由ライセンス', 'Billing File Information[0].ライセンス', 'Billing File Information[0].本文URL.ラベル', 'Billing File Information[0].本文URL.オブジェクト タイプ', 'Billing File Information[0].本文URL.本文URL', 'Billing File Information[0].バージョン情報'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required', 'Required', 'Required', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {7: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-25', 'タイトル', 'ja', 'jpn', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'A大学', 'ja', '', '', 'repoadmin@test.org', '寄与者', 'ja', 'ContactPerson', '', '', '', '', '', '', '', 'open access', 'http://purl.org/coar/access_right/c_abf2', 'ja', 'CC0', '一定期間後に事業の実施上有益な者に対しての提供を開始する。但しデータのクレジット表記を条件とする。', 'ja', 'NDC', '', '複合化学', 'abstract', '概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要概要', 'ja', '', '', '', '', 'dataset', 'http://purl.org/coar/resource_type/c_ddb1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '','','', 'Crossref Funder', 'https://dx.doi.org/10.13039/501100001863', 'ja', 'NEDO', '', '12345678', 'ja', 'プロジェクト', '', '', '', '', '1GB未満', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) # .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file_issue36234 -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp def test_make_stats_file_issue36234(app, users,db_itemtype,db_records_file): @@ -8040,7 +8074,7 @@ def test_make_stats_file_issue36234(app, users,db_itemtype,db_records_file): recids = [1] list_item_role = {"2": {"weko_creator_id": "1", "weko_shared_id": -1}} - test = ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.file_path[1]', '.metadata.item_1617605131499[1].accessrole', '.metadata.item_1617605131499[1].date[0].dateType', '.metadata.item_1617605131499[1].date[0].dateValue', '.metadata.item_1617605131499[1].displaytype', '.metadata.item_1617605131499[1].fileDate[0].fileDateType', '.metadata.item_1617605131499[1].fileDate[0].fileDateValue', '.metadata.item_1617605131499[1].filename', '.metadata.item_1617605131499[1].filesize[0].value', '.metadata.item_1617605131499[1].format', '.metadata.item_1617605131499[1].groups', '.metadata.item_1617605131499[1].licensefree', '.metadata.item_1617605131499[1].licensetype', '.metadata.item_1617605131499[1].url.label', '.metadata.item_1617605131499[1].url.objectType', '.metadata.item_1617605131499[1].url.url', '.metadata.item_1617605131499[1].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', '.ファイルパス[1]', 'File[1].アクセス', 'File[1].オープンアクセスの日付[0].日付タイプ', 'File[1].オープンアクセスの日付[0].日付', 'File[1].表示形式', 'File[1].日付[0].日付タイプ', 'File[1].日付[0].日付', 'File[1].表示名', 'File[1].サイズ[0].サイズ', 'File[1].フォーマット', 'File[1].グループ', 'File[1].自由ライセンス', 'File[1].ライセンス', 'File[1].本文URL.ラベル', 'File[1].本文URL.オブジェクトタイプ', 'File[1].本文URL.本文URL', 'File[1].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {1: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2023-02-28', 'only file item', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'recid_1/test1.txt', 'open_access', 'Available', '2023-02-28', '', '', '', 'test1.txt', '37 B', 'text/plain', '', '', '', '', '', 'https://localhost/record/1/files/test1.txt', '', '', 'open_access', 'Available', '2023-02-28', '', '', '', 'google', '', '', '', '', '', '', '', 'https://www.google.com/', '', '', '', '', '', '', '']}) + test = ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.file_path[1]', '.metadata.item_1617605131499[1].accessrole', '.metadata.item_1617605131499[1].date[0].dateType', '.metadata.item_1617605131499[1].date[0].dateValue', '.metadata.item_1617605131499[1].displaytype', '.metadata.item_1617605131499[1].fileDate[0].fileDateType', '.metadata.item_1617605131499[1].fileDate[0].fileDateValue', '.metadata.item_1617605131499[1].filename', '.metadata.item_1617605131499[1].filesize[0].value', '.metadata.item_1617605131499[1].format', '.metadata.item_1617605131499[1].groups', '.metadata.item_1617605131499[1].licensefree', '.metadata.item_1617605131499[1].licensetype', '.metadata.item_1617605131499[1].url.label', '.metadata.item_1617605131499[1].url.objectType', '.metadata.item_1617605131499[1].url.url', '.metadata.item_1617605131499[1].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', '.ファイルパス[1]', 'File[1].アクセス', 'File[1].オープンアクセスの日付[0].日付タイプ', 'File[1].オープンアクセスの日付[0].日付', 'File[1].表示形式', 'File[1].日付[0].日付タイプ', 'File[1].日付[0].日付', 'File[1].表示名', 'File[1].サイズ[0].サイズ', 'File[1].フォーマット', 'File[1].グループ', 'File[1].自由ライセンス', 'File[1].ライセンス', 'File[1].本文URL.ラベル', 'File[1].本文URL.オブジェクトタイプ', 'File[1].本文URL.本文URL', 'File[1].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {1: [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2023-02-28', 'only file item', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'recid_1/test1.txt', 'open_access', 'Available', '2023-02-28', '', '', '', 'test1.txt', '37 B', 'text/plain', '', '', '', '', '', 'https://localhost/record/1/files/test1.txt', '', 'recid_1/google', 'open_access', 'Available', '2023-02-28', '', '', '', 'google', '', '', '', '', '', '', '', 'https://www.google.com/', '', '', '', '', '', '', '']}) with app.test_request_context(): result = make_stats_file(item_type_id, recids, list_item_role,export_path) assert result == test @@ -8100,25 +8134,30 @@ def test_check_item_type_name(): # def export_items(post_data): # .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_export_items -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp def test_export_items(app,db_itemtype,db_records,users): - post_data = {'export_file_contents_radio': 'False', 'export_format_radio': 'JSON', 'record_ids': '[1]', 'invalid_record_ids': '[]', 'record_metadata': '{"1":{"created":"2022-08-25T12:56:26.587349+00:00","id":1,"links":{"self":"https://localhost:8443/api/records/1"},"metadata":{"_comment":["en_conference paperITEM00000001(public_open_access_simple)","WEKO-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2","https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/","4-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz","Joho, Taro,Joho, Taro,Joho, Taro","Joho,Joho,Joho","Taro,Taro,Taro","0000000121691048","ISNI","http://isni.org/isni/0000000121691048","University,Source Title,1,111,12,1,3,Degree Name,2021-06-30,xxxxxx,kakenhi,Degree Grantor Name","Conference Name","1","JPN","Sponsor","2000","12","1","2020","12","2020/12/11","1","Conference Venue","Conference Place"],"_files_info":[{"extention":"pdf","label":"1KB.pdf","url":"https://weko3.example.org/record/1/files/1KB.pdf"}],"_item_metadata":{"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"author_link":["4"],"control_number":"1","item_1617186331708":{"attribute_name":"Title","attribute_value_mlt":[{"subitem_1551255647225":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","subitem_1551255648112":"ja"},{"subitem_1551255647225":"en_conference paperITEM00000001(public_open_access_simple)","subitem_1551255648112":"en"}]},"item_1617186385884":{"attribute_name":"Alternative Title","attribute_value_mlt":[{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"en"},{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"ja"}]},"item_1617186419668":{"attribute_name":"Creator","attribute_type":"creator","attribute_value_mlt":[{"creatorAffiliations":[{"affiliationNameIdentifiers":[{"affiliationNameIdentifier":"0000000121691048","affiliationNameIdentifierScheme":"ISNI","affiliationNameIdentifierURI":"http://isni.org/isni/0000000121691048"}],"affiliationNames":[{"affiliationName":"University","affiliationNameLang":"en"}]}],"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"4","nameIdentifierScheme":"WEKO"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617186476635":{"attribute_name":"Access Rights","attribute_value_mlt":[{"subitem_1522299639480":"open access","subitem_1600958577026":"http://purl.org/coar/access_right/c_abf2"}]},"item_1617186499011":{"attribute_name":"Rights","attribute_value_mlt":[{"subitem_1522650717957":"ja","subitem_1522650727486":"http://localhost","subitem_1522651041219":"Rights Information"}]},"item_1617186609386":{"attribute_name":"Subject","attribute_value_mlt":[{"subitem_1522299896455":"ja","subitem_1522300014469":"Other","subitem_1522300048512":"http://localhost/","subitem_1523261968819":"Sibject1"}]},"item_1617186626617":{"attribute_name":"Description","attribute_value_mlt":[{"subitem_description":"Description\\nDescription
    Description","subitem_description_language":"en","subitem_description_type":"Abstract"},{"subitem_description":"概要\\n概要\\n概要\\n概要","subitem_description_language":"ja","subitem_description_type":"Abstract"}]},"item_1617186643794":{"attribute_name":"Publisher","attribute_value_mlt":[{"subitem_1522300295150":"en","subitem_1522300316516":"Publisher"}]},"item_1617186660861":{"attribute_name":"Date","attribute_value_mlt":[{"subitem_1522300695726":"Available","subitem_1522300722591":"2021-06-30"}]},"item_1617186702042":{"attribute_name":"Language","attribute_value_mlt":[{"subitem_1551255818386":"jpn"}]},"item_1617186783814":{"attribute_name":"Identifier","attribute_value_mlt":[{"subitem_identifier_type":"URI","subitem_identifier_uri":"http://localhost"}]},"item_1617186859717":{"attribute_name":"Temporal","attribute_value_mlt":[{"subitem_1522658018441":"en","subitem_1522658031721":"Temporal"}]},"item_1617186882738":{"attribute_name":"Geo Location","attribute_value_mlt":[{"subitem_geolocation_place":[{"subitem_geolocation_place_text":"Japan"}]}]},"item_1617186901218":{"attribute_name":"Funding Reference","attribute_value_mlt":[{"subitem_1522399143519":{"subitem_1522399281603":"ISNI","subitem_1522399333375":"http://xxx"},"subitem_1522399412622":[{"subitem_1522399416691":"en","subitem_1522737543681":"Funder Name"}],"subitem_1522399571623":{"subitem_1522399585738":"Award URI","subitem_1522399628911":"Award Number"},"subitem_1522399651758":[{"subitem_1522721910626":"en","subitem_1522721929892":"Award Title"}]}]},"item_1617186920753":{"attribute_name":"Source Identifier","attribute_value_mlt":[{"subitem_1522646500366":"ISSN","subitem_1522646572813":"xxxx-xxxx-xxxx"}]},"item_1617186941041":{"attribute_name":"Source Title","attribute_value_mlt":[{"subitem_1522650068558":"en","subitem_1522650091861":"Source Title"}]},"item_1617186959569":{"attribute_name":"Volume Number","attribute_value_mlt":[{"subitem_1551256328147":"1"}]},"item_1617186981471":{"attribute_name":"Issue Number","attribute_value_mlt":[{"subitem_1551256294723":"111"}]},"item_1617186994930":{"attribute_name":"Number of Pages","attribute_value_mlt":[{"subitem_1551256248092":"12"}]},"item_1617187024783":{"attribute_name":"Page Start","attribute_value_mlt":[{"subitem_1551256198917":"1"}]},"item_1617187045071":{"attribute_name":"Page End","attribute_value_mlt":[{"subitem_1551256185532":"3"}]},"item_1617187112279":{"attribute_name":"Degree Name","attribute_value_mlt":[{"subitem_1551256126428":"Degree Name","subitem_1551256129013":"en"}]},"item_1617187136212":{"attribute_name":"Date Granted","attribute_value_mlt":[{"subitem_1551256096004":"2021-06-30"}]},"item_1617187187528":{"attribute_name":"Conference","attribute_value_mlt":[{"subitem_1599711633003":[{"subitem_1599711636923":"Conference Name","subitem_1599711645590":"ja"}],"subitem_1599711655652":"1","subitem_1599711660052":[{"subitem_1599711680082":"Sponsor","subitem_1599711686511":"ja"}],"subitem_1599711699392":{"subitem_1599711704251":"2020/12/11","subitem_1599711712451":"1","subitem_1599711727603":"12","subitem_1599711731891":"2000","subitem_1599711735410":"1","subitem_1599711739022":"12","subitem_1599711743722":"2020","subitem_1599711745532":"ja"},"subitem_1599711758470":[{"subitem_1599711769260":"Conference Venue","subitem_1599711775943":"ja"}],"subitem_1599711788485":[{"subitem_1599711798761":"Conference Place","subitem_1599711803382":"ja"}],"subitem_1599711813532":"JPN"}]},"item_1617258105262":{"attribute_name":"Resource Type","attribute_value_mlt":[{"resourcetype":"dataset","resourceuri":"http://purl.org/coar/resource_type/c_ddb1"}]},"item_1617265215918":{"attribute_name":"Version Type","attribute_value_mlt":[{"subitem_1522305645492":"AO","subitem_1600292170262":"http://purl.org/coar/version/c_b1a7d7d4d402bcce"}]},"item_1617349709064":{"attribute_name":"Contributor","attribute_value_mlt":[{"contributorMails":[{"contributorMail":"wekosoftware@nii.ac.jp"}],"contributorNames":[{"contributorName":"情報, 太郎","lang":"ja"},{"contributorName":"ジョウホウ, タロウ","lang":"ja-Kana"},{"contributorName":"Joho, Taro","lang":"en"}],"contributorType":"ContactPerson","familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617349808926":{"attribute_name":"Version","attribute_value_mlt":[{"subitem_1523263171732":"Version"}]},"item_1617351524846":{"attribute_name":"APC","attribute_value_mlt":[{"subitem_1523260933860":"Unknown"}]},"item_1617353299429":{"attribute_name":"Relation","attribute_value_mlt":[{"subitem_1522306207484":"isVersionOf","subitem_1522306287251":{"subitem_1522306382014":"arXiv","subitem_1522306436033":"xxxxx"},"subitem_1523320863692":[{"subitem_1523320867455":"en","subitem_1523320909613":"Related Title"}]}]},"item_1617605131499":{"attribute_name":"File","attribute_type":"file","attribute_value_mlt":[{"accessrole":"open_access","date":[{"dateType":"Available","dateValue":"2021-07-12"}],"displaytype":"simple","filename":"1KB.pdf","filesize":[{"value":"1 KB"}],"format":"text/plain","mimetype":"application/pdf","url":{"url":"https://weko3.example.org/record/1/files/1KB.pdf"},"version_id":"9008626e-cb32-48bd-8409-1204f03b8077"}]},"item_1617610673286":{"attribute_name":"Rights Holder","attribute_value_mlt":[{"nameIdentifiers":[{"nameIdentifier":"xxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"}],"rightHolderNames":[{"rightHolderLanguage":"ja","rightHolderName":"Right Holder Name"}]}]},"item_1617620223087":{"attribute_name":"Heading","attribute_value_mlt":[{"subitem_1565671149650":"ja","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheading"},{"subitem_1565671149650":"en","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheding"}]},"item_1617944105607":{"attribute_name":"Degree Grantor","attribute_value_mlt":[{"subitem_1551256015892":[{"subitem_1551256027296":"xxxxxx","subitem_1551256029891":"kakenhi"}],"subitem_1551256037922":[{"subitem_1551256042287":"Degree Grantor Name","subitem_1551256047619":"en"}]}]},"item_title":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","item_type_id":"15","owner":"1","path":["1661432090216"],"pubdate":{"attribute_name":"PubDate","attribute_value":"2021-08-06"},"publish_date":"2021-08-06","publish_status":"0","relation_version_is_last":true,"title":["ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"weko_creator_id":"1","weko_shared_id":-1},"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"accessRights":["open access"],"alternative":["Alternative Title","Alternative Title"],"apc":["Unknown"],"author_link":["4"],"conference":{"conferenceCountry":["JPN"],"conferenceDate":["2020/12/11"],"conferenceName":["Conference Name"],"conferenceSequence":["1"],"conferenceSponsor":["Sponsor"],"conferenceVenue":["Conference Venue"]},"contributor":{"@attributes":{"contributorType":[["ContactPerson"]]},"affiliation":{"affiliationName":[],"nameIdentifier":[]},"contributorAlternative":[],"contributorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro"],"nameIdentifier":["xxxxxxx","xxxxxxx","xxxxxxx"]},"control_number":"1","creator":{"affiliation":{"affiliationName":["University"],"nameIdentifier":["0000000121691048"]},"creatorAlternative":[],"creatorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho","情報","ジョウホウ","Joho","情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro","太郎","タロウ","Taro","太郎","タロウ","Taro"],"nameIdentifier":["4","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz"]},"date":[{"dateType":"Available","value":"2021-06-30"}],"dateGranted":["2021-06-30"],"degreeGrantor":{"degreeGrantorName":["Degree Grantor Name"],"nameIdentifier":["xxxxxx"]},"degreeName":["Degree Name"],"description":[{"descriptionType":"Abstract","value":"Description\\nDescription
    Description"},{"descriptionType":"Abstract","value":"概要\\n概要\\n概要\\n概要"}],"feedback_mail_list":[{"author_id":"","email":"wekosoftware@nii.ac.jp"}],"fundingReference":{"awardNumber":["Award Number"],"awardTitle":["Award Title"],"funderIdentifier":["http://xxx"],"funderName":["Funder Name"]},"geoLocation":{"geoLocationPlace":["Japan"]},"identifier":[{"identifierType":"URI","value":"http://localhost"}],"issue":["111"],"itemtype":"デフォルトアイテムタイプ(フル)","language":["jpn"],"numPages":["12"],"pageEnd":["3"],"pageStart":["1"],"path":["1661432090216"],"publish_date":"2021-08-06","publish_status":"0","publisher":["Publisher"],"relation":{"@attributes":{"relationType":[["isVersionOf"]]},"relatedIdentifier":[{"identifierType":"arXiv","value":"xxxxx"}],"relatedTitle":["Related Title"]},"relation_version_is_last":true,"rights":["Rights Information"],"rightsHolder":{"nameIdentifier":["xxxxxx"],"rightsHolderName":["Right Holder Name"]},"sourceIdentifier":[{"identifierType":"ISSN","value":"xxxx-xxxx-xxxx"}],"sourceTitle":["Source Title"],"subject":[{"subjectScheme":"Other","value":"Sibject1"}],"temporal":["Temporal"],"title":["en_conference paperITEM00000001(public_open_access_simple)","ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"type":["dataset"],"version":["Version"],"versiontype":["AO"],"volume":["1"],"weko_creator_id":"1","weko_shared_id":-1},"updated":"2022-08-26T12:57:36.376731+00:00"}}'} + record_metadata = '{"created":"2022-08-25T12:56:26.587349+00:00","id":1,"links":{"self":"https://localhost:8443/api/records/1"},"metadata":{"_comment":["en_conference paperITEM00000001(public_open_access_simple)","WEKO-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2","https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/","4-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz","Joho, Taro,Joho, Taro,Joho, Taro","Joho,Joho,Joho","Taro,Taro,Taro","0000000121691048","ISNI","http://isni.org/isni/0000000121691048","University,Source Title,1,111,12,1,3,Degree Name,2021-06-30,xxxxxx,kakenhi,Degree Grantor Name","Conference Name","1","JPN","Sponsor","2000","12","1","2020","12","2020/12/11","1","Conference Venue","Conference Place"],"_files_info":[{"extention":"pdf","label":"1KB.pdf","url":"https://weko3.example.org/record/1/files/1KB.pdf"}],"_item_metadata":{"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"author_link":["4"],"control_number":"1","item_1617186331708":{"attribute_name":"Title","attribute_value_mlt":[{"subitem_1551255647225":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","subitem_1551255648112":"ja"},{"subitem_1551255647225":"en_conference paperITEM00000001(public_open_access_simple)","subitem_1551255648112":"en"}]},"item_1617186385884":{"attribute_name":"Alternative Title","attribute_value_mlt":[{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"en"},{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"ja"}]},"item_1617186419668":{"attribute_name":"Creator","attribute_type":"creator","attribute_value_mlt":[{"creatorAffiliations":[{"affiliationNameIdentifiers":[{"affiliationNameIdentifier":"0000000121691048","affiliationNameIdentifierScheme":"ISNI","affiliationNameIdentifierURI":"http://isni.org/isni/0000000121691048"}],"affiliationNames":[{"affiliationName":"University","affiliationNameLang":"en"}]}],"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"4","nameIdentifierScheme":"WEKO"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617186476635":{"attribute_name":"Access Rights","attribute_value_mlt":[{"subitem_1522299639480":"open access","subitem_1600958577026":"http://purl.org/coar/access_right/c_abf2"}]},"item_1617186499011":{"attribute_name":"Rights","attribute_value_mlt":[{"subitem_1522650717957":"ja","subitem_1522650727486":"http://localhost","subitem_1522651041219":"Rights Information"}]},"item_1617186609386":{"attribute_name":"Subject","attribute_value_mlt":[{"subitem_1522299896455":"ja","subitem_1522300014469":"Other","subitem_1522300048512":"http://localhost/","subitem_1523261968819":"Sibject1"}]},"item_1617186626617":{"attribute_name":"Description","attribute_value_mlt":[{"subitem_description":"Description\\nDescription
    Description","subitem_description_language":"en","subitem_description_type":"Abstract"},{"subitem_description":"概要\\n概要\\n概要\\n概要","subitem_description_language":"ja","subitem_description_type":"Abstract"}]},"item_1617186643794":{"attribute_name":"Publisher","attribute_value_mlt":[{"subitem_1522300295150":"en","subitem_1522300316516":"Publisher"}]},"item_1617186660861":{"attribute_name":"Date","attribute_value_mlt":[{"subitem_1522300695726":"Available","subitem_1522300722591":"2021-06-30"}]},"item_1617186702042":{"attribute_name":"Language","attribute_value_mlt":[{"subitem_1551255818386":"jpn"}]},"item_1617186783814":{"attribute_name":"Identifier","attribute_value_mlt":[{"subitem_identifier_type":"URI","subitem_identifier_uri":"http://localhost"}]},"item_1617186859717":{"attribute_name":"Temporal","attribute_value_mlt":[{"subitem_1522658018441":"en","subitem_1522658031721":"Temporal"}]},"item_1617186882738":{"attribute_name":"Geo Location","attribute_value_mlt":[{"subitem_geolocation_place":[{"subitem_geolocation_place_text":"Japan"}]}]},"item_1617186901218":{"attribute_name":"Funding Reference","attribute_value_mlt":[{"subitem_1522399143519":{"subitem_1522399281603":"ISNI","subitem_1522399333375":"http://xxx"},"subitem_1522399412622":[{"subitem_1522399416691":"en","subitem_1522737543681":"Funder Name"}],"subitem_1522399571623":{"subitem_1522399585738":"Award URI","subitem_1522399628911":"Award Number"},"subitem_1522399651758":[{"subitem_1522721910626":"en","subitem_1522721929892":"Award Title"}]}]},"item_1617186920753":{"attribute_name":"Source Identifier","attribute_value_mlt":[{"subitem_1522646500366":"ISSN","subitem_1522646572813":"xxxx-xxxx-xxxx"}]},"item_1617186941041":{"attribute_name":"Source Title","attribute_value_mlt":[{"subitem_1522650068558":"en","subitem_1522650091861":"Source Title"}]},"item_1617186959569":{"attribute_name":"Volume Number","attribute_value_mlt":[{"subitem_1551256328147":"1"}]},"item_1617186981471":{"attribute_name":"Issue Number","attribute_value_mlt":[{"subitem_1551256294723":"111"}]},"item_1617186994930":{"attribute_name":"Number of Pages","attribute_value_mlt":[{"subitem_1551256248092":"12"}]},"item_1617187024783":{"attribute_name":"Page Start","attribute_value_mlt":[{"subitem_1551256198917":"1"}]},"item_1617187045071":{"attribute_name":"Page End","attribute_value_mlt":[{"subitem_1551256185532":"3"}]},"item_1617187112279":{"attribute_name":"Degree Name","attribute_value_mlt":[{"subitem_1551256126428":"Degree Name","subitem_1551256129013":"en"}]},"item_1617187136212":{"attribute_name":"Date Granted","attribute_value_mlt":[{"subitem_1551256096004":"2021-06-30"}]},"item_1617187187528":{"attribute_name":"Conference","attribute_value_mlt":[{"subitem_1599711633003":[{"subitem_1599711636923":"Conference Name","subitem_1599711645590":"ja"}],"subitem_1599711655652":"1","subitem_1599711660052":[{"subitem_1599711680082":"Sponsor","subitem_1599711686511":"ja"}],"subitem_1599711699392":{"subitem_1599711704251":"2020/12/11","subitem_1599711712451":"1","subitem_1599711727603":"12","subitem_1599711731891":"2000","subitem_1599711735410":"1","subitem_1599711739022":"12","subitem_1599711743722":"2020","subitem_1599711745532":"ja"},"subitem_1599711758470":[{"subitem_1599711769260":"Conference Venue","subitem_1599711775943":"ja"}],"subitem_1599711788485":[{"subitem_1599711798761":"Conference Place","subitem_1599711803382":"ja"}],"subitem_1599711813532":"JPN"}]},"item_1617258105262":{"attribute_name":"Resource Type","attribute_value_mlt":[{"resourcetype":"dataset","resourceuri":"http://purl.org/coar/resource_type/c_ddb1"}]},"item_1617265215918":{"attribute_name":"Version Type","attribute_value_mlt":[{"subitem_1522305645492":"AO","subitem_1600292170262":"http://purl.org/coar/version/c_b1a7d7d4d402bcce"}]},"item_1617349709064":{"attribute_name":"Contributor","attribute_value_mlt":[{"contributorMails":[{"contributorMail":"wekosoftware@nii.ac.jp"}],"contributorNames":[{"contributorName":"情報, 太郎","lang":"ja"},{"contributorName":"ジョウホウ, タロウ","lang":"ja-Kana"},{"contributorName":"Joho, Taro","lang":"en"}],"contributorType":"ContactPerson","familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617349808926":{"attribute_name":"Version","attribute_value_mlt":[{"subitem_1523263171732":"Version"}]},"item_1617351524846":{"attribute_name":"APC","attribute_value_mlt":[{"subitem_1523260933860":"Unknown"}]},"item_1617353299429":{"attribute_name":"Relation","attribute_value_mlt":[{"subitem_1522306207484":"isVersionOf","subitem_1522306287251":{"subitem_1522306382014":"arXiv","subitem_1522306436033":"xxxxx"},"subitem_1523320863692":[{"subitem_1523320867455":"en","subitem_1523320909613":"Related Title"}]}]},"item_1617605131499":{"attribute_name":"File","attribute_type":"file","attribute_value_mlt":[{"accessrole":"open_access","date":[{"dateType":"Available","dateValue":"2021-07-12"}],"displaytype":"simple","filename":"1KB.pdf","filesize":[{"value":"1 KB"}],"format":"text/plain","mimetype":"application/pdf","url":{"url":"https://weko3.example.org/record/1/files/1KB.pdf"},"version_id":"9008626e-cb32-48bd-8409-1204f03b8077"}]},"item_1617610673286":{"attribute_name":"Rights Holder","attribute_value_mlt":[{"nameIdentifiers":[{"nameIdentifier":"xxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"}],"rightHolderNames":[{"rightHolderLanguage":"ja","rightHolderName":"Right Holder Name"}]}]},"item_1617620223087":{"attribute_name":"Heading","attribute_value_mlt":[{"subitem_1565671149650":"ja","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheading"},{"subitem_1565671149650":"en","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheding"}]},"item_1617944105607":{"attribute_name":"Degree Grantor","attribute_value_mlt":[{"subitem_1551256015892":[{"subitem_1551256027296":"xxxxxx","subitem_1551256029891":"kakenhi"}],"subitem_1551256037922":[{"subitem_1551256042287":"Degree Grantor Name","subitem_1551256047619":"en"}]}]},"item_title":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","item_type_id":"15","owner":"1","path":["1661432090216"],"pubdate":{"attribute_name":"PubDate","attribute_value":"2021-08-06"},"publish_date":"2021-08-06","publish_status":"0","relation_version_is_last":true,"title":["ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"weko_creator_id":"1","weko_shared_id":-1},"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"accessRights":["open access"],"alternative":["Alternative Title","Alternative Title"],"apc":["Unknown"],"author_link":["4"],"conference":{"conferenceCountry":["JPN"],"conferenceDate":["2020/12/11"],"conferenceName":["Conference Name"],"conferenceSequence":["1"],"conferenceSponsor":["Sponsor"],"conferenceVenue":["Conference Venue"]},"contributor":{"@attributes":{"contributorType":[["ContactPerson"]]},"affiliation":{"affiliationName":[],"nameIdentifier":[]},"contributorAlternative":[],"contributorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro"],"nameIdentifier":["xxxxxxx","xxxxxxx","xxxxxxx"]},"control_number":"1","creator":{"affiliation":{"affiliationName":["University"],"nameIdentifier":["0000000121691048"]},"creatorAlternative":[],"creatorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho","情報","ジョウホウ","Joho","情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro","太郎","タロウ","Taro","太郎","タロウ","Taro"],"nameIdentifier":["4","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz"]},"date":[{"dateType":"Available","value":"2021-06-30"}],"dateGranted":["2021-06-30"],"degreeGrantor":{"degreeGrantorName":["Degree Grantor Name"],"nameIdentifier":["xxxxxx"]},"degreeName":["Degree Name"],"description":[{"descriptionType":"Abstract","value":"Description\\nDescription
    Description"},{"descriptionType":"Abstract","value":"概要\\n概要\\n概要\\n概要"}],"feedback_mail_list":[{"author_id":"","email":"wekosoftware@nii.ac.jp"}],"fundingReference":{"awardNumber":["Award Number"],"awardTitle":["Award Title"],"funderIdentifier":["http://xxx"],"funderName":["Funder Name"]},"geoLocation":{"geoLocationPlace":["Japan"]},"identifier":[{"identifierType":"URI","value":"http://localhost"}],"issue":["111"],"itemtype":"デフォルトアイテムタイプ(フル)","language":["jpn"],"numPages":["12"],"pageEnd":["3"],"pageStart":["1"],"path":["1661432090216"],"publish_date":"2021-08-06","publish_status":"0","publisher":["Publisher"],"relation":{"@attributes":{"relationType":[["isVersionOf"]]},"relatedIdentifier":[{"identifierType":"arXiv","value":"xxxxx"}],"relatedTitle":["Related Title"]},"relation_version_is_last":true,"rights":["Rights Information"],"rightsHolder":{"nameIdentifier":["xxxxxx"],"rightsHolderName":["Right Holder Name"]},"sourceIdentifier":[{"identifierType":"ISSN","value":"xxxx-xxxx-xxxx"}],"sourceTitle":["Source Title"],"subject":[{"subjectScheme":"Other","value":"Sibject1"}],"temporal":["Temporal"],"title":["en_conference paperITEM00000001(public_open_access_simple)","ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"type":["dataset"],"version":["Version"],"versiontype":["AO"],"volume":["1"],"weko_creator_id":"1","weko_shared_id":-1},"updated":"2022-08-26T12:57:36.376731+00:00"}' + post_data = {'export_file_contents_radio': 'False', 'export_format_radio': 'JSON', 'record_ids': '[1]', 'invalid_record_ids': '[]'} with app.test_request_context(headers=[("Accept-Language", "en")]): - with patch("flask_login.utils._get_user", return_value=users[1]["obj"]): + with patch("flask_login.utils._get_user", return_value=users[1]["obj"]), \ + patch("weko_records_ui.utils.export_preprocess", MagicMock(return_value=record_metadata)): res = export_items(post_data) assert res.status_code == 200 + with patch("weko_items_ui.utils._get_max_export_items", return_value=0), \ + pytest.raises(BadRequest): + export_items(post_data) # .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_export_items_issue32943 -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp def test_export_items_issue32943(app,db_itemtype,db_itemtype2,db_records,users,db_records2): - post_data = {'export_file_contents_radio': 'False', 'export_format_radio': 'JSON', 'record_ids': '[1]', 'invalid_record_ids': '1', 'record_metadata': '{"1":{"created":"2022-08-25T12:56:26.587349+00:00","id":1,"links":{"self":"https://localhost:8443/api/records/1"},"metadata":{"_comment":["en_conference paperITEM00000001(public_open_access_simple)","WEKO-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2","https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/","4-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz","Joho, Taro,Joho, Taro,Joho, Taro","Joho,Joho,Joho","Taro,Taro,Taro","0000000121691048","ISNI","http://isni.org/isni/0000000121691048","University,Source Title,1,111,12,1,3,Degree Name,2021-06-30,xxxxxx,kakenhi,Degree Grantor Name","Conference Name","1","JPN","Sponsor","2000","12","1","2020","12","2020/12/11","1","Conference Venue","Conference Place"],"_files_info":[{"extention":"pdf","label":"1KB.pdf","url":"https://weko3.example.org/record/1/files/1KB.pdf"}],"_item_metadata":{"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"author_link":["4"],"control_number":"1","item_1617186331708":{"attribute_name":"Title","attribute_value_mlt":[{"subitem_1551255647225":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","subitem_1551255648112":"ja"},{"subitem_1551255647225":"en_conference paperITEM00000001(public_open_access_simple)","subitem_1551255648112":"en"}]},"item_1617186385884":{"attribute_name":"Alternative Title","attribute_value_mlt":[{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"en"},{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"ja"}]},"item_1617186419668":{"attribute_name":"Creator","attribute_type":"creator","attribute_value_mlt":[{"creatorAffiliations":[{"affiliationNameIdentifiers":[{"affiliationNameIdentifier":"0000000121691048","affiliationNameIdentifierScheme":"ISNI","affiliationNameIdentifierURI":"http://isni.org/isni/0000000121691048"}],"affiliationNames":[{"affiliationName":"University","affiliationNameLang":"en"}]}],"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"4","nameIdentifierScheme":"WEKO"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617186476635":{"attribute_name":"Access Rights","attribute_value_mlt":[{"subitem_1522299639480":"open access","subitem_1600958577026":"http://purl.org/coar/access_right/c_abf2"}]},"item_1617186499011":{"attribute_name":"Rights","attribute_value_mlt":[{"subitem_1522650717957":"ja","subitem_1522650727486":"http://localhost","subitem_1522651041219":"Rights Information"}]},"item_1617186609386":{"attribute_name":"Subject","attribute_value_mlt":[{"subitem_1522299896455":"ja","subitem_1522300014469":"Other","subitem_1522300048512":"http://localhost/","subitem_1523261968819":"Sibject1"}]},"item_1617186626617":{"attribute_name":"Description","attribute_value_mlt":[{"subitem_description":"Description\\nDescription
    Description","subitem_description_language":"en","subitem_description_type":"Abstract"},{"subitem_description":"概要\\n概要\\n概要\\n概要","subitem_description_language":"ja","subitem_description_type":"Abstract"}]},"item_1617186643794":{"attribute_name":"Publisher","attribute_value_mlt":[{"subitem_1522300295150":"en","subitem_1522300316516":"Publisher"}]},"item_1617186660861":{"attribute_name":"Date","attribute_value_mlt":[{"subitem_1522300695726":"Available","subitem_1522300722591":"2021-06-30"}]},"item_1617186702042":{"attribute_name":"Language","attribute_value_mlt":[{"subitem_1551255818386":"jpn"}]},"item_1617186783814":{"attribute_name":"Identifier","attribute_value_mlt":[{"subitem_identifier_type":"URI","subitem_identifier_uri":"http://localhost"}]},"item_1617186859717":{"attribute_name":"Temporal","attribute_value_mlt":[{"subitem_1522658018441":"en","subitem_1522658031721":"Temporal"}]},"item_1617186882738":{"attribute_name":"Geo Location","attribute_value_mlt":[{"subitem_geolocation_place":[{"subitem_geolocation_place_text":"Japan"}]}]},"item_1617186901218":{"attribute_name":"Funding Reference","attribute_value_mlt":[{"subitem_1522399143519":{"subitem_1522399281603":"ISNI","subitem_1522399333375":"http://xxx"},"subitem_1522399412622":[{"subitem_1522399416691":"en","subitem_1522737543681":"Funder Name"}],"subitem_1522399571623":{"subitem_1522399585738":"Award URI","subitem_1522399628911":"Award Number"},"subitem_1522399651758":[{"subitem_1522721910626":"en","subitem_1522721929892":"Award Title"}]}]},"item_1617186920753":{"attribute_name":"Source Identifier","attribute_value_mlt":[{"subitem_1522646500366":"ISSN","subitem_1522646572813":"xxxx-xxxx-xxxx"}]},"item_1617186941041":{"attribute_name":"Source Title","attribute_value_mlt":[{"subitem_1522650068558":"en","subitem_1522650091861":"Source Title"}]},"item_1617186959569":{"attribute_name":"Volume Number","attribute_value_mlt":[{"subitem_1551256328147":"1"}]},"item_1617186981471":{"attribute_name":"Issue Number","attribute_value_mlt":[{"subitem_1551256294723":"111"}]},"item_1617186994930":{"attribute_name":"Number of Pages","attribute_value_mlt":[{"subitem_1551256248092":"12"}]},"item_1617187024783":{"attribute_name":"Page Start","attribute_value_mlt":[{"subitem_1551256198917":"1"}]},"item_1617187045071":{"attribute_name":"Page End","attribute_value_mlt":[{"subitem_1551256185532":"3"}]},"item_1617187112279":{"attribute_name":"Degree Name","attribute_value_mlt":[{"subitem_1551256126428":"Degree Name","subitem_1551256129013":"en"}]},"item_1617187136212":{"attribute_name":"Date Granted","attribute_value_mlt":[{"subitem_1551256096004":"2021-06-30"}]},"item_1617187187528":{"attribute_name":"Conference","attribute_value_mlt":[{"subitem_1599711633003":[{"subitem_1599711636923":"Conference Name","subitem_1599711645590":"ja"}],"subitem_1599711655652":"1","subitem_1599711660052":[{"subitem_1599711680082":"Sponsor","subitem_1599711686511":"ja"}],"subitem_1599711699392":{"subitem_1599711704251":"2020/12/11","subitem_1599711712451":"1","subitem_1599711727603":"12","subitem_1599711731891":"2000","subitem_1599711735410":"1","subitem_1599711739022":"12","subitem_1599711743722":"2020","subitem_1599711745532":"ja"},"subitem_1599711758470":[{"subitem_1599711769260":"Conference Venue","subitem_1599711775943":"ja"}],"subitem_1599711788485":[{"subitem_1599711798761":"Conference Place","subitem_1599711803382":"ja"}],"subitem_1599711813532":"JPN"}]},"item_1617258105262":{"attribute_name":"Resource Type","attribute_value_mlt":[{"resourcetype":"dataset","resourceuri":"http://purl.org/coar/resource_type/c_ddb1"}]},"item_1617265215918":{"attribute_name":"Version Type","attribute_value_mlt":[{"subitem_1522305645492":"AO","subitem_1600292170262":"http://purl.org/coar/version/c_b1a7d7d4d402bcce"}]},"item_1617349709064":{"attribute_name":"Contributor","attribute_value_mlt":[{"contributorMails":[{"contributorMail":"wekosoftware@nii.ac.jp"}],"contributorNames":[{"contributorName":"情報, 太郎","lang":"ja"},{"contributorName":"ジョウホウ, タロウ","lang":"ja-Kana"},{"contributorName":"Joho, Taro","lang":"en"}],"contributorType":"ContactPerson","familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617349808926":{"attribute_name":"Version","attribute_value_mlt":[{"subitem_1523263171732":"Version"}]},"item_1617351524846":{"attribute_name":"APC","attribute_value_mlt":[{"subitem_1523260933860":"Unknown"}]},"item_1617353299429":{"attribute_name":"Relation","attribute_value_mlt":[{"subitem_1522306207484":"isVersionOf","subitem_1522306287251":{"subitem_1522306382014":"arXiv","subitem_1522306436033":"xxxxx"},"subitem_1523320863692":[{"subitem_1523320867455":"en","subitem_1523320909613":"Related Title"}]}]},"item_1617605131499":{"attribute_name":"File","attribute_type":"file","attribute_value_mlt":[{"accessrole":"open_access","date":[{"dateType":"Available","dateValue":"2021-07-12"}],"displaytype":"simple","filename":"1KB.pdf","filesize":[{"value":"1 KB"}],"format":"text/plain","mimetype":"application/pdf","url":{"url":"https://weko3.example.org/record/1/files/1KB.pdf"},"version_id":"9008626e-cb32-48bd-8409-1204f03b8077"}]},"item_1617610673286":{"attribute_name":"Rights Holder","attribute_value_mlt":[{"nameIdentifiers":[{"nameIdentifier":"xxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"}],"rightHolderNames":[{"rightHolderLanguage":"ja","rightHolderName":"Right Holder Name"}]}]},"item_1617620223087":{"attribute_name":"Heading","attribute_value_mlt":[{"subitem_1565671149650":"ja","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheading"},{"subitem_1565671149650":"en","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheding"}]},"item_1617944105607":{"attribute_name":"Degree Grantor","attribute_value_mlt":[{"subitem_1551256015892":[{"subitem_1551256027296":"xxxxxx","subitem_1551256029891":"kakenhi"}],"subitem_1551256037922":[{"subitem_1551256042287":"Degree Grantor Name","subitem_1551256047619":"en"}]}]},"item_title":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","item_type_id":"15","owner":"1","path":["1661432090216"],"pubdate":{"attribute_name":"PubDate","attribute_value":"2021-08-06"},"publish_date":"2021-08-06","publish_status":"0","relation_version_is_last":true,"title":["ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"weko_creator_id":"1","weko_shared_id":-1},"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"accessRights":["open access"],"alternative":["Alternative Title","Alternative Title"],"apc":["Unknown"],"author_link":["4"],"conference":{"conferenceCountry":["JPN"],"conferenceDate":["2020/12/11"],"conferenceName":["Conference Name"],"conferenceSequence":["1"],"conferenceSponsor":["Sponsor"],"conferenceVenue":["Conference Venue"]},"contributor":{"@attributes":{"contributorType":[["ContactPerson"]]},"affiliation":{"affiliationName":[],"nameIdentifier":[]},"contributorAlternative":[],"contributorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro"],"nameIdentifier":["xxxxxxx","xxxxxxx","xxxxxxx"]},"control_number":"1","creator":{"affiliation":{"affiliationName":["University"],"nameIdentifier":["0000000121691048"]},"creatorAlternative":[],"creatorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho","情報","ジョウホウ","Joho","情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro","太郎","タロウ","Taro","太郎","タロウ","Taro"],"nameIdentifier":["4","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz"]},"date":[{"dateType":"Available","value":"2021-06-30"}],"dateGranted":["2021-06-30"],"degreeGrantor":{"degreeGrantorName":["Degree Grantor Name"],"nameIdentifier":["xxxxxx"]},"degreeName":["Degree Name"],"description":[{"descriptionType":"Abstract","value":"Description\\nDescription
    Description"},{"descriptionType":"Abstract","value":"概要\\n概要\\n概要\\n概要"}],"feedback_mail_list":[{"author_id":"","email":"wekosoftware@nii.ac.jp"}],"fundingReference":{"awardNumber":["Award Number"],"awardTitle":["Award Title"],"funderIdentifier":["http://xxx"],"funderName":["Funder Name"]},"geoLocation":{"geoLocationPlace":["Japan"]},"identifier":[{"identifierType":"URI","value":"http://localhost"}],"issue":["111"],"itemtype":"デフォルトアイテムタイプ(フル)","language":["jpn"],"numPages":["12"],"pageEnd":["3"],"pageStart":["1"],"path":["1661432090216"],"publish_date":"2021-08-06","publish_status":"0","publisher":["Publisher"],"relation":{"@attributes":{"relationType":[["isVersionOf"]]},"relatedIdentifier":[{"identifierType":"arXiv","value":"xxxxx"}],"relatedTitle":["Related Title"]},"relation_version_is_last":true,"rights":["Rights Information"],"rightsHolder":{"nameIdentifier":["xxxxxx"],"rightsHolderName":["Right Holder Name"]},"sourceIdentifier":[{"identifierType":"ISSN","value":"xxxx-xxxx-xxxx"}],"sourceTitle":["Source Title"],"subject":[{"subjectScheme":"Other","value":"Sibject1"}],"temporal":["Temporal"],"title":["en_conference paperITEM00000001(public_open_access_simple)","ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"type":["dataset"],"version":["Version"],"versiontype":["AO"],"volume":["1"],"weko_creator_id":"1","weko_shared_id":-1},"updated":"2022-08-26T12:57:36.376731+00:00"}}'} + record_metadata = '{"created":"2022-08-25T12:56:26.587349+00:00","id":1,"links":{"self":"https://localhost:8443/api/records/1"},"metadata":{"_comment":["en_conference paperITEM00000001(public_open_access_simple)","WEKO-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2","https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/","4-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz","Joho, Taro,Joho, Taro,Joho, Taro","Joho,Joho,Joho","Taro,Taro,Taro","0000000121691048","ISNI","http://isni.org/isni/0000000121691048","University,Source Title,1,111,12,1,3,Degree Name,2021-06-30,xxxxxx,kakenhi,Degree Grantor Name","Conference Name","1","JPN","Sponsor","2000","12","1","2020","12","2020/12/11","1","Conference Venue","Conference Place"],"_files_info":[{"extention":"pdf","label":"1KB.pdf","url":"https://weko3.example.org/record/1/files/1KB.pdf"}],"_item_metadata":{"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"author_link":["4"],"control_number":"1","item_1617186331708":{"attribute_name":"Title","attribute_value_mlt":[{"subitem_1551255647225":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","subitem_1551255648112":"ja"},{"subitem_1551255647225":"en_conference paperITEM00000001(public_open_access_simple)","subitem_1551255648112":"en"}]},"item_1617186385884":{"attribute_name":"Alternative Title","attribute_value_mlt":[{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"en"},{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"ja"}]},"item_1617186419668":{"attribute_name":"Creator","attribute_type":"creator","attribute_value_mlt":[{"creatorAffiliations":[{"affiliationNameIdentifiers":[{"affiliationNameIdentifier":"0000000121691048","affiliationNameIdentifierScheme":"ISNI","affiliationNameIdentifierURI":"http://isni.org/isni/0000000121691048"}],"affiliationNames":[{"affiliationName":"University","affiliationNameLang":"en"}]}],"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"4","nameIdentifierScheme":"WEKO"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617186476635":{"attribute_name":"Access Rights","attribute_value_mlt":[{"subitem_1522299639480":"open access","subitem_1600958577026":"http://purl.org/coar/access_right/c_abf2"}]},"item_1617186499011":{"attribute_name":"Rights","attribute_value_mlt":[{"subitem_1522650717957":"ja","subitem_1522650727486":"http://localhost","subitem_1522651041219":"Rights Information"}]},"item_1617186609386":{"attribute_name":"Subject","attribute_value_mlt":[{"subitem_1522299896455":"ja","subitem_1522300014469":"Other","subitem_1522300048512":"http://localhost/","subitem_1523261968819":"Sibject1"}]},"item_1617186626617":{"attribute_name":"Description","attribute_value_mlt":[{"subitem_description":"Description\\nDescription
    Description","subitem_description_language":"en","subitem_description_type":"Abstract"},{"subitem_description":"概要\\n概要\\n概要\\n概要","subitem_description_language":"ja","subitem_description_type":"Abstract"}]},"item_1617186643794":{"attribute_name":"Publisher","attribute_value_mlt":[{"subitem_1522300295150":"en","subitem_1522300316516":"Publisher"}]},"item_1617186660861":{"attribute_name":"Date","attribute_value_mlt":[{"subitem_1522300695726":"Available","subitem_1522300722591":"2021-06-30"}]},"item_1617186702042":{"attribute_name":"Language","attribute_value_mlt":[{"subitem_1551255818386":"jpn"}]},"item_1617186783814":{"attribute_name":"Identifier","attribute_value_mlt":[{"subitem_identifier_type":"URI","subitem_identifier_uri":"http://localhost"}]},"item_1617186859717":{"attribute_name":"Temporal","attribute_value_mlt":[{"subitem_1522658018441":"en","subitem_1522658031721":"Temporal"}]},"item_1617186882738":{"attribute_name":"Geo Location","attribute_value_mlt":[{"subitem_geolocation_place":[{"subitem_geolocation_place_text":"Japan"}]}]},"item_1617186901218":{"attribute_name":"Funding Reference","attribute_value_mlt":[{"subitem_1522399143519":{"subitem_1522399281603":"ISNI","subitem_1522399333375":"http://xxx"},"subitem_1522399412622":[{"subitem_1522399416691":"en","subitem_1522737543681":"Funder Name"}],"subitem_1522399571623":{"subitem_1522399585738":"Award URI","subitem_1522399628911":"Award Number"},"subitem_1522399651758":[{"subitem_1522721910626":"en","subitem_1522721929892":"Award Title"}]}]},"item_1617186920753":{"attribute_name":"Source Identifier","attribute_value_mlt":[{"subitem_1522646500366":"ISSN","subitem_1522646572813":"xxxx-xxxx-xxxx"}]},"item_1617186941041":{"attribute_name":"Source Title","attribute_value_mlt":[{"subitem_1522650068558":"en","subitem_1522650091861":"Source Title"}]},"item_1617186959569":{"attribute_name":"Volume Number","attribute_value_mlt":[{"subitem_1551256328147":"1"}]},"item_1617186981471":{"attribute_name":"Issue Number","attribute_value_mlt":[{"subitem_1551256294723":"111"}]},"item_1617186994930":{"attribute_name":"Number of Pages","attribute_value_mlt":[{"subitem_1551256248092":"12"}]},"item_1617187024783":{"attribute_name":"Page Start","attribute_value_mlt":[{"subitem_1551256198917":"1"}]},"item_1617187045071":{"attribute_name":"Page End","attribute_value_mlt":[{"subitem_1551256185532":"3"}]},"item_1617187112279":{"attribute_name":"Degree Name","attribute_value_mlt":[{"subitem_1551256126428":"Degree Name","subitem_1551256129013":"en"}]},"item_1617187136212":{"attribute_name":"Date Granted","attribute_value_mlt":[{"subitem_1551256096004":"2021-06-30"}]},"item_1617187187528":{"attribute_name":"Conference","attribute_value_mlt":[{"subitem_1599711633003":[{"subitem_1599711636923":"Conference Name","subitem_1599711645590":"ja"}],"subitem_1599711655652":"1","subitem_1599711660052":[{"subitem_1599711680082":"Sponsor","subitem_1599711686511":"ja"}],"subitem_1599711699392":{"subitem_1599711704251":"2020/12/11","subitem_1599711712451":"1","subitem_1599711727603":"12","subitem_1599711731891":"2000","subitem_1599711735410":"1","subitem_1599711739022":"12","subitem_1599711743722":"2020","subitem_1599711745532":"ja"},"subitem_1599711758470":[{"subitem_1599711769260":"Conference Venue","subitem_1599711775943":"ja"}],"subitem_1599711788485":[{"subitem_1599711798761":"Conference Place","subitem_1599711803382":"ja"}],"subitem_1599711813532":"JPN"}]},"item_1617258105262":{"attribute_name":"Resource Type","attribute_value_mlt":[{"resourcetype":"dataset","resourceuri":"http://purl.org/coar/resource_type/c_ddb1"}]},"item_1617265215918":{"attribute_name":"Version Type","attribute_value_mlt":[{"subitem_1522305645492":"AO","subitem_1600292170262":"http://purl.org/coar/version/c_b1a7d7d4d402bcce"}]},"item_1617349709064":{"attribute_name":"Contributor","attribute_value_mlt":[{"contributorMails":[{"contributorMail":"wekosoftware@nii.ac.jp"}],"contributorNames":[{"contributorName":"情報, 太郎","lang":"ja"},{"contributorName":"ジョウホウ, タロウ","lang":"ja-Kana"},{"contributorName":"Joho, Taro","lang":"en"}],"contributorType":"ContactPerson","familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617349808926":{"attribute_name":"Version","attribute_value_mlt":[{"subitem_1523263171732":"Version"}]},"item_1617351524846":{"attribute_name":"APC","attribute_value_mlt":[{"subitem_1523260933860":"Unknown"}]},"item_1617353299429":{"attribute_name":"Relation","attribute_value_mlt":[{"subitem_1522306207484":"isVersionOf","subitem_1522306287251":{"subitem_1522306382014":"arXiv","subitem_1522306436033":"xxxxx"},"subitem_1523320863692":[{"subitem_1523320867455":"en","subitem_1523320909613":"Related Title"}]}]},"item_1617605131499":{"attribute_name":"File","attribute_type":"file","attribute_value_mlt":[{"accessrole":"open_access","date":[{"dateType":"Available","dateValue":"2021-07-12"}],"displaytype":"simple","filename":"1KB.pdf","filesize":[{"value":"1 KB"}],"format":"text/plain","mimetype":"application/pdf","url":{"url":"https://weko3.example.org/record/1/files/1KB.pdf"},"version_id":"9008626e-cb32-48bd-8409-1204f03b8077"}]},"item_1617610673286":{"attribute_name":"Rights Holder","attribute_value_mlt":[{"nameIdentifiers":[{"nameIdentifier":"xxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"}],"rightHolderNames":[{"rightHolderLanguage":"ja","rightHolderName":"Right Holder Name"}]}]},"item_1617620223087":{"attribute_name":"Heading","attribute_value_mlt":[{"subitem_1565671149650":"ja","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheading"},{"subitem_1565671149650":"en","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheding"}]},"item_1617944105607":{"attribute_name":"Degree Grantor","attribute_value_mlt":[{"subitem_1551256015892":[{"subitem_1551256027296":"xxxxxx","subitem_1551256029891":"kakenhi"}],"subitem_1551256037922":[{"subitem_1551256042287":"Degree Grantor Name","subitem_1551256047619":"en"}]}]},"item_title":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","item_type_id":"15","owner":"1","path":["1661432090216"],"pubdate":{"attribute_name":"PubDate","attribute_value":"2021-08-06"},"publish_date":"2021-08-06","publish_status":"0","relation_version_is_last":true,"title":["ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"weko_creator_id":"1","weko_shared_id":-1},"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"accessRights":["open access"],"alternative":["Alternative Title","Alternative Title"],"apc":["Unknown"],"author_link":["4"],"conference":{"conferenceCountry":["JPN"],"conferenceDate":["2020/12/11"],"conferenceName":["Conference Name"],"conferenceSequence":["1"],"conferenceSponsor":["Sponsor"],"conferenceVenue":["Conference Venue"]},"contributor":{"@attributes":{"contributorType":[["ContactPerson"]]},"affiliation":{"affiliationName":[],"nameIdentifier":[]},"contributorAlternative":[],"contributorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro"],"nameIdentifier":["xxxxxxx","xxxxxxx","xxxxxxx"]},"control_number":"1","creator":{"affiliation":{"affiliationName":["University"],"nameIdentifier":["0000000121691048"]},"creatorAlternative":[],"creatorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho","情報","ジョウホウ","Joho","情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro","太郎","タロウ","Taro","太郎","タロウ","Taro"],"nameIdentifier":["4","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz"]},"date":[{"dateType":"Available","value":"2021-06-30"}],"dateGranted":["2021-06-30"],"degreeGrantor":{"degreeGrantorName":["Degree Grantor Name"],"nameIdentifier":["xxxxxx"]},"degreeName":["Degree Name"],"description":[{"descriptionType":"Abstract","value":"Description\\nDescription
    Description"},{"descriptionType":"Abstract","value":"概要\\n概要\\n概要\\n概要"}],"feedback_mail_list":[{"author_id":"","email":"wekosoftware@nii.ac.jp"}],"fundingReference":{"awardNumber":["Award Number"],"awardTitle":["Award Title"],"funderIdentifier":["http://xxx"],"funderName":["Funder Name"]},"geoLocation":{"geoLocationPlace":["Japan"]},"identifier":[{"identifierType":"URI","value":"http://localhost"}],"issue":["111"],"itemtype":"デフォルトアイテムタイプ(フル)","language":["jpn"],"numPages":["12"],"pageEnd":["3"],"pageStart":["1"],"path":["1661432090216"],"publish_date":"2021-08-06","publish_status":"0","publisher":["Publisher"],"relation":{"@attributes":{"relationType":[["isVersionOf"]]},"relatedIdentifier":[{"identifierType":"arXiv","value":"xxxxx"}],"relatedTitle":["Related Title"]},"relation_version_is_last":true,"rights":["Rights Information"],"rightsHolder":{"nameIdentifier":["xxxxxx"],"rightsHolderName":["Right Holder Name"]},"sourceIdentifier":[{"identifierType":"ISSN","value":"xxxx-xxxx-xxxx"}],"sourceTitle":["Source Title"],"subject":[{"subjectScheme":"Other","value":"Sibject1"}],"temporal":["Temporal"],"title":["en_conference paperITEM00000001(public_open_access_simple)","ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"type":["dataset"],"version":["Version"],"versiontype":["AO"],"volume":["1"],"weko_creator_id":"1","weko_shared_id":-1},"updated":"2022-08-26T12:57:36.376731+00:00"}' + post_data = {'export_file_contents_radio': 'False', 'export_format_radio': 'JSON', 'record_ids': '[1]', 'invalid_record_ids': '1'} with app.test_request_context(headers=[("Accept-Language", "en")]): - with patch("flask_login.utils._get_user", return_value=users[1]["obj"]): + with patch("flask_login.utils._get_user", return_value=users[1]["obj"]), \ + patch("weko_records_ui.utils.export_preprocess", MagicMock(return_value=record_metadata)): res = export_items(post_data) assert res == ('',204) - - post_data = {'export_file_contents_radio': 'False', 'export_format_radio': 'JSON', 'record_ids': '[1,2]', 'invalid_record_ids': '1', 'record_metadata': '{"1":{"created":"2022-08-25T12:56:26.587349+00:00","id":1,"links":{"self":"https://localhost:8443/api/records/1"},"metadata":{"_comment":["en_conference paperITEM00000001(public_open_access_simple)","WEKO-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2-,- ORCID-,- CiNii-,- KAKEN2","https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/-,- https://orcid.org/-,- https://ci.nii.ac.jp/-,- https://kaken.nii.ac.jp/","4-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz-,- xxxxxxx-,- xxxxxxx-,- zzzzzzz","Joho, Taro,Joho, Taro,Joho, Taro","Joho,Joho,Joho","Taro,Taro,Taro","0000000121691048","ISNI","http://isni.org/isni/0000000121691048","University,Source Title,1,111,12,1,3,Degree Name,2021-06-30,xxxxxx,kakenhi,Degree Grantor Name","Conference Name","1","JPN","Sponsor","2000","12","1","2020","12","2020/12/11","1","Conference Venue","Conference Place"],"_files_info":[{"extention":"pdf","label":"1KB.pdf","url":"https://weko3.example.org/record/1/files/1KB.pdf"}],"_item_metadata":{"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"author_link":["4"],"control_number":"1","item_1617186331708":{"attribute_name":"Title","attribute_value_mlt":[{"subitem_1551255647225":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","subitem_1551255648112":"ja"},{"subitem_1551255647225":"en_conference paperITEM00000001(public_open_access_simple)","subitem_1551255648112":"en"}]},"item_1617186385884":{"attribute_name":"Alternative Title","attribute_value_mlt":[{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"en"},{"subitem_1551255720400":"Alternative Title","subitem_1551255721061":"ja"}]},"item_1617186419668":{"attribute_name":"Creator","attribute_type":"creator","attribute_value_mlt":[{"creatorAffiliations":[{"affiliationNameIdentifiers":[{"affiliationNameIdentifier":"0000000121691048","affiliationNameIdentifierScheme":"ISNI","affiliationNameIdentifierURI":"http://isni.org/isni/0000000121691048"}],"affiliationNames":[{"affiliationName":"University","affiliationNameLang":"en"}]}],"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"4","nameIdentifierScheme":"WEKO"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]},{"creatorMails":[{"creatorMail":"wekosoftware@nii.ac.jp"}],"creatorNames":[{"creatorName":"情報, 太郎","creatorNameLang":"ja"},{"creatorName":"ジョウホウ, タロウ","creatorNameLang":"ja-Kana"},{"creatorName":"Joho, Taro","creatorNameLang":"en"}],"familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"zzzzzzz","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617186476635":{"attribute_name":"Access Rights","attribute_value_mlt":[{"subitem_1522299639480":"open access","subitem_1600958577026":"http://purl.org/coar/access_right/c_abf2"}]},"item_1617186499011":{"attribute_name":"Rights","attribute_value_mlt":[{"subitem_1522650717957":"ja","subitem_1522650727486":"http://localhost","subitem_1522651041219":"Rights Information"}]},"item_1617186609386":{"attribute_name":"Subject","attribute_value_mlt":[{"subitem_1522299896455":"ja","subitem_1522300014469":"Other","subitem_1522300048512":"http://localhost/","subitem_1523261968819":"Sibject1"}]},"item_1617186626617":{"attribute_name":"Description","attribute_value_mlt":[{"subitem_description":"Description\\nDescription
    Description","subitem_description_language":"en","subitem_description_type":"Abstract"},{"subitem_description":"概要\\n概要\\n概要\\n概要","subitem_description_language":"ja","subitem_description_type":"Abstract"}]},"item_1617186643794":{"attribute_name":"Publisher","attribute_value_mlt":[{"subitem_1522300295150":"en","subitem_1522300316516":"Publisher"}]},"item_1617186660861":{"attribute_name":"Date","attribute_value_mlt":[{"subitem_1522300695726":"Available","subitem_1522300722591":"2021-06-30"}]},"item_1617186702042":{"attribute_name":"Language","attribute_value_mlt":[{"subitem_1551255818386":"jpn"}]},"item_1617186783814":{"attribute_name":"Identifier","attribute_value_mlt":[{"subitem_identifier_type":"URI","subitem_identifier_uri":"http://localhost"}]},"item_1617186859717":{"attribute_name":"Temporal","attribute_value_mlt":[{"subitem_1522658018441":"en","subitem_1522658031721":"Temporal"}]},"item_1617186882738":{"attribute_name":"Geo Location","attribute_value_mlt":[{"subitem_geolocation_place":[{"subitem_geolocation_place_text":"Japan"}]}]},"item_1617186901218":{"attribute_name":"Funding Reference","attribute_value_mlt":[{"subitem_1522399143519":{"subitem_1522399281603":"ISNI","subitem_1522399333375":"http://xxx"},"subitem_1522399412622":[{"subitem_1522399416691":"en","subitem_1522737543681":"Funder Name"}],"subitem_1522399571623":{"subitem_1522399585738":"Award URI","subitem_1522399628911":"Award Number"},"subitem_1522399651758":[{"subitem_1522721910626":"en","subitem_1522721929892":"Award Title"}]}]},"item_1617186920753":{"attribute_name":"Source Identifier","attribute_value_mlt":[{"subitem_1522646500366":"ISSN","subitem_1522646572813":"xxxx-xxxx-xxxx"}]},"item_1617186941041":{"attribute_name":"Source Title","attribute_value_mlt":[{"subitem_1522650068558":"en","subitem_1522650091861":"Source Title"}]},"item_1617186959569":{"attribute_name":"Volume Number","attribute_value_mlt":[{"subitem_1551256328147":"1"}]},"item_1617186981471":{"attribute_name":"Issue Number","attribute_value_mlt":[{"subitem_1551256294723":"111"}]},"item_1617186994930":{"attribute_name":"Number of Pages","attribute_value_mlt":[{"subitem_1551256248092":"12"}]},"item_1617187024783":{"attribute_name":"Page Start","attribute_value_mlt":[{"subitem_1551256198917":"1"}]},"item_1617187045071":{"attribute_name":"Page End","attribute_value_mlt":[{"subitem_1551256185532":"3"}]},"item_1617187112279":{"attribute_name":"Degree Name","attribute_value_mlt":[{"subitem_1551256126428":"Degree Name","subitem_1551256129013":"en"}]},"item_1617187136212":{"attribute_name":"Date Granted","attribute_value_mlt":[{"subitem_1551256096004":"2021-06-30"}]},"item_1617187187528":{"attribute_name":"Conference","attribute_value_mlt":[{"subitem_1599711633003":[{"subitem_1599711636923":"Conference Name","subitem_1599711645590":"ja"}],"subitem_1599711655652":"1","subitem_1599711660052":[{"subitem_1599711680082":"Sponsor","subitem_1599711686511":"ja"}],"subitem_1599711699392":{"subitem_1599711704251":"2020/12/11","subitem_1599711712451":"1","subitem_1599711727603":"12","subitem_1599711731891":"2000","subitem_1599711735410":"1","subitem_1599711739022":"12","subitem_1599711743722":"2020","subitem_1599711745532":"ja"},"subitem_1599711758470":[{"subitem_1599711769260":"Conference Venue","subitem_1599711775943":"ja"}],"subitem_1599711788485":[{"subitem_1599711798761":"Conference Place","subitem_1599711803382":"ja"}],"subitem_1599711813532":"JPN"}]},"item_1617258105262":{"attribute_name":"Resource Type","attribute_value_mlt":[{"resourcetype":"dataset","resourceuri":"http://purl.org/coar/resource_type/c_ddb1"}]},"item_1617265215918":{"attribute_name":"Version Type","attribute_value_mlt":[{"subitem_1522305645492":"AO","subitem_1600292170262":"http://purl.org/coar/version/c_b1a7d7d4d402bcce"}]},"item_1617349709064":{"attribute_name":"Contributor","attribute_value_mlt":[{"contributorMails":[{"contributorMail":"wekosoftware@nii.ac.jp"}],"contributorNames":[{"contributorName":"情報, 太郎","lang":"ja"},{"contributorName":"ジョウホウ, タロウ","lang":"ja-Kana"},{"contributorName":"Joho, Taro","lang":"en"}],"contributorType":"ContactPerson","familyNames":[{"familyName":"情報","familyNameLang":"ja"},{"familyName":"ジョウホウ","familyNameLang":"ja-Kana"},{"familyName":"Joho","familyNameLang":"en"}],"givenNames":[{"givenName":"太郎","givenNameLang":"ja"},{"givenName":"タロウ","givenNameLang":"ja-Kana"},{"givenName":"Taro","givenNameLang":"en"}],"nameIdentifiers":[{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"CiNii","nameIdentifierURI":"https://ci.nii.ac.jp/"},{"nameIdentifier":"xxxxxxx","nameIdentifierScheme":"KAKEN2","nameIdentifierURI":"https://kaken.nii.ac.jp/"}]}]},"item_1617349808926":{"attribute_name":"Version","attribute_value_mlt":[{"subitem_1523263171732":"Version"}]},"item_1617351524846":{"attribute_name":"APC","attribute_value_mlt":[{"subitem_1523260933860":"Unknown"}]},"item_1617353299429":{"attribute_name":"Relation","attribute_value_mlt":[{"subitem_1522306207484":"isVersionOf","subitem_1522306287251":{"subitem_1522306382014":"arXiv","subitem_1522306436033":"xxxxx"},"subitem_1523320863692":[{"subitem_1523320867455":"en","subitem_1523320909613":"Related Title"}]}]},"item_1617605131499":{"attribute_name":"File","attribute_type":"file","attribute_value_mlt":[{"accessrole":"open_access","date":[{"dateType":"Available","dateValue":"2021-07-12"}],"displaytype":"simple","filename":"1KB.pdf","filesize":[{"value":"1 KB"}],"format":"text/plain","mimetype":"application/pdf","url":{"url":"https://weko3.example.org/record/1/files/1KB.pdf"},"version_id":"9008626e-cb32-48bd-8409-1204f03b8077"}]},"item_1617610673286":{"attribute_name":"Rights Holder","attribute_value_mlt":[{"nameIdentifiers":[{"nameIdentifier":"xxxxxx","nameIdentifierScheme":"ORCID","nameIdentifierURI":"https://orcid.org/"}],"rightHolderNames":[{"rightHolderLanguage":"ja","rightHolderName":"Right Holder Name"}]}]},"item_1617620223087":{"attribute_name":"Heading","attribute_value_mlt":[{"subitem_1565671149650":"ja","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheading"},{"subitem_1565671149650":"en","subitem_1565671169640":"Banner Headline","subitem_1565671178623":"Subheding"}]},"item_1617944105607":{"attribute_name":"Degree Grantor","attribute_value_mlt":[{"subitem_1551256015892":[{"subitem_1551256027296":"xxxxxx","subitem_1551256029891":"kakenhi"}],"subitem_1551256037922":[{"subitem_1551256042287":"Degree Grantor Name","subitem_1551256047619":"en"}]}]},"item_title":"ja_conference paperITEM00000001(public_open_access_open_access_simple)","item_type_id":"15","owner":"1","path":["1661432090216"],"pubdate":{"attribute_name":"PubDate","attribute_value":"2021-08-06"},"publish_date":"2021-08-06","publish_status":"0","relation_version_is_last":true,"title":["ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"weko_creator_id":"1","weko_shared_id":-1},"_oai":{"id":"oai:weko3.example.org:00000001","sets":["1661432090216"]},"accessRights":["open access"],"alternative":["Alternative Title","Alternative Title"],"apc":["Unknown"],"author_link":["4"],"conference":{"conferenceCountry":["JPN"],"conferenceDate":["2020/12/11"],"conferenceName":["Conference Name"],"conferenceSequence":["1"],"conferenceSponsor":["Sponsor"],"conferenceVenue":["Conference Venue"]},"contributor":{"@attributes":{"contributorType":[["ContactPerson"]]},"affiliation":{"affiliationName":[],"nameIdentifier":[]},"contributorAlternative":[],"contributorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro"],"nameIdentifier":["xxxxxxx","xxxxxxx","xxxxxxx"]},"control_number":"1","creator":{"affiliation":{"affiliationName":["University"],"nameIdentifier":["0000000121691048"]},"creatorAlternative":[],"creatorName":["情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro","情報, 太郎","ジョウホウ, タロウ","Joho, Taro"],"familyName":["情報","ジョウホウ","Joho","情報","ジョウホウ","Joho","情報","ジョウホウ","Joho"],"givenName":["太郎","タロウ","Taro","太郎","タロウ","Taro","太郎","タロウ","Taro"],"nameIdentifier":["4","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz","xxxxxxx","xxxxxxx","zzzzzzz"]},"date":[{"dateType":"Available","value":"2021-06-30"}],"dateGranted":["2021-06-30"],"degreeGrantor":{"degreeGrantorName":["Degree Grantor Name"],"nameIdentifier":["xxxxxx"]},"degreeName":["Degree Name"],"description":[{"descriptionType":"Abstract","value":"Description\\nDescription
    Description"},{"descriptionType":"Abstract","value":"概要\\n概要\\n概要\\n概要"}],"feedback_mail_list":[{"author_id":"","email":"wekosoftware@nii.ac.jp"}],"fundingReference":{"awardNumber":["Award Number"],"awardTitle":["Award Title"],"funderIdentifier":["http://xxx"],"funderName":["Funder Name"]},"geoLocation":{"geoLocationPlace":["Japan"]},"identifier":[{"identifierType":"URI","value":"http://localhost"}],"issue":["111"],"itemtype":"デフォルトアイテムタイプ(フル)","language":["jpn"],"numPages":["12"],"pageEnd":["3"],"pageStart":["1"],"path":["1661432090216"],"publish_date":"2021-08-06","publish_status":"0","publisher":["Publisher"],"relation":{"@attributes":{"relationType":[["isVersionOf"]]},"relatedIdentifier":[{"identifierType":"arXiv","value":"xxxxx"}],"relatedTitle":["Related Title"]},"relation_version_is_last":true,"rights":["Rights Information"],"rightsHolder":{"nameIdentifier":["xxxxxx"],"rightsHolderName":["Right Holder Name"]},"sourceIdentifier":[{"identifierType":"ISSN","value":"xxxx-xxxx-xxxx"}],"sourceTitle":["Source Title"],"subject":[{"subjectScheme":"Other","value":"Sibject1"}],"temporal":["Temporal"],"title":["en_conference paperITEM00000001(public_open_access_simple)","ja_conference paperITEM00000001(public_open_access_open_access_simple)"],"type":["dataset"],"version":["Version"],"versiontype":["AO"],"volume":["1"],"weko_creator_id":"1","weko_shared_id":-1},"updated":"2022-08-26T12:57:36.376731+00:00"}}'} - with app.test_request_context(headers=[("Accept-Language", "en")]): - with patch("flask_login.utils._get_user", return_value=users[1]["obj"]): + + post_data['record_ids'] = '[1,2]' res = export_items(post_data) assert res.status_code == 200 @@ -9219,11 +9258,11 @@ def test_save_title(app, db_itemtype, db_workflow, db_records, users): "$schema": "1", "item_1617186331708": [ { - "subitem_1551255647225": "ja_conference paperITEM00000001(public_open_access_open_access_simple)", + "subitem_1551255647225": "タイトル", "subitem_1551255648112": "ja", }, { - "subitem_1551255647225": "en_conference paperITEM00000001(public_open_access_simple)", + "subitem_1551255647225": "title", "subitem_1551255648112": "en", }, ], @@ -9671,11 +9710,55 @@ def test_save_title(app, db_itemtype, db_workflow, db_records, users): save_title("A-00000000-00000", request_data) activity = WorkActivity() db_activity = activity.get_activity_detail("A-00000000-00000") - assert ( - db_activity.title - == "ja_conference paperITEM00000001(public_open_access_open_access_simple)" - ) + assert db_activity.title == "タイトル" + request_data["metainfo"]["item_1617186331708"][0].pop("subitem_1551255648112") + request_data["metainfo"]["item_1617186331708"][1].pop("subitem_1551255648112") + save_title("A-00000000-00000", request_data) + db_activity = activity.get_activity_detail("A-00000000-00000") + assert db_activity.title == "タイトル" + + request_data["metainfo"]["item_1617186331709"] = [ + { + "subitem_1551255647226": "タイトル-2", + "subitem_1551255648113": "ja", + }, + { + "subitem_1551255647226": "title-2", + "subitem_1551255648113": "en", + }, + ] + save_title("A-00000000-00000", request_data) + db_activity = activity.get_activity_detail("A-00000000-00000") + assert db_activity.title == "タイトル" + + request_data["metainfo"].pop("item_1617186331708") + save_title("A-00000000-00000", request_data) + db_activity = activity.get_activity_detail("A-00000000-00000") + assert db_activity.title == "タイトル-2" + + request_data["metainfo"]["item_1617186331709"][0].pop("subitem_1551255648113") + request_data["metainfo"]["item_1617186331709"][1].pop("subitem_1551255648113") + save_title("A-00000000-00000", request_data) + db_activity = activity.get_activity_detail("A-00000000-00000") + assert db_activity.title == "タイトル-2" + + with patch("weko_items_ui.utils.get_key_title_in_item_type_mapping") as mock_get_key: + mock_get_key.return_value = (None, "subitem_1551255647225") + dummy_request_data = request_data.copy() + dummy_request_data["metainfo"]["item_1617186331709"] = [ + { + "subitem_1551255647226": "タイトル-dummy", + "subitem_1551255648113": "ja", + }, + { + "subitem_1551255647226": "title-dummy", + "subitem_1551255648113": "en", + }, + ] + save_title("A-00000000-00000", dummy_request_data) + db_activity = activity.get_activity_detail("A-00000000-00000") + assert db_activity.title == "タイトル-2" # def get_key_title_in_item_type_mapping(item_type_mapping): # .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_get_key_title_in_item_type_mapping -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp @@ -10141,8 +10224,39 @@ def test_get_title_in_request(): ], "endpoints": {"initialization": "/api/deposits/redirect/1.0"}, } - - assert get_title_in_request(request_data,'item_1617186331708', 'subitem_1551255647225')=='ja_conference paperITEM00000001(public_open_access_open_access_simple)' + key_list = ['item_1617186331708', 'item_1617186331709'] + key_child_dict = {'item_1617186331708': 'subitem_1551255647225', 'item_1617186331709': 'subitem_1551255647226'} + assert get_title_in_request(request_data, key_list, key_child_dict) == 'ja_conference paperITEM00000001(public_open_access_open_access_simple)' + + # Test Case: title value type is dict + request_data2 = request_data.copy() + request_data2["metainfo"]["item_1617186331708"] = { + "subitem_1551255647225": "dict_title", + "subitem_1551255648112": "ja", + } + assert get_title_in_request(request_data2, key_list, key_child_dict) == "dict_title" + + # Test Case: title value type is not dict or list + request_data3 = request_data.copy() + request_data3["metainfo"]["item_1617186331708"] = ("subitem_1551255647225", "tuple_title") + assert get_title_in_request(request_data3, key_list, key_child_dict) == "" + + # Test Case: title value type is list but not includes key_child + request_data4 = request_data.copy() + request_data4["metainfo"]["item_1617186331708"] = [ + { + "subitem_1551255648112": "ja", + }, + { + "subitem_1551255647225": "en_conference paperITEM00000001(public_open_access_simple)", + "subitem_1551255648112": "en", + }, + ] + assert get_title_in_request(request_data4, key_list, key_child_dict) == "" + + # Test Case: key_list is None (exception occured) + assert get_title_in_request(request_data, None, key_child_dict) == "" + # def hide_form_items(item_type, schema_form): @@ -10181,8 +10295,9 @@ def test_get_ignore_item(db_itemtype): # def get_max_ins_feedback_mail(self): # def get_max_items(self, item_attrs): # def get_subs_item(self, -# .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file_with_permission -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp -def test_make_stats_file_with_permission(app, users,db_itemtype,db_records): + +# .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file_with_permission -vv -s --cov-branch --cov-report=term --cov-report=html --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp +def test_make_stats_file_with_permission(app, users,db,db_itemtype,db_records,identifier): item_type_id = 1 recids = ["1", "2"] record0 = WekoRecord.get_record_by_pid(1) @@ -10197,11 +10312,51 @@ def test_make_stats_file_with_permission(app, users,db_itemtype,db_records): with app.test_request_context(): with patch("flask_login.utils._get_user", return_value=users[2]["obj"]): - assert ( - make_stats_file_with_permission( - item_type_id, recids, records_metadata, permissions + assert make_stats_file_with_permission(item_type_id, recids, records_metadata, permissions)== ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {'1': [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], '2': [2, 'Index(public_state = True,harvest_public_state = False)', 'private', '', '', '', '', 'Keep', '2022-08-20', 'title2', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) + # test doi + def create_record_with_doi(recid, doi_type, doi_value=""): + """create item with doi""" + from tests.helpers import create_record + doi_prefix = identifier["Root Index"].get(doi_type,"") + if not doi_value: + doi_value = "{prefix}/{suffix}".format( + prefix=doi_prefix, + suffix="{:010}".format(recid) + ) + record_tmp = {"_oai": {"id": "oai:weko3.example.org:{:08}".format(recid), "sets": ["1"]}, "path": ["1"], "owner": "1", "recid": str(recid), "title": [f"record_with_doi: {recid}"], "pubdate": {"attribute_name": "PubDate", "attribute_value": "2022-08-20"}, "_buckets": {"deposit": "3e99cfca-098b-42ed-b8a0-20ddd09b3e02"}, "_deposit": {"id": str(recid), "pid": {"type": "depid", "value": str(recid), "revision_id": 0}, "owner": "1", "owners": [1], "status": "draft", "created_by": 1, "owners_ext": {"email": "wekosoftware@nii.ac.jp", "username": "", "displayname": ""}}, "item_title": f"record_with_doi: {recid}", "author_link": [], "item_type_id": "1", "publish_date": "2022-08-20", "publish_status": "0", "weko_shared_id": -1, "item_1617186331708": {"attribute_name": "Title", "attribute_value_mlt": [{"subitem_1551255647225": f"record_with_doi: {recid}", "subitem_1551255648112": "ja"}]}, "item_1617258105262": {"attribute_name": "Resource Type", "attribute_value_mlt": [{"resourceuri": "http://purl.org/coar/resource_type/c_5794", "resourcetype": "conference paper"}]}, "item_1617186819068":{"attribute_name":"","attribute_value_mlt":[{"subitem_identifier_reg_text":doi_value,"subitem_identifier_reg_type":doi_type}]},"relation_version_is_last": True} + item_tmp = {"id": str(recid), "pid": {"type": "depid", "value": str(recid), "revision_id": 0}, "lang": "ja", "owner": "1", "title": f"record_with_doi: {recid}", "owners": [1], "status": "published", "$schema": "/items/jsonschema/1", "pubdate": "2022-08-20", "created_by": 1, "owners_ext": {"email": "wekosoftware@nii.ac.jp", "username": "", "displayname": ""}, "shared_user_id": -1, "item_1617186331708": [{"subitem_1551255647225": f"record_with_doi: {recid}", "subitem_1551255648112": "ja"}], "item_1617258105262": {"resourceuri": "http://purl.org/coar/resource_type/c_5794", "resourcetype": "conference paper"},"item_1617186819068":[{"subitem_identifier_reg_text":doi_value,"subitem_identifier_reg_type":doi_type}]} + _,pid_recid,_,_,_,_ = create_record(record_tmp, item_tmp) + doi = PersistentIdentifier.query.filter_by(pid_type="doi",pid_value="https://doi.org/10.xyz/{:010}".format(recid)).one_or_none() + doi_url = f"https://doi.org/{doi_value}" + if doi: + doi.pid_value = doi_url + db.session.merge(doi) + else: + doi = PersistentIdentifier.create("doi",doi_url,object_type="rec",object_uuid=pid_recid.object_uuid,status=PIDStatus.REGISTERED) + db.session.add(doi) + db.session.commit() + + create_record_with_doi(10, "JaLC") # JaLC DOI + create_record_with_doi(11, "Crossref") # Crossref + create_record_with_doi(12, "DataCite") # DataCite + create_record_with_doi(13, "NDL JaLC") # NDL JaLC + create_record_with_doi(14, "JaLC","4567/0000000014") # JaLC, NDL JaLC prefix + + records_metadata = { + "10": WekoRecord.get_record_by_pid(10), + "11": WekoRecord.get_record_by_pid(11), + "12": WekoRecord.get_record_by_pid(12), + "13": WekoRecord.get_record_by_pid(13), + "14": WekoRecord.get_record_by_pid(14), + } + with app.test_request_context(): + with patch("flask_login.utils._get_user", return_value=users[2]["obj"]): + + res = make_stats_file_with_permission( + item_type_id, ["10","11","12","13","14"], records_metadata, permissions ) - == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {'1': ['1', 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', '', '', 'Keep', '2022-08-20', 'title', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], '2': ['2', 'Index(public_state = True,harvest_public_state = False)', 'private', '', '', '', '', 'Keep', '2022-08-20', 'title2', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) ) + assert res == ([['#.id', '.uri', '.metadata.path[0]', '.pos_index[0]', '.publish_status', '.feedback_mail[0]', '.cnri', '.doi_ra', '.doi', '.edit_mode', '.metadata.pubdate', '.metadata.item_1617186331708[0].subitem_1551255647225', '.metadata.item_1617186331708[0].subitem_1551255648112', '.metadata.item_1617186385884[0].subitem_1551255720400', '.metadata.item_1617186385884[0].subitem_1551255721061', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifier', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierScheme', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNameIdentifiers[0].affiliationNameIdentifierURI', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationName', '.metadata.item_1617186419668[0].creatorAffiliations[0].affiliationNames[0].affiliationNameLang', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternative', '.metadata.item_1617186419668[0].creatorAlternatives[0].creatorAlternativeLang', '.metadata.item_1617186419668[0].creatorMails[0].creatorMail', '.metadata.item_1617186419668[0].creatorNames[0].creatorName', '.metadata.item_1617186419668[0].creatorNames[0].creatorNameLang', '.metadata.item_1617186419668[0].familyNames[0].familyName', '.metadata.item_1617186419668[0].familyNames[0].familyNameLang', '.metadata.item_1617186419668[0].givenNames[0].givenName', '.metadata.item_1617186419668[0].givenNames[0].givenNameLang', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617186419668[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationNameIdentifier', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationScheme', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNameIdentifiers[0].contributorAffiliationURI', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationName', '.metadata.item_1617349709064[0].contributorAffiliations[0].contributorAffiliationNames[0].contributorAffiliationNameLang', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternative', '.metadata.item_1617349709064[0].contributorAlternatives[0].contributorAlternativeLang', '.metadata.item_1617349709064[0].contributorMails[0].contributorMail', '.metadata.item_1617349709064[0].contributorNames[0].contributorName', '.metadata.item_1617349709064[0].contributorNames[0].lang', '.metadata.item_1617349709064[0].contributorType', '.metadata.item_1617349709064[0].familyNames[0].familyName', '.metadata.item_1617349709064[0].familyNames[0].familyNameLang', '.metadata.item_1617349709064[0].givenNames[0].givenName', '.metadata.item_1617349709064[0].givenNames[0].givenNameLang', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617349709064[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617186476635.subitem_1522299639480', '.metadata.item_1617186476635.subitem_1600958577026', '.metadata.item_1617351524846.subitem_1523260933860', '.metadata.item_1617186499011[0].subitem_1522650717957', '.metadata.item_1617186499011[0].subitem_1522650727486', '.metadata.item_1617186499011[0].subitem_1522651041219', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifier', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierScheme', '.metadata.item_1617610673286[0].nameIdentifiers[0].nameIdentifierURI', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderLanguage', '.metadata.item_1617610673286[0].rightHolderNames[0].rightHolderName', '.metadata.item_1617186609386[0].subitem_1522299896455', '.metadata.item_1617186609386[0].subitem_1522300014469', '.metadata.item_1617186609386[0].subitem_1522300048512', '.metadata.item_1617186609386[0].subitem_1523261968819', '.metadata.item_1617186626617[0].subitem_description', '.metadata.item_1617186626617[0].subitem_description_language', '.metadata.item_1617186626617[0].subitem_description_type', '.metadata.item_1617186643794[0].subitem_1522300295150', '.metadata.item_1617186643794[0].subitem_1522300316516', '.metadata.item_1617186660861[0].subitem_1522300695726', '.metadata.item_1617186660861[0].subitem_1522300722591', '.metadata.item_1617186702042[0].subitem_1551255818386', '.metadata.item_1617258105262.resourcetype', '.metadata.item_1617258105262.resourceuri', '.metadata.item_1617349808926.subitem_1523263171732', '.metadata.item_1617265215918.subitem_1522305645492', '.metadata.item_1617265215918.subitem_1600292170262', '.metadata.item_1617186783814[0].subitem_identifier_type', '.metadata.item_1617186783814[0].subitem_identifier_uri', '.metadata.item_1617186819068.subitem_identifier_reg_text', '.metadata.item_1617186819068.subitem_identifier_reg_type', '.metadata.item_1617353299429[0].subitem_1522306207484', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306382014', '.metadata.item_1617353299429[0].subitem_1522306287251.subitem_1522306436033', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320867455', '.metadata.item_1617353299429[0].subitem_1523320863692[0].subitem_1523320909613', '.metadata.item_1617186859717[0].subitem_1522658018441', '.metadata.item_1617186859717[0].subitem_1522658031721', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_east_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_north_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_south_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_box.subitem_west_longitude', '.metadata.item_1617186882738[0].subitem_geolocation_place[0].subitem_geolocation_place_text', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_latitude', '.metadata.item_1617186882738[0].subitem_geolocation_point.subitem_point_longitude', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399281603', '.metadata.item_1617186901218[0].subitem_1522399143519.subitem_1522399333375', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522399416691', '.metadata.item_1617186901218[0].subitem_1522399412622[0].subitem_1522737543681', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399585738', '.metadata.item_1617186901218[0].subitem_1522399571623.subitem_1522399628911', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721910626', '.metadata.item_1617186901218[0].subitem_1522399651758[0].subitem_1522721929892', '.metadata.item_1617186920753[0].subitem_1522646500366', '.metadata.item_1617186920753[0].subitem_1522646572813', '.metadata.item_1617186941041[0].subitem_1522650068558', '.metadata.item_1617186941041[0].subitem_1522650091861', '.metadata.item_1617186959569.subitem_1551256328147', '.metadata.item_1617186981471.subitem_1551256294723', '.metadata.item_1617186994930.subitem_1551256248092', '.metadata.item_1617187024783.subitem_1551256198917', '.metadata.item_1617187045071.subitem_1551256185532', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDate', '.metadata.item_1617187056579.bibliographicIssueDates.bibliographicIssueDateType', '.metadata.item_1617187056579.bibliographicIssueNumber', '.metadata.item_1617187056579.bibliographicNumberOfPages', '.metadata.item_1617187056579.bibliographicPageEnd', '.metadata.item_1617187056579.bibliographicPageStart', '.metadata.item_1617187056579.bibliographicVolumeNumber', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_title', '.metadata.item_1617187056579.bibliographic_titles[0].bibliographic_titleLang', '.metadata.item_1617187087799.subitem_1551256171004', '.metadata.item_1617187112279[0].subitem_1551256126428', '.metadata.item_1617187112279[0].subitem_1551256129013', '.metadata.item_1617187136212.subitem_1551256096004', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256027296', '.metadata.item_1617944105607[0].subitem_1551256015892[0].subitem_1551256029891', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256042287', '.metadata.item_1617944105607[0].subitem_1551256037922[0].subitem_1551256047619', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711636923', '.metadata.item_1617187187528[0].subitem_1599711633003[0].subitem_1599711645590', '.metadata.item_1617187187528[0].subitem_1599711655652', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711680082', '.metadata.item_1617187187528[0].subitem_1599711660052[0].subitem_1599711686511', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711704251', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711712451', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711727603', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711731891', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711735410', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711739022', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711743722', '.metadata.item_1617187187528[0].subitem_1599711699392.subitem_1599711745532', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711769260', '.metadata.item_1617187187528[0].subitem_1599711758470[0].subitem_1599711775943', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711798761', '.metadata.item_1617187187528[0].subitem_1599711788485[0].subitem_1599711803382', '.metadata.item_1617187187528[0].subitem_1599711813532', '.file_path[0]', '.metadata.item_1617605131499[0].accessrole', '.metadata.item_1617605131499[0].date[0].dateType', '.metadata.item_1617605131499[0].date[0].dateValue', '.metadata.item_1617605131499[0].displaytype', '.metadata.item_1617605131499[0].fileDate[0].fileDateType', '.metadata.item_1617605131499[0].fileDate[0].fileDateValue', '.metadata.item_1617605131499[0].filename', '.metadata.item_1617605131499[0].filesize[0].value', '.metadata.item_1617605131499[0].format', '.metadata.item_1617605131499[0].groups', '.metadata.item_1617605131499[0].licensefree', '.metadata.item_1617605131499[0].licensetype', '.metadata.item_1617605131499[0].url.label', '.metadata.item_1617605131499[0].url.objectType', '.metadata.item_1617605131499[0].url.url', '.metadata.item_1617605131499[0].version', '.metadata.item_1617620223087[0].subitem_1565671149650', '.metadata.item_1617620223087[0].subitem_1565671169640', '.metadata.item_1617620223087[0].subitem_1565671178623', '.thumbnail_path[0]', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_label', '.metadata.item_1662046377046[0].subitem_thumbnail[0].thumbnail_url'], ['#ID', 'URI', '.IndexID[0]', '.POS_INDEX[0]', '.PUBLISH_STATUS', '.FEEDBACK_MAIL[0]', '.CNRI', '.DOI_RA', '.DOI', 'Keep/Upgrade Version', 'PubDate', 'Title[0].Title', 'Title[0].Language', 'Alternative Title[0].Alternative Title', 'Alternative Title[0].Language', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Creator[0].作成者所属[0].所属機関識別子[0].所属機関識別子URI', 'Creator[0].作成者所属[0].所属機関名[0].所属機関名', 'Creator[0].作成者所属[0].所属機関名[0].言語', 'Creator[0].作成者別名[0].別名', 'Creator[0].作成者別名[0].言語', 'Creator[0].作成者メールアドレス[0].メールアドレス', 'Creator[0].作成者姓名[0].姓名', 'Creator[0].作成者姓名[0].言語', 'Creator[0].作成者姓[0].姓', 'Creator[0].作成者姓[0].言語', 'Creator[0].作成者名[0].名', 'Creator[0].作成者名[0].言語', 'Creator[0].作成者識別子[0].作成者識別子', 'Creator[0].作成者識別子[0].作成者識別子Scheme', 'Creator[0].作成者識別子[0].作成者識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子スキーマ', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関識別子URI', 'Contributor[0].寄与者所属[0].所属機関識別子[0].所属機関名', 'Contributor[0].寄与者所属[0].所属機関識別子[0].言語', 'Contributor[0].寄与者別名[0].別名', 'Contributor[0].寄与者別名[0].言語', 'Contributor[0].寄与者メールアドレス[0].メールアドレス', 'Contributor[0].寄与者姓名[0].姓名', 'Contributor[0].寄与者姓名[0].言語', 'Contributor[0].寄与者タイプ', 'Contributor[0].寄与者姓[0].姓', 'Contributor[0].寄与者姓[0].言語', 'Contributor[0].寄与者名[0].名', 'Contributor[0].寄与者名[0].言語', 'Contributor[0].寄与者識別子[0].寄与者識別子', 'Contributor[0].寄与者識別子[0].寄与者識別子Scheme', 'Contributor[0].寄与者識別子[0].寄与者識別子URI', 'Access Rights.アクセス権', 'Access Rights.アクセス権URI', 'APC.APC', 'Rights[0].言語', 'Rights[0].権利情報Resource', 'Rights[0].権利情報', 'Rights Holder[0].権利者識別子[0].権利者識別子', 'Rights Holder[0].権利者識別子[0].権利者識別子Scheme', 'Rights Holder[0].権利者識別子[0].権利者識別子URI', 'Rights Holder[0].権利者名[0].言語', 'Rights Holder[0].権利者名[0].権利者名', 'Subject[0].言語', 'Subject[0].主題Scheme', 'Subject[0].主題URI', 'Subject[0].主題', 'Description[0].内容記述', 'Description[0].言語', 'Description[0].内容記述タイプ', 'Publisher[0].言語', 'Publisher[0].出版者', 'Date[0].日付タイプ', 'Date[0].日付', 'Language[0].Language', 'Resource Type.資源タイプ', 'Resource Type.資源タイプ識別子', 'Version.バージョン情報', 'Version Type.出版タイプ', 'Version Type.出版タイプResource', 'Identifier[0].識別子タイプ', 'Identifier[0].識別子', 'Identifier Registration.ID登録', 'Identifier Registration.ID登録タイプ', 'Relation[0].関連タイプ', 'Relation[0].関連識別子.識別子タイプ', 'Relation[0].関連識別子.関連識別子', 'Relation[0].関連名称[0].言語', 'Relation[0].関連名称[0].関連名称', 'Temporal[0].言語', 'Temporal[0].時間的範囲', 'Geo Location[0].位置情報(空間).東部経度', 'Geo Location[0].位置情報(空間).北部緯度', 'Geo Location[0].位置情報(空間).南部緯度', 'Geo Location[0].位置情報(空間).西部経度', 'Geo Location[0].位置情報(自由記述)[0].位置情報(自由記述)', 'Geo Location[0].位置情報(点).緯度', 'Geo Location[0].位置情報(点).経度', 'Funding Reference[0].助成機関識別子.助成機関識別子タイプ', 'Funding Reference[0].助成機関識別子.助成機関識別子', 'Funding Reference[0].助成機関名[0].言語', 'Funding Reference[0].助成機関名[0].助成機関名', 'Funding Reference[0].研究課題番号.研究課題URI', 'Funding Reference[0].研究課題番号.研究課題番号', 'Funding Reference[0].研究課題名[0].言語', 'Funding Reference[0].研究課題名[0].研究課題名', 'Source Identifier[0].収録物識別子タイプ', 'Source Identifier[0].収録物識別子', 'Source Title[0].言語', 'Source Title[0].収録物名', 'Volume Number.Volume Number', 'Issue Number.Issue Number', 'Number of Pages.Number of Pages', 'Page Start.Page Start', 'Page End.Page End', 'Bibliographic Information.発行日.日付', 'Bibliographic Information.発行日.日付タイプ', 'Bibliographic Information.号', 'Bibliographic Information.ページ数', 'Bibliographic Information.終了ページ', 'Bibliographic Information.開始ページ', 'Bibliographic Information.巻', 'Bibliographic Information.雑誌名[0].タイトル', 'Bibliographic Information.雑誌名[0].言語', 'Dissertation Number.Dissertation Number', 'Degree Name[0].Degree Name', 'Degree Name[0].Language', 'Date Granted.Date Granted', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier', 'Degree Grantor[0].Degree Grantor Name Identifier[0].Degree Grantor Name Identifier Scheme', 'Degree Grantor[0].Degree Grantor Name[0].Degree Grantor Name', 'Degree Grantor[0].Degree Grantor Name[0].Language', 'Conference[0].Conference Name[0].Conference Name', 'Conference[0].Conference Name[0].Language', 'Conference[0].Conference Sequence', 'Conference[0].Conference Sponsor[0].Conference Sponsor', 'Conference[0].Conference Sponsor[0].Language', 'Conference[0].Conference Date.Conference Date', 'Conference[0].Conference Date.Start Day', 'Conference[0].Conference Date.Start Month', 'Conference[0].Conference Date.Start Year', 'Conference[0].Conference Date.End Day', 'Conference[0].Conference Date.End Month', 'Conference[0].Conference Date.End Year', 'Conference[0].Conference Date.Language', 'Conference[0].Conference Venue[0].Conference Venue', 'Conference[0].Conference Venue[0].Language', 'Conference[0].Conference Place[0].Conference Place', 'Conference[0].Conference Place[0].Language', 'Conference[0].Conference Country', '.ファイルパス[0]', 'File[0].アクセス', 'File[0].オープンアクセスの日付[0].日付タイプ', 'File[0].オープンアクセスの日付[0].日付', 'File[0].表示形式', 'File[0].日付[0].日付タイプ', 'File[0].日付[0].日付', 'File[0].表示名', 'File[0].サイズ[0].サイズ', 'File[0].フォーマット', 'File[0].グループ', 'File[0].自由ライセンス', 'File[0].ライセンス', 'File[0].本文URL.ラベル', 'File[0].本文URL.オブジェクトタイプ', 'File[0].本文URL.本文URL', 'File[0].バージョン情報', 'Heading[0].Language', 'Heading[0].Banner Headline', 'Heading[0].Subheading', '.サムネイルパス[0]', 'サムネイル[0].URI[0].ラベル', 'サムネイル[0].URI[0].URI'], ['#', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', '', '', 'System', '', '', 'System', 'System', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'System', 'System'], ['#', '', 'Allow Multiple', 'Allow Multiple', 'Required', 'Allow Multiple', '', '', '', 'Required', 'Required', 'Required, Allow Multiple', 'Required, Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Required', 'Required', '', '', '', 'Allow Multiple', 'Allow Multiple', '', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Allow Multiple', 'Allow Multiple', '', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple', 'Allow Multiple']], {'10': [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'JaLC', '1234/0000000010', 'Keep', '2022-08-20', 'record_with_doi: 10', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '1234/0000000010', 'JaLC', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], '11': [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'Crossref', '2345/0000000011', 'Keep', '2022-08-20', 'record_with_doi: 11', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '2345/0000000011', 'Crossref', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], '12': [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'DataCite', '3456/0000000012', 'Keep', '2022-08-20', 'record_with_doi: 12', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '3456/0000000012', 'DataCite', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], '13': [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'NDL JaLC', '4567/0000000013', 'Keep', '2022-08-20', 'record_with_doi: 13', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '4567/0000000013', 'NDL JaLC', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], '14': [1, 'Index(public_state = True,harvest_public_state = True)', 'public', '', '', 'NDL JaLC', '4567/0000000014', 'Keep', '2022-08-20', 'record_with_doi: 14', 'ja', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'conference paper', 'http://purl.org/coar/resource_type/c_5794', '', '', '', '', '', '4567/0000000014', 'JaLC', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']}) + # .tox/c1/bin/pytest --cov=weko_items_ui tests/test_utils.py::test_make_stats_file_with_permission_issue33432 -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-items-ui/.tox/c1/tmp diff --git a/modules/weko-items-ui/weko_items_ui/config.py b/modules/weko-items-ui/weko_items_ui/config.py index 71422596da..192db2ed24 100644 --- a/modules/weko-items-ui/weko_items_ui/config.py +++ b/modules/weko-items-ui/weko_items_ui/config.py @@ -69,8 +69,8 @@ } """Max number of items that can be exported per role.""" -WEKO_ITEMS_UI_EXPORT_FORMAT_JSON = 'JSON' -"""Format for exporting items -- JSON. """ +WEKO_ITEMS_UI_EXPORT_FORMAT_TSV = 'TSV' +"""Format for exporting items -- TSV. """ WEKO_ITEMS_UI_EXPORT_FORMAT_BIBTEX = 'BIBTEX' """Format for exporting items -- BIBTEX. """ diff --git a/modules/weko-items-ui/weko_items_ui/static/js/weko_items_ui/app.js b/modules/weko-items-ui/weko_items_ui/static/js/weko_items_ui/app.js index cb48da3a13..a08c72c783 100644 --- a/modules/weko-items-ui/weko_items_ui/static/js/weko_items_ui/app.js +++ b/modules/weko-items-ui/weko_items_ui/static/js/weko_items_ui/app.js @@ -4694,6 +4694,42 @@ function validateThumbnails(rootScope, scope, itemSizeCheckFlg, files) { 'invenioRecords', 'wekoRecords.controllers', ]); + + function FileNameCheckCtrl($scope, $rootScope){ + $scope.deleteFromArrayFile = function(item, modelArray) { + // get uploaded files + let fileObjects={}; + let filesVM = $rootScope["filesVM"]; + if (filesVM && filesVM.hasOwnProperty("files")){ + let filesUploaded = filesVM.files; + filesUploaded.forEach(function(file){ + fileObjects[file.key] = file["version_id"]; + }); + } + // delete data + + if (modelArray) { + target = modelArray[item]; + let flg = true; + if (fileObjects[target.filename] != undefined){ + if (fileObjects[target.filename] == target.version_id){ + flg = false; + } + } + if (flg){ + modelArray.splice(item, 1); + } + } + return modelArray; + } + } + + FileNameCheckCtrl.$inject = [ + '$scope', + '$rootScope', + ]; + angular.module('fileNameCheck',[]) + .controller('FileNameCheckCtrl', FileNameCheckCtrl); angular.module('uploadThumbnail', ['schemaForm', 'invenioFiles']) .controller('UploadController', function ($scope, $rootScope, InvenioFilesAPI) { @@ -4914,7 +4950,7 @@ function validateThumbnails(rootScope, scope, itemSizeCheckFlg, files) { 'mgcrea.ngStrap.modal', 'pascalprecht.translate', 'ui.sortable', 'ui.select', 'mgcrea.ngStrap.select', 'mgcrea.ngStrap.datepicker', 'mgcrea.ngStrap.helpers.dateParser', 'mgcrea.ngStrap.tooltip', - 'invenioFiles', 'uploadThumbnail' + 'invenioFiles', 'uploadThumbnail', 'fileNameCheck' ] ); }); diff --git a/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/iframe/item_index.html b/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/iframe/item_index.html index b0db6976a5..91fc7b8be1 100644 --- a/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/iframe/item_index.html +++ b/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/iframe/item_index.html @@ -165,7 +165,7 @@
    - {{ item.get('title_ja', item.get('title')) if item }} + {{ activity.title if activity.title }}
    diff --git a/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/macros/export_controls.html b/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/macros/export_controls.html index 9bce5fa85d..30e54f8bb9 100644 --- a/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/macros/export_controls.html +++ b/modules/weko-items-ui/weko_items_ui/templates/weko_items_ui/macros/export_controls.html @@ -31,11 +31,11 @@
    {{ _('File contents cannot be exported.') }}

    {{_('Export Format')}}

    -
    -
    diff --git a/modules/weko-items-ui/weko_items_ui/translations/en/LC_MESSAGES/messages.po b/modules/weko-items-ui/weko_items_ui/translations/en/LC_MESSAGES/messages.po index 637760243c..3673187919 100644 --- a/modules/weko-items-ui/weko_items_ui/translations/en/LC_MESSAGES/messages.po +++ b/modules/weko-items-ui/weko_items_ui/translations/en/LC_MESSAGES/messages.po @@ -475,7 +475,7 @@ msgid "Export Format" msgstr "" #: weko_items_ui/templates/weko_items_ui/macros/export_controls.html:38 -msgid "JSON" +msgid "TSV" msgstr "" #: weko_items_ui/templates/weko_items_ui/macros/export_controls.html:44 diff --git a/modules/weko-items-ui/weko_items_ui/translations/ja/LC_MESSAGES/messages.po b/modules/weko-items-ui/weko_items_ui/translations/ja/LC_MESSAGES/messages.po index 20b2e48165..8b7bfbf4fb 100644 --- a/modules/weko-items-ui/weko_items_ui/translations/ja/LC_MESSAGES/messages.po +++ b/modules/weko-items-ui/weko_items_ui/translations/ja/LC_MESSAGES/messages.po @@ -475,7 +475,7 @@ msgid "Export Format" msgstr "" #: weko_items_ui/templates/weko_items_ui/macros/export_controls.html:38 -msgid "JSON" +msgid "TSV" msgstr "" #: weko_items_ui/templates/weko_items_ui/macros/export_controls.html:44 diff --git a/modules/weko-items-ui/weko_items_ui/utils.py b/modules/weko-items-ui/weko_items_ui/utils.py index cbc80c1984..32469dd793 100644 --- a/modules/weko-items-ui/weko_items_ui/utils.py +++ b/modules/weko-items-ui/weko_items_ui/utils.py @@ -75,7 +75,7 @@ from weko_search_ui.config import WEKO_IMPORT_DOI_TYPE from weko_search_ui.query import item_search_factory from weko_search_ui.utils import check_sub_item_is_system, \ - get_root_item_option, get_sub_item_option + get_root_item_option, get_sub_item_option, get_identifier_setting from weko_schema_ui.models import PublishStatus from weko_user_profiles import UserProfile from weko_workflow.api import WorkActivity @@ -2221,6 +2221,7 @@ def get_subs_item(self, doi_value, doi_type = identifier.get_idt_registration_data() doi_type_str = doi_type[0] if doi_type and doi_type[0] else '' doi_str = doi_value[0] if doi_value and doi_value[0] else '' + identifier_setting = get_identifier_setting("Root Index") if doi_type_str and doi_str: doi_domain = '' if doi_type_str == WEKO_IMPORT_DOI_TYPE[0]: @@ -2233,6 +2234,9 @@ def get_subs_item(self, doi_domain = IDENTIFIER_GRANT_LIST[4][2] if doi_domain and doi_str.startswith(doi_domain): doi_str = doi_str.replace(doi_domain + '/', '', 1) + if doi_type_str == WEKO_IMPORT_DOI_TYPE[0] and \ + doi_str.startswith(identifier_setting.ndl_jalc_doi + "/"): + doi_type_str = WEKO_IMPORT_DOI_TYPE[3] records.attr_output[recid].extend([ doi_type_str, doi_str @@ -2461,9 +2465,9 @@ def check_item_type_name(name): def export_items(post_data): - """Gather all the item data and export and return as a JSON or BIBTEX. + """Gather all the item data and export and return as a TSV or BIBTEX. - :return: JSON, BIBTEX + :return: TSV, BIBTEX """ current_app.logger.debug("post_data:{}".format(post_data)) include_contents = True if \ @@ -2477,12 +2481,29 @@ def export_items(post_data): invalid_record_ids = [invalid_record_ids] # Remove all invalid records record_ids = set(record_ids) - set(invalid_record_ids) - record_metadata = json.loads(post_data['record_metadata']) + if len(record_ids) > _get_max_export_items(): return abort(400) elif len(record_ids) == 0: return '',204 + # Get records for export + record_recids = [] + record_uuids = [] + for record_id in record_ids: + recid = PersistentIdentifier.get('recid', str(record_id)) + record_recids.append(recid) + record_uuids.append(str(recid.object_uuid)) + + records = WekoRecord.get_records(record_uuids) + + from weko_records_ui.utils import export_preprocess + record_metadata = {} + for recid, record in zip(record_recids, records): + record_metadata[recid.pid_value] = json.loads( + export_preprocess(recid, record, 'json') + ) + result = {'items': []} temp_path = tempfile.TemporaryDirectory( prefix=current_app.config['WEKO_ITEMS_UI_EXPORT_TMP_PREFIX']) @@ -3200,7 +3221,7 @@ def get_mapping_name_item_type_by_key(key, item_type_mapping): for mapping_key in item_type_mapping: if mapping_key == key: property_data = item_type_mapping.get(mapping_key) - if isinstance(property_data.get('jpcoar_mapping'), dict): + if isinstance(property_data, dict) and isinstance(property_data.get('jpcoar_mapping'), dict): for name in property_data.get('jpcoar_mapping'): return name return key @@ -3745,9 +3766,9 @@ def save_title(activity_id, request_data): if item_type_id: item_type_mapping = Mapping.get_record(item_type_id) # current_app.logger.debug("item_type_mapping:{}".format(item_type_mapping)) - key, key_child = get_key_title_in_item_type_mapping(item_type_mapping) - if key and key_child: - title = get_title_in_request(request_data, key, key_child) + key_list, key_child_dict = get_key_title_in_item_type_mapping(item_type_mapping) + if key_list and key_child_dict: + title = get_title_in_request(request_data, key_list, key_child_dict) activity.update_title(activity_id, title) @@ -3757,35 +3778,41 @@ def get_key_title_in_item_type_mapping(item_type_mapping): :param item_type_mapping: item type mapping. :return: """ + key_list = [] + key_child_dict = {} for mapping_key in item_type_mapping: - property_data = item_type_mapping.get( - mapping_key).get('jpcoar_mapping') - if isinstance(property_data, - dict) and 'title' in property_data and property_data.get( - 'title').get('@value'): - return mapping_key, property_data.get('title').get('@value') - return None, None + property_data = item_type_mapping.get(mapping_key).get('jpcoar_mapping') + if isinstance(property_data, dict) and \ + 'title' in property_data and \ + property_data.get('title').get('@value'): + key_list.append(mapping_key) + key_child_dict[mapping_key] = property_data.get('title').get('@value') + return key_list, key_child_dict -def get_title_in_request(request_data, key, key_child): +def get_title_in_request(request_data, key_list, key_child_dict): """Get title in request. :param request_data: activity id. - :param key: key of title. - :param key_child: key child of title. + :param key_list: key of title. + :param key_child_dict: key child of title. :return: """ result = '' try: title = request_data.get('metainfo') - if title and key in title: - title_value = title.get(key) - if isinstance(title_value, dict) and key_child in title_value: - result = title_value.get(key_child) - elif isinstance(title_value, list) and len(title_value) > 0: - title_value = title_value[0] - if key_child in title_value: + for key in key_list: + if title and key in title: + title_value = title.get(key) + key_child = key_child_dict.get(key) + if isinstance(title_value, dict) and key_child in title_value: result = title_value.get(key_child) + elif isinstance(title_value, list) and len(title_value) > 0: + title_value = title_value[0] + if key_child in title_value: + result = title_value.get(key_child) + if result: + break except Exception: pass return result @@ -4234,6 +4261,7 @@ def get_subs_item(self, doi_value, doi_type = identifier.get_idt_registration_data() doi_type_str = doi_type[0] if doi_type and doi_type[0] else '' doi_str = doi_value[0] if doi_value and doi_value[0] else '' + identifier_setting = get_identifier_setting("Root Index") if doi_type_str and doi_str: doi_domain = '' if doi_type_str == WEKO_IMPORT_DOI_TYPE[0]: @@ -4246,6 +4274,9 @@ def get_subs_item(self, doi_domain = IDENTIFIER_GRANT_LIST[4][2] if doi_domain and doi_str.startswith(doi_domain): doi_str = doi_str.replace(doi_domain + '/', '', 1) + if doi_type_str == WEKO_IMPORT_DOI_TYPE[0] and \ + doi_str.startswith(identifier_setting.ndl_jalc_doi + "/"): + doi_type_str = WEKO_IMPORT_DOI_TYPE[3] records.attr_output[recid].extend([ doi_type_str, doi_str diff --git a/modules/weko-itemtypes-ui/requirements.txt b/modules/weko-itemtypes-ui/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-itemtypes-ui/requirements.txt +++ b/modules/weko-itemtypes-ui/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-itemtypes-ui/requirements2.txt b/modules/weko-itemtypes-ui/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-itemtypes-ui/requirements2.txt +++ b/modules/weko-itemtypes-ui/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-itemtypes-ui/weko_itemtypes_ui/static/js/weko_itemtypes_ui/create_itemtype.js b/modules/weko-itemtypes-ui/weko_itemtypes_ui/static/js/weko_itemtypes_ui/create_itemtype.js index 2d6f6ea90e..fff59d365a 100644 --- a/modules/weko-itemtypes-ui/weko_itemtypes_ui/static/js/weko_itemtypes_ui/create_itemtype.js +++ b/modules/weko-itemtypes-ui/weko_itemtypes_ui/static/js/weko_itemtypes_ui/create_itemtype.js @@ -1,8 +1,8 @@ // require(["jquery", "bootstrap"],function() {}); $(document).ready(function () { var checkboxTemplate = "/static/templates/weko_deposit/checkboxes.html"; -// Number of callbacks(requests) when rendering the page, When add a new callback, -// please increase/decrease appropriately + // Number of callbacks(requests) when rendering the page, When add a new callback, + // please increase/decrease appropriately var requestNum = 0; src_render = {}; src_mapping = {}; @@ -13,7 +13,7 @@ $(document).ready(function () { meta_list: {}, // 追加した行の情報を保存する(セットした詳細情報) meta_fix: {}, schemaeditor: { // objectの場合 - schema:{} // 生成したschemaの情報を保存する + schema: {} // 生成したschemaの情報を保存する }, edit_notes: {} // Map of notes for each attribute, keep seperate }; @@ -109,48 +109,48 @@ $(document).ready(function () { show: false }) - if($('#item-type-lists').val().length > 0) { + if ($('#item-type-lists').val().length > 0) { // バージョンアップ $('#upt_version').attr('checked', true); $('#new_version').attr('checked', false); itemname = $('#item-type-lists').find("option:selected").text(); - itemname = itemname.substr(0,itemname.lastIndexOf('(')); + itemname = itemname.substr(0, itemname.lastIndexOf('(')); $('#itemtype_name').val(itemname); - url_update_schema = '/admin/itemtypes/'+$('#item-type-lists').val()+'/register'; - }else{ + url_update_schema = '/admin/itemtypes/' + $('#item-type-lists').val() + '/register'; + } else { endLoading(); } - $('.radio_versionup').on('click', function(){ - if($(this).val() == 'upt') { - url_update_schema = '/admin/itemtypes/'+$('#item-type-lists').val()+'/register'; + $('.radio_versionup').on('click', function () { + if ($(this).val() == 'upt') { + url_update_schema = '/admin/itemtypes/' + $('#item-type-lists').val() + '/register'; } else { url_update_schema = '/admin/itemtypes/register'; } }); - $('#item-type-lists').on('change', function(){ + $('#item-type-lists').on('change', function () { window.location.href = '/admin/itemtypes/' + $('#item-type-lists').val(); }); //For export if ($("#item-type-lists option:selected").hasClass('normal_type')) { - $('#item_type_export').prop('disabled',false); + $('#item_type_export').prop('disabled', false); } - $('#item_type_export').on('click', function(){ + $('#item_type_export').on('click', function () { let item_type_id = $('#item-type-lists').val(); - document.location.href = '/admin/itemtypes/'+ item_type_id + '/export'; + document.location.href = '/admin/itemtypes/' + item_type_id + '/export'; }); //For import - $('#item_type_import').on('click', function(){ + $('#item_type_import').on('click', function () { $('#importUI').toggleClass('hide'); }); - $('#import_exec_btn').on('click', function(){ - if($('#import_file').prop("files").length != 1){ + $('#import_exec_btn').on('click', function () { + if ($('#import_file').prop("files").length != 1) { alert("Please select Zipfile."); return; } - if($('#itemtype_name_import').val().length < 1){ + if ($('#itemtype_name_import').val().length < 1) { alert("Please input Type Name."); return; } @@ -160,33 +160,33 @@ $(document).ready(function () { send_file("/admin/itemtypes/import", fd); }); - $('input[type=radio][name=item_type]').on ('change', function(){ - if (this.value === 'normal') { - $('option.normal_type').show() - $('option.harvesting_type').hide() - disabled_deleted_type(); - } else if (this.value === 'harvesting') { - $('option.normal_type').hide() - $('option.harvesting_type').show() - disabled_deleted_type(); - } else { - $('option.deleted_type').show(); - $('option.normal_type').hide(); - $('option.harvesting_type').hide(); - $('#btn_restore_itemtype_schema').prop('disabled', false); - $('div.metadata-content *').not("[id=btn_restore_itemtype_schema]").prop('disabled', true); - } + $('input[type=radio][name=item_type]').on('change', function () { + if (this.value === 'normal') { + $('option.normal_type').show() + $('option.harvesting_type').hide() + disabled_deleted_type(); + } else if (this.value === 'harvesting') { + $('option.normal_type').hide() + $('option.harvesting_type').show() + disabled_deleted_type(); + } else { + $('option.deleted_type').show(); + $('option.normal_type').hide(); + $('option.harvesting_type').hide(); + $('#btn_restore_itemtype_schema').prop('disabled', false); + $('div.metadata-content *').not("[id=btn_restore_itemtype_schema]").prop('disabled', true); + } }); - function disabled_deleted_type(){ - $('option.deleted_type').hide(); - $('#btn_restore_itemtype_schema').prop('disabled', true); - $('div.metadata-content *').not("[id=btn_restore_itemtype_schema]").prop('disabled', false); - $('#chk_pubdate_0').attr('disabled', true); + function disabled_deleted_type() { + $('option.deleted_type').hide(); + $('#btn_restore_itemtype_schema').prop('disabled', true); + $('div.metadata-content *').not("[id=btn_restore_itemtype_schema]").prop('disabled', false); + $('#chk_pubdate_0').attr('disabled', true); } - $('#btn_create_itemtype_schema').on('click', function(){ - if($('#itemtype_name').val() == "") { + $('#btn_create_itemtype_schema').on('click', function () { + if ($('#itemtype_name').val() == "") { $('#itemtype_name_warning').removeClass('hide'); $('#itemtype_name').focus(); return; @@ -196,14 +196,14 @@ $(document).ready(function () { send(url_update_schema, page_global); }); - $('#btn_previews_itemtype_schema').on('click', function(){ + $('#btn_previews_itemtype_schema').on('click', function () { create_itemtype_schema(); $('#schema_json').text(JSON.stringify(page_global.table_row_map.schema, null, 4)); $('#form_json').text(JSON.stringify(page_global.table_row_map.form, null, 4)); $('#render_json').text(JSON.stringify(page_global, null, 4)); }); - function create_itemtype_schema(){ + function create_itemtype_schema() { page_global.table_row_map['name'] = $('#itemtype_name').val(); page_global.table_row_map['action'] = $('[name=radio_versionup]:checked').val(); @@ -307,11 +307,11 @@ $(document).ready(function () { page_global.table_row_map['form'] = []; // コンテンツ本体 - if(page_global.upload_file) { + if (page_global.upload_file) { page_global.table_row_map.schema.properties["filemeta"] = { - type:"array", + type: "array", title: "Contents Body", - items:{ + items: { type: "object", properties: { filename: { @@ -321,12 +321,12 @@ $(document).ready(function () { displaytype: { type: "string", title: "Display Format", - enum: ["detail","simple","preview"] + enum: ["detail", "simple", "preview"] }, licensetype: { type: "string", title: "License", - enum: ["license_free","license_0","license_1","license_2","license_3","license_4","license_5"] + enum: ["license_free", "license_0", "license_1", "license_2", "license_3", "license_4", "license_5"] }, licensefree: { type: "string" @@ -334,7 +334,7 @@ $(document).ready(function () { accessrole: { type: "string", title: "Access", - enum: ["open_access","open_date","open_login","open_no","open_restricted"] + enum: ["open_access", "open_date", "open_login", "open_no", "open_restricted"] }, accessdate: { type: "string", @@ -348,8 +348,8 @@ $(document).ready(function () { } } page_global.table_row_map.form.push({ - key:"filemeta", - title:"Contents Body", + key: "filemeta", + title: "Contents Body", add: "New", style: { add: "btn-success" @@ -359,32 +359,32 @@ $(document).ready(function () { key: "filemeta[].filename", type: "select", title: "Display Name", - title_i18n:{ja:"表示名",en:"FileName"} + title_i18n: { ja: "表示名", en: "FileName" } }, { key: "filemeta[].displaytype", type: "select", title: "Display Format", - title_i18n:{ja:"表示形式",en:"Preview"}, + title_i18n: { ja: "表示形式", en: "Preview" }, titleMap: [ - {value: "detail", name: "Detailed" }, - {value: "simple", name: "Simple" }, - {value: "preview", name: "Preview" } + { value: "detail", name: "Detailed" }, + { value: "simple", name: "Simple" }, + { value: "preview", name: "Preview" } ] }, { key: "filemeta[].licensetype", type: "select", - title:" License", - title_i18n:{ja:"ライセンス",en:"License"}, + title: " License", + title_i18n: { ja: "ライセンス", en: "License" }, titleMap: [ - {value: "license_free", name: "License Free" }, - {value: "license_0", name: "Creative Commons : Attribution" }, - {value: "license_1", name: "Creative Commons : Attribution-Share-Alike" }, - {value: "license_2", name: "Creative Commons : Attribution-No-Derivatives" }, - {value: "license_3", name: "Creative Commons : Attribution-Non-Commercial" }, - {value: "license_4", name: "Creative Commons : Attribution-NonCommercial-ShareAlike" }, - {value: "license_5", name: "Creative Commons : Attribution-NonCommercial-ShareAlike-NoDerivatives" } + { value: "license_free", name: "License Free" }, + { value: "license_0", name: "Creative Commons : Attribution" }, + { value: "license_1", name: "Creative Commons : Attribution-Share-Alike" }, + { value: "license_2", name: "Creative Commons : Attribution-No-Derivatives" }, + { value: "license_3", name: "Creative Commons : Attribution-Non-Commercial" }, + { value: "license_4", name: "Creative Commons : Attribution-NonCommercial-ShareAlike" }, + { value: "license_5", name: "Creative Commons : Attribution-NonCommercial-ShareAlike-NoDerivatives" } ] }, { @@ -395,7 +395,7 @@ $(document).ready(function () { }, { title: "Check Plagiarism", - title_i18n:{ja:"剽窃チェック",en:"Check Plagiarism"}, + title_i18n: { ja: "剽窃チェック", en: "Check Plagiarism" }, type: "template", template: "" }, @@ -403,18 +403,18 @@ $(document).ready(function () { key: "filemeta[].accessrole", type: "radios", title: "Access", - title_i18n:{ja:"アクセス",en:"Access"}, + title_i18n: { ja: "アクセス", en: "Access" }, titleMap: [ - {value: "open_access", name: "Open Access" }, - {value: "open_date", name: "Specify Open Access Date" }, - {value: "open_login", name: "Only Logged In Users" }, - {value: "open_no", name: "Do Not Make Public" } + { value: "open_access", name: "Open Access" }, + { value: "open_date", name: "Specify Open Access Date" }, + { value: "open_login", name: "Only Logged In Users" }, + { value: "open_no", name: "Do Not Make Public" } ] }, { key: "filemeta[].accessdate", title: "Publish Date", - title_i18n:{ja:"公開日",en:"Opendate"}, + title_i18n: { ja: "公開日", en: "Opendate" }, type: "template", format: "yyyy-MM-dd", templateUrl: "/static/templates/weko_deposit/datepicker.html", @@ -423,13 +423,13 @@ $(document).ready(function () { { key: "filemeta[].groups", title: "Group", - title_i18n:{ja:"グループ",en:"Group"}, + title_i18n: { ja: "グループ", en: "Group" }, type: "text", condition: "model.filemeta[arrayIndex].accessrole == 'open_date' || model.filemeta[arrayIndex].accessrole == 'open_login'" } ] }); - if(src_mapping.hasOwnProperty('filemeta')) { + if (src_mapping.hasOwnProperty('filemeta')) { page_global.table_row_map.mapping['filemeta'] = src_mapping['filemeta']; } else { page_global.table_row_map.mapping['filemeta'] = mapping_value; @@ -452,55 +452,55 @@ $(document).ready(function () { }); page_global.table_row_map.schema.required.push("pubdate"); - if(src_mapping.hasOwnProperty('pubdate')) { + if (src_mapping.hasOwnProperty('pubdate')) { page_global.table_row_map.mapping['pubdate'] = src_mapping['pubdate']; } else { page_global.table_row_map.mapping['pubdate'] = mapping_value; } // Used last mapping of system properties - if(src_mapping.hasOwnProperty('system_identifier_doi')) { + if (src_mapping.hasOwnProperty('system_identifier_doi')) { page_global.table_row_map.mapping['system_identifier_doi'] = src_mapping['system_identifier_doi']; } - if(src_mapping.hasOwnProperty('system_identifier_hdl')) { + if (src_mapping.hasOwnProperty('system_identifier_hdl')) { page_global.table_row_map.mapping['system_identifier_hdl'] = src_mapping['system_identifier_hdl']; } - if(src_mapping.hasOwnProperty('system_identifier_uri')) { + if (src_mapping.hasOwnProperty('system_identifier_uri')) { page_global.table_row_map.mapping['system_identifier_uri'] = src_mapping['system_identifier_uri']; } - if(src_mapping.hasOwnProperty('system_file')) { + if (src_mapping.hasOwnProperty('system_file')) { page_global.table_row_map.mapping['system_file'] = src_mapping['system_file']; } // End system mapping // テーブルの行をトラバースし、マップに追加する err_input_id = [] - $.each(page_global.table_row, function(idx, row_id){ + $.each(page_global.table_row, function (idx, row_id) { var tmp = {} - tmp.title = $('#txt_title_'+row_id).val(); + tmp.title = $('#txt_title_' + row_id).val(); //add by ryuu. start - tmp.title_i18n ={} - tmp.title_i18n.ja = $('#txt_title_ja_'+row_id).val(); - tmp.title_i18n.en = $('#txt_title_en_'+row_id).val(); + tmp.title_i18n = {} + tmp.title_i18n.ja = $('#txt_title_ja_' + row_id).val(); + tmp.title_i18n.en = $('#txt_title_en_' + row_id).val(); //add by ryuu. end - tmp.input_type = $('#select_input_type_'+row_id).val(); + tmp.input_type = $('#select_input_type_' + row_id).val(); tmp.input_value = ""; - tmp.input_minItems = $('#minItems_'+row_id).val(); - tmp.input_maxItems = $('#maxItems_'+row_id).val(); + tmp.input_minItems = $('#minItems_' + row_id).val(); + tmp.input_maxItems = $('#maxItems_' + row_id).val(); tmp.option = {} - tmp.option.required = $('#chk_'+row_id+'_0').is(':checked')?true:false; - tmp.option.multiple = $('#chk_'+row_id+'_1').is(':checked')?true:false; - tmp.option.hidden = $('#chk_'+row_id+'_4').is(':checked')?true:false; - tmp.option.showlist = tmp.option.hidden?false:($('#chk_'+row_id+'_2').is(':checked')?true:false); - tmp.option.crtf = tmp.option.hidden?false:($('#chk_'+row_id+'_3').is(':checked')?true:false); - tmp.option.oneline = tmp.option.hidden?false:($('#chk_'+row_id+'_5').is(':checked')?true:false); + tmp.option.required = $('#chk_' + row_id + '_0').is(':checked') ? true : false; + tmp.option.multiple = $('#chk_' + row_id + '_1').is(':checked') ? true : false; + tmp.option.hidden = $('#chk_' + row_id + '_4').is(':checked') ? true : false; + tmp.option.showlist = tmp.option.hidden ? false : ($('#chk_' + row_id + '_2').is(':checked') ? true : false); + tmp.option.crtf = tmp.option.hidden ? false : ($('#chk_' + row_id + '_3').is(':checked') ? true : false); + tmp.option.oneline = tmp.option.hidden ? false : ($('#chk_' + row_id + '_5').is(':checked') ? true : false); // Retrieve notes edited page_global.edit_notes[row_id] = $('#edit_notes_' + row_id).val(); - if(src_render.hasOwnProperty('meta_list') - && src_render['meta_list'].hasOwnProperty(row_id)) { - if(tmp.input_type == src_render['meta_list'][row_id]['input_type']) { - if(src_mapping.hasOwnProperty(row_id)) { + if (src_render.hasOwnProperty('meta_list') + && src_render['meta_list'].hasOwnProperty(row_id)) { + if (tmp.input_type == src_render['meta_list'][row_id]['input_type']) { + if (src_mapping.hasOwnProperty(row_id)) { page_global.table_row_map.mapping[row_id] = src_mapping[row_id]; } else { page_global.table_row_map.mapping[row_id] = mapping_value; @@ -512,11 +512,11 @@ $(document).ready(function () { page_global.table_row_map.mapping[row_id] = mapping_value; } - if(tmp.option.required) { + if (tmp.option.required) { page_global.table_row_map.schema.required.push(row_id); } - if(tmp.input_type == 'text' || tmp.input_type == 'textarea') { - if(tmp.option.multiple) { + if (tmp.input_type == 'text' || tmp.input_type == 'textarea') { + if (tmp.option.multiple) { page_global.table_row_map.schema.properties[row_id] = { type: "array", title: tmp.title, @@ -525,7 +525,7 @@ $(document).ready(function () { items: { type: "object", properties: { - interim: {type: "string"} // [interim]は本当の意味を持たない + interim: { type: "string" } // [interim]は本当の意味を持たない } } } @@ -533,9 +533,9 @@ $(document).ready(function () { key: row_id, add: "New", title_i18n: tmp.title_i18n, - style: {add:"btn-success"}, + style: { add: "btn-success" }, items: [{ - key: row_id+'[].interim', + key: row_id + '[].interim', type: tmp.input_type, notitle: true }] @@ -553,8 +553,8 @@ $(document).ready(function () { type: tmp.input_type // text|textarea }); } - } else if(tmp.input_type == 'datetime') { - if(tmp.option.multiple) { + } else if (tmp.input_type == 'datetime') { + if (tmp.option.multiple) { page_global.table_row_map.schema.properties[row_id] = { type: "array", title: tmp.title, @@ -563,7 +563,7 @@ $(document).ready(function () { items: { type: "object", properties: { - interim: {type: "string"} // [interim]は本当の意味を持たない + interim: { type: "string" } // [interim]は本当の意味を持たない } } } @@ -571,9 +571,9 @@ $(document).ready(function () { key: row_id, title_i18n: tmp.title_i18n, add: "New", - style: {add:"btn-success"}, + style: { add: "btn-success" }, items: [{ - key: row_id+'[].interim', + key: row_id + '[].interim', type: "template", format: "yyyy-MM-dd", templateUrl: "/static/templates/weko_deposit/datepicker.html", @@ -595,16 +595,16 @@ $(document).ready(function () { templateUrl: "/static/templates/weko_deposit/datepicker.html" }); } - } else if(tmp.input_type == 'checkboxes') { - tmp.input_value = $("#schema_"+row_id).find(".select-value-setting").val(); + } else if (tmp.input_type == 'checkboxes') { + tmp.input_value = $("#schema_" + row_id).find(".select-value-setting").val(); enum_tmp = [] titleMap_tmp = [] - $.each(tmp.input_value.split('|'), function(i,v){ + $.each(tmp.input_value.split('|'), function (i, v) { enum_tmp.push(v); - titleMap_tmp.push({value:v, name:v}); + titleMap_tmp.push({ value: v, name: v }); }) - if(tmp.option.multiple) { + if (tmp.option.multiple) { // 選択式(プルダウン)(複数可) page_global.table_row_map.schema.properties[row_id] = { type: "array", @@ -633,7 +633,7 @@ $(document).ready(function () { title: tmp.title, title_i18n: tmp.title_i18n, add: "New", - style: {add:"btn-success"}, + style: { add: "btn-success" }, items: [{ title: tmp.title, title_i18n: tmp.title_i18n, @@ -677,19 +677,19 @@ $(document).ready(function () { type: "fieldset" }); } - } else if(tmp.input_type == 'radios' || tmp.input_type == 'select') { - tmp.input_value = $("#schema_"+row_id).find(".select-value-setting").val(); + } else if (tmp.input_type == 'radios' || tmp.input_type == 'select') { + tmp.input_value = $("#schema_" + row_id).find(".select-value-setting").val(); enum_tmp = [] titleMap_tmp = [] - $.each(tmp.input_value.split('|'), function(i,v){ + $.each(tmp.input_value.split('|'), function (i, v) { enum_tmp.push(v); - titleMap_tmp.push({value:v, name:v}); + titleMap_tmp.push({ value: v, name: v }); }) if (tmp && tmp.input_type == 'select' && enum_tmp[0] != undefined && enum_tmp[0] != "" && enum_tmp[0] != null) { enum_tmp.unshift(null); } - if(tmp.option.multiple) { + if (tmp.option.multiple) { page_global.table_row_map.schema.properties[row_id] = { type: "array", title: tmp.title, @@ -702,7 +702,7 @@ $(document).ready(function () { interim: { // [interim]は本当の意味を持たない title: tmp.title, title_i18n: tmp.title_i18n, - type: ["null","string"], + type: ["null", "string"], enum: enum_tmp } } @@ -713,11 +713,11 @@ $(document).ready(function () { title: tmp.title, title_i18n: tmp.title_i18n, add: "New", - style: {add:"btn-success"}, + style: { add: "btn-success" }, items: [{ title: tmp.title, title_i18n: tmp.title_i18n, - key: row_id+'[].interim', + key: row_id + '[].interim', type: tmp.input_type, // radios|select notitle: true, titleMap: titleMap_tmp @@ -731,7 +731,7 @@ $(document).ready(function () { properties: { "interim": {// [interim]は本当の意味を持たない title: tmp.title, - type: ["null","string"], + type: ["null", "string"], enum: enum_tmp, format: tmp.input_type, // radios|select } @@ -751,11 +751,11 @@ $(document).ready(function () { type: "fieldset" }); } - } else if(tmp && tmp.input_type.indexOf('cus_') != -1) { - editor = page_json_editor['schema_'+row_id]; + } else if (tmp && tmp.input_type.indexOf('cus_') != -1) { + editor = page_json_editor['schema_' + row_id]; page_global.schemaeditor.schema[row_id] = JSON.parse(JSON.stringify(editor.getValue())); removeEnumForCheckboxes(page_global.schemaeditor.schema[row_id].properties); - if(tmp.option.multiple) { + if (tmp.option.multiple) { page_global.table_row_map.schema.properties[row_id] = { type: "array", title: tmp.title, @@ -771,8 +771,8 @@ $(document).ready(function () { properties_obj[tmp.input_type.substr(4)].forms.title = tmp.title; properties_obj[tmp.input_type.substr(4)].forms.title_i18n = tmp.title_i18n; //add by ryuu. end - if(Array.isArray(properties_obj[tmp.input_type.substr(4)].forms)) { - properties_obj[tmp.input_type.substr(4)].forms.forEach(function(element){ + if (Array.isArray(properties_obj[tmp.input_type.substr(4)].forms)) { + properties_obj[tmp.input_type.substr(4)].forms.forEach(function (element) { // rename subitem if (rename_subitem_config && element.items && element.items.length > 0) { element = rename_subitem(element); @@ -847,85 +847,85 @@ $(document).ready(function () { } // add new meta table row - $('#btn_new_itemtype_meta').on('click', function(){ + $('#btn_new_itemtype_meta').on('click', function () { new_meta_row('item_' + $.now(), propertyOptions); }); - function new_meta_row(row_id, option_list, isDisableChangeInputType=false) { + function new_meta_row(row_id, option_list, isDisableChangeInputType = false) { let isDisable = isDisableChangeInputType ? 'disabled' : ''; var row_template = '' - + '' - + '
    ' - +'

    ' + "Japanese" + ':

    ' - +' ' - +'

    ' + "English" + ':

    ' - +' ' - + '
    ' - +' ' - +'' - + '
    ' - + ' ' - + ' ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + ' ' - + ' ' - + '
    ' - + '
    ' - + ' ' - + ' ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '
    ' - + '' - + '' - + '
    ' - + ' ' - + '
    ' - + '
    ' - + ' ' - + '
    ' - + '
    ' - + ' ' - + '
    ' - + '
    ' - + ' ' - + '
    ' - + '
    ' - + ' ' - + '
    ' - + '
    ' - + ' ' - + '
    ' - + '' - + '' - + ' ' - + '' - + '' - + '
    ' - + ' ' - + ' ' - + '
    ' - + '' - + '' - + ' ' - + '' - + ''; + + '' + + '
    ' + + '

    ' + "Japanese" + ':

    ' + + ' ' + + '

    ' + "English" + ':

    ' + + ' ' + + '
    ' + + ' ' + + '' + + '
    ' + + ' ' + + ' ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + ' ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + ' ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '' + + '' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '' + + '' + + ' ' + + '' + + '' + + '
    ' + + ' ' + + ' ' + + '
    ' + + '' + + '' + + ' ' + + '' + + ''; $('#tbody_itemtype').append(row_template); page_global.table_row.push(row_id); initSortedBtn(); - //add by ryuu. start - //多言語linkをクリック - $('#tbody_itemtype').on('click', 'tr td #btn_link_'+row_id, function(){ - if($('#text_title_JaEn_' + row_id).hasClass('hide')) { + //add by ryuu. start + //多言語linkをクリック + $('#tbody_itemtype').on('click', 'tr td #btn_link_' + row_id, function () { + if ($('#text_title_JaEn_' + row_id).hasClass('hide')) { $('#text_title_JaEn_' + row_id).removeClass('hide'); } else { $('#text_title_JaEn_' + row_id).addClass('hide'); @@ -935,22 +935,22 @@ $(document).ready(function () { // Dynamic additional click event // メタ項目の削除関数をダイナミックに登録する - $('#tbody_itemtype').on('click', 'tr td #btn_del_'+row_id, function(){ - page_global.table_row.splice($.inArray(row_id,page_global.table_row),1); + $('#tbody_itemtype').on('click', 'tr td #btn_del_' + row_id, function () { + page_global.table_row.splice($.inArray(row_id, page_global.table_row), 1); $('#tr_' + row_id).remove(); initSortedBtn(); }); // チェックボックス「複数可」が選択状態になると、サイズのセットボックスを表示する - $('#tbody_itemtype').on('click', 'tr td #chk_'+row_id+'_1', function(){ - if($('#chk_'+row_id+'_1').is(':checked')) { + $('#tbody_itemtype').on('click', 'tr td #chk_' + row_id + '_1', function () { + if ($('#chk_' + row_id + '_1').is(':checked')) { $('#arr_size_' + row_id).removeClass('hide'); } else { $('#arr_size_' + row_id).addClass('hide'); } }); // チェックボックス「非表示」が選択状態になると、 - $('#tbody_itemtype').on('click', 'tr td #chk_'+row_id+'_4', function(){ - if($('#chk_'+row_id+'_4').is(':checked')) { + $('#tbody_itemtype').on('click', 'tr td #chk_' + row_id + '_4', function () { + if ($('#chk_' + row_id + '_4').is(':checked')) { $('#chk_prev_' + row_id + '_2').addClass('disabled'); $('#chk_' + row_id + '_2').attr('disabled', true); $('#chk_prev_' + row_id + '_3').addClass('disabled'); @@ -970,51 +970,51 @@ $(document).ready(function () { }); } - $('#tbody_itemtype').on('click', '.sortable_up', function(){ + $('#tbody_itemtype').on('click', '.sortable_up', function () { var cur_row_id = $(this).attr('metaid'); - var up_row_idx = $.inArray(cur_row_id,page_global.table_row); - if(up_row_idx === 0) { + var up_row_idx = $.inArray(cur_row_id, page_global.table_row); + if (up_row_idx === 0) { // first row return; } - up_row_idx = up_row_idx-1; + up_row_idx = up_row_idx - 1; var up_row_id = page_global.table_row[up_row_idx]; - $('#tr_'+cur_row_id).after($('#tr_'+up_row_id)); - page_global.table_row.splice(up_row_idx,1); - var cur_row_idx = $.inArray(cur_row_id,page_global.table_row); - if(cur_row_idx == page_global.table_row.length-1) { + $('#tr_' + cur_row_id).after($('#tr_' + up_row_id)); + page_global.table_row.splice(up_row_idx, 1); + var cur_row_idx = $.inArray(cur_row_id, page_global.table_row); + if (cur_row_idx == page_global.table_row.length - 1) { page_global.table_row.push(up_row_id); } else { - page_global.table_row.splice(cur_row_idx+1,0,up_row_id); + page_global.table_row.splice(cur_row_idx + 1, 0, up_row_id); } initSortedBtn(); }) - $('#tbody_itemtype').on('click', '.sortable_down', function(){ + $('#tbody_itemtype').on('click', '.sortable_down', function () { var cur_row_id = $(this).attr('metaid'); - var down_row_idx = $.inArray(cur_row_id,page_global.table_row); - if(down_row_idx === page_global.table_row.length-1) { + var down_row_idx = $.inArray(cur_row_id, page_global.table_row); + if (down_row_idx === page_global.table_row.length - 1) { // last row return; } - down_row_idx = down_row_idx+1; + down_row_idx = down_row_idx + 1; var down_row_id = page_global.table_row[down_row_idx]; - $('#tr_'+cur_row_id).before($('#tr_'+down_row_id)); - page_global.table_row.splice(down_row_idx,1); - var cur_row_idx = $.inArray(cur_row_id,page_global.table_row); - page_global.table_row.splice(cur_row_idx,0,down_row_id); + $('#tr_' + cur_row_id).before($('#tr_' + down_row_id)); + page_global.table_row.splice(down_row_idx, 1); + var cur_row_idx = $.inArray(cur_row_id, page_global.table_row); + page_global.table_row.splice(cur_row_idx, 0, down_row_id); initSortedBtn(); }) function initSortedBtn() { $('.sortable_up').removeClass('disabled'); $('.sortable_down').removeClass('disabled'); - $('#btn_up_'+page_global.table_row[0]).addClass('disabled'); - $('#btn_down_'+page_global.table_row[page_global.table_row.length-1]).addClass('disabled'); + $('#btn_up_' + page_global.table_row[0]).addClass('disabled'); + $('#btn_down_' + page_global.table_row[page_global.table_row.length - 1]).addClass('disabled'); } - $('#chk_upload_file').on('change', function(){ - if($('#chk_upload_file').is(':checked')) { + $('#chk_upload_file').on('change', function () { + if ($('#chk_upload_file').is(':checked')) { // page_global.upload_file = true; page_global.upload_file = false; } else { @@ -1023,10 +1023,10 @@ $(document).ready(function () { }); function setDefaultI18n(schema, forms) { - if(!schema|| !forms || !forms.items) return; + if (!schema || !forms || !forms.items) return; Object.keys(schema).map(function (subSchema) { forms.items.forEach(function (subForm) { - if(subForm['key']){ + if (subForm['key']) { let subkey = subForm.key.split("."); let last_key = subkey[subkey.length - 1] if (last_key == subSchema) { @@ -1039,7 +1039,7 @@ $(document).ready(function () { schemaTitleI18n = subFormTitleI18n ? subFormTitleI18n : defaultTitle; schema[subSchema]['title_i18n'] = schemaTitleI18n; let childSchema = getPropertiesOrItems(schema[subSchema]); - if(childSchema) + if (childSchema) setDefaultI18n(childSchema, subForm); } } @@ -1049,22 +1049,22 @@ $(document).ready(function () { // itemtype select input change - $('#tbody_itemtype').on('change', '.change_input_type', function(){ + $('#tbody_itemtype').on('change', '.change_input_type', function () { var meta_id = $(this).attr('metaid'); let isFile = false; let checkboxMetaId = $('#chk_' + meta_id + '_1'); let checkboxNLId = $('#chk_' + meta_id + '_3'); - if($(this).val().indexOf('cus_') != -1) { + if ($(this).val().indexOf('cus_') != -1) { let product = properties_obj[$(this).val().substr(4)].schema; let product_forms = properties_obj[$(this).val().substr(4)].forms; isFile = properties_obj[$(this).val().substr(4)].is_file; - for(key in product.properties) { - if(isFile || product.properties[key]["isHide"] ==true){ + for (key in product.properties) { + if (isFile || product.properties[key]["isHide"] == true) { product.properties[key]["showListDisable"] = true product.properties[key]["specifyNLDisable"] = true product.properties[key]["nonDisplayDisable"] = true } - if(isFile){ + if (isFile) { product.properties[key]["hideDisable"] = true } } @@ -1077,31 +1077,31 @@ $(document).ready(function () { checkboxNLId.prop('checked', false); } setDefaultI18n(product.properties, product_forms); - render_object('schema_'+meta_id, product); - } else if('checkboxes' == $(this).val() || 'radios' == $(this).val() - || 'select' == $(this).val()){ + render_object('schema_' + meta_id, product); + } else if ('checkboxes' == $(this).val() || 'radios' == $(this).val() + || 'select' == $(this).val()) { checkboxMetaId.prop("checked", isFile); - render_select('schema_'+meta_id, ''); + render_select('schema_' + meta_id, ''); } else { $('#chk_prev_' + meta_id + '_1').removeClass('disabled'); checkboxMetaId.attr('disabled', false); checkboxMetaId.prop("checked", isFile); - render_empty('schema_'+meta_id); + render_empty('schema_' + meta_id); } }); function render_empty(elementId) { - $('#'+elementId).empty(); + $('#' + elementId).empty(); } function render_text(elementId, initval) { - $('#'+elementId).html(''); } function render_select(elementId, initval) { - $('#'+elementId).html('
    ' + $('#' + elementId).html('
    ' + '
    '); } @@ -1115,7 +1115,7 @@ $(document).ready(function () { page_json_editor[elementId] = editor; } - function send(url, data){ + function send(url, data) { $.ajax({ method: 'POST', url: url, @@ -1123,8 +1123,8 @@ $(document).ready(function () { contentType: 'application/json', dataType: 'json', data: JSON.stringify(data), - success: function(data,textStatus) { - if('redirect_url' in data){ + success: function (data, textStatus) { + if ('redirect_url' in data) { window.location.href = data.redirect_url } else { @@ -1132,7 +1132,7 @@ $(document).ready(function () { $('#myModal').modal('show'); } }, - error: function(textStatus,errorThrown){ + error: function (textStatus, errorThrown) { let message; if (textStatus.status === 400) { let response = JSON.parse(textStatus.responseText); @@ -1154,7 +1154,7 @@ $(document).ready(function () { } } - function custom_suffix_subitem_name(suffix){ + function custom_suffix_subitem_name(suffix) { // Replace all space to _ suffix = suffix.replace(/ /g, '_'); // convert to lower case character @@ -1164,15 +1164,15 @@ $(document).ready(function () { function process_child_subitem_name_form(org, prefix, form) { //rename subitem - form.items.forEach(function(item) { + form.items.forEach(function (item) { if (!item.key) { return } let subkey = item.key.split("_"); let orgkey = item.key; - if (rename_subitem_config && subkey.length > 1 && !isNaN(Number(subkey[subkey.length-1]))) { - let old_subkey = subkey[subkey.length-1]; - subkey[subkey.length-1] = custom_suffix_subitem_name(item.title); + if (rename_subitem_config && subkey.length > 1 && !isNaN(Number(subkey[subkey.length - 1]))) { + let old_subkey = subkey[subkey.length - 1]; + subkey[subkey.length - 1] = custom_suffix_subitem_name(item.title); // let ret = subkey.join('_'); // item.key = prefix + ret.split(org)[1]; update_mapping_list(old_subkey, custom_suffix_subitem_name(item.title)); @@ -1187,24 +1187,24 @@ $(document).ready(function () { } function rename_subitem(form) { - //rename subitem - form.items.forEach(function(item) { - // if (!item.hasOwnProperty('key')) { - if (!item.key) { - return - } - let subkey = item.key.split("_"); - let orgkey = item.key - if (rename_subitem_config && subkey.length > 1 && !isNaN(Number(subkey[1]))) { - item.key = subkey[0] + "_" + custom_suffix_subitem_name(item.title); - update_mapping_list(subkey[1], custom_suffix_subitem_name(item.title)); - } - if (item.items && item.items.length > 0) { - item = process_child_subitem_name_form(orgkey, item.key, item); - } - }); + //rename subitem + form.items.forEach(function (item) { + // if (!item.hasOwnProperty('key')) { + if (!item.key) { + return + } + let subkey = item.key.split("_"); + let orgkey = item.key + if (rename_subitem_config && subkey.length > 1 && !isNaN(Number(subkey[1]))) { + item.key = subkey[0] + "_" + custom_suffix_subitem_name(item.title); + update_mapping_list(subkey[1], custom_suffix_subitem_name(item.title)); + } + if (item.items && item.items.length > 0) { + item = process_child_subitem_name_form(orgkey, item.key, item); + } + }); - return form; + return form; } getPropUrl = '/admin/itemtypes/get-all-properties?lang=' + $('#lang-code').val(); @@ -1215,12 +1215,12 @@ $(document).ready(function () { method: 'GET', url: getPropUrl, async: false, - success: function(data, status){ + success: function (data, status) { properties_obj = data; defProps = data.defaults; - Object.keys(defProps).forEach(function(row_id){ - property_default[defProps[row_id].value] = defProps[row_id].name + Object.keys(defProps).forEach(function (row_id) { + property_default[defProps[row_id].value] = defProps[row_id].name }) isSelected = true; Object.keys(defProps).forEach(function (key) { @@ -1286,65 +1286,65 @@ $(document).ready(function () { propertyOptions = propertyOptions + others; textPropertyOptions = textPropertyOptions + _others; }, - error: function(status, error){ + error: function (status, error) { console.log(error); } }); function endLoading() { - if(requestNum == 0){ + if (requestNum == 0) { $(".container").removeClass("hidden"); $(".lds-ring-background").addClass("hidden"); } } if ($('#item-type-lists').val().length > 0) { -// This condition contains 2 callbacks(requests), if you add new here -// or somewhere else, please increase/decrease this value too + // This condition contains 2 callbacks(requests), if you add new here + // or somewhere else, please increase/decrease this value too requestNum = 2; $.get('/admin/itemtypes/' + $('#item-type-lists').val() + '/render', function (data, status) { let changedProperties = []; - Object.keys(data).forEach(function(key) { + Object.keys(data).forEach(function (key) { src_render[key] = data[key]; }); page_global.upload_file = false; // data.upload_file; $('#chk_upload_file').attr('checked', data.upload_file); // load publish date option loadPubdateOptions(data); - $.each(data.table_row, function(idx, row_id){ + $.each(data.table_row, function (idx, row_id) { if (generalTextProps.includes(data.meta_list[row_id].input_type)) { new_meta_row(row_id, textPropertyOptions); } else { new_meta_row(row_id, propertyOptions, true); } - let requiredCheckbox = $('#chk_'+row_id+'_0'); - let multipleCheckbox = $('#chk_'+row_id+'_1'); - let newLineCheckbox = $('#chk_'+row_id+'_3'); - $('#txt_title_'+row_id).val(data.meta_list[row_id].title); + let requiredCheckbox = $('#chk_' + row_id + '_0'); + let multipleCheckbox = $('#chk_' + row_id + '_1'); + let newLineCheckbox = $('#chk_' + row_id + '_3'); + $('#txt_title_' + row_id).val(data.meta_list[row_id].title); //add by ryuu. start - $('#txt_title_ja_'+row_id).val(data.meta_list[row_id].title_i18n.ja); - $('#txt_title_en_'+row_id).val(data.meta_list[row_id].title_i18n.en); + $('#txt_title_ja_' + row_id).val(data.meta_list[row_id].title_i18n.ja); + $('#txt_title_en_' + row_id).val(data.meta_list[row_id].title_i18n.en); //add by ryuu. end - $('#select_input_type_'+row_id).val(data.meta_list[row_id].input_type); - $('#minItems_'+row_id).val(data.meta_list[row_id].input_minItems); - $('#maxItems_'+row_id).val(data.meta_list[row_id].input_maxItems); + $('#select_input_type_' + row_id).val(data.meta_list[row_id].input_type); + $('#minItems_' + row_id).val(data.meta_list[row_id].input_minItems); + $('#maxItems_' + row_id).val(data.meta_list[row_id].input_maxItems); requiredCheckbox.attr('checked', data.meta_list[row_id].option.required); multipleCheckbox.attr('checked', data.meta_list[row_id].option.multiple); - $('#chk_'+row_id+'_2').attr('checked', data.meta_list[row_id].option.showlist); - $('#chk_'+row_id+'_3').attr('checked', data.meta_list[row_id].option.crtf); - $('#chk_'+row_id+'_4').attr('checked', data.meta_list[row_id].option.hidden); - $('#chk_'+row_id+'_5').attr('checked', data.meta_list[row_id].option.oneline); + $('#chk_' + row_id + '_2').attr('checked', data.meta_list[row_id].option.showlist); + $('#chk_' + row_id + '_3').attr('checked', data.meta_list[row_id].option.crtf); + $('#chk_' + row_id + '_4').attr('checked', data.meta_list[row_id].option.hidden); + $('#chk_' + row_id + '_5').attr('checked', data.meta_list[row_id].option.oneline); // Add the notes for the row here - if(row_id in data.edit_notes) { + if (row_id in data.edit_notes) { $('#edit_notes_' + row_id).val(data.edit_notes[row_id]); } - if (row_id === "pubdate"){ + if (row_id === "pubdate") { requiredCheckbox.attr('disabled', true); } - if(data.meta_list[row_id].option.hidden) { + if (data.meta_list[row_id].option.hidden) { $('#chk_prev_' + row_id + '_2').addClass('disabled'); $('#chk_' + row_id + '_2').attr('disabled', true); $('#chk_prev_' + row_id + '_3').addClass('disabled'); @@ -1353,11 +1353,11 @@ $(document).ready(function () { $('#chk_' + row_id + '_5').attr('disabled', true); } - if(data.meta_list[row_id].option.multiple) { + if (data.meta_list[row_id].option.multiple) { $('#arr_size_' + row_id).removeClass('hide'); } - if(data.meta_list[row_id].input_type.indexOf('cus_') != -1) { + if (data.meta_list[row_id].input_type.indexOf('cus_') != -1) { //Get title_i18n of item_type set to schema properties in order to fill to input controls. //Get schema from table item_type_properties. let itemTypePropertiesSchema = properties_obj[data.meta_list[row_id].input_type.substr(4)].schema; @@ -1382,15 +1382,15 @@ $(document).ready(function () { setRequiredListFromItemTypeToProperty( itemTypePropertiesSchema, itemTypeSchema); - // Set disable attribute for child in case parent is set Hide + // Set disable attribute for child in case parent is set Hide let isFile = properties_obj[data.meta_list[row_id].input_type.substr(4)].is_file; - for(key in properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties){ - if(isFile || properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties[key]["isHide"] ==true){ + for (key in properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties) { + if (isFile || properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties[key]["isHide"] == true) { properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties[key]["showListDisable"] = true properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties[key]["specifyNLDisable"] = true properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties[key]["nonDisplayDisable"] = true } - if(isFile){ + if (isFile) { properties_obj[data.meta_list[row_id].input_type.substr(4)].schema.properties[key]["hideDisable"] = true } } @@ -1411,35 +1411,35 @@ $(document).ready(function () { } } }); - render_object('schema_'+row_id, properties_obj[data.meta_list[row_id].input_type.substr(4)].schema); + render_object('schema_' + row_id, properties_obj[data.meta_list[row_id].input_type.substr(4)].schema); if (isFile) { multipleCheckbox.attr('disabled', true); newLineCheckbox.attr('disabled', true); newLineCheckbox.prop('checked', false); newLineCheckbox.attr('isFile', true); } - } else if('checkboxes' == data.meta_list[row_id].input_type || 'radios' == data.meta_list[row_id].input_type - || 'select' == data.meta_list[row_id].input_type){ - render_select('schema_'+row_id, data.meta_list[row_id].input_value); + } else if ('checkboxes' == data.meta_list[row_id].input_type || 'radios' == data.meta_list[row_id].input_type + || 'select' == data.meta_list[row_id].input_type) { + render_select('schema_' + row_id, data.meta_list[row_id].input_value); } else { - render_empty('schema_'+row_id); + render_empty('schema_' + row_id); } }); //Show message changed properties. - if(changedProperties.length > 0){ + if (changedProperties.length > 0) { let message = '
    ' + - '' + '' + '

    ' + changedProperties.join('

    ') + '

    '; $('section.content-header').prepend(message); } - if($('input[type=radio][name=item_type]:checked').val() === 'deleted') { + if ($('input[type=radio][name=item_type]:checked').val() === 'deleted') { $('div.metadata-content *').not('[id=btn_restore_itemtype_schema]').prop('disabled', true); } requestNum--; endLoading(); }); - $.get('/api/itemtypes/' + $('#item-type-lists').val() + '/mapping', function(data, status){ - Object.keys(data).forEach(function(key){ + $.get('/api/itemtypes/' + $('#item-type-lists').val() + '/mapping', function (data, status) { + Object.keys(data).forEach(function (key) { src_mapping[key] = data[key]; }); requestNum--; @@ -1448,14 +1448,14 @@ $(document).ready(function () { } $('input[type=radio][name=item_type][value=normal]').click() if ($("#item-type-lists option:selected").hasClass('normal_type')) { - $('input[type=radio][name=item_type][value=normal]').click() + $('input[type=radio][name=item_type][value=normal]').click() } else if ($("#item-type-lists option:selected").hasClass('harvesting_type')) { - $('input[type=radio][name=item_type][value=harvesting]').click() + $('input[type=radio][name=item_type][value=harvesting]').click() } else if ($("#item-type-lists option:selected").hasClass('deleted_type')) { - $('input[type=radio][name=item_type][value=deleted]').click() + $('input[type=radio][name=item_type][value=deleted]').click() } - $('#btn_delete_item').on('click', function(){ + $('#btn_delete_item').on('click', function () { var selected_item_type = $("#item-type-lists :selected"); var is_harvesting_type = selected_item_type.hasClass("harvesting_type"); var is_belonging_item = selected_item_type.hasClass("belonging_item"); @@ -1468,23 +1468,23 @@ $(document).ready(function () { } }); - $('#item_type_delete_continue').on('click', function(){ + $('#item_type_delete_continue').on('click', function () { $("#item_type_delete_confirmation").modal("hide"); send_uri('/admin/itemtypes/delete/' + $('#item-type-lists').val(), {}, - function(data){ + function (data) { window.location.href = "/admin/itemtypes"; // Error/Success flash set from server side }, - function(errmsg){ + function (errmsg) { window.location.href = "/admin/itemtypes"; //alert(JSON.stringify(errmsg)); - }); + }); }); - $('#btn_restore_itemtype_schema').on('click', function(){ + $('#btn_restore_itemtype_schema').on('click', function () { var restore_itemtype = $("#item-type-lists :selected"); if (restore_itemtype.val() !== '' && restore_itemtype.hasClass("deleted_type")) { send_uri('/admin/itemtypes/restore/' + restore_itemtype.val(), {}, - function(data){ + function (data) { restore_itemtype.removeAttr("selected"); restore_itemtype.hide(); restore_itemtype.removeClass("deleted_type"); @@ -1492,13 +1492,13 @@ $(document).ready(function () { $('#itemtype_name').val(''); alert(data.msg); }, - function(errmsg){ + function (errmsg) { alert(data.msg); - }); + }); } }); - function send_uri(url, data, handleSuccess, handleError){ + function send_uri(url, data, handleSuccess, handleError) { $.ajax({ method: 'POST', url: url, @@ -1506,30 +1506,30 @@ $(document).ready(function () { contentType: 'application/json', dataType: 'json', data: JSON.stringify(data), - success: function(data,textStatus){ + success: function (data, textStatus) { handleSuccess(data); }, - error: function(textStatus,errorThrown){ + error: function (textStatus, errorThrown) { handleError(textStatus); } }); } - function add_meta_system(){ + function add_meta_system() { var result = {} - Object.keys(meta_system_info).forEach(function(key){ + Object.keys(meta_system_info).forEach(function (key) { result[key] = { - title : meta_system_info[key].title, - title_i18n : meta_system_info[key].title_i18n, - input_type : meta_system_info[key].input_type, - input_value : "", - option : meta_system_info[key].option + title: meta_system_info[key].title, + title_i18n: meta_system_info[key].title_i18n, + input_type: meta_system_info[key].input_type, + input_value: "", + option: meta_system_info[key].option } }) return result } - function create_system_data(){ + function create_system_data() { let result = {} let system_row = Object.keys(meta_system_info); result.system_row = system_row @@ -1538,13 +1538,13 @@ $(document).ready(function () { return result } - function get_form_system(){ + function get_form_system() { let result = new Array() let list_key = Object.keys(meta_system_info) - for(i = 0; i< list_key.length; ++i){ + for (i = 0; i < list_key.length; ++i) { let row_id = list_key[i] let item = new Object() - if(meta_system_info[row_id].input_type.indexOf('cus_') != -1) { + if (meta_system_info[row_id].input_type.indexOf('cus_') != -1) { item = JSON.parse(JSON.stringify(properties_obj['system'][meta_system_info[row_id].input_type.substr(4)].form)); item.title = meta_system_info[row_id].title item.title_i18n = meta_system_info[row_id].title_i18n @@ -1563,10 +1563,10 @@ $(document).ready(function () { function add_system_schema_property() { let list_key = Object.keys(meta_system_info) - for(let i = 0; i< list_key.length; ++i){ + for (let i = 0; i < list_key.length; ++i) { let row_id = list_key[i] let item = {}; - if(meta_system_info[row_id].input_type.indexOf('cus_') != -1) { + if (meta_system_info[row_id].input_type.indexOf('cus_') != -1) { item = JSON.parse(JSON.stringify(properties_obj['system'][meta_system_info[row_id].input_type.substr(4)].schema)); item.title = meta_system_info[row_id].title } else { @@ -1587,7 +1587,7 @@ $(document).ready(function () { itpSchema.isHide = itForm.isHide; itpSchema.isNonDisplay = itForm.isNonDisplay; // itpSchema.format = itForm.format; - if(itForm.hasOwnProperty('titleMap')) { + if (itForm.hasOwnProperty('titleMap')) { let titleMapList = itForm['titleMap']; let arrEnumList = []; let isTitleMap = false; @@ -1596,11 +1596,11 @@ $(document).ready(function () { isTitleMap = true; }); if (isTitleMap && - Array.isArray(arrEnumList) && - itpSchema.format == 'select' && - arrEnumList[0] != undefined && - arrEnumList[0] != "" && - arrEnumList[0] != null) { + Array.isArray(arrEnumList) && + itpSchema.format == 'select' && + arrEnumList[0] != undefined && + arrEnumList[0] != "" && + arrEnumList[0] != null) { arrEnumList.unshift(null); } itpSchema.enum = arrEnumList; @@ -1608,7 +1608,7 @@ $(document).ready(function () { } function checkAndSetTitleI18nForSchema(itpSchema, itpForm) { - let titleI118nDefault = {'ja': '', 'en': ''}; + let titleI118nDefault = { 'ja': '', 'en': '' }; // Define title_i18n of SchemaProperty and ItemTypeProperty. let itpSchemaTitleI18n = itpSchema.title_i18n; let itpFormTitleI18n = itpForm.title_i18n; @@ -1619,7 +1619,7 @@ $(document).ready(function () { itpSchemaTitleI18n.ja = itpSchemaTitleI18n.ja ? itpSchemaTitleI18n.ja : itpFormTitleI18n.ja; itpSchemaTitleI18n.en = itpSchemaTitleI18n.en ? itpSchemaTitleI18n.en : itpFormTitleI18n.en; - if(!itpForm.hasOwnProperty('title_i18n_temp')) { + if (!itpForm.hasOwnProperty('title_i18n_temp')) { itpSchema.title_i18n_temp = itpForm.title_i18n; } } @@ -1641,10 +1641,10 @@ $(document).ready(function () { let propertyKey = itemTypeForm.key + '.' + propKey; propertyKey = fixKey(propertyKey); properties[propKey].uniqueKey = propertyKey; - $.each(itemTypeForm.items, function(ind, form) { + $.each(itemTypeForm.items, function (ind, form) { let formKey = !form.key ? '' : form.key; formKey = fixKey(formKey); - if(propertyKey == formKey) { + if (propertyKey == formKey) { setInfoToSchema(properties[propKey], form, propertyKey); setTitleI18nForSubPropertiesByCondition1(properties[propKey], form.items, propertyKey); return false; @@ -1655,14 +1655,14 @@ $(document).ready(function () { // If title_i18n of (1) is empty, set title_i18n of (2) to 'schema properties'. // setTitleI18nForSchemaPropertiesByCondition(properties, itemTypePropertyForm); Object.keys(properties).map(function (propKey) { - $.each(itemTypePropertyForm.items, function(ind, form){ + $.each(itemTypePropertyForm.items, function (ind, form) { let propertyKey = itemTypePropertyForm.key + '.' + propKey; let formKey = !form.key ? '' : form.key; // Remove all [] in key. propertyKey = fixKey(propertyKey); formKey = fixKey(formKey); // Check and set title_i18n for parent item. - if(propertyKey == formKey) { + if (propertyKey == formKey) { checkAndSetTitleI18nForSchema(properties[propKey], form); // Check and set title_i18n for child item. setTitleI18nForSubPropertiesByCondition2(properties[propKey], form.items, propertyKey); @@ -1684,7 +1684,7 @@ $(document).ready(function () { } function setTitleI18nForSubPropertiesByCondition1(schemaProperties, subForms, prefixKey) { - if(!subForms) return; + if (!subForms) return; let properties = getPropertiesOrItems(schemaProperties); Object.keys(properties).map(function (propKey) { let propertyKey = prefixKey + '.' + propKey; @@ -1703,7 +1703,7 @@ $(document).ready(function () { } function setTitleI18nForSubPropertiesByCondition2(schemaProperties, subForms, prefixKey) { - if(!subForms) return; + if (!subForms) return; let properties = getPropertiesOrItems(schemaProperties); Object.keys(properties).map(function (propKey) { $.each(subForms, function (ind, form) { @@ -1724,10 +1724,10 @@ $(document).ready(function () { } function getChangedProperties(itpForms, itForms, changedProperties) { - if(!itpForms || !itpForms.items || !itForms || !itForms.items) return; - let titleI118nDefault = {'ja': '', 'en': ''}; - $.each(itpForms.items, function(ind, itpForm) { - $.each(itForms.items, function(ind, itForm) { + if (!itpForms || !itpForms.items || !itForms || !itForms.items) return; + let titleI118nDefault = { 'ja': '', 'en': '' }; + $.each(itpForms.items, function (ind, itpForm) { + $.each(itForms.items, function (ind, itForm) { // Define key of form. let itpFormKey = itForms.key + '.' + itpForm.key; let itFormKey = !itForm.key ? '' : itForm.key; @@ -1736,7 +1736,7 @@ $(document).ready(function () { // Remove all [] in key. itpFormKey = fixKey(itpFormKey); itFormKey = fixKey(itFormKey); - if(itpFormKey == itFormKey) { + if (itpFormKey == itFormKey) { itpForm.title_i18n = itpForm.title_i18n ? itpForm.title_i18n : titleI118nDefault; itForm.title_i18n_temp = itForm.title_i18n_temp ? itForm.title_i18n_temp : itpForm.title_i18n; let itpTitleI18nEn = itpForm.title_i18n.en; @@ -1755,10 +1755,10 @@ $(document).ready(function () { } function getChangedSubProperties(itpForms, itForms, changedProperties) { - if(!itpForms || !itpForms.items || !itForms || !itForms.items) return; - let titleI118nDefault = {'ja': '', 'en': ''}; - $.each(itpForms.items, function(ind, itpForm) { - $.each(itForms.items, function(ind, itForm) { + if (!itpForms || !itpForms.items || !itForms || !itForms.items) return; + let titleI118nDefault = { 'ja': '', 'en': '' }; + $.each(itpForms.items, function (ind, itpForm) { + $.each(itForms.items, function (ind, itForm) { // Define sub key. let itpFormKey = itpForm.key; let itFormKey = !itForm.key ? '' : itForm.key; @@ -1767,7 +1767,7 @@ $(document).ready(function () { // Remove all [] in key. itpFormKey = fixKey(itpFormKey); itFormKey = fixKey(itFormKey); - if(itpFormKey == itFormKey) { + if (itpFormKey == itFormKey) { itpForm.title_i18n = itpForm.title_i18n ? itpForm.title_i18n : titleI118nDefault; itForm.title_i18n_temp = itForm.title_i18n_temp ? itForm.title_i18n_temp : itpForm.title_i18n; let itpTitleI18nEn = itpForm.title_i18n.en; @@ -1785,8 +1785,8 @@ $(document).ready(function () { }); } - function setRequiredListFromItemTypeToProperty(property,itemType) { - if (property == undefined || itemType == undefined){ + function setRequiredListFromItemTypeToProperty(property, itemType) { + if (property == undefined || itemType == undefined) { return; } if (itemType.hasOwnProperty("required")) { @@ -1794,14 +1794,14 @@ $(document).ready(function () { } if (itemType.hasOwnProperty("properties")) { Object.keys(itemType.properties).map(function (ip_key) { - setRequiredListFromItemTypeToProperty(property.properties[ip_key],itemType.properties[ip_key]) + setRequiredListFromItemTypeToProperty(property.properties[ip_key], itemType.properties[ip_key]) }); } else if (itemType.hasOwnProperty("items")) { // setRequiredListFromItemTypeToProperty(itemType.items, property.items) // It means that itemtype is set as multiple - if(itemType.hasOwnProperty("minItems")){ - setRequiredListFromItemTypeToProperty(property,itemType.items) - }else{ + if (itemType.hasOwnProperty("minItems")) { + setRequiredListFromItemTypeToProperty(property, itemType.items) + } else { setRequiredListFromItemTypeToProperty(property.items, itemType.items) } } @@ -1811,22 +1811,22 @@ $(document).ready(function () { function setSchemaFromItemTypeToItemTypeProperty(itemTypePropertiesSchema, itemTypeSchema) { let itpSchema = getPropertiesOrItems(itemTypePropertiesSchema) || {}; let itSchema = getPropertiesOrItems(itemTypeSchema) || {}; - Object.keys(itpSchema).map(function(itpSchemaKey) { - Object.keys(itSchema).map(function(itSchemaKey) { - if(itpSchemaKey == itSchemaKey) { + Object.keys(itpSchema).map(function (itpSchemaKey) { + Object.keys(itSchema).map(function (itSchemaKey) { + if (itpSchemaKey == itSchemaKey) { let itpSubSchema = itpSchema[itpSchemaKey]; let itSubSchema = itSchema[itSchemaKey]; itpSubSchema.format = itSubSchema.format; - if(itpSubSchema.format == 'select') { - itpSubSchema.type = ["null","string"]; - } else if(itpSubSchema.format == 'checkboxes') { + if (itpSubSchema.format == 'select') { + itpSubSchema.type = ["null", "string"]; + } else if (itpSubSchema.format == 'checkboxes') { itpSubSchema.type = "array"; - } else if(itpSubSchema.format == "radios") { + } else if (itpSubSchema.format == "radios") { itpSubSchema.type = "string"; } setSchemaFromItemTypeToItemTypeProperty(itpSubSchema, itSubSchema); return false; - } + } }); }); } @@ -1834,14 +1834,14 @@ $(document).ready(function () { //When save data, get data from schema set to form. function setTitleI18nFromPropertiesSchemaToForm(properties, form) { Object.keys(properties).map(function (propKey) { - $.each(form.items, function(ind, subForm){ + $.each(form.items, function (ind, subForm) { //Get title_i18n of schema properties set to parent form. let propertyKey = 'parentkey.' + propKey; let formKey = !subForm.key ? '' : subForm.key; // Remove all [] in key. propertyKey = fixKey(propertyKey); formKey = fixKey(formKey); - if(propertyKey == formKey){ + if (propertyKey == formKey) { setInfoToPropertySchema(properties[propKey], subForm); setTitleI18nFromPropertiesSchemaToSubForm(properties[propKey], subForm.items, propertyKey); return false; @@ -1851,7 +1851,7 @@ $(document).ready(function () { } function setTitleI18nFromPropertiesSchemaToSubForm(schemaProperties, subForms, prefixKey) { - if(!subForms) return; + if (!subForms) return; let properties = getPropertiesOrItems(schemaProperties); let propertyKey; Object.keys(properties).map(function (propKey) { @@ -1890,24 +1890,24 @@ $(document).ready(function () { _enum = property['currentEnum']; } //Trim space for value of enum in item type schema. - if(_enum){ - let isEnumStr = typeof(_enum) == 'string'; + if (_enum) { + let isEnumStr = typeof (_enum) == 'string'; let list_enum = isEnumStr ? _enum.split('|') : _enum; let enumTemp = []; - $.each(list_enum, function(ind, val) { - if(val && val.length > 0){ + $.each(list_enum, function (ind, val) { + if (val && val.length > 0) { enumTemp.push(val.trim()); } }); _enum = enumTemp; } //Trim space for name and value of titleMap form in item type schema. - if(form.titleMap){ + if (form.titleMap) { Object.keys(form.titleMap).map(function (titleMap) { - if(form.titleMap[titleMap]['name']){ + if (form.titleMap[titleMap]['name']) { form.titleMap[titleMap]['name'] = form.titleMap[titleMap]['name'].trim(); } - if(form.titleMap[titleMap]['value']){ + if (form.titleMap[titleMap]['value']) { form.titleMap[titleMap]['value'] = form.titleMap[titleMap]['value'].trim(); } }); @@ -1916,11 +1916,11 @@ $(document).ready(function () { property['enum'] = _enum; //Set TitleMap for form. if (editAble && _enum) { - let list_enum = typeof(_enum) == 'string' ? _enum.split('|') : _enum; + let list_enum = typeof (_enum) == 'string' ? _enum.split('|') : _enum; let titleMap = []; - $.each(list_enum, function(ind, val) { - if(val&&val.length > 0){ - titleMap.push({"name": val, "value": val}); + $.each(list_enum, function (ind, val) { + if (val && val.length > 0) { + titleMap.push({ "name": val, "value": val }); } }); console.log("titleMap"); @@ -1932,9 +1932,9 @@ $(document).ready(function () { if (property.hasOwnProperty('items')) delete property.items } - if (property.format == 'radios') { + if (property.format == 'radios') { form.type = "radios" - if (form.hasOwnProperty('templateUrl')){ + if (form.hasOwnProperty('templateUrl')) { delete form.templateUrl } } else if (property.format == 'checkboxes') { @@ -1955,8 +1955,8 @@ $(document).ready(function () { form.type = form['templateUrl'] ? "template" : "select"; } //Delete info not use. - if(property.hasOwnProperty('uniqueKey')) delete property['uniqueKey']; - if(property.hasOwnProperty('currentEnum')) delete property['currentEnum']; + if (property.hasOwnProperty('uniqueKey')) delete property['uniqueKey']; + if (property.hasOwnProperty('currentEnum')) delete property['currentEnum']; } function removeEnumForCheckboxes(schema) { @@ -1988,8 +1988,8 @@ $(document).ready(function () { function getItemTypeForm(formId, forms) { //Get form from table item_type (1). let itemTypeForm = {}; - $.each(forms, function(ind, form){ - if(form.key == formId){ + $.each(forms, function (ind, form) { + if (form.key == formId) { itemTypeForm = form; return false; } @@ -1997,10 +1997,10 @@ $(document).ready(function () { return itemTypeForm; } - function loadPubdateOptions(data){ - if (data.hasOwnProperty("meta_fix") && data.meta_fix.hasOwnProperty("pubdate")){ + function loadPubdateOptions(data) { + if (data.hasOwnProperty("meta_fix") && data.meta_fix.hasOwnProperty("pubdate")) { let options = data.meta_fix.pubdate.option; - if(options) { + if (options) { $('#chk_pubdate_1').prop('checked', options.multiple); $('#chk_pubdate_2').prop('checked', options.showlist); $('#chk_pubdate_3').prop('checked', options.crtf); @@ -2013,7 +2013,7 @@ $(document).ready(function () { } } - function send_file(url, data){ + function send_file(url, data) { $.ajax({ method: 'POST', url: url, @@ -2022,8 +2022,8 @@ $(document).ready(function () { dataType: 'json', processData: false, data: data, - success: function(data,textStatus) { - if('redirect_url' in data){ + success: function (data, textStatus) { + if ('redirect_url' in data) { window.location.href = data.redirect_url } else { @@ -2031,7 +2031,7 @@ $(document).ready(function () { $('#myModal').modal('show'); } }, - error: function(textStatus,errorThrown){ + error: function (textStatus, errorThrown) { let message; if (textStatus.status === 400) { let response = JSON.parse(textStatus.responseText); diff --git a/modules/weko-logging/requirements.txt b/modules/weko-logging/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-logging/requirements.txt +++ b/modules/weko-logging/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-logging/requirements2.txt b/modules/weko-logging/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-logging/requirements2.txt +++ b/modules/weko-logging/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-plugins/requirements.txt b/modules/weko-plugins/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-plugins/requirements.txt +++ b/modules/weko-plugins/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-plugins/requirements2.txt b/modules/weko-plugins/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-plugins/requirements2.txt +++ b/modules/weko-plugins/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-records-ui/requirements.txt b/modules/weko-records-ui/requirements.txt index 185e0e4a8d..f6e95bb71f 100644 --- a/modules/weko-records-ui/requirements.txt +++ b/modules/weko-records-ui/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,8 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 +pypdf==5.0.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-records-ui/requirements2.txt b/modules/weko-records-ui/requirements2.txt index 4cfceb72d6..059381f7f9 100644 --- a/modules/weko-records-ui/requirements2.txt +++ b/modules/weko-records-ui/requirements2.txt @@ -49,7 +49,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-records-ui/setup.py b/modules/weko-records-ui/setup.py index 6ff3cd1f1c..086d8eff00 100644 --- a/modules/weko-records-ui/setup.py +++ b/modules/weko-records-ui/setup.py @@ -57,7 +57,7 @@ install_requires = [ 'Flask-BabelEx>=0.9.2', 'invenio-previewer>=1.0.0a11', - 'PyPDF2>=1.26.0', + 'pypdf>=4.3.1,<5.0.0', 'invenio-pidrelations>=1.0.0a3', 'invenio-records>=1.0.0b4', ] diff --git a/modules/weko-records-ui/tests/conftest.py b/modules/weko-records-ui/tests/conftest.py index c9b59e72da..447bad054a 100644 --- a/modules/weko-records-ui/tests/conftest.py +++ b/modules/weko-records-ui/tests/conftest.py @@ -33,6 +33,7 @@ from collections import OrderedDict from unittest.mock import patch from datetime import timedelta +from sqlalchemy.sql import func import pytest from elasticsearch import Elasticsearch @@ -48,6 +49,7 @@ from invenio_admin import InvenioAdmin from invenio_assets import InvenioAssets from invenio_cache import InvenioCache +from invenio_communities.models import Community from invenio_db import InvenioDB from invenio_db import db as db_ from invenio_deposit import InvenioDeposit @@ -223,7 +225,7 @@ def base_app(instance_path): }, WEKO_INDEX_TREE_UPATED=True, WEKO_INDEX_TREE_REST_ENDPOINTS=WEKO_INDEX_TREE_REST_ENDPOINTS, - I18N_LANGUAGE=[("ja", "Japanese"), ("en", "English")], + I18N_LANGUAGES=[("ja", "Japanese"), ("en", "English"), ('fr', 'French')], SERVER_NAME="TEST_SERVER", SEARCH_ELASTIC_HOSTS="elasticsearch", SEARCH_INDEX_PREFIX="test-", @@ -250,9 +252,9 @@ def base_app(instance_path): PDF_COVERPAGE_LANG_FILENAME=PDF_COVERPAGE_LANG_FILENAME, # JPAEXG_TTF_FILEPATH=JPAEXG_TTF_FILEPATH, # JPAEXG_TTF_FILEPATH = "/code/modules/weko-records-ui/weko_records_ui/fonts/ipaexg00201/ipaexg.ttf", - JPAEXG_TTF_FILEPATH="/../tests/fonts/ipaexg.ttf", + JPAEXG_TTF_FILEPATH="tests/fonts/ipaexg.ttf", # JPAEXM_TTF_FILEPATH=JPAEXM_TTF_FILEPATH, - JPAEXM_TTF_FILEPATH="/../tests/fonts/ipaexm.ttf", + JPAEXM_TTF_FILEPATH="tests/fonts/ipaexm.ttf", URL_OA_POLICY_HEIGHT=URL_OA_POLICY_HEIGHT, HEADER_HEIGHT=HEADER_HEIGHT, TITLE_HEIGHT=TITLE_HEIGHT, @@ -4484,3 +4486,53 @@ def db_rocrate_mapping(db): with db.session.begin_nested(): db.session.add(rocrate_mapping) db.session.commit() + + +@pytest.fixture() +def indices(app, db): + """Create indices.""" + + latest_index = db.session.query( + func.max(Index.position).label("max_position") + ).one() + + index = Index( + id=1234567890, + index_name="index_name", + index_name_english="index_name_english", + display_no=1, + harvest_public_state=True, + image_name="image_name", + public_state=True, + position=latest_index.max_position + 1, + ) + + db.session.add(index) + db.session.commit() + + return [index] + + +@pytest.fixture() +def communities(app, indices, users, db): + """Create communities.""" + user_record = users[0] + user_obj = user_record["obj"] + + community = Community( + id="community_sample", + id_role=user_obj.roles[0].id, + id_user=user_record["id"], + title='Community 1', + description='Community 1 description', + page=1, + curation_policy='curation_policy', + community_header='community_header', + community_footer='community_footer', + last_record_accepted=datetime.now(), + root_node_id=indices[0].id, + ) + + db.session.add(community) + db.session.commit() + return [community] \ No newline at end of file diff --git a/modules/weko-records-ui/tests/data/item_type_form_pdftest.json b/modules/weko-records-ui/tests/data/item_type_form_pdftest.json new file mode 100644 index 0000000000..fac3344467 --- /dev/null +++ b/modules/weko-records-ui/tests/data/item_type_form_pdftest.json @@ -0,0 +1,3630 @@ +[ + { + "key": "pubdate", + "type": "template", + "title": "PubDate", + "format": "yyyy-MM-dd", + "required": true, + "title_i18n": { + "en": "PubDate", + "ja": "公開日" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + { + "add": "New", + "key": "item_1711081249402", + "items": [ + { + "key": "item_1711081249402[].subitem_title_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + }, + { + "key": "item_1711081249402[].subitem_title", + "type": "text", + "title": "タイトル", + "title_i18n": { + "en": "Title", + "ja": "タイトル" + }, + "title_i18n_temp": { + "en": "Title", + "ja": "タイトル" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "Title", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "key": "item_1711081258940", + "type": "fieldset", + "items": [ + { + "key": "item_1711081258940.subitem_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "jpn", + "value": "jpn" + }, + { + "name": "eng", + "value": "eng" + }, + { + "name": "aar", + "value": "aar" + }, + { + "name": "abk", + "value": "abk" + }, + { + "name": "afr", + "value": "afr" + }, + { + "name": "aka", + "value": "aka" + }, + { + "name": "amh", + "value": "amh" + }, + { + "name": "ara", + "value": "ara" + }, + { + "name": "arg", + "value": "arg" + }, + { + "name": "asm", + "value": "asm" + }, + { + "name": "ava", + "value": "ava" + }, + { + "name": "ave", + "value": "ave" + }, + { + "name": "aym", + "value": "aym" + }, + { + "name": "aze", + "value": "aze" + }, + { + "name": "bak", + "value": "bak" + }, + { + "name": "bam", + "value": "bam" + }, + { + "name": "bel", + "value": "bel" + }, + { + "name": "ben", + "value": "ben" + }, + { + "name": "bis", + "value": "bis" + }, + { + "name": "bod", + "value": "bod" + }, + { + "name": "bos", + "value": "bos" + }, + { + "name": "bre", + "value": "bre" + }, + { + "name": "bul", + "value": "bul" + }, + { + "name": "cat", + "value": "cat" + }, + { + "name": "ces", + "value": "ces" + }, + { + "name": "cha", + "value": "cha" + }, + { + "name": "che", + "value": "che" + }, + { + "name": "chu", + "value": "chu" + }, + { + "name": "chv", + "value": "chv" + }, + { + "name": "cor", + "value": "cor" + }, + { + "name": "cos", + "value": "cos" + }, + { + "name": "cre", + "value": "cre" + }, + { + "name": "cym", + "value": "cym" + }, + { + "name": "dan", + "value": "dan" + }, + { + "name": "deu", + "value": "deu" + }, + { + "name": "div", + "value": "div" + }, + { + "name": "dzo", + "value": "dzo" + }, + { + "name": "ell", + "value": "ell" + }, + { + "name": "epo", + "value": "epo" + }, + { + "name": "est", + "value": "est" + }, + { + "name": "eus", + "value": "eus" + }, + { + "name": "ewe", + "value": "ewe" + }, + { + "name": "fao", + "value": "fao" + }, + { + "name": "fas", + "value": "fas" + }, + { + "name": "fij", + "value": "fij" + }, + { + "name": "fin", + "value": "fin" + }, + { + "name": "fra", + "value": "fra" + }, + { + "name": "fry", + "value": "fry" + }, + { + "name": "ful", + "value": "ful" + }, + { + "name": "gla", + "value": "gla" + }, + { + "name": "gle", + "value": "gle" + }, + { + "name": "glg", + "value": "glg" + }, + { + "name": "glv", + "value": "glv" + }, + { + "name": "grn", + "value": "grn" + }, + { + "name": "guj", + "value": "guj" + }, + { + "name": "hat", + "value": "hat" + }, + { + "name": "hau", + "value": "hau" + }, + { + "name": "heb", + "value": "heb" + }, + { + "name": "her", + "value": "her" + }, + { + "name": "hin", + "value": "hin" + }, + { + "name": "hmo", + "value": "hmo" + }, + { + "name": "hrv", + "value": "hrv" + }, + { + "name": "hun", + "value": "hun" + }, + { + "name": "hye", + "value": "hye" + }, + { + "name": "ibo", + "value": "ibo" + }, + { + "name": "ido", + "value": "ido" + }, + { + "name": "iii", + "value": "iii" + }, + { + "name": "iku", + "value": "iku" + }, + { + "name": "ile", + "value": "ile" + }, + { + "name": "ina", + "value": "ina" + }, + { + "name": "ind", + "value": "ind" + }, + { + "name": "ipk", + "value": "ipk" + }, + { + "name": "isl", + "value": "isl" + }, + { + "name": "ita", + "value": "ita" + }, + { + "name": "jav", + "value": "jav" + }, + { + "name": "kal", + "value": "kal" + }, + { + "name": "kan", + "value": "kan" + }, + { + "name": "kas", + "value": "kas" + }, + { + "name": "kat", + "value": "kat" + }, + { + "name": "kau", + "value": "kau" + }, + { + "name": "kaz", + "value": "kaz" + }, + { + "name": "khm", + "value": "khm" + }, + { + "name": "kik", + "value": "kik" + }, + { + "name": "kin", + "value": "kin" + }, + { + "name": "kir", + "value": "kir" + }, + { + "name": "kom", + "value": "kom" + }, + { + "name": "kon", + "value": "kon" + }, + { + "name": "kor", + "value": "kor" + }, + { + "name": "kua", + "value": "kua" + }, + { + "name": "kur", + "value": "kur" + }, + { + "name": "lao", + "value": "lao" + }, + { + "name": "lat", + "value": "lat" + }, + { + "name": "lav", + "value": "lav" + }, + { + "name": "lim", + "value": "lim" + }, + { + "name": "lin", + "value": "lin" + }, + { + "name": "lit", + "value": "lit" + }, + { + "name": "ltz", + "value": "ltz" + }, + { + "name": "lub", + "value": "lub" + }, + { + "name": "lug", + "value": "lug" + }, + { + "name": "mah", + "value": "mah" + }, + { + "name": "mal", + "value": "mal" + }, + { + "name": "mar", + "value": "mar" + }, + { + "name": "mkd", + "value": "mkd" + }, + { + "name": "mlg", + "value": "mlg" + }, + { + "name": "mlt", + "value": "mlt" + }, + { + "name": "mon", + "value": "mon" + }, + { + "name": "mri", + "value": "mri" + }, + { + "name": "msa", + "value": "msa" + }, + { + "name": "mya", + "value": "mya" + }, + { + "name": "nau", + "value": "nau" + }, + { + "name": "nav", + "value": "nav" + }, + { + "name": "nbl", + "value": "nbl" + }, + { + "name": "nde", + "value": "nde" + }, + { + "name": "ndo", + "value": "ndo" + }, + { + "name": "nep", + "value": "nep" + }, + { + "name": "nld", + "value": "nld" + }, + { + "name": "nno", + "value": "nno" + }, + { + "name": "nob", + "value": "nob" + }, + { + "name": "nor", + "value": "nor" + }, + { + "name": "nya", + "value": "nya" + }, + { + "name": "oci", + "value": "oci" + }, + { + "name": "oji", + "value": "oji" + }, + { + "name": "ori", + "value": "ori" + }, + { + "name": "orm", + "value": "orm" + }, + { + "name": "oss", + "value": "oss" + }, + { + "name": "pan", + "value": "pan" + }, + { + "name": "pli", + "value": "pli" + }, + { + "name": "pol", + "value": "pol" + }, + { + "name": "por", + "value": "por" + }, + { + "name": "pus", + "value": "pus" + }, + { + "name": "que", + "value": "que" + }, + { + "name": "roh", + "value": "roh" + }, + { + "name": "ron", + "value": "ron" + }, + { + "name": "run", + "value": "run" + }, + { + "name": "rus", + "value": "rus" + }, + { + "name": "sag", + "value": "sag" + }, + { + "name": "san", + "value": "san" + }, + { + "name": "sin", + "value": "sin" + }, + { + "name": "slk", + "value": "slk" + }, + { + "name": "slv", + "value": "slv" + }, + { + "name": "sme", + "value": "sme" + }, + { + "name": "smo", + "value": "smo" + }, + { + "name": "sna", + "value": "sna" + }, + { + "name": "snd", + "value": "snd" + }, + { + "name": "som", + "value": "som" + }, + { + "name": "sot", + "value": "sot" + }, + { + "name": "spa", + "value": "spa" + }, + { + "name": "sqi", + "value": "sqi" + }, + { + "name": "srd", + "value": "srd" + }, + { + "name": "srp", + "value": "srp" + }, + { + "name": "ssw", + "value": "ssw" + }, + { + "name": "sun", + "value": "sun" + }, + { + "name": "swa", + "value": "swa" + }, + { + "name": "swe", + "value": "swe" + }, + { + "name": "tah", + "value": "tah" + }, + { + "name": "tam", + "value": "tam" + }, + { + "name": "tat", + "value": "tat" + }, + { + "name": "tel", + "value": "tel" + }, + { + "name": "tgk", + "value": "tgk" + }, + { + "name": "tgl", + "value": "tgl" + }, + { + "name": "tha", + "value": "tha" + }, + { + "name": "tir", + "value": "tir" + }, + { + "name": "ton", + "value": "ton" + }, + { + "name": "tsn", + "value": "tsn" + }, + { + "name": "tso", + "value": "tso" + }, + { + "name": "tuk", + "value": "tuk" + }, + { + "name": "tur", + "value": "tur" + }, + { + "name": "twi", + "value": "twi" + }, + { + "name": "uig", + "value": "uig" + }, + { + "name": "ukr", + "value": "ukr" + }, + { + "name": "urd", + "value": "urd" + }, + { + "name": "uzb", + "value": "uzb" + }, + { + "name": "ven", + "value": "ven" + }, + { + "name": "vie", + "value": "vie" + }, + { + "name": "vol", + "value": "vol" + }, + { + "name": "wln", + "value": "wln" + }, + { + "name": "wol", + "value": "wol" + }, + { + "name": "xho", + "value": "xho" + }, + { + "name": "yid", + "value": "yid" + }, + { + "name": "yor", + "value": "yor" + }, + { + "name": "zha", + "value": "zha" + }, + { + "name": "zho", + "value": "zho" + }, + { + "name": "zul", + "value": "zul" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "title": "language01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711083729173", + "items": [ + { + "key": "item_1711083729173[].subitem_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "jpn", + "value": "jpn" + }, + { + "name": "eng", + "value": "eng" + }, + { + "name": "aar", + "value": "aar" + }, + { + "name": "abk", + "value": "abk" + }, + { + "name": "afr", + "value": "afr" + }, + { + "name": "aka", + "value": "aka" + }, + { + "name": "amh", + "value": "amh" + }, + { + "name": "ara", + "value": "ara" + }, + { + "name": "arg", + "value": "arg" + }, + { + "name": "asm", + "value": "asm" + }, + { + "name": "ava", + "value": "ava" + }, + { + "name": "ave", + "value": "ave" + }, + { + "name": "aym", + "value": "aym" + }, + { + "name": "aze", + "value": "aze" + }, + { + "name": "bak", + "value": "bak" + }, + { + "name": "bam", + "value": "bam" + }, + { + "name": "bel", + "value": "bel" + }, + { + "name": "ben", + "value": "ben" + }, + { + "name": "bis", + "value": "bis" + }, + { + "name": "bod", + "value": "bod" + }, + { + "name": "bos", + "value": "bos" + }, + { + "name": "bre", + "value": "bre" + }, + { + "name": "bul", + "value": "bul" + }, + { + "name": "cat", + "value": "cat" + }, + { + "name": "ces", + "value": "ces" + }, + { + "name": "cha", + "value": "cha" + }, + { + "name": "che", + "value": "che" + }, + { + "name": "chu", + "value": "chu" + }, + { + "name": "chv", + "value": "chv" + }, + { + "name": "cor", + "value": "cor" + }, + { + "name": "cos", + "value": "cos" + }, + { + "name": "cre", + "value": "cre" + }, + { + "name": "cym", + "value": "cym" + }, + { + "name": "dan", + "value": "dan" + }, + { + "name": "deu", + "value": "deu" + }, + { + "name": "div", + "value": "div" + }, + { + "name": "dzo", + "value": "dzo" + }, + { + "name": "ell", + "value": "ell" + }, + { + "name": "epo", + "value": "epo" + }, + { + "name": "est", + "value": "est" + }, + { + "name": "eus", + "value": "eus" + }, + { + "name": "ewe", + "value": "ewe" + }, + { + "name": "fao", + "value": "fao" + }, + { + "name": "fas", + "value": "fas" + }, + { + "name": "fij", + "value": "fij" + }, + { + "name": "fin", + "value": "fin" + }, + { + "name": "fra", + "value": "fra" + }, + { + "name": "fry", + "value": "fry" + }, + { + "name": "ful", + "value": "ful" + }, + { + "name": "gla", + "value": "gla" + }, + { + "name": "gle", + "value": "gle" + }, + { + "name": "glg", + "value": "glg" + }, + { + "name": "glv", + "value": "glv" + }, + { + "name": "grn", + "value": "grn" + }, + { + "name": "guj", + "value": "guj" + }, + { + "name": "hat", + "value": "hat" + }, + { + "name": "hau", + "value": "hau" + }, + { + "name": "heb", + "value": "heb" + }, + { + "name": "her", + "value": "her" + }, + { + "name": "hin", + "value": "hin" + }, + { + "name": "hmo", + "value": "hmo" + }, + { + "name": "hrv", + "value": "hrv" + }, + { + "name": "hun", + "value": "hun" + }, + { + "name": "hye", + "value": "hye" + }, + { + "name": "ibo", + "value": "ibo" + }, + { + "name": "ido", + "value": "ido" + }, + { + "name": "iii", + "value": "iii" + }, + { + "name": "iku", + "value": "iku" + }, + { + "name": "ile", + "value": "ile" + }, + { + "name": "ina", + "value": "ina" + }, + { + "name": "ind", + "value": "ind" + }, + { + "name": "ipk", + "value": "ipk" + }, + { + "name": "isl", + "value": "isl" + }, + { + "name": "ita", + "value": "ita" + }, + { + "name": "jav", + "value": "jav" + }, + { + "name": "kal", + "value": "kal" + }, + { + "name": "kan", + "value": "kan" + }, + { + "name": "kas", + "value": "kas" + }, + { + "name": "kat", + "value": "kat" + }, + { + "name": "kau", + "value": "kau" + }, + { + "name": "kaz", + "value": "kaz" + }, + { + "name": "khm", + "value": "khm" + }, + { + "name": "kik", + "value": "kik" + }, + { + "name": "kin", + "value": "kin" + }, + { + "name": "kir", + "value": "kir" + }, + { + "name": "kom", + "value": "kom" + }, + { + "name": "kon", + "value": "kon" + }, + { + "name": "kor", + "value": "kor" + }, + { + "name": "kua", + "value": "kua" + }, + { + "name": "kur", + "value": "kur" + }, + { + "name": "lao", + "value": "lao" + }, + { + "name": "lat", + "value": "lat" + }, + { + "name": "lav", + "value": "lav" + }, + { + "name": "lim", + "value": "lim" + }, + { + "name": "lin", + "value": "lin" + }, + { + "name": "lit", + "value": "lit" + }, + { + "name": "ltz", + "value": "ltz" + }, + { + "name": "lub", + "value": "lub" + }, + { + "name": "lug", + "value": "lug" + }, + { + "name": "mah", + "value": "mah" + }, + { + "name": "mal", + "value": "mal" + }, + { + "name": "mar", + "value": "mar" + }, + { + "name": "mkd", + "value": "mkd" + }, + { + "name": "mlg", + "value": "mlg" + }, + { + "name": "mlt", + "value": "mlt" + }, + { + "name": "mon", + "value": "mon" + }, + { + "name": "mri", + "value": "mri" + }, + { + "name": "msa", + "value": "msa" + }, + { + "name": "mya", + "value": "mya" + }, + { + "name": "nau", + "value": "nau" + }, + { + "name": "nav", + "value": "nav" + }, + { + "name": "nbl", + "value": "nbl" + }, + { + "name": "nde", + "value": "nde" + }, + { + "name": "ndo", + "value": "ndo" + }, + { + "name": "nep", + "value": "nep" + }, + { + "name": "nld", + "value": "nld" + }, + { + "name": "nno", + "value": "nno" + }, + { + "name": "nob", + "value": "nob" + }, + { + "name": "nor", + "value": "nor" + }, + { + "name": "nya", + "value": "nya" + }, + { + "name": "oci", + "value": "oci" + }, + { + "name": "oji", + "value": "oji" + }, + { + "name": "ori", + "value": "ori" + }, + { + "name": "orm", + "value": "orm" + }, + { + "name": "oss", + "value": "oss" + }, + { + "name": "pan", + "value": "pan" + }, + { + "name": "pli", + "value": "pli" + }, + { + "name": "pol", + "value": "pol" + }, + { + "name": "por", + "value": "por" + }, + { + "name": "pus", + "value": "pus" + }, + { + "name": "que", + "value": "que" + }, + { + "name": "roh", + "value": "roh" + }, + { + "name": "ron", + "value": "ron" + }, + { + "name": "run", + "value": "run" + }, + { + "name": "rus", + "value": "rus" + }, + { + "name": "sag", + "value": "sag" + }, + { + "name": "san", + "value": "san" + }, + { + "name": "sin", + "value": "sin" + }, + { + "name": "slk", + "value": "slk" + }, + { + "name": "slv", + "value": "slv" + }, + { + "name": "sme", + "value": "sme" + }, + { + "name": "smo", + "value": "smo" + }, + { + "name": "sna", + "value": "sna" + }, + { + "name": "snd", + "value": "snd" + }, + { + "name": "som", + "value": "som" + }, + { + "name": "sot", + "value": "sot" + }, + { + "name": "spa", + "value": "spa" + }, + { + "name": "sqi", + "value": "sqi" + }, + { + "name": "srd", + "value": "srd" + }, + { + "name": "srp", + "value": "srp" + }, + { + "name": "ssw", + "value": "ssw" + }, + { + "name": "sun", + "value": "sun" + }, + { + "name": "swa", + "value": "swa" + }, + { + "name": "swe", + "value": "swe" + }, + { + "name": "tah", + "value": "tah" + }, + { + "name": "tam", + "value": "tam" + }, + { + "name": "tat", + "value": "tat" + }, + { + "name": "tel", + "value": "tel" + }, + { + "name": "tgk", + "value": "tgk" + }, + { + "name": "tgl", + "value": "tgl" + }, + { + "name": "tha", + "value": "tha" + }, + { + "name": "tir", + "value": "tir" + }, + { + "name": "ton", + "value": "ton" + }, + { + "name": "tsn", + "value": "tsn" + }, + { + "name": "tso", + "value": "tso" + }, + { + "name": "tuk", + "value": "tuk" + }, + { + "name": "tur", + "value": "tur" + }, + { + "name": "twi", + "value": "twi" + }, + { + "name": "uig", + "value": "uig" + }, + { + "name": "ukr", + "value": "ukr" + }, + { + "name": "urd", + "value": "urd" + }, + { + "name": "uzb", + "value": "uzb" + }, + { + "name": "ven", + "value": "ven" + }, + { + "name": "vie", + "value": "vie" + }, + { + "name": "vol", + "value": "vol" + }, + { + "name": "wln", + "value": "wln" + }, + { + "name": "wol", + "value": "wol" + }, + { + "name": "xho", + "value": "xho" + }, + { + "name": "yid", + "value": "yid" + }, + { + "name": "yor", + "value": "yor" + }, + { + "name": "zha", + "value": "zha" + }, + { + "name": "zho", + "value": "zho" + }, + { + "name": "zul", + "value": "zul" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "language02", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711081274859", + "items": [ + { + "key": "item_1711081274859[].subitem_publisher_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + }, + { + "key": "item_1711081274859[].subitem_publisher", + "type": "text", + "title": "出版者", + "title_i18n": { + "en": "Publisher", + "ja": "出版者" + }, + "title_i18n_temp": { + "en": "Publisher", + "ja": "出版者" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "publisher01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711081333893", + "items": [ + { + "key": "item_1711081333893[].subitem_subject_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + }, + { + "key": "item_1711081333893[].subitem_subject_scheme", + "type": "select", + "title": "主題Scheme", + "titleMap": [ + { + "name": "BSH", + "value": "BSH" + }, + { + "name": "DDC", + "value": "DDC" + }, + { + "name": "LCC", + "value": "LCC" + }, + { + "name": "LCSH", + "value": "LCSH" + }, + { + "name": "MeSH", + "value": "MeSH" + }, + { + "name": "NDC", + "value": "NDC" + }, + { + "name": "NDLC", + "value": "NDLC" + }, + { + "name": "NDLSH", + "value": "NDLSH" + }, + { + "name": "SciVal", + "value": "SciVal" + }, + { + "name": "UDC", + "value": "UDC" + }, + { + "name": "Other", + "value": "Other" + } + ], + "title_i18n": { + "en": "Subject Scheme", + "ja": "主題Scheme" + }, + "title_i18n_temp": { + "en": "Subject Scheme", + "ja": "主題Scheme" + } + }, + { + "key": "item_1711081333893[].subitem_subject_uri", + "type": "text", + "title": "主題URI", + "title_i18n": { + "en": "Subject URI", + "ja": "主題URI" + }, + "title_i18n_temp": { + "en": "Subject URI", + "ja": "主題URI" + } + }, + { + "key": "item_1711081333893[].subitem_subject", + "type": "text", + "title": "主題", + "title_i18n": { + "en": "Subject", + "ja": "主題" + }, + "title_i18n_temp": { + "en": "Subject", + "ja": "主題" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "subject01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711081408726", + "items": [ + { + "add": "New", + "key": "item_1711081408726[].nameIdentifiers", + "items": [ + { + "key": "item_1711081408726[].nameIdentifiers[].nameIdentifierScheme", + "type": "select", + "title": "作成者識別子Scheme", + "titleMap": [], + "title_i18n": { + "en": "Creator Name Identifier Scheme", + "ja": "作成者識別子Scheme" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier Scheme", + "ja": "作成者識別子Scheme" + } + }, + { + "key": "item_1711081408726[].nameIdentifiers[].nameIdentifierURI", + "type": "text", + "title": "作成者識別子URI", + "title_i18n": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + } + }, + { + "key": "item_1711081408726[].nameIdentifiers[].nameIdentifier", + "type": "text", + "title": "作成者識別子", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者識別子", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorNames", + "items": [ + { + "key": "item_1711081408726[].creatorNames[].creatorName", + "type": "text", + "title": "姓名", + "title_i18n": { + "en": "Name", + "ja": "姓名" + }, + "title_i18n_temp": { + "en": "Name", + "ja": "姓名" + } + }, + { + "key": "item_1711081408726[].creatorNames[].creatorNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者姓名", + "title_i18n": { + "en": "Creator Name", + "ja": "作成者姓名" + }, + "title_i18n_temp": { + "en": "Creator Name", + "ja": "作成者姓名" + } + }, + { + "add": "New", + "key": "item_1711081408726[].familyNames", + "items": [ + { + "key": "item_1711081408726[].familyNames[].familyName", + "type": "text", + "title": "姓", + "title_i18n": { + "en": "Family Name", + "ja": "姓" + }, + "title_i18n_temp": { + "en": "Family Name", + "ja": "姓" + } + }, + { + "key": "item_1711081408726[].familyNames[].familyNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者姓", + "title_i18n": { + "en": "Creator Family Name", + "ja": "作成者姓" + }, + "title_i18n_temp": { + "en": "Creator Family Name", + "ja": "作成者姓" + } + }, + { + "add": "New", + "key": "item_1711081408726[].givenNames", + "items": [ + { + "key": "item_1711081408726[].givenNames[].givenName", + "type": "text", + "title": "名", + "title_i18n": { + "en": "Given Name", + "ja": "名" + }, + "title_i18n_temp": { + "en": "Given Name", + "ja": "名" + } + }, + { + "key": "item_1711081408726[].givenNames[].givenNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者名", + "title_i18n": { + "en": "Creator Given Name", + "ja": "作成者名" + }, + "title_i18n_temp": { + "en": "Creator Given Name", + "ja": "作成者名" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorAlternatives", + "items": [ + { + "key": "item_1711081408726[].creatorAlternatives[].creatorAlternative", + "type": "text", + "title": "別名", + "title_i18n": { + "en": "Alternative Name", + "ja": "別名" + }, + "title_i18n_temp": { + "en": "Alternative Name", + "ja": "別名" + } + }, + { + "key": "item_1711081408726[].creatorAlternatives[].creatorAlternativeLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者別名", + "title_i18n": { + "en": "Creator Alternative Name", + "ja": "作成者別名" + }, + "title_i18n_temp": { + "en": "Creator Alternative Name", + "ja": "作成者別名" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorAffiliations", + "items": [ + { + "add": "New", + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers", + "items": [ + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers[].affiliationNameIdentifier", + "type": "text", + "title": "所属機関識別子", + "title_i18n": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + } + }, + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers[].affiliationNameIdentifierScheme", + "type": "select", + "title": "所属機関識別子Scheme", + "titleMap": [ + { + "name": "kakenhi", + "value": "kakenhi" + }, + { + "name": "ISNI", + "value": "ISNI" + }, + { + "name": "Ringgold", + "value": "Ringgold" + }, + { + "name": "GRID", + "value": "GRID" + } + ], + "title_i18n": { + "en": "Affiliation Name Identifier Scheme", + "ja": "所属機関識別子Scheme" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifier Scheme", + "ja": "所属機関識別子Scheme" + } + }, + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers[].affiliationNameIdentifierURI", + "type": "text", + "title": "所属機関識別子URI", + "title_i18n": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "所属機関識別子", + "title_i18n": { + "en": "Affiliation Name Identifiers", + "ja": "所属機関識別子" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifiers", + "ja": "所属機関識別子" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorAffiliations[].affiliationNames", + "items": [ + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNames[].affiliationName", + "type": "text", + "title": "所属機関名", + "title_i18n": { + "en": "Affiliation Name", + "ja": "所属機関名" + }, + "title_i18n_temp": { + "en": "Affiliation Name", + "ja": "所属機関名" + } + }, + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNames[].affiliationNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "所属機関名", + "title_i18n": { + "en": "Affiliation Names", + "ja": "所属機関名" + }, + "title_i18n_temp": { + "en": "Affiliation Names", + "ja": "所属機関名" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者所属", + "title_i18n": { + "en": "Affiliation", + "ja": "作成者所属" + }, + "title_i18n_temp": { + "en": "Affiliation", + "ja": "作成者所属" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorMails", + "items": [ + { + "key": "item_1711081408726[].creatorMails[].creatorMail", + "type": "text", + "title": "メールアドレス", + "title_i18n": { + "en": "Email Address", + "ja": "メールアドレス" + }, + "title_i18n_temp": { + "en": "Email Address", + "ja": "メールアドレス" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者メールアドレス", + "title_i18n": { + "en": "Creator Email Address", + "ja": "作成者メールアドレス" + }, + "title_i18n_temp": { + "en": "Creator Email Address", + "ja": "作成者メールアドレス" + } + }, + { + "key": "item_1711081408726[].authorInputButton", + "icon": "glyphicon glyphicon-search", + "type": "button", + "style": "btn-default pull-right m-top-5", + "title": "著者DBから入力", + "onClick": "searchAuthor('item_1711081408726', true, form)", + "title_i18n": { + "en": "Enter from DB", + "ja": "著者DBから入力" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "creator01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "key": "item_1711083182141", + "type": "fieldset", + "items": [ + { + "key": "item_1711083182141.resourceuri", + "type": "text", + "title": "資源タイプ識別子", + "readonly": true, + "title_i18n": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + }, + "title_i18n_temp": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + } + }, + { + "key": "item_1711083182141.resourcetype", + "type": "select", + "title": "資源タイプ ", + "onChange": "resourceTypeSelect()", + "titleMap": [ + { + "name": "conference paper", + "value": "conference paper" + }, + { + "name": "data paper", + "value": "data paper" + }, + { + "name": "departmental bulletin paper", + "value": "departmental bulletin paper" + }, + { + "name": "editorial", + "value": "editorial" + }, + { + "name": "journal article", + "value": "journal article" + }, + { + "name": "newspaper", + "value": "newspaper" + }, + { + "name": "periodical", + "value": "periodical" + }, + { + "name": "review article", + "value": "review article" + }, + { + "name": "software paper", + "value": "software paper" + }, + { + "name": "article", + "value": "article" + }, + { + "name": "book", + "value": "book" + }, + { + "name": "book part", + "value": "book part" + }, + { + "name": "cartographic material", + "value": "cartographic material" + }, + { + "name": "map", + "value": "map" + }, + { + "name": "conference object", + "value": "conference object" + }, + { + "name": "conference proceedings", + "value": "conference proceedings" + }, + { + "name": "conference poster", + "value": "conference poster" + }, + { + "name": "aggregated data", + "value": "aggregated data" + }, + { + "name": "clinical trial data", + "value": "clinical trial data" + }, + { + "name": "compiled data", + "value": "compiled data" + }, + { + "name": "encoded data", + "value": "encoded data" + }, + { + "name": "experimental data", + "value": "experimental data" + }, + { + "name": "genomic data", + "value": "genomic data" + }, + { + "name": "geospatial data", + "value": "geospatial data" + }, + { + "name": "laboratory notebook", + "value": "laboratory notebook" + }, + { + "name": "measurement and test data", + "value": "measurement and test data" + }, + { + "name": "observational data", + "value": "observational data" + }, + { + "name": "recorded data", + "value": "recorded data" + }, + { + "name": "simulation data", + "value": "simulation data" + }, + { + "name": "survey data", + "value": "survey data" + }, + { + "name": "dataset", + "value": "dataset" + }, + { + "name": "interview", + "value": "interview" + }, + { + "name": "image", + "value": "image" + }, + { + "name": "still image", + "value": "still image" + }, + { + "name": "moving image", + "value": "moving image" + }, + { + "name": "video", + "value": "video" + }, + { + "name": "lecture", + "value": "lecture" + }, + { + "name": "patent", + "value": "patent" + }, + { + "name": "internal report", + "value": "internal report" + }, + { + "name": "report", + "value": "report" + }, + { + "name": "research report", + "value": "research report" + }, + { + "name": "technical report", + "value": "technical report" + }, + { + "name": "policy report", + "value": "policy report" + }, + { + "name": "report part", + "value": "report part" + }, + { + "name": "working paper", + "value": "working paper" + }, + { + "name": "data management plan", + "value": "data management plan" + }, + { + "name": "sound", + "value": "sound" + }, + { + "name": "thesis", + "value": "thesis" + }, + { + "name": "bachelor thesis", + "value": "bachelor thesis" + }, + { + "name": "master thesis", + "value": "master thesis" + }, + { + "name": "doctoral thesis", + "value": "doctoral thesis" + }, + { + "name": "interactive resource", + "value": "interactive resource" + }, + { + "name": "learning object", + "value": "learning object" + }, + { + "name": "manuscript", + "value": "manuscript" + }, + { + "name": "musical notation", + "value": "musical notation" + }, + { + "name": "research proposal", + "value": "research proposal" + }, + { + "name": "software", + "value": "software" + }, + { + "name": "technical documentation", + "value": "technical documentation" + }, + { + "name": "workflow", + "value": "workflow" + }, + { + "name": "other", + "value": "other" + } + ], + "title_i18n": { + "en": "Resource Type", + "ja": "資源タイプ " + }, + "title_i18n_temp": { + "en": "Resource Type", + "ja": "資源タイプ " + } + } + ], + "title": "資源タイプ", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711083273218", + "items": [ + { + "key": "item_1711083273218[].filename", + "type": "template", + "title": "表示名", + "onChange": "fileNameSelect(this, form, modelValue)", + "titleMap": [], + "title_i18n": { + "en": "FileName", + "ja": "表示名" + }, + "templateUrl": "/static/templates/weko_deposit/datalist.html", + "fieldHtmlClass": "file-name", + "title_i18n_temp": { + "en": "FileName", + "ja": "表示名" + } + }, + { + "key": "item_1711083273218[].url", + "type": "fieldset", + "items": [ + { + "key": "item_1711083273218[].url.url", + "type": "text", + "title": "本文URL", + "feedback": false, + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + }, + "fieldHtmlClass": "file-text-url", + "title_i18n_temp": { + "en": "Text URL", + "ja": "本文URL" + }, + "disableSuccessState": true + }, + { + "key": "item_1711083273218[].url.label", + "type": "text", + "title": "ラベル", + "feedback": false, + "title_i18n": { + "en": "Label", + "ja": "ラベル" + }, + "title_i18n_temp": { + "en": "Label", + "ja": "ラベル" + }, + "disableSuccessState": true + }, + { + "key": "item_1711083273218[].url.objectType", + "type": "select", + "title": "オブジェクトタイプ", + "feedback": false, + "titleMap": [ + { + "name": "abstract", + "value": "abstract" + }, + { + "name": "summary", + "value": "summary" + }, + { + "name": "fulltext", + "value": "fulltext" + }, + { + "name": "thumbnail", + "value": "thumbnail" + }, + { + "name": "other", + "value": "other" + } + ], + "title_i18n": { + "en": "Object Type", + "ja": "オブジェクトタイプ" + }, + "title_i18n_temp": { + "en": "Object Type", + "ja": "オブジェクトタイプ" + }, + "disableSuccessState": true + } + ], + "title": "本文URL", + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + }, + "title_i18n_temp": { + "en": "Text URL", + "ja": "本文URL" + } + }, + { + "key": "item_1711083273218[].format", + "type": "text", + "title": "フォーマット", + "title_i18n": { + "en": "Format", + "ja": "フォーマット" + }, + "title_i18n_temp": { + "en": "Format", + "ja": "フォーマット" + } + }, + { + "add": "New", + "key": "item_1711083273218[].filesize", + "items": [ + { + "key": "item_1711083273218[].filesize[].value", + "type": "text", + "title": "サイズ", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + }, + "title_i18n_temp": { + "en": "Size", + "ja": "サイズ" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "サイズ", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + }, + "title_i18n_temp": { + "en": "Size", + "ja": "サイズ" + } + }, + { + "add": "New", + "key": "item_1711083273218[].fileDate", + "items": [ + { + "key": "item_1711083273218[].fileDate[].fileDateType", + "type": "select", + "title": "日付タイプ", + "titleMap": [ + { + "name": "Accepted", + "value": "Accepted" + }, + { + "name": "Collected", + "value": "Collected" + }, + { + "name": "Copyrighted", + "value": "Copyrighted" + }, + { + "name": "Created", + "value": "Created" + }, + { + "name": "Issued", + "value": "Issued" + }, + { + "name": "Submitted", + "value": "Submitted" + }, + { + "name": "Updated", + "value": "Updated" + }, + { + "name": "Valid", + "value": "Valid" + } + ], + "title_i18n": { + "en": "Date Type", + "ja": "日付タイプ" + }, + "title_i18n_temp": { + "en": "Date Type", + "ja": "日付タイプ" + } + }, + { + "key": "item_1711083273218[].fileDate[].fileDateValue", + "type": "template", + "title": "日付", + "format": "yyyy-MM-dd", + "title_i18n": { + "en": "Date", + "ja": "日付" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker_multi_format.html", + "title_i18n_temp": { + "en": "Date", + "ja": "日付" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "日付", + "title_i18n": { + "en": "Date", + "ja": "日付" + }, + "title_i18n_temp": { + "en": "Date", + "ja": "日付" + } + }, + { + "key": "item_1711083273218[].version", + "type": "text", + "title": "バージョン情報", + "title_i18n": { + "en": "Version Information", + "ja": "バージョン情報" + }, + "title_i18n_temp": { + "en": "Version Information", + "ja": "バージョン情報" + } + }, + { + "key": "item_1711083273218[].displaytype", + "type": "select", + "title": "表示形式", + "titleMap": [ + { + "name": "詳細表示", + "value": "detail", + "name_i18n": { + "en": "Detail", + "ja": "詳細表示" + } + }, + { + "name": "簡易表示", + "value": "simple", + "name_i18n": { + "en": "Simple", + "ja": "簡易表示" + } + }, + { + "name": "プレビュー", + "value": "preview", + "name_i18n": { + "en": "Preview", + "ja": "プレビュー" + } + } + ], + "title_i18n": { + "en": "Preview", + "ja": "表示形式" + }, + "title_i18n_temp": { + "en": "Preview", + "ja": "表示形式" + } + }, + { + "key": "item_1711083273218[].licensetype", + "type": "select", + "title": "ライセンス", + "titleMap": [], + "title_i18n": { + "en": "License", + "ja": "ライセンス" + }, + "title_i18n_temp": { + "en": "License", + "ja": "ライセンス" + } + }, + { + "key": "item_1711083273218[].licensefree", + "type": "textarea", + "notitle": true, + "condition": "model.item_1711083273218[arrayIndex].licensetype == 'license_free'", + "title_i18n": { + "en": "自由ライセンス", + "ja": "自由ライセンス" + } + }, + { + "type": "template", + "title": "剽窃チェック", + "template": "", + "title_i18n": { + "en": "Check Plagiarism", + "ja": "剽窃チェック" + } + }, + { + "key": "item_1711083273218[].accessrole", + "type": "radios", + "title": "アクセス", + "onChange": "accessRoleChange()", + "titleMap": [ + { + "name": "オープンアクセス", + "value": "open_access", + "name_i18n": { + "en": "Open access", + "ja": "オープンアクセス" + } + }, + { + "name": "オープンアクセス日を指定する", + "value": "open_date", + "name_i18n": { + "en": "Input Open Access Date", + "ja": "オープンアクセス日を指定する" + } + }, + { + "name": "ログインユーザのみ", + "value": "open_login", + "name_i18n": { + "en": "Registered User Only", + "ja": "ログインユーザのみ" + } + }, + { + "name": "公開しない", + "value": "open_no", + "name_i18n": { + "en": "Do not Publish", + "ja": "公開しない" + } + } + ], + "title_i18n": { + "en": "Access", + "ja": "アクセス" + }, + "title_i18n_temp": { + "en": "Access", + "ja": "アクセス" + } + }, + { + "key": "item_1711083273218[].date[0].dateValue", + "type": "template", + "title": "公開日", + "format": "yyyy-MM-dd", + "condition": "model.item_1711083273218[arrayIndex].accessrole == 'open_date'", + "title_i18n": { + "en": "Opendate", + "ja": "公開日" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + { + "key": "item_1711083273218[].groups", + "type": "select", + "title": "グループ", + "titleMap": [], + "condition": "model.item_1711083273218[arrayIndex].accessrole == 'open_login'", + "title_i18n": { + "en": "Group", + "ja": "グループ" + }, + "title_i18n_temp": { + "en": "Group", + "ja": "グループ" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "File", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "key": "system_identifier_doi", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_systemidt_identifier", + "type": "text", + "title": "SYSTEMIDT Identifier" + }, + { + "key": "parentkey.subitem_systemidt_identifier_type", + "type": "select", + "title": "SYSTEMIDT Identifier Type", + "titleMap": [ + { + "name": "DOI", + "value": "DOI" + }, + { + "name": "HDL", + "value": "HDL" + }, + { + "name": "URI", + "value": "URI" + } + ] + } + ], + "title": "Persistent Identifier(DOI)", + "title_i18n": { + "en": "Persistent Identifier(DOI)", + "ja": "永続識別子(DOI)" + } + }, + { + "key": "system_identifier_hdl", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_systemidt_identifier", + "type": "text", + "title": "SYSTEMIDT Identifier" + }, + { + "key": "parentkey.subitem_systemidt_identifier_type", + "type": "select", + "title": "SYSTEMIDT Identifier Type", + "titleMap": [ + { + "name": "DOI", + "value": "DOI" + }, + { + "name": "HDL", + "value": "HDL" + }, + { + "name": "URI", + "value": "URI" + } + ] + } + ], + "title": "Persistent Identifier(HDL)", + "title_i18n": { + "en": "Persistent Identifier(HDL)", + "ja": "永続識別子(HDL)" + } + }, + { + "key": "system_identifier_uri", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_systemidt_identifier", + "type": "text", + "title": "SYSTEMIDT Identifier" + }, + { + "key": "parentkey.subitem_systemidt_identifier_type", + "type": "select", + "title": "SYSTEMIDT Identifier Type", + "titleMap": [ + { + "name": "DOI", + "value": "DOI" + }, + { + "name": "HDL", + "value": "HDL" + }, + { + "name": "URI", + "value": "URI" + } + ] + } + ], + "title": "Persistent Identifier(URI)", + "title_i18n": { + "en": "Persistent Identifier(URI)", + "ja": "永続識別子(URI)" + } + }, + { + "key": "system_file", + "type": "fieldset", + "items": [ + { + "add": "New", + "key": "parentkey.subitem_systemfile_filename", + "items": [ + { + "key": "parentkey.subitem_systemfile_filename[].subitem_systemfile_filename_label", + "type": "text", + "title": "SYSTEMFILE Filename Label" + }, + { + "key": "parentkey.subitem_systemfile_filename[].subitem_systemfile_filename_type", + "type": "select", + "title": "SYSTEMFILE Filename Type", + "titleMap": [ + { + "name": "Abstract", + "value": "Abstract" + }, + { + "name": "Fulltext", + "value": "Fulltext" + }, + { + "name": "Summary", + "value": "Summary" + }, + { + "name": "Thumbnail", + "value": "Thumbnail" + }, + { + "name": "Other", + "value": "Other" + } + ] + }, + { + "key": "parentkey.subitem_systemfile_filename[].subitem_systemfile_filename_uri", + "type": "text", + "title": "SYSTEMFILE Filename URI" + } + ], + "style": { + "add": "btn-success" + }, + "title": "SYSTEMFILE Filename" + }, + { + "key": "parentkey.subitem_systemfile_mimetype", + "type": "text", + "title": "SYSTEMFILE MimeType" + }, + { + "key": "parentkey.subitem_systemfile_size", + "type": "text", + "title": "SYSTEMFILE Size" + }, + { + "add": "New", + "key": "parentkey.subitem_systemfile_datetime", + "items": [ + { + "key": "parentkey.subitem_systemfile_datetime[].subitem_systemfile_datetime_date", + "type": "template", + "title": "SYSTEMFILE DateTime Date", + "format": "yyyy-MM-dd", + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + { + "key": "parentkey.subitem_systemfile_datetime[].subitem_systemfile_datetime_type", + "type": "select", + "title": "SYSTEMFILE DateTime Type", + "titleMap": [ + { + "name": "Accepted", + "value": "Accepted" + }, + { + "name": "Available", + "value": "Available" + }, + { + "name": "Collected", + "value": "Collected" + }, + { + "name": "Copyrighted", + "value": "Copyrighted" + }, + { + "name": "Created", + "value": "Created" + }, + { + "name": "Issued", + "value": "Issued" + }, + { + "name": "Submitted", + "value": "Submitted" + }, + { + "name": "Updated", + "value": "Updated" + }, + { + "name": "Valid", + "value": "Valid" + } + ] + } + ], + "style": { + "add": "btn-success" + }, + "title": "SYSTEMFILE DateTime" + }, + { + "key": "parentkey.subitem_systemfile_version", + "type": "text", + "title": "SYSTEMFILE Version" + } + ], + "title": "File Information", + "title_i18n": { + "en": "File Information", + "ja": "ファイル情報" + } + } +] \ No newline at end of file diff --git a/modules/weko-records-ui/tests/data/item_type_mapping_pdftest.json b/modules/weko-records-ui/tests/data/item_type_mapping_pdftest.json new file mode 100644 index 0000000000..291ea12351 --- /dev/null +++ b/modules/weko-records-ui/tests/data/item_type_mapping_pdftest.json @@ -0,0 +1,337 @@ +{ + "pubdate": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": "", + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_file": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "system_file": { + "URI": { + "@value": "subitem_systemfile_filename_uri", + "@attributes": { + "label": "subitem_systemfile_filename_label", + "objectType": "subitem_systemfile_filename_type" + } + }, + "date": { + "@value": "subitem_systemfile_datetime_date", + "@attributes": { + "dateType": "subitem_systemfile_datetime_type" + } + }, + "extent": { + "@value": "subitem_systemfile_size" + }, + "version": { + "@value": "subitem_systemfile_version" + }, + "mimeType": { + "@value": "subitem_systemfile_mimetype" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "item_1711081249402": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "title": { + "@value": "subitem_title", + "@attributes": { + "xml:lang": "subitem_title_language" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "language": { + "@value": "subitem_language" + } + } + }, + "item_1711081258940": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "language": { + "@value": "subitem_language" + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "language": { + "@value": "subitem_language" + } + } + }, + "item_1711081274859": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "publisher": { + "@value": "subitem_publisher", + "@attributes":{ + "xml:lang":"subitem_publisher_language" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "subject": { + "@value": "subitem_subject" + } + } + }, + "item_1711081333893": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "subject": { + "@value": "subitem_subject", + "@attributes": { + "xml:lang": "subitem_subject_language", + "subjectURI": "subitem_subject_uri", + "subjectScheme": "subitem_subject_scheme" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "creator": { + "affiliation": { + "affiliationName": { + "@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier" + } + } + } + } + }, + "item_1711081408726": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "creator": { + "affiliation": { + "nameIdentifier": { + "@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", + "@attributes": { + "nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", + "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme" + } + }, + "affiliationName": { + "@value": "creatorAffiliations.affiliationNames.affiliationName", + "@attributes": { + "xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang" + } + } + }, + "creatorName": { + "@value": "creatorNames.creatorName", + "@attributes": { + "xml:lang": "creatorNames.creatorNameLang" + } + }, + "creatorAlternative": { + "@value": "creatorAlternatives.creatorAlternative", + "@attributes": { + "xml:lang": "creatorAlternatives.creatorAlternativeLang" + } + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "creator": { + "affiliation": { + "nameIdentifier": { + "@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", + "@attributes": { + "nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", + "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme" + } + }, + "affiliationName": { + "@value": "creatorAffiliations.affiliationNames.affiliationName", + "@attributes": { + "xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang" + } + } + }, + "creatorName": { + "@value": "creatorNames.creatorName", + "@attributes": { + "xml:lang": "creatorNames.creatorNameLang" + } + } + } + } + }, + "item_1711083182141": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "type": { + "@value": "resourcetype", + "@attributes": { + "rdf:resource": "resourceuri" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "type": { + "@value": "resourcetype", + "@attributes": { + "rdf:resource": "resourceuri" + } + } + } + }, + "item_1711083273218": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "file": { + "URI": { + "@value": "url.url", + "@attributes": { + "label": "url.label", + "objectType": "url.objectType" + } + }, + "date": { + "@value": "fileDate.fileDateValue", + "@attributes": { + "dateType": "fileDate.fileDateType" + } + }, + "extent": { + "@value": "filesize.value" + }, + "version": { + "@value": "version" + }, + "mimeType": { + "@value": "format" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "file": { + "URI": { + "@value": "url.url", + "@attributes": { + "label": "url.label", + "objectType": "url.objectType" + } + }, + "date": { + "@value": "fileDate.fileDateValue", + "@attributes": { + "dateType": "fileDate.fileDateType" + } + }, + "extent": { + "@value": "filesize.value" + }, + "version": { + "@value": "version" + }, + "mimeType": { + "@value": "format" + } + } + } + }, + "item_1711083729173": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": "", + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_identifier_doi": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "identifier": { + "@value": "subitem_systemidt_identifier", + "@attributes": { + "identifierType": "subitem_systemidt_identifier_type" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_identifier_hdl": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "identifier": { + "@value": "subitem_systemidt_identifier", + "@attributes": { + "identifierType": "subitem_systemidt_identifier_type" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_identifier_uri": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "identifier": { + "@value": "subitem_systemidt_identifier", + "@attributes": { + "identifierType": "subitem_systemidt_identifier_type" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + } +} \ No newline at end of file diff --git a/modules/weko-records-ui/tests/data/item_type_render_pdftest.json b/modules/weko-records-ui/tests/data/item_type_render_pdftest.json new file mode 100644 index 0000000000..424c583bc3 --- /dev/null +++ b/modules/weko-records-ui/tests/data/item_type_render_pdftest.json @@ -0,0 +1,8155 @@ +{ + "meta_fix": { + "pubdate": { + "title": "PubDate", + "option": { + "crtf": false, + "hidden": false, + "multiple": false, + "required": true, + "showlist": false + }, + "input_type": "datetime", + "title_i18n": { + "en": "PubDate", + "ja": "公開日" + }, + "input_value": "" + } + }, + "meta_list": { + "item_1711081249402": { + "title": "Title", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": true, + "required": false, + "showlist": false + }, + "input_type": "cus_1001", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711081258940": { + "title": "language01", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": false, + "required": false, + "showlist": false + }, + "input_type": "cus_1003", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711081274859": { + "title": "publisher01", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": true, + "required": false, + "showlist": false + }, + "input_type": "cus_1011", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711081333893": { + "title": "subject01", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": true, + "required": false, + "showlist": false + }, + "input_type": "cus_1009", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711081408726": { + "title": "creator01", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": true, + "required": false, + "showlist": false + }, + "input_type": "cus_1038", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711083182141": { + "title": "資源タイプ", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": false, + "required": false, + "showlist": false + }, + "input_type": "cus_1014", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711083273218": { + "title": "File", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": true, + "required": false, + "showlist": false + }, + "input_type": "cus_65", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_1711083729173": { + "title": "language02", + "option": { + "crtf": false, + "hidden": false, + "oneline": false, + "multiple": true, + "required": false, + "showlist": false + }, + "input_type": "cus_1003", + "title_i18n": { + "en": "", + "ja": "" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + } + }, + "table_row": [ + "item_1711081249402", + "item_1711081258940", + "item_1711083729173", + "item_1711081274859", + "item_1711081333893", + "item_1711081408726", + "item_1711083182141", + "item_1711083273218" + ], + "edit_notes": { + "item_1711081249402": "", + "item_1711081258940": "", + "item_1711081274859": "", + "item_1711081333893": "", + "item_1711081408726": "", + "item_1711083182141": "", + "item_1711083273218": "", + "item_1711083729173": "" + }, + "meta_system": { + "system_file": { + "title": "File Information", + "option": { + "crtf": false, + "hidden": true, + "oneline": false, + "multiple": false, + "required": false, + "showlist": false + }, + "input_type": "cus_131", + "title_i18n": { + "en": "File Information", + "ja": "ファイル情報" + }, + "input_value": "" + }, + "system_identifier_doi": { + "title": "Persistent Identifier(DOI)", + "option": { + "crtf": false, + "hidden": true, + "oneline": false, + "multiple": false, + "required": false, + "showlist": false + }, + "input_type": "cus_130", + "title_i18n": { + "en": "Persistent Identifier(DOI)", + "ja": "永続識別子(DOI)" + }, + "input_value": "" + }, + "system_identifier_hdl": { + "title": "Persistent Identifier(HDL)", + "option": { + "crtf": false, + "hidden": true, + "oneline": false, + "multiple": false, + "required": false, + "showlist": false + }, + "input_type": "cus_130", + "title_i18n": { + "en": "Persistent Identifier(HDL)", + "ja": "永続識別子(HDL)" + }, + "input_value": "" + }, + "system_identifier_uri": { + "title": "Persistent Identifier(URI)", + "option": { + "crtf": false, + "hidden": true, + "oneline": false, + "multiple": false, + "required": false, + "showlist": false + }, + "input_type": "cus_130", + "title_i18n": { + "en": "Persistent Identifier(URI)", + "ja": "永続識別子(URI)" + }, + "input_value": "" + } + }, + "upload_file": false, + "schemaeditor": { + "schema": { + "item_1711081249402": { + "type": "object", + "format": "object", + "properties": { + "subitem_title": { + "type": "string", + "title": "タイトル", + "format": "text", + "title_i18n": { + "en": "Title", + "ja": "タイトル" + } + }, + "subitem_title_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "item_1711081258940": { + "type": "object", + "format": "object", + "properties": { + "subitem_language": { + "enum": [ + null, + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ] + } + } + }, + "item_1711081274859": { + "type": "object", + "format": "object", + "properties": { + "subitem_publisher": { + "type": "string", + "title": "出版者", + "format": "text", + "title_i18n": { + "en": "Publisher", + "ja": "出版者" + } + }, + "subitem_publisher_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "item_1711081333893": { + "type": "object", + "format": "object", + "properties": { + "subitem_subject": { + "type": "string", + "title": "主題", + "format": "text", + "title_i18n": { + "en": "Subject", + "ja": "主題" + } + }, + "subitem_subject_uri": { + "type": "string", + "title": "主題URI", + "format": "text", + "title_i18n": { + "en": "Subject URI", + "ja": "主題URI" + } + }, + "subitem_subject_scheme": { + "enum": [ + null, + "BSH", + "DDC", + "LCC", + "LCSH", + "MeSH", + "NDC", + "NDLC", + "NDLSH", + "SciVal", + "UDC", + "Other" + ], + "type": [ + "null", + "string" + ], + "title": "主題Scheme", + "format": "select", + "currentEnum": [ + "BSH", + "DDC", + "LCC", + "LCSH", + "MeSH", + "NDC", + "NDLC", + "NDLSH", + "SciVal", + "UDC", + "Other" + ] + }, + "subitem_subject_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "item_1711081408726": { + "type": "object", + "format": "object", + "properties": { + "iscreator": { + "type": "string", + "title": "iscreator", + "format": "text", + "title_i18n": { + "en": "", + "ja": "" + } + }, + "givenNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "givenName": { + "type": "string", + "title": "名", + "format": "text", + "title_i18n": { + "en": "Given Name", + "ja": "名" + } + }, + "givenNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者名", + "format": "array" + }, + "familyNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "familyName": { + "type": "string", + "title": "姓", + "format": "text", + "title_i18n": { + "en": "Family Name", + "ja": "姓" + } + }, + "familyNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者姓", + "format": "array" + }, + "creatorMails": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorMail": { + "type": "string", + "title": "メールアドレス", + "format": "text", + "title_i18n": { + "en": "Email Address", + "ja": "メールアドレス" + } + } + } + }, + "title": "作成者メールアドレス", + "format": "array" + }, + "creatorNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorName": { + "type": "string", + "title": "姓名", + "format": "text", + "title_i18n": { + "en": "Name", + "ja": "姓名" + } + }, + "creatorNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者姓名", + "format": "array" + }, + "nameIdentifiers": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "nameIdentifier": { + "type": "string", + "title": "作成者識別子", + "format": "text", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + }, + "nameIdentifierURI": { + "type": "string", + "title": "作成者識別子URI", + "format": "text", + "title_i18n": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + } + }, + "nameIdentifierScheme": { + "enum": [], + "type": [ + "null", + "string" + ], + "title": "作成者識別子Scheme", + "format": "select", + "currentEnum": [] + } + } + }, + "title": "作成者識別子", + "format": "array" + }, + "creatorAffiliations": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationName": { + "type": "string", + "title": "所属機関名", + "format": "text", + "title_i18n": { + "en": "Affiliation Name", + "ja": "所属機関名" + } + }, + "affiliationNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "所属機関名", + "format": "array" + }, + "affiliationNameIdentifiers": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationNameIdentifier": { + "type": "string", + "title": "所属機関識別子", + "format": "text", + "title_i18n": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + } + }, + "affiliationNameIdentifierURI": { + "type": "string", + "title": "所属機関識別子URI", + "format": "text", + "title_i18n": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + } + }, + "affiliationNameIdentifierScheme": { + "enum": [ + null, + "kakenhi", + "ISNI", + "Ringgold", + "GRID" + ], + "type": [ + "null", + "string" + ], + "title": "所属機関識別子Scheme", + "format": "select", + "currentEnum": [ + "kakenhi", + "ISNI", + "Ringgold", + "GRID" + ] + } + } + }, + "title": "所属機関識別子", + "format": "array" + } + } + }, + "title": "作成者所属", + "format": "array" + }, + "creatorAlternatives": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorAlternative": { + "type": "string", + "title": "別名", + "format": "text", + "title_i18n": { + "en": "Alternative Name", + "ja": "別名" + } + }, + "creatorAlternativeLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者別名", + "format": "array" + } + } + }, + "item_1711083182141": { + "type": "object", + "format": "object", + "properties": { + "resourceuri": { + "type": "string", + "title": "資源タイプ識別子", + "format": "text", + "title_i18n": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + } + }, + "resourcetype": { + "enum": [ + null, + "conference paper", + "data paper", + "departmental bulletin paper", + "editorial", + "journal article", + "newspaper", + "periodical", + "review article", + "software paper", + "article", + "book", + "book part", + "cartographic material", + "map", + "conference object", + "conference proceedings", + "conference poster", + "aggregated data", + "clinical trial data", + "compiled data", + "encoded data", + "experimental data", + "genomic data", + "geospatial data", + "laboratory notebook", + "measurement and test data", + "observational data", + "recorded data", + "simulation data", + "survey data", + "dataset", + "interview", + "image", + "still image", + "moving image", + "video", + "lecture", + "patent", + "internal report", + "report", + "research report", + "technical report", + "policy report", + "report part", + "working paper", + "data management plan", + "sound", + "thesis", + "bachelor thesis", + "master thesis", + "doctoral thesis", + "interactive resource", + "learning object", + "manuscript", + "musical notation", + "research proposal", + "software", + "technical documentation", + "workflow", + "other" + ], + "type": [ + "null", + "string" + ], + "title": "資源タイプ", + "format": "select", + "currentEnum": [ + "conference paper", + "data paper", + "departmental bulletin paper", + "editorial", + "journal article", + "newspaper", + "periodical", + "review article", + "software paper", + "article", + "book", + "book part", + "cartographic material", + "map", + "conference object", + "conference proceedings", + "conference poster", + "aggregated data", + "clinical trial data", + "compiled data", + "encoded data", + "experimental data", + "genomic data", + "geospatial data", + "laboratory notebook", + "measurement and test data", + "observational data", + "recorded data", + "simulation data", + "survey data", + "dataset", + "interview", + "image", + "still image", + "moving image", + "video", + "lecture", + "patent", + "internal report", + "report", + "research report", + "technical report", + "policy report", + "report part", + "working paper", + "data management plan", + "sound", + "thesis", + "bachelor thesis", + "master thesis", + "doctoral thesis", + "interactive resource", + "learning object", + "manuscript", + "musical notation", + "research proposal", + "software", + "technical documentation", + "workflow", + "other" + ] + } + } + }, + "item_1711083273218": { + "type": "object", + "format": "object", + "properties": { + "url": { + "type": "object", + "title": "本文URL", + "format": "object", + "properties": { + "url": { + "type": "string", + "title": "本文URL", + "format": "text", + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + } + }, + "label": { + "type": "string", + "title": "ラベル", + "format": "text", + "title_i18n": { + "en": "Label", + "ja": "ラベル" + } + }, + "objectType": { + "enum": [ + null, + "abstract", + "summary", + "fulltext", + "thumbnail", + "other" + ], + "type": [ + "null", + "string" + ], + "title": "オブジェクトタイプ", + "format": "select", + "currentEnum": [ + "abstract", + "summary", + "fulltext", + "thumbnail", + "other" + ] + } + } + }, + "date": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "dateType": { + "enum": [], + "type": [ + "null", + "string" + ], + "title": "日付タイプ", + "format": "select", + "currentEnum": [] + }, + "dateValue": { + "type": "string", + "title": "日付", + "format": "datetime", + "title_i18n": { + "en": "", + "ja": "" + } + } + } + }, + "title": "オープンアクセスの日付", + "format": "array" + }, + "format": { + "type": "string", + "title": "フォーマット", + "format": "text", + "title_i18n": { + "en": "Format", + "ja": "フォーマット" + } + }, + "groups": { + "enum": [], + "type": [ + "null", + "string" + ], + "title": "グループ", + "format": "select", + "currentEnum": [] + }, + "version": { + "type": "string", + "title": "バージョン情報", + "format": "text", + "title_i18n": { + "en": "Version Information", + "ja": "バージョン情報" + } + }, + "fileDate": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "fileDateType": { + "enum": [ + null, + "Accepted", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ], + "type": [ + "null", + "string" + ], + "title": "日付タイプ", + "format": "select", + "currentEnum": [ + "Accepted", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ] + }, + "fileDateValue": { + "type": "string", + "title": "日付", + "format": "datetime", + "title_i18n": { + "en": "Date", + "ja": "日付" + } + } + } + }, + "title": "日付", + "format": "array" + }, + "filename": { + "type": "string", + "title": "表示名", + "format": "text", + "title_i18n": { + "en": "FileName", + "ja": "表示名" + } + }, + "filesize": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "value": { + "type": "string", + "title": "サイズ", + "format": "text", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + } + } + } + }, + "title": "サイズ", + "format": "array" + }, + "accessrole": { + "enum": [ + "open_access", + "open_date", + "open_login", + "open_no" + ], + "type": [ + "null", + "string" + ], + "title": "アクセス", + "format": "radios" + }, + "displaytype": { + "enum": [ + null, + "detail", + "simple", + "preview" + ], + "type": [ + "null", + "string" + ], + "title": "表示形式", + "format": "select", + "currentEnum": [ + "detail", + "simple", + "preview" + ] + }, + "licensefree": { + "type": "string", + "title": "自由ライセンス", + "format": "textarea", + "title_i18n": { + "en": "自由ライセンス", + "ja": "自由ライセンス" + } + }, + "licensetype": { + "enum": [], + "type": [ + "null", + "string" + ], + "title": "ライセンス", + "format": "select", + "currentEnum": [] + } + } + }, + "item_1711083729173": { + "type": "object", + "format": "object", + "properties": { + "subitem_language": { + "enum": [ + null, + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ] + } + } + } + } + }, + "table_row_map": { + "form": [ + { + "key": "pubdate", + "type": "template", + "title": "PubDate", + "format": "yyyy-MM-dd", + "required": true, + "title_i18n": { + "en": "PubDate", + "ja": "公開日" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + { + "add": "New", + "key": "item_1711081249402", + "items": [ + { + "key": "item_1711081249402[].subitem_title_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + }, + { + "key": "item_1711081249402[].subitem_title", + "type": "text", + "title": "タイトル", + "title_i18n": { + "en": "Title", + "ja": "タイトル" + }, + "title_i18n_temp": { + "en": "Title", + "ja": "タイトル" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "Title", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "key": "item_1711081258940", + "type": "fieldset", + "items": [ + { + "key": "item_1711081258940.subitem_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "jpn", + "value": "jpn" + }, + { + "name": "eng", + "value": "eng" + }, + { + "name": "aar", + "value": "aar" + }, + { + "name": "abk", + "value": "abk" + }, + { + "name": "afr", + "value": "afr" + }, + { + "name": "aka", + "value": "aka" + }, + { + "name": "amh", + "value": "amh" + }, + { + "name": "ara", + "value": "ara" + }, + { + "name": "arg", + "value": "arg" + }, + { + "name": "asm", + "value": "asm" + }, + { + "name": "ava", + "value": "ava" + }, + { + "name": "ave", + "value": "ave" + }, + { + "name": "aym", + "value": "aym" + }, + { + "name": "aze", + "value": "aze" + }, + { + "name": "bak", + "value": "bak" + }, + { + "name": "bam", + "value": "bam" + }, + { + "name": "bel", + "value": "bel" + }, + { + "name": "ben", + "value": "ben" + }, + { + "name": "bis", + "value": "bis" + }, + { + "name": "bod", + "value": "bod" + }, + { + "name": "bos", + "value": "bos" + }, + { + "name": "bre", + "value": "bre" + }, + { + "name": "bul", + "value": "bul" + }, + { + "name": "cat", + "value": "cat" + }, + { + "name": "ces", + "value": "ces" + }, + { + "name": "cha", + "value": "cha" + }, + { + "name": "che", + "value": "che" + }, + { + "name": "chu", + "value": "chu" + }, + { + "name": "chv", + "value": "chv" + }, + { + "name": "cor", + "value": "cor" + }, + { + "name": "cos", + "value": "cos" + }, + { + "name": "cre", + "value": "cre" + }, + { + "name": "cym", + "value": "cym" + }, + { + "name": "dan", + "value": "dan" + }, + { + "name": "deu", + "value": "deu" + }, + { + "name": "div", + "value": "div" + }, + { + "name": "dzo", + "value": "dzo" + }, + { + "name": "ell", + "value": "ell" + }, + { + "name": "epo", + "value": "epo" + }, + { + "name": "est", + "value": "est" + }, + { + "name": "eus", + "value": "eus" + }, + { + "name": "ewe", + "value": "ewe" + }, + { + "name": "fao", + "value": "fao" + }, + { + "name": "fas", + "value": "fas" + }, + { + "name": "fij", + "value": "fij" + }, + { + "name": "fin", + "value": "fin" + }, + { + "name": "fra", + "value": "fra" + }, + { + "name": "fry", + "value": "fry" + }, + { + "name": "ful", + "value": "ful" + }, + { + "name": "gla", + "value": "gla" + }, + { + "name": "gle", + "value": "gle" + }, + { + "name": "glg", + "value": "glg" + }, + { + "name": "glv", + "value": "glv" + }, + { + "name": "grn", + "value": "grn" + }, + { + "name": "guj", + "value": "guj" + }, + { + "name": "hat", + "value": "hat" + }, + { + "name": "hau", + "value": "hau" + }, + { + "name": "heb", + "value": "heb" + }, + { + "name": "her", + "value": "her" + }, + { + "name": "hin", + "value": "hin" + }, + { + "name": "hmo", + "value": "hmo" + }, + { + "name": "hrv", + "value": "hrv" + }, + { + "name": "hun", + "value": "hun" + }, + { + "name": "hye", + "value": "hye" + }, + { + "name": "ibo", + "value": "ibo" + }, + { + "name": "ido", + "value": "ido" + }, + { + "name": "iii", + "value": "iii" + }, + { + "name": "iku", + "value": "iku" + }, + { + "name": "ile", + "value": "ile" + }, + { + "name": "ina", + "value": "ina" + }, + { + "name": "ind", + "value": "ind" + }, + { + "name": "ipk", + "value": "ipk" + }, + { + "name": "isl", + "value": "isl" + }, + { + "name": "ita", + "value": "ita" + }, + { + "name": "jav", + "value": "jav" + }, + { + "name": "kal", + "value": "kal" + }, + { + "name": "kan", + "value": "kan" + }, + { + "name": "kas", + "value": "kas" + }, + { + "name": "kat", + "value": "kat" + }, + { + "name": "kau", + "value": "kau" + }, + { + "name": "kaz", + "value": "kaz" + }, + { + "name": "khm", + "value": "khm" + }, + { + "name": "kik", + "value": "kik" + }, + { + "name": "kin", + "value": "kin" + }, + { + "name": "kir", + "value": "kir" + }, + { + "name": "kom", + "value": "kom" + }, + { + "name": "kon", + "value": "kon" + }, + { + "name": "kor", + "value": "kor" + }, + { + "name": "kua", + "value": "kua" + }, + { + "name": "kur", + "value": "kur" + }, + { + "name": "lao", + "value": "lao" + }, + { + "name": "lat", + "value": "lat" + }, + { + "name": "lav", + "value": "lav" + }, + { + "name": "lim", + "value": "lim" + }, + { + "name": "lin", + "value": "lin" + }, + { + "name": "lit", + "value": "lit" + }, + { + "name": "ltz", + "value": "ltz" + }, + { + "name": "lub", + "value": "lub" + }, + { + "name": "lug", + "value": "lug" + }, + { + "name": "mah", + "value": "mah" + }, + { + "name": "mal", + "value": "mal" + }, + { + "name": "mar", + "value": "mar" + }, + { + "name": "mkd", + "value": "mkd" + }, + { + "name": "mlg", + "value": "mlg" + }, + { + "name": "mlt", + "value": "mlt" + }, + { + "name": "mon", + "value": "mon" + }, + { + "name": "mri", + "value": "mri" + }, + { + "name": "msa", + "value": "msa" + }, + { + "name": "mya", + "value": "mya" + }, + { + "name": "nau", + "value": "nau" + }, + { + "name": "nav", + "value": "nav" + }, + { + "name": "nbl", + "value": "nbl" + }, + { + "name": "nde", + "value": "nde" + }, + { + "name": "ndo", + "value": "ndo" + }, + { + "name": "nep", + "value": "nep" + }, + { + "name": "nld", + "value": "nld" + }, + { + "name": "nno", + "value": "nno" + }, + { + "name": "nob", + "value": "nob" + }, + { + "name": "nor", + "value": "nor" + }, + { + "name": "nya", + "value": "nya" + }, + { + "name": "oci", + "value": "oci" + }, + { + "name": "oji", + "value": "oji" + }, + { + "name": "ori", + "value": "ori" + }, + { + "name": "orm", + "value": "orm" + }, + { + "name": "oss", + "value": "oss" + }, + { + "name": "pan", + "value": "pan" + }, + { + "name": "pli", + "value": "pli" + }, + { + "name": "pol", + "value": "pol" + }, + { + "name": "por", + "value": "por" + }, + { + "name": "pus", + "value": "pus" + }, + { + "name": "que", + "value": "que" + }, + { + "name": "roh", + "value": "roh" + }, + { + "name": "ron", + "value": "ron" + }, + { + "name": "run", + "value": "run" + }, + { + "name": "rus", + "value": "rus" + }, + { + "name": "sag", + "value": "sag" + }, + { + "name": "san", + "value": "san" + }, + { + "name": "sin", + "value": "sin" + }, + { + "name": "slk", + "value": "slk" + }, + { + "name": "slv", + "value": "slv" + }, + { + "name": "sme", + "value": "sme" + }, + { + "name": "smo", + "value": "smo" + }, + { + "name": "sna", + "value": "sna" + }, + { + "name": "snd", + "value": "snd" + }, + { + "name": "som", + "value": "som" + }, + { + "name": "sot", + "value": "sot" + }, + { + "name": "spa", + "value": "spa" + }, + { + "name": "sqi", + "value": "sqi" + }, + { + "name": "srd", + "value": "srd" + }, + { + "name": "srp", + "value": "srp" + }, + { + "name": "ssw", + "value": "ssw" + }, + { + "name": "sun", + "value": "sun" + }, + { + "name": "swa", + "value": "swa" + }, + { + "name": "swe", + "value": "swe" + }, + { + "name": "tah", + "value": "tah" + }, + { + "name": "tam", + "value": "tam" + }, + { + "name": "tat", + "value": "tat" + }, + { + "name": "tel", + "value": "tel" + }, + { + "name": "tgk", + "value": "tgk" + }, + { + "name": "tgl", + "value": "tgl" + }, + { + "name": "tha", + "value": "tha" + }, + { + "name": "tir", + "value": "tir" + }, + { + "name": "ton", + "value": "ton" + }, + { + "name": "tsn", + "value": "tsn" + }, + { + "name": "tso", + "value": "tso" + }, + { + "name": "tuk", + "value": "tuk" + }, + { + "name": "tur", + "value": "tur" + }, + { + "name": "twi", + "value": "twi" + }, + { + "name": "uig", + "value": "uig" + }, + { + "name": "ukr", + "value": "ukr" + }, + { + "name": "urd", + "value": "urd" + }, + { + "name": "uzb", + "value": "uzb" + }, + { + "name": "ven", + "value": "ven" + }, + { + "name": "vie", + "value": "vie" + }, + { + "name": "vol", + "value": "vol" + }, + { + "name": "wln", + "value": "wln" + }, + { + "name": "wol", + "value": "wol" + }, + { + "name": "xho", + "value": "xho" + }, + { + "name": "yid", + "value": "yid" + }, + { + "name": "yor", + "value": "yor" + }, + { + "name": "zha", + "value": "zha" + }, + { + "name": "zho", + "value": "zho" + }, + { + "name": "zul", + "value": "zul" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "title": "language01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711083729173", + "items": [ + { + "key": "item_1711083729173[].subitem_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "jpn", + "value": "jpn" + }, + { + "name": "eng", + "value": "eng" + }, + { + "name": "aar", + "value": "aar" + }, + { + "name": "abk", + "value": "abk" + }, + { + "name": "afr", + "value": "afr" + }, + { + "name": "aka", + "value": "aka" + }, + { + "name": "amh", + "value": "amh" + }, + { + "name": "ara", + "value": "ara" + }, + { + "name": "arg", + "value": "arg" + }, + { + "name": "asm", + "value": "asm" + }, + { + "name": "ava", + "value": "ava" + }, + { + "name": "ave", + "value": "ave" + }, + { + "name": "aym", + "value": "aym" + }, + { + "name": "aze", + "value": "aze" + }, + { + "name": "bak", + "value": "bak" + }, + { + "name": "bam", + "value": "bam" + }, + { + "name": "bel", + "value": "bel" + }, + { + "name": "ben", + "value": "ben" + }, + { + "name": "bis", + "value": "bis" + }, + { + "name": "bod", + "value": "bod" + }, + { + "name": "bos", + "value": "bos" + }, + { + "name": "bre", + "value": "bre" + }, + { + "name": "bul", + "value": "bul" + }, + { + "name": "cat", + "value": "cat" + }, + { + "name": "ces", + "value": "ces" + }, + { + "name": "cha", + "value": "cha" + }, + { + "name": "che", + "value": "che" + }, + { + "name": "chu", + "value": "chu" + }, + { + "name": "chv", + "value": "chv" + }, + { + "name": "cor", + "value": "cor" + }, + { + "name": "cos", + "value": "cos" + }, + { + "name": "cre", + "value": "cre" + }, + { + "name": "cym", + "value": "cym" + }, + { + "name": "dan", + "value": "dan" + }, + { + "name": "deu", + "value": "deu" + }, + { + "name": "div", + "value": "div" + }, + { + "name": "dzo", + "value": "dzo" + }, + { + "name": "ell", + "value": "ell" + }, + { + "name": "epo", + "value": "epo" + }, + { + "name": "est", + "value": "est" + }, + { + "name": "eus", + "value": "eus" + }, + { + "name": "ewe", + "value": "ewe" + }, + { + "name": "fao", + "value": "fao" + }, + { + "name": "fas", + "value": "fas" + }, + { + "name": "fij", + "value": "fij" + }, + { + "name": "fin", + "value": "fin" + }, + { + "name": "fra", + "value": "fra" + }, + { + "name": "fry", + "value": "fry" + }, + { + "name": "ful", + "value": "ful" + }, + { + "name": "gla", + "value": "gla" + }, + { + "name": "gle", + "value": "gle" + }, + { + "name": "glg", + "value": "glg" + }, + { + "name": "glv", + "value": "glv" + }, + { + "name": "grn", + "value": "grn" + }, + { + "name": "guj", + "value": "guj" + }, + { + "name": "hat", + "value": "hat" + }, + { + "name": "hau", + "value": "hau" + }, + { + "name": "heb", + "value": "heb" + }, + { + "name": "her", + "value": "her" + }, + { + "name": "hin", + "value": "hin" + }, + { + "name": "hmo", + "value": "hmo" + }, + { + "name": "hrv", + "value": "hrv" + }, + { + "name": "hun", + "value": "hun" + }, + { + "name": "hye", + "value": "hye" + }, + { + "name": "ibo", + "value": "ibo" + }, + { + "name": "ido", + "value": "ido" + }, + { + "name": "iii", + "value": "iii" + }, + { + "name": "iku", + "value": "iku" + }, + { + "name": "ile", + "value": "ile" + }, + { + "name": "ina", + "value": "ina" + }, + { + "name": "ind", + "value": "ind" + }, + { + "name": "ipk", + "value": "ipk" + }, + { + "name": "isl", + "value": "isl" + }, + { + "name": "ita", + "value": "ita" + }, + { + "name": "jav", + "value": "jav" + }, + { + "name": "kal", + "value": "kal" + }, + { + "name": "kan", + "value": "kan" + }, + { + "name": "kas", + "value": "kas" + }, + { + "name": "kat", + "value": "kat" + }, + { + "name": "kau", + "value": "kau" + }, + { + "name": "kaz", + "value": "kaz" + }, + { + "name": "khm", + "value": "khm" + }, + { + "name": "kik", + "value": "kik" + }, + { + "name": "kin", + "value": "kin" + }, + { + "name": "kir", + "value": "kir" + }, + { + "name": "kom", + "value": "kom" + }, + { + "name": "kon", + "value": "kon" + }, + { + "name": "kor", + "value": "kor" + }, + { + "name": "kua", + "value": "kua" + }, + { + "name": "kur", + "value": "kur" + }, + { + "name": "lao", + "value": "lao" + }, + { + "name": "lat", + "value": "lat" + }, + { + "name": "lav", + "value": "lav" + }, + { + "name": "lim", + "value": "lim" + }, + { + "name": "lin", + "value": "lin" + }, + { + "name": "lit", + "value": "lit" + }, + { + "name": "ltz", + "value": "ltz" + }, + { + "name": "lub", + "value": "lub" + }, + { + "name": "lug", + "value": "lug" + }, + { + "name": "mah", + "value": "mah" + }, + { + "name": "mal", + "value": "mal" + }, + { + "name": "mar", + "value": "mar" + }, + { + "name": "mkd", + "value": "mkd" + }, + { + "name": "mlg", + "value": "mlg" + }, + { + "name": "mlt", + "value": "mlt" + }, + { + "name": "mon", + "value": "mon" + }, + { + "name": "mri", + "value": "mri" + }, + { + "name": "msa", + "value": "msa" + }, + { + "name": "mya", + "value": "mya" + }, + { + "name": "nau", + "value": "nau" + }, + { + "name": "nav", + "value": "nav" + }, + { + "name": "nbl", + "value": "nbl" + }, + { + "name": "nde", + "value": "nde" + }, + { + "name": "ndo", + "value": "ndo" + }, + { + "name": "nep", + "value": "nep" + }, + { + "name": "nld", + "value": "nld" + }, + { + "name": "nno", + "value": "nno" + }, + { + "name": "nob", + "value": "nob" + }, + { + "name": "nor", + "value": "nor" + }, + { + "name": "nya", + "value": "nya" + }, + { + "name": "oci", + "value": "oci" + }, + { + "name": "oji", + "value": "oji" + }, + { + "name": "ori", + "value": "ori" + }, + { + "name": "orm", + "value": "orm" + }, + { + "name": "oss", + "value": "oss" + }, + { + "name": "pan", + "value": "pan" + }, + { + "name": "pli", + "value": "pli" + }, + { + "name": "pol", + "value": "pol" + }, + { + "name": "por", + "value": "por" + }, + { + "name": "pus", + "value": "pus" + }, + { + "name": "que", + "value": "que" + }, + { + "name": "roh", + "value": "roh" + }, + { + "name": "ron", + "value": "ron" + }, + { + "name": "run", + "value": "run" + }, + { + "name": "rus", + "value": "rus" + }, + { + "name": "sag", + "value": "sag" + }, + { + "name": "san", + "value": "san" + }, + { + "name": "sin", + "value": "sin" + }, + { + "name": "slk", + "value": "slk" + }, + { + "name": "slv", + "value": "slv" + }, + { + "name": "sme", + "value": "sme" + }, + { + "name": "smo", + "value": "smo" + }, + { + "name": "sna", + "value": "sna" + }, + { + "name": "snd", + "value": "snd" + }, + { + "name": "som", + "value": "som" + }, + { + "name": "sot", + "value": "sot" + }, + { + "name": "spa", + "value": "spa" + }, + { + "name": "sqi", + "value": "sqi" + }, + { + "name": "srd", + "value": "srd" + }, + { + "name": "srp", + "value": "srp" + }, + { + "name": "ssw", + "value": "ssw" + }, + { + "name": "sun", + "value": "sun" + }, + { + "name": "swa", + "value": "swa" + }, + { + "name": "swe", + "value": "swe" + }, + { + "name": "tah", + "value": "tah" + }, + { + "name": "tam", + "value": "tam" + }, + { + "name": "tat", + "value": "tat" + }, + { + "name": "tel", + "value": "tel" + }, + { + "name": "tgk", + "value": "tgk" + }, + { + "name": "tgl", + "value": "tgl" + }, + { + "name": "tha", + "value": "tha" + }, + { + "name": "tir", + "value": "tir" + }, + { + "name": "ton", + "value": "ton" + }, + { + "name": "tsn", + "value": "tsn" + }, + { + "name": "tso", + "value": "tso" + }, + { + "name": "tuk", + "value": "tuk" + }, + { + "name": "tur", + "value": "tur" + }, + { + "name": "twi", + "value": "twi" + }, + { + "name": "uig", + "value": "uig" + }, + { + "name": "ukr", + "value": "ukr" + }, + { + "name": "urd", + "value": "urd" + }, + { + "name": "uzb", + "value": "uzb" + }, + { + "name": "ven", + "value": "ven" + }, + { + "name": "vie", + "value": "vie" + }, + { + "name": "vol", + "value": "vol" + }, + { + "name": "wln", + "value": "wln" + }, + { + "name": "wol", + "value": "wol" + }, + { + "name": "xho", + "value": "xho" + }, + { + "name": "yid", + "value": "yid" + }, + { + "name": "yor", + "value": "yor" + }, + { + "name": "zha", + "value": "zha" + }, + { + "name": "zho", + "value": "zho" + }, + { + "name": "zul", + "value": "zul" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "language02", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711081274859", + "items": [ + { + "key": "item_1711081274859[].subitem_publisher_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + }, + { + "key": "item_1711081274859[].subitem_publisher", + "type": "text", + "title": "出版者", + "title_i18n": { + "en": "Publisher", + "ja": "出版者" + }, + "title_i18n_temp": { + "en": "Publisher", + "ja": "出版者" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "publisher01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711081333893", + "items": [ + { + "key": "item_1711081333893[].subitem_subject_language", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + }, + { + "key": "item_1711081333893[].subitem_subject_scheme", + "type": "select", + "title": "主題Scheme", + "titleMap": [ + { + "name": "BSH", + "value": "BSH" + }, + { + "name": "DDC", + "value": "DDC" + }, + { + "name": "LCC", + "value": "LCC" + }, + { + "name": "LCSH", + "value": "LCSH" + }, + { + "name": "MeSH", + "value": "MeSH" + }, + { + "name": "NDC", + "value": "NDC" + }, + { + "name": "NDLC", + "value": "NDLC" + }, + { + "name": "NDLSH", + "value": "NDLSH" + }, + { + "name": "SciVal", + "value": "SciVal" + }, + { + "name": "UDC", + "value": "UDC" + }, + { + "name": "Other", + "value": "Other" + } + ], + "title_i18n": { + "en": "Subject Scheme", + "ja": "主題Scheme" + }, + "title_i18n_temp": { + "en": "Subject Scheme", + "ja": "主題Scheme" + } + }, + { + "key": "item_1711081333893[].subitem_subject_uri", + "type": "text", + "title": "主題URI", + "title_i18n": { + "en": "Subject URI", + "ja": "主題URI" + }, + "title_i18n_temp": { + "en": "Subject URI", + "ja": "主題URI" + } + }, + { + "key": "item_1711081333893[].subitem_subject", + "type": "text", + "title": "主題", + "title_i18n": { + "en": "Subject", + "ja": "主題" + }, + "title_i18n_temp": { + "en": "Subject", + "ja": "主題" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "subject01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711081408726", + "items": [ + { + "add": "New", + "key": "item_1711081408726[].nameIdentifiers", + "items": [ + { + "key": "item_1711081408726[].nameIdentifiers[].nameIdentifierScheme", + "type": "select", + "title": "作成者識別子Scheme", + "titleMap": [], + "title_i18n": { + "en": "Creator Name Identifier Scheme", + "ja": "作成者識別子Scheme" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier Scheme", + "ja": "作成者識別子Scheme" + } + }, + { + "key": "item_1711081408726[].nameIdentifiers[].nameIdentifierURI", + "type": "text", + "title": "作成者識別子URI", + "title_i18n": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + } + }, + { + "key": "item_1711081408726[].nameIdentifiers[].nameIdentifier", + "type": "text", + "title": "作成者識別子", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者識別子", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + }, + "title_i18n_temp": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorNames", + "items": [ + { + "key": "item_1711081408726[].creatorNames[].creatorName", + "type": "text", + "title": "姓名", + "title_i18n": { + "en": "Name", + "ja": "姓名" + }, + "title_i18n_temp": { + "en": "Name", + "ja": "姓名" + } + }, + { + "key": "item_1711081408726[].creatorNames[].creatorNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者姓名", + "title_i18n": { + "en": "Creator Name", + "ja": "作成者姓名" + }, + "title_i18n_temp": { + "en": "Creator Name", + "ja": "作成者姓名" + } + }, + { + "add": "New", + "key": "item_1711081408726[].familyNames", + "items": [ + { + "key": "item_1711081408726[].familyNames[].familyName", + "type": "text", + "title": "姓", + "title_i18n": { + "en": "Family Name", + "ja": "姓" + }, + "title_i18n_temp": { + "en": "Family Name", + "ja": "姓" + } + }, + { + "key": "item_1711081408726[].familyNames[].familyNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者姓", + "title_i18n": { + "en": "Creator Family Name", + "ja": "作成者姓" + }, + "title_i18n_temp": { + "en": "Creator Family Name", + "ja": "作成者姓" + } + }, + { + "add": "New", + "key": "item_1711081408726[].givenNames", + "items": [ + { + "key": "item_1711081408726[].givenNames[].givenName", + "type": "text", + "title": "名", + "title_i18n": { + "en": "Given Name", + "ja": "名" + }, + "title_i18n_temp": { + "en": "Given Name", + "ja": "名" + } + }, + { + "key": "item_1711081408726[].givenNames[].givenNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者名", + "title_i18n": { + "en": "Creator Given Name", + "ja": "作成者名" + }, + "title_i18n_temp": { + "en": "Creator Given Name", + "ja": "作成者名" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorAlternatives", + "items": [ + { + "key": "item_1711081408726[].creatorAlternatives[].creatorAlternative", + "type": "text", + "title": "別名", + "title_i18n": { + "en": "Alternative Name", + "ja": "別名" + }, + "title_i18n_temp": { + "en": "Alternative Name", + "ja": "別名" + } + }, + { + "key": "item_1711081408726[].creatorAlternatives[].creatorAlternativeLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者別名", + "title_i18n": { + "en": "Creator Alternative Name", + "ja": "作成者別名" + }, + "title_i18n_temp": { + "en": "Creator Alternative Name", + "ja": "作成者別名" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorAffiliations", + "items": [ + { + "add": "New", + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers", + "items": [ + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers[].affiliationNameIdentifier", + "type": "text", + "title": "所属機関識別子", + "title_i18n": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + } + }, + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers[].affiliationNameIdentifierScheme", + "type": "select", + "title": "所属機関識別子Scheme", + "titleMap": [ + { + "name": "kakenhi", + "value": "kakenhi" + }, + { + "name": "ISNI", + "value": "ISNI" + }, + { + "name": "Ringgold", + "value": "Ringgold" + }, + { + "name": "GRID", + "value": "GRID" + } + ], + "title_i18n": { + "en": "Affiliation Name Identifier Scheme", + "ja": "所属機関識別子Scheme" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifier Scheme", + "ja": "所属機関識別子Scheme" + } + }, + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNameIdentifiers[].affiliationNameIdentifierURI", + "type": "text", + "title": "所属機関識別子URI", + "title_i18n": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "所属機関識別子", + "title_i18n": { + "en": "Affiliation Name Identifiers", + "ja": "所属機関識別子" + }, + "title_i18n_temp": { + "en": "Affiliation Name Identifiers", + "ja": "所属機関識別子" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorAffiliations[].affiliationNames", + "items": [ + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNames[].affiliationName", + "type": "text", + "title": "所属機関名", + "title_i18n": { + "en": "Affiliation Name", + "ja": "所属機関名" + }, + "title_i18n_temp": { + "en": "Affiliation Name", + "ja": "所属機関名" + } + }, + { + "key": "item_1711081408726[].creatorAffiliations[].affiliationNames[].affiliationNameLang", + "type": "select", + "title": "言語", + "titleMap": [ + { + "name": "ja", + "value": "ja" + }, + { + "name": "ja-Kana", + "value": "ja-Kana" + }, + { + "name": "ja-Latn", + "value": "ja-Latn" + }, + { + "name": "en", + "value": "en" + }, + { + "name": "fr", + "value": "fr" + }, + { + "name": "it", + "value": "it" + }, + { + "name": "de", + "value": "de" + }, + { + "name": "es", + "value": "es" + }, + { + "name": "zh-cn", + "value": "zh-cn" + }, + { + "name": "zh-tw", + "value": "zh-tw" + }, + { + "name": "ru", + "value": "ru" + }, + { + "name": "la", + "value": "la" + }, + { + "name": "ms", + "value": "ms" + }, + { + "name": "eo", + "value": "eo" + }, + { + "name": "ar", + "value": "ar" + }, + { + "name": "el", + "value": "el" + }, + { + "name": "ko", + "value": "ko" + } + ], + "title_i18n": { + "en": "Language", + "ja": "言語" + }, + "title_i18n_temp": { + "en": "Language", + "ja": "言語" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "所属機関名", + "title_i18n": { + "en": "Affiliation Names", + "ja": "所属機関名" + }, + "title_i18n_temp": { + "en": "Affiliation Names", + "ja": "所属機関名" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者所属", + "title_i18n": { + "en": "Affiliation", + "ja": "作成者所属" + }, + "title_i18n_temp": { + "en": "Affiliation", + "ja": "作成者所属" + } + }, + { + "add": "New", + "key": "item_1711081408726[].creatorMails", + "items": [ + { + "key": "item_1711081408726[].creatorMails[].creatorMail", + "type": "text", + "title": "メールアドレス", + "title_i18n": { + "en": "Email Address", + "ja": "メールアドレス" + }, + "title_i18n_temp": { + "en": "Email Address", + "ja": "メールアドレス" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "作成者メールアドレス", + "title_i18n": { + "en": "Creator Email Address", + "ja": "作成者メールアドレス" + }, + "title_i18n_temp": { + "en": "Creator Email Address", + "ja": "作成者メールアドレス" + } + }, + { + "key": "item_1711081408726[].authorInputButton", + "icon": "glyphicon glyphicon-search", + "type": "button", + "style": "btn-default pull-right m-top-5", + "title": "著者DBから入力", + "onClick": "searchAuthor('item_1711081408726', true, form)", + "title_i18n": { + "en": "Enter from DB", + "ja": "著者DBから入力" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "creator01", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "key": "item_1711083182141", + "type": "fieldset", + "items": [ + { + "key": "item_1711083182141.resourceuri", + "type": "text", + "title": "資源タイプ識別子", + "readonly": true, + "title_i18n": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + }, + "title_i18n_temp": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + } + }, + { + "key": "item_1711083182141.resourcetype", + "type": "select", + "title": "資源タイプ ", + "onChange": "resourceTypeSelect()", + "titleMap": [ + { + "name": "conference paper", + "value": "conference paper" + }, + { + "name": "data paper", + "value": "data paper" + }, + { + "name": "departmental bulletin paper", + "value": "departmental bulletin paper" + }, + { + "name": "editorial", + "value": "editorial" + }, + { + "name": "journal article", + "value": "journal article" + }, + { + "name": "newspaper", + "value": "newspaper" + }, + { + "name": "periodical", + "value": "periodical" + }, + { + "name": "review article", + "value": "review article" + }, + { + "name": "software paper", + "value": "software paper" + }, + { + "name": "article", + "value": "article" + }, + { + "name": "book", + "value": "book" + }, + { + "name": "book part", + "value": "book part" + }, + { + "name": "cartographic material", + "value": "cartographic material" + }, + { + "name": "map", + "value": "map" + }, + { + "name": "conference object", + "value": "conference object" + }, + { + "name": "conference proceedings", + "value": "conference proceedings" + }, + { + "name": "conference poster", + "value": "conference poster" + }, + { + "name": "aggregated data", + "value": "aggregated data" + }, + { + "name": "clinical trial data", + "value": "clinical trial data" + }, + { + "name": "compiled data", + "value": "compiled data" + }, + { + "name": "encoded data", + "value": "encoded data" + }, + { + "name": "experimental data", + "value": "experimental data" + }, + { + "name": "genomic data", + "value": "genomic data" + }, + { + "name": "geospatial data", + "value": "geospatial data" + }, + { + "name": "laboratory notebook", + "value": "laboratory notebook" + }, + { + "name": "measurement and test data", + "value": "measurement and test data" + }, + { + "name": "observational data", + "value": "observational data" + }, + { + "name": "recorded data", + "value": "recorded data" + }, + { + "name": "simulation data", + "value": "simulation data" + }, + { + "name": "survey data", + "value": "survey data" + }, + { + "name": "dataset", + "value": "dataset" + }, + { + "name": "interview", + "value": "interview" + }, + { + "name": "image", + "value": "image" + }, + { + "name": "still image", + "value": "still image" + }, + { + "name": "moving image", + "value": "moving image" + }, + { + "name": "video", + "value": "video" + }, + { + "name": "lecture", + "value": "lecture" + }, + { + "name": "patent", + "value": "patent" + }, + { + "name": "internal report", + "value": "internal report" + }, + { + "name": "report", + "value": "report" + }, + { + "name": "research report", + "value": "research report" + }, + { + "name": "technical report", + "value": "technical report" + }, + { + "name": "policy report", + "value": "policy report" + }, + { + "name": "report part", + "value": "report part" + }, + { + "name": "working paper", + "value": "working paper" + }, + { + "name": "data management plan", + "value": "data management plan" + }, + { + "name": "sound", + "value": "sound" + }, + { + "name": "thesis", + "value": "thesis" + }, + { + "name": "bachelor thesis", + "value": "bachelor thesis" + }, + { + "name": "master thesis", + "value": "master thesis" + }, + { + "name": "doctoral thesis", + "value": "doctoral thesis" + }, + { + "name": "interactive resource", + "value": "interactive resource" + }, + { + "name": "learning object", + "value": "learning object" + }, + { + "name": "manuscript", + "value": "manuscript" + }, + { + "name": "musical notation", + "value": "musical notation" + }, + { + "name": "research proposal", + "value": "research proposal" + }, + { + "name": "software", + "value": "software" + }, + { + "name": "technical documentation", + "value": "technical documentation" + }, + { + "name": "workflow", + "value": "workflow" + }, + { + "name": "other", + "value": "other" + } + ], + "title_i18n": { + "en": "Resource Type", + "ja": "資源タイプ " + }, + "title_i18n_temp": { + "en": "Resource Type", + "ja": "資源タイプ " + } + } + ], + "title": "資源タイプ", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "add": "New", + "key": "item_1711083273218", + "items": [ + { + "key": "item_1711083273218[].filename", + "type": "template", + "title": "表示名", + "onChange": "fileNameSelect(this, form, modelValue)", + "titleMap": [], + "title_i18n": { + "en": "FileName", + "ja": "表示名" + }, + "templateUrl": "/static/templates/weko_deposit/datalist.html", + "fieldHtmlClass": "file-name", + "title_i18n_temp": { + "en": "FileName", + "ja": "表示名" + } + }, + { + "key": "item_1711083273218[].url", + "type": "fieldset", + "items": [ + { + "key": "item_1711083273218[].url.url", + "type": "text", + "title": "本文URL", + "feedback": false, + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + }, + "fieldHtmlClass": "file-text-url", + "title_i18n_temp": { + "en": "Text URL", + "ja": "本文URL" + }, + "disableSuccessState": true + }, + { + "key": "item_1711083273218[].url.label", + "type": "text", + "title": "ラベル", + "feedback": false, + "title_i18n": { + "en": "Label", + "ja": "ラベル" + }, + "title_i18n_temp": { + "en": "Label", + "ja": "ラベル" + }, + "disableSuccessState": true + }, + { + "key": "item_1711083273218[].url.objectType", + "type": "select", + "title": "オブジェクトタイプ", + "feedback": false, + "titleMap": [ + { + "name": "abstract", + "value": "abstract" + }, + { + "name": "summary", + "value": "summary" + }, + { + "name": "fulltext", + "value": "fulltext" + }, + { + "name": "thumbnail", + "value": "thumbnail" + }, + { + "name": "other", + "value": "other" + } + ], + "title_i18n": { + "en": "Object Type", + "ja": "オブジェクトタイプ" + }, + "title_i18n_temp": { + "en": "Object Type", + "ja": "オブジェクトタイプ" + }, + "disableSuccessState": true + } + ], + "title": "本文URL", + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + }, + "title_i18n_temp": { + "en": "Text URL", + "ja": "本文URL" + } + }, + { + "key": "item_1711083273218[].format", + "type": "text", + "title": "フォーマット", + "title_i18n": { + "en": "Format", + "ja": "フォーマット" + }, + "title_i18n_temp": { + "en": "Format", + "ja": "フォーマット" + } + }, + { + "add": "New", + "key": "item_1711083273218[].filesize", + "items": [ + { + "key": "item_1711083273218[].filesize[].value", + "type": "text", + "title": "サイズ", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + }, + "title_i18n_temp": { + "en": "Size", + "ja": "サイズ" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "サイズ", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + }, + "title_i18n_temp": { + "en": "Size", + "ja": "サイズ" + } + }, + { + "add": "New", + "key": "item_1711083273218[].fileDate", + "items": [ + { + "key": "item_1711083273218[].fileDate[].fileDateType", + "type": "select", + "title": "日付タイプ", + "titleMap": [ + { + "name": "Accepted", + "value": "Accepted" + }, + { + "name": "Collected", + "value": "Collected" + }, + { + "name": "Copyrighted", + "value": "Copyrighted" + }, + { + "name": "Created", + "value": "Created" + }, + { + "name": "Issued", + "value": "Issued" + }, + { + "name": "Submitted", + "value": "Submitted" + }, + { + "name": "Updated", + "value": "Updated" + }, + { + "name": "Valid", + "value": "Valid" + } + ], + "title_i18n": { + "en": "Date Type", + "ja": "日付タイプ" + }, + "title_i18n_temp": { + "en": "Date Type", + "ja": "日付タイプ" + } + }, + { + "key": "item_1711083273218[].fileDate[].fileDateValue", + "type": "template", + "title": "日付", + "format": "yyyy-MM-dd", + "title_i18n": { + "en": "Date", + "ja": "日付" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker_multi_format.html", + "title_i18n_temp": { + "en": "Date", + "ja": "日付" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "日付", + "title_i18n": { + "en": "Date", + "ja": "日付" + }, + "title_i18n_temp": { + "en": "Date", + "ja": "日付" + } + }, + { + "key": "item_1711083273218[].version", + "type": "text", + "title": "バージョン情報", + "title_i18n": { + "en": "Version Information", + "ja": "バージョン情報" + }, + "title_i18n_temp": { + "en": "Version Information", + "ja": "バージョン情報" + } + }, + { + "key": "item_1711083273218[].displaytype", + "type": "select", + "title": "表示形式", + "titleMap": [ + { + "name": "詳細表示", + "value": "detail", + "name_i18n": { + "en": "Detail", + "ja": "詳細表示" + } + }, + { + "name": "簡易表示", + "value": "simple", + "name_i18n": { + "en": "Simple", + "ja": "簡易表示" + } + }, + { + "name": "プレビュー", + "value": "preview", + "name_i18n": { + "en": "Preview", + "ja": "プレビュー" + } + } + ], + "title_i18n": { + "en": "Preview", + "ja": "表示形式" + }, + "title_i18n_temp": { + "en": "Preview", + "ja": "表示形式" + } + }, + { + "key": "item_1711083273218[].licensetype", + "type": "select", + "title": "ライセンス", + "titleMap": [], + "title_i18n": { + "en": "License", + "ja": "ライセンス" + }, + "title_i18n_temp": { + "en": "License", + "ja": "ライセンス" + } + }, + { + "key": "item_1711083273218[].licensefree", + "type": "textarea", + "notitle": true, + "condition": "model.item_1711083273218[arrayIndex].licensetype == 'license_free'", + "title_i18n": { + "en": "自由ライセンス", + "ja": "自由ライセンス" + } + }, + { + "type": "template", + "title": "剽窃チェック", + "template": "", + "title_i18n": { + "en": "Check Plagiarism", + "ja": "剽窃チェック" + } + }, + { + "key": "item_1711083273218[].accessrole", + "type": "radios", + "title": "アクセス", + "onChange": "accessRoleChange()", + "titleMap": [ + { + "name": "オープンアクセス", + "value": "open_access", + "name_i18n": { + "en": "Open access", + "ja": "オープンアクセス" + } + }, + { + "name": "オープンアクセス日を指定する", + "value": "open_date", + "name_i18n": { + "en": "Input Open Access Date", + "ja": "オープンアクセス日を指定する" + } + }, + { + "name": "ログインユーザのみ", + "value": "open_login", + "name_i18n": { + "en": "Registered User Only", + "ja": "ログインユーザのみ" + } + }, + { + "name": "公開しない", + "value": "open_no", + "name_i18n": { + "en": "Do not Publish", + "ja": "公開しない" + } + } + ], + "title_i18n": { + "en": "Access", + "ja": "アクセス" + }, + "title_i18n_temp": { + "en": "Access", + "ja": "アクセス" + } + }, + { + "key": "item_1711083273218[].date[0].dateValue", + "type": "template", + "title": "公開日", + "format": "yyyy-MM-dd", + "condition": "model.item_1711083273218[arrayIndex].accessrole == 'open_date'", + "title_i18n": { + "en": "Opendate", + "ja": "公開日" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + { + "key": "item_1711083273218[].groups", + "type": "select", + "title": "グループ", + "titleMap": [], + "condition": "model.item_1711083273218[arrayIndex].accessrole == 'open_login'", + "title_i18n": { + "en": "Group", + "ja": "グループ" + }, + "title_i18n_temp": { + "en": "Group", + "ja": "グループ" + } + } + ], + "style": { + "add": "btn-success" + }, + "title": "File", + "title_i18n": { + "en": "", + "ja": "" + } + }, + { + "key": "system_identifier_doi", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_systemidt_identifier", + "type": "text", + "title": "SYSTEMIDT Identifier" + }, + { + "key": "parentkey.subitem_systemidt_identifier_type", + "type": "select", + "title": "SYSTEMIDT Identifier Type", + "titleMap": [ + { + "name": "DOI", + "value": "DOI" + }, + { + "name": "HDL", + "value": "HDL" + }, + { + "name": "URI", + "value": "URI" + } + ] + } + ], + "title": "Persistent Identifier(DOI)", + "title_i18n": { + "en": "Persistent Identifier(DOI)", + "ja": "永続識別子(DOI)" + } + }, + { + "key": "system_identifier_hdl", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_systemidt_identifier", + "type": "text", + "title": "SYSTEMIDT Identifier" + }, + { + "key": "parentkey.subitem_systemidt_identifier_type", + "type": "select", + "title": "SYSTEMIDT Identifier Type", + "titleMap": [ + { + "name": "DOI", + "value": "DOI" + }, + { + "name": "HDL", + "value": "HDL" + }, + { + "name": "URI", + "value": "URI" + } + ] + } + ], + "title": "Persistent Identifier(HDL)", + "title_i18n": { + "en": "Persistent Identifier(HDL)", + "ja": "永続識別子(HDL)" + } + }, + { + "key": "system_identifier_uri", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_systemidt_identifier", + "type": "text", + "title": "SYSTEMIDT Identifier" + }, + { + "key": "parentkey.subitem_systemidt_identifier_type", + "type": "select", + "title": "SYSTEMIDT Identifier Type", + "titleMap": [ + { + "name": "DOI", + "value": "DOI" + }, + { + "name": "HDL", + "value": "HDL" + }, + { + "name": "URI", + "value": "URI" + } + ] + } + ], + "title": "Persistent Identifier(URI)", + "title_i18n": { + "en": "Persistent Identifier(URI)", + "ja": "永続識別子(URI)" + } + }, + { + "key": "system_file", + "type": "fieldset", + "items": [ + { + "add": "New", + "key": "parentkey.subitem_systemfile_filename", + "items": [ + { + "key": "parentkey.subitem_systemfile_filename[].subitem_systemfile_filename_label", + "type": "text", + "title": "SYSTEMFILE Filename Label" + }, + { + "key": "parentkey.subitem_systemfile_filename[].subitem_systemfile_filename_type", + "type": "select", + "title": "SYSTEMFILE Filename Type", + "titleMap": [ + { + "name": "Abstract", + "value": "Abstract" + }, + { + "name": "Fulltext", + "value": "Fulltext" + }, + { + "name": "Summary", + "value": "Summary" + }, + { + "name": "Thumbnail", + "value": "Thumbnail" + }, + { + "name": "Other", + "value": "Other" + } + ] + }, + { + "key": "parentkey.subitem_systemfile_filename[].subitem_systemfile_filename_uri", + "type": "text", + "title": "SYSTEMFILE Filename URI" + } + ], + "style": { + "add": "btn-success" + }, + "title": "SYSTEMFILE Filename" + }, + { + "key": "parentkey.subitem_systemfile_mimetype", + "type": "text", + "title": "SYSTEMFILE MimeType" + }, + { + "key": "parentkey.subitem_systemfile_size", + "type": "text", + "title": "SYSTEMFILE Size" + }, + { + "add": "New", + "key": "parentkey.subitem_systemfile_datetime", + "items": [ + { + "key": "parentkey.subitem_systemfile_datetime[].subitem_systemfile_datetime_date", + "type": "template", + "title": "SYSTEMFILE DateTime Date", + "format": "yyyy-MM-dd", + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + { + "key": "parentkey.subitem_systemfile_datetime[].subitem_systemfile_datetime_type", + "type": "select", + "title": "SYSTEMFILE DateTime Type", + "titleMap": [ + { + "name": "Accepted", + "value": "Accepted" + }, + { + "name": "Available", + "value": "Available" + }, + { + "name": "Collected", + "value": "Collected" + }, + { + "name": "Copyrighted", + "value": "Copyrighted" + }, + { + "name": "Created", + "value": "Created" + }, + { + "name": "Issued", + "value": "Issued" + }, + { + "name": "Submitted", + "value": "Submitted" + }, + { + "name": "Updated", + "value": "Updated" + }, + { + "name": "Valid", + "value": "Valid" + } + ] + } + ], + "style": { + "add": "btn-success" + }, + "title": "SYSTEMFILE DateTime" + }, + { + "key": "parentkey.subitem_systemfile_version", + "type": "text", + "title": "SYSTEMFILE Version" + } + ], + "title": "File Information", + "title_i18n": { + "en": "File Information", + "ja": "ファイル情報" + } + } + ], + "name": "test_item_type01", + "action": "upt", + "schema": { + "type": "object", + "$schema": "http://json-schema.org/draft-04/schema#", + "required": [ + "pubdate" + ], + "properties": { + "pubdate": { + "type": "string", + "title": "PubDate", + "format": "datetime" + }, + "system_file": { + "type": "object", + "title": "File Information", + "format": "object", + "properties": { + "subitem_systemfile_size": { + "type": "string", + "title": "SYSTEMFILE Size", + "format": "text" + }, + "subitem_systemfile_version": { + "type": "string", + "title": "SYSTEMFILE Version", + "format": "text" + }, + "subitem_systemfile_datetime": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "subitem_systemfile_datetime_date": { + "type": "string", + "title": "SYSTEMFILE DateTime Date", + "format": "datetime" + }, + "subitem_systemfile_datetime_type": { + "enum": [ + "Accepted", + "Available", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ], + "type": "string", + "title": "SYSTEMFILE DateTime Type", + "format": "select" + } + } + }, + "title": "SYSTEMFILE DateTime", + "format": "array" + }, + "subitem_systemfile_filename": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "subitem_systemfile_filename_uri": { + "type": "string", + "title": "SYSTEMFILE Filename URI", + "format": "text" + }, + "subitem_systemfile_filename_type": { + "enum": [ + "Abstract", + "Fulltext", + "Summary", + "Thumbnail", + "Other" + ], + "type": "string", + "title": "SYSTEMFILE Filename Type", + "format": "select" + }, + "subitem_systemfile_filename_label": { + "type": "string", + "title": "SYSTEMFILE Filename Label", + "format": "text" + } + } + }, + "title": "SYSTEMFILE Filename", + "format": "array" + }, + "subitem_systemfile_mimetype": { + "type": "string", + "title": "SYSTEMFILE MimeType", + "format": "text" + } + }, + "system_prop": true + }, + "item_1711081249402": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_title": { + "type": "string", + "title": "タイトル", + "format": "text", + "title_i18n": { + "en": "Title", + "ja": "タイトル" + } + }, + "subitem_title_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "Title", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711081258940": { + "type": "object", + "title": "language01", + "properties": { + "subitem_language": { + "enum": [ + null, + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ] + } + } + }, + "item_1711081274859": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_publisher": { + "type": "string", + "title": "出版者", + "format": "text", + "title_i18n": { + "en": "Publisher", + "ja": "出版者" + } + }, + "subitem_publisher_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "publisher01", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711081333893": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_subject": { + "type": "string", + "title": "主題", + "format": "text", + "title_i18n": { + "en": "Subject", + "ja": "主題" + } + }, + "subitem_subject_uri": { + "type": "string", + "title": "主題URI", + "format": "text", + "title_i18n": { + "en": "Subject URI", + "ja": "主題URI" + } + }, + "subitem_subject_scheme": { + "enum": [ + null, + "BSH", + "DDC", + "LCC", + "LCSH", + "MeSH", + "NDC", + "NDLC", + "NDLSH", + "SciVal", + "UDC", + "Other" + ], + "type": [ + "null", + "string" + ], + "title": "主題Scheme", + "format": "select", + "currentEnum": [ + "BSH", + "DDC", + "LCC", + "LCSH", + "MeSH", + "NDC", + "NDLC", + "NDLSH", + "SciVal", + "UDC", + "Other" + ] + }, + "subitem_subject_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "subject01", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711081408726": { + "type": "array", + "items": { + "type": "object", + "properties": { + "iscreator": { + "type": "string", + "title": "iscreator", + "format": "text", + "title_i18n": { + "en": "", + "ja": "" + } + }, + "givenNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "givenName": { + "type": "string", + "title": "名", + "format": "text", + "title_i18n": { + "en": "Given Name", + "ja": "名" + } + }, + "givenNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者名", + "format": "array" + }, + "familyNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "familyName": { + "type": "string", + "title": "姓", + "format": "text", + "title_i18n": { + "en": "Family Name", + "ja": "姓" + } + }, + "familyNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者姓", + "format": "array" + }, + "creatorMails": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorMail": { + "type": "string", + "title": "メールアドレス", + "format": "text", + "title_i18n": { + "en": "Email Address", + "ja": "メールアドレス" + } + } + } + }, + "title": "作成者メールアドレス", + "format": "array" + }, + "creatorNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorName": { + "type": "string", + "title": "姓名", + "format": "text", + "title_i18n": { + "en": "Name", + "ja": "姓名" + } + }, + "creatorNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者姓名", + "format": "array" + }, + "nameIdentifiers": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "nameIdentifier": { + "type": "string", + "title": "作成者識別子", + "format": "text", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + }, + "nameIdentifierURI": { + "type": "string", + "title": "作成者識別子URI", + "format": "text", + "title_i18n": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + } + }, + "nameIdentifierScheme": { + "type": [ + "null", + "string" + ], + "title": "作成者識別子Scheme", + "format": "select", + "currentEnum": [] + } + } + }, + "title": "作成者識別子", + "format": "array" + }, + "creatorAffiliations": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationName": { + "type": "string", + "title": "所属機関名", + "format": "text", + "title_i18n": { + "en": "Affiliation Name", + "ja": "所属機関名" + } + }, + "affiliationNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "所属機関名", + "format": "array" + }, + "affiliationNameIdentifiers": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationNameIdentifier": { + "type": "string", + "title": "所属機関識別子", + "format": "text", + "title_i18n": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + } + }, + "affiliationNameIdentifierURI": { + "type": "string", + "title": "所属機関識別子URI", + "format": "text", + "title_i18n": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + } + }, + "affiliationNameIdentifierScheme": { + "enum": [ + null, + "kakenhi", + "ISNI", + "Ringgold", + "GRID" + ], + "type": [ + "null", + "string" + ], + "title": "所属機関識別子Scheme", + "format": "select", + "currentEnum": [ + "kakenhi", + "ISNI", + "Ringgold", + "GRID" + ] + } + } + }, + "title": "所属機関識別子", + "format": "array" + } + } + }, + "title": "作成者所属", + "format": "array" + }, + "creatorAlternatives": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorAlternative": { + "type": "string", + "title": "別名", + "format": "text", + "title_i18n": { + "en": "Alternative Name", + "ja": "別名" + } + }, + "creatorAlternativeLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者別名", + "format": "array" + } + } + }, + "title": "creator01", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711083182141": { + "type": "object", + "title": "資源タイプ", + "properties": { + "resourceuri": { + "type": "string", + "title": "資源タイプ識別子", + "format": "text", + "title_i18n": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + } + }, + "resourcetype": { + "enum": [ + null, + "conference paper", + "data paper", + "departmental bulletin paper", + "editorial", + "journal article", + "newspaper", + "periodical", + "review article", + "software paper", + "article", + "book", + "book part", + "cartographic material", + "map", + "conference object", + "conference proceedings", + "conference poster", + "aggregated data", + "clinical trial data", + "compiled data", + "encoded data", + "experimental data", + "genomic data", + "geospatial data", + "laboratory notebook", + "measurement and test data", + "observational data", + "recorded data", + "simulation data", + "survey data", + "dataset", + "interview", + "image", + "still image", + "moving image", + "video", + "lecture", + "patent", + "internal report", + "report", + "research report", + "technical report", + "policy report", + "report part", + "working paper", + "data management plan", + "sound", + "thesis", + "bachelor thesis", + "master thesis", + "doctoral thesis", + "interactive resource", + "learning object", + "manuscript", + "musical notation", + "research proposal", + "software", + "technical documentation", + "workflow", + "other" + ], + "type": [ + "null", + "string" + ], + "title": "資源タイプ", + "format": "select", + "currentEnum": [ + "conference paper", + "data paper", + "departmental bulletin paper", + "editorial", + "journal article", + "newspaper", + "periodical", + "review article", + "software paper", + "article", + "book", + "book part", + "cartographic material", + "map", + "conference object", + "conference proceedings", + "conference poster", + "aggregated data", + "clinical trial data", + "compiled data", + "encoded data", + "experimental data", + "genomic data", + "geospatial data", + "laboratory notebook", + "measurement and test data", + "observational data", + "recorded data", + "simulation data", + "survey data", + "dataset", + "interview", + "image", + "still image", + "moving image", + "video", + "lecture", + "patent", + "internal report", + "report", + "research report", + "technical report", + "policy report", + "report part", + "working paper", + "data management plan", + "sound", + "thesis", + "bachelor thesis", + "master thesis", + "doctoral thesis", + "interactive resource", + "learning object", + "manuscript", + "musical notation", + "research proposal", + "software", + "technical documentation", + "workflow", + "other" + ] + } + } + }, + "item_1711083273218": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "object", + "title": "本文URL", + "format": "object", + "properties": { + "url": { + "type": "string", + "title": "本文URL", + "format": "text", + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + } + }, + "label": { + "type": "string", + "title": "ラベル", + "format": "text", + "title_i18n": { + "en": "Label", + "ja": "ラベル" + } + }, + "objectType": { + "enum": [ + null, + "abstract", + "summary", + "fulltext", + "thumbnail", + "other" + ], + "type": [ + "null", + "string" + ], + "title": "オブジェクトタイプ", + "format": "select", + "currentEnum": [ + "abstract", + "summary", + "fulltext", + "thumbnail", + "other" + ] + } + } + }, + "date": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "dateType": { + "type": [ + "null", + "string" + ], + "title": "日付タイプ", + "format": "select", + "currentEnum": [] + }, + "dateValue": { + "type": "string", + "title": "日付", + "format": "datetime", + "title_i18n": { + "en": "", + "ja": "" + } + } + } + }, + "title": "オープンアクセスの日付", + "format": "array" + }, + "format": { + "type": "string", + "title": "フォーマット", + "format": "text", + "title_i18n": { + "en": "Format", + "ja": "フォーマット" + } + }, + "groups": { + "type": [ + "null", + "string" + ], + "title": "グループ", + "format": "select", + "currentEnum": [] + }, + "version": { + "type": "string", + "title": "バージョン情報", + "format": "text", + "title_i18n": { + "en": "Version Information", + "ja": "バージョン情報" + } + }, + "fileDate": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "fileDateType": { + "enum": [ + null, + "Accepted", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ], + "type": [ + "null", + "string" + ], + "title": "日付タイプ", + "format": "select", + "currentEnum": [ + "Accepted", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ] + }, + "fileDateValue": { + "type": "string", + "title": "日付", + "format": "datetime", + "title_i18n": { + "en": "Date", + "ja": "日付" + } + } + } + }, + "title": "日付", + "format": "array" + }, + "filename": { + "type": "string", + "title": "表示名", + "format": "text", + "title_i18n": { + "en": "FileName", + "ja": "表示名" + } + }, + "filesize": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "value": { + "type": "string", + "title": "サイズ", + "format": "text", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + } + } + } + }, + "title": "サイズ", + "format": "array" + }, + "accessrole": { + "enum": [ + "open_access", + "open_date", + "open_login", + "open_no" + ], + "type": [ + "null", + "string" + ], + "title": "アクセス", + "format": "radios" + }, + "displaytype": { + "enum": [ + null, + "detail", + "simple", + "preview" + ], + "type": [ + "null", + "string" + ], + "title": "表示形式", + "format": "select", + "currentEnum": [ + "detail", + "simple", + "preview" + ] + }, + "licensefree": { + "type": "string", + "title": "自由ライセンス", + "format": "textarea", + "title_i18n": { + "en": "自由ライセンス", + "ja": "自由ライセンス" + } + }, + "licensetype": { + "type": [ + "null", + "string" + ], + "title": "ライセンス", + "format": "select", + "currentEnum": [] + } + } + }, + "title": "File", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711083729173": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_language": { + "enum": [ + null, + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ] + } + } + }, + "title": "language02", + "maxItems": 9999, + "minItems": 1 + }, + "system_identifier_doi": { + "type": "object", + "title": "Persistent Identifier(DOI)", + "format": "object", + "properties": { + "subitem_systemidt_identifier": { + "type": "string", + "title": "SYSTEMIDT Identifier", + "format": "text" + }, + "subitem_systemidt_identifier_type": { + "enum": [ + "DOI", + "HDL", + "URI" + ], + "type": "string", + "title": "SYSTEMIDT Identifier Type", + "format": "select" + } + }, + "system_prop": true + }, + "system_identifier_hdl": { + "type": "object", + "title": "Persistent Identifier(HDL)", + "format": "object", + "properties": { + "subitem_systemidt_identifier": { + "type": "string", + "title": "SYSTEMIDT Identifier", + "format": "text" + }, + "subitem_systemidt_identifier_type": { + "enum": [ + "DOI", + "HDL", + "URI" + ], + "type": "string", + "title": "SYSTEMIDT Identifier Type", + "format": "select" + } + }, + "system_prop": true + }, + "system_identifier_uri": { + "type": "object", + "title": "Persistent Identifier(URI)", + "format": "object", + "properties": { + "subitem_systemidt_identifier": { + "type": "string", + "title": "SYSTEMIDT Identifier", + "format": "text" + }, + "subitem_systemidt_identifier_type": { + "enum": [ + "DOI", + "HDL", + "URI" + ], + "type": "string", + "title": "SYSTEMIDT Identifier Type", + "format": "select" + } + }, + "system_prop": true + } + }, + "description": "" + }, + "mapping": { + "pubdate": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": "", + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_file": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "system_file": { + "URI": { + "@value": "subitem_systemfile_filename_uri", + "@attributes": { + "label": "subitem_systemfile_filename_label", + "objectType": "subitem_systemfile_filename_type" + } + }, + "date": { + "@value": "subitem_systemfile_datetime_date", + "@attributes": { + "dateType": "subitem_systemfile_datetime_type" + } + }, + "extent": { + "@value": "subitem_systemfile_size" + }, + "version": { + "@value": "subitem_systemfile_version" + }, + "mimeType": { + "@value": "subitem_systemfile_mimetype" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "item_1711081249402": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "title": { + "@value": "subitem_title", + "@attributes": { + "xml:lang": "subitem_title_language" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "language": { + "@value": "subitem_language" + } + } + }, + "item_1711081258940": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "language": { + "@value": "subitem_language" + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "language": { + "@value": "subitem_language" + } + } + }, + "item_1711081274859": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "publisher": { + "@value": "subitem_publisher" + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "subject": { + "@value": "subitem_subject" + } + } + }, + "item_1711081333893": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "subject": { + "@value": "subitem_subject", + "@attributes": { + "xml:lang": "subitem_subject_language", + "subjectURI": "subitem_subject_uri", + "subjectScheme": "subitem_subject_scheme" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "creator": { + "affiliation": { + "affiliationName": { + "@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier" + } + } + } + } + }, + "item_1711081408726": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "creator": { + "affiliation": { + "nameIdentifier": { + "@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", + "@attributes": { + "nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", + "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme" + } + }, + "affiliationName": { + "@value": "creatorAffiliations.affiliationNames.affiliationName", + "@attributes": { + "xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang" + } + } + }, + "creatorName": { + "@value": "creatorNames.creatorName", + "@attributes": { + "xml:lang": "creatorNames.creatorNameLang" + } + }, + "creatorAlternative": { + "@value": "creatorAlternatives.creatorAlternative", + "@attributes": { + "xml:lang": "creatorAlternatives.creatorAlternativeLang" + } + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "creator": { + "affiliation": { + "nameIdentifier": { + "@value": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", + "@attributes": { + "nameIdentifierURI": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", + "nameIdentifierScheme": "creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme" + } + }, + "affiliationName": { + "@value": "creatorAffiliations.affiliationNames.affiliationName", + "@attributes": { + "xml:lang": "creatorAffiliations.affiliationNames.affiliationNameLang" + } + } + }, + "creatorName": { + "@value": "creatorNames.creatorName", + "@attributes": { + "xml:lang": "creatorNames.creatorNameLang" + } + } + } + } + }, + "item_1711083182141": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "type": { + "@value": "resourcetype", + "@attributes": { + "rdf:resource": "resourceuri" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "type": { + "@value": "resourcetype", + "@attributes": { + "rdf:resource": "resourceuri" + } + } + } + }, + "item_1711083273218": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "file": { + "URI": { + "@value": "url.url", + "@attributes": { + "label": "url.label", + "objectType": "url.objectType" + } + }, + "date": { + "@value": "fileDate.fileDateValue", + "@attributes": { + "dateType": "fileDate.fileDateType" + } + }, + "extent": { + "@value": "filesize.value" + }, + "version": { + "@value": "version" + }, + "mimeType": { + "@value": "format" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "", + "jpcoar_v1_mapping": { + "file": { + "URI": { + "@value": "url.url", + "@attributes": { + "label": "url.label", + "objectType": "url.objectType" + } + }, + "date": { + "@value": "fileDate.fileDateValue", + "@attributes": { + "dateType": "fileDate.fileDateType" + } + }, + "extent": { + "@value": "filesize.value" + }, + "version": { + "@value": "version" + }, + "mimeType": { + "@value": "format" + } + } + } + }, + "item_1711083729173": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": "", + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_identifier_doi": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "identifier": { + "@value": "subitem_systemidt_identifier", + "@attributes": { + "identifierType": "subitem_systemidt_identifier_type" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_identifier_hdl": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "identifier": { + "@value": "subitem_systemidt_identifier", + "@attributes": { + "identifierType": "subitem_systemidt_identifier_type" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + }, + "system_identifier_uri": { + "lom_mapping": "", + "lido_mapping": "", + "spase_mapping": "", + "jpcoar_mapping": { + "identifier": { + "@value": "subitem_systemidt_identifier", + "@attributes": { + "identifierType": "subitem_systemidt_identifier_type" + } + } + }, + "junii2_mapping": "", + "oai_dc_mapping": "", + "display_lang_type": "" + } + } + } +} \ No newline at end of file diff --git a/modules/weko-records-ui/tests/data/item_type_schema_pdftest.json b/modules/weko-records-ui/tests/data/item_type_schema_pdftest.json new file mode 100644 index 0000000000..eee48b58ed --- /dev/null +++ b/modules/weko-records-ui/tests/data/item_type_schema_pdftest.json @@ -0,0 +1,2058 @@ +{ + "type": "object", + "$schema": "http://json-schema.org/draft-04/schema#", + "required": [ + "pubdate" + ], + "properties": { + "pubdate": { + "type": "string", + "title": "PubDate", + "format": "datetime" + }, + "system_file": { + "type": "object", + "title": "File Information", + "format": "object", + "properties": { + "subitem_systemfile_size": { + "type": "string", + "title": "SYSTEMFILE Size", + "format": "text" + }, + "subitem_systemfile_version": { + "type": "string", + "title": "SYSTEMFILE Version", + "format": "text" + }, + "subitem_systemfile_datetime": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "subitem_systemfile_datetime_date": { + "type": "string", + "title": "SYSTEMFILE DateTime Date", + "format": "datetime" + }, + "subitem_systemfile_datetime_type": { + "enum": [ + "Accepted", + "Available", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ], + "type": "string", + "title": "SYSTEMFILE DateTime Type", + "format": "select" + } + } + }, + "title": "SYSTEMFILE DateTime", + "format": "array" + }, + "subitem_systemfile_filename": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "subitem_systemfile_filename_uri": { + "type": "string", + "title": "SYSTEMFILE Filename URI", + "format": "text" + }, + "subitem_systemfile_filename_type": { + "enum": [ + "Abstract", + "Fulltext", + "Summary", + "Thumbnail", + "Other" + ], + "type": "string", + "title": "SYSTEMFILE Filename Type", + "format": "select" + }, + "subitem_systemfile_filename_label": { + "type": "string", + "title": "SYSTEMFILE Filename Label", + "format": "text" + } + } + }, + "title": "SYSTEMFILE Filename", + "format": "array" + }, + "subitem_systemfile_mimetype": { + "type": "string", + "title": "SYSTEMFILE MimeType", + "format": "text" + } + }, + "system_prop": true + }, + "item_1711081249402": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_title": { + "type": "string", + "title": "タイトル", + "format": "text", + "title_i18n": { + "en": "Title", + "ja": "タイトル" + } + }, + "subitem_title_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "Title", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711081258940": { + "type": "object", + "title": "language01", + "properties": { + "subitem_language": { + "enum": [ + null, + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ] + } + } + }, + "item_1711081274859": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_publisher": { + "type": "string", + "title": "出版者", + "format": "text", + "title_i18n": { + "en": "Publisher", + "ja": "出版者" + } + }, + "subitem_publisher_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "publisher01", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711081333893": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_subject": { + "type": "string", + "title": "主題", + "format": "text", + "title_i18n": { + "en": "Subject", + "ja": "主題" + } + }, + "subitem_subject_uri": { + "type": "string", + "title": "主題URI", + "format": "text", + "title_i18n": { + "en": "Subject URI", + "ja": "主題URI" + } + }, + "subitem_subject_scheme": { + "enum": [ + null, + "BSH", + "DDC", + "LCC", + "LCSH", + "MeSH", + "NDC", + "NDLC", + "NDLSH", + "SciVal", + "UDC", + "Other" + ], + "type": [ + "null", + "string" + ], + "title": "主題Scheme", + "format": "select", + "currentEnum": [ + "BSH", + "DDC", + "LCC", + "LCSH", + "MeSH", + "NDC", + "NDLC", + "NDLSH", + "SciVal", + "UDC", + "Other" + ] + }, + "subitem_subject_language": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "subject01", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711081408726": { + "type": "array", + "items": { + "type": "object", + "properties": { + "iscreator": { + "type": "string", + "title": "iscreator", + "format": "text", + "title_i18n": { + "en": "", + "ja": "" + } + }, + "givenNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "givenName": { + "type": "string", + "title": "名", + "format": "text", + "title_i18n": { + "en": "Given Name", + "ja": "名" + } + }, + "givenNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者名", + "format": "array" + }, + "familyNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "familyName": { + "type": "string", + "title": "姓", + "format": "text", + "title_i18n": { + "en": "Family Name", + "ja": "姓" + } + }, + "familyNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者姓", + "format": "array" + }, + "creatorMails": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorMail": { + "type": "string", + "title": "メールアドレス", + "format": "text", + "title_i18n": { + "en": "Email Address", + "ja": "メールアドレス" + } + } + } + }, + "title": "作成者メールアドレス", + "format": "array" + }, + "creatorNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorName": { + "type": "string", + "title": "姓名", + "format": "text", + "title_i18n": { + "en": "Name", + "ja": "姓名" + } + }, + "creatorNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者姓名", + "format": "array" + }, + "nameIdentifiers": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "nameIdentifier": { + "type": "string", + "title": "作成者識別子", + "format": "text", + "title_i18n": { + "en": "Creator Name Identifier", + "ja": "作成者識別子" + } + }, + "nameIdentifierURI": { + "type": "string", + "title": "作成者識別子URI", + "format": "text", + "title_i18n": { + "en": "Creator Name Identifier URI", + "ja": "作成者識別子URI" + } + }, + "nameIdentifierScheme": { + "type": [ + "null", + "string" + ], + "title": "作成者識別子Scheme", + "format": "select", + "currentEnum": [] + } + } + }, + "title": "作成者識別子", + "format": "array" + }, + "creatorAffiliations": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationNames": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationName": { + "type": "string", + "title": "所属機関名", + "format": "text", + "title_i18n": { + "en": "Affiliation Name", + "ja": "所属機関名" + } + }, + "affiliationNameLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "所属機関名", + "format": "array" + }, + "affiliationNameIdentifiers": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "affiliationNameIdentifier": { + "type": "string", + "title": "所属機関識別子", + "format": "text", + "title_i18n": { + "en": "Affiliation Name Identifier", + "ja": "所属機関識別子" + } + }, + "affiliationNameIdentifierURI": { + "type": "string", + "title": "所属機関識別子URI", + "format": "text", + "title_i18n": { + "en": "Affiliation Name Identifier URI", + "ja": "所属機関識別子URI" + } + }, + "affiliationNameIdentifierScheme": { + "enum": [ + null, + "kakenhi", + "ISNI", + "Ringgold", + "GRID" + ], + "type": [ + "null", + "string" + ], + "title": "所属機関識別子Scheme", + "format": "select", + "currentEnum": [ + "kakenhi", + "ISNI", + "Ringgold", + "GRID" + ] + } + } + }, + "title": "所属機関識別子", + "format": "array" + } + } + }, + "title": "作成者所属", + "format": "array" + }, + "creatorAlternatives": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "creatorAlternative": { + "type": "string", + "title": "別名", + "format": "text", + "title_i18n": { + "en": "Alternative Name", + "ja": "別名" + } + }, + "creatorAlternativeLang": { + "enum": [ + null, + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "ja", + "ja-Kana", + "ja-Latn", + "en", + "fr", + "it", + "de", + "es", + "zh-cn", + "zh-tw", + "ru", + "la", + "ms", + "eo", + "ar", + "el", + "ko" + ] + } + } + }, + "title": "作成者別名", + "format": "array" + } + } + }, + "title": "creator01", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711083182141": { + "type": "object", + "title": "資源タイプ", + "properties": { + "resourceuri": { + "type": "string", + "title": "資源タイプ識別子", + "format": "text", + "title_i18n": { + "en": "Resource Type Identifier", + "ja": "資源タイプ識別子" + } + }, + "resourcetype": { + "enum": [ + null, + "conference paper", + "data paper", + "departmental bulletin paper", + "editorial", + "journal article", + "newspaper", + "periodical", + "review article", + "software paper", + "article", + "book", + "book part", + "cartographic material", + "map", + "conference object", + "conference proceedings", + "conference poster", + "aggregated data", + "clinical trial data", + "compiled data", + "encoded data", + "experimental data", + "genomic data", + "geospatial data", + "laboratory notebook", + "measurement and test data", + "observational data", + "recorded data", + "simulation data", + "survey data", + "dataset", + "interview", + "image", + "still image", + "moving image", + "video", + "lecture", + "patent", + "internal report", + "report", + "research report", + "technical report", + "policy report", + "report part", + "working paper", + "data management plan", + "sound", + "thesis", + "bachelor thesis", + "master thesis", + "doctoral thesis", + "interactive resource", + "learning object", + "manuscript", + "musical notation", + "research proposal", + "software", + "technical documentation", + "workflow", + "other" + ], + "type": [ + "null", + "string" + ], + "title": "資源タイプ", + "format": "select", + "currentEnum": [ + "conference paper", + "data paper", + "departmental bulletin paper", + "editorial", + "journal article", + "newspaper", + "periodical", + "review article", + "software paper", + "article", + "book", + "book part", + "cartographic material", + "map", + "conference object", + "conference proceedings", + "conference poster", + "aggregated data", + "clinical trial data", + "compiled data", + "encoded data", + "experimental data", + "genomic data", + "geospatial data", + "laboratory notebook", + "measurement and test data", + "observational data", + "recorded data", + "simulation data", + "survey data", + "dataset", + "interview", + "image", + "still image", + "moving image", + "video", + "lecture", + "patent", + "internal report", + "report", + "research report", + "technical report", + "policy report", + "report part", + "working paper", + "data management plan", + "sound", + "thesis", + "bachelor thesis", + "master thesis", + "doctoral thesis", + "interactive resource", + "learning object", + "manuscript", + "musical notation", + "research proposal", + "software", + "technical documentation", + "workflow", + "other" + ] + } + } + }, + "item_1711083273218": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "object", + "title": "本文URL", + "format": "object", + "properties": { + "url": { + "type": "string", + "title": "本文URL", + "format": "text", + "title_i18n": { + "en": "Text URL", + "ja": "本文URL" + } + }, + "label": { + "type": "string", + "title": "ラベル", + "format": "text", + "title_i18n": { + "en": "Label", + "ja": "ラベル" + } + }, + "objectType": { + "enum": [ + null, + "abstract", + "summary", + "fulltext", + "thumbnail", + "other" + ], + "type": [ + "null", + "string" + ], + "title": "オブジェクトタイプ", + "format": "select", + "currentEnum": [ + "abstract", + "summary", + "fulltext", + "thumbnail", + "other" + ] + } + } + }, + "date": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "dateType": { + "type": [ + "null", + "string" + ], + "title": "日付タイプ", + "format": "select", + "currentEnum": [] + }, + "dateValue": { + "type": "string", + "title": "日付", + "format": "datetime", + "title_i18n": { + "en": "", + "ja": "" + } + } + } + }, + "title": "オープンアクセスの日付", + "format": "array" + }, + "format": { + "type": "string", + "title": "フォーマット", + "format": "text", + "title_i18n": { + "en": "Format", + "ja": "フォーマット" + } + }, + "groups": { + "type": [ + "null", + "string" + ], + "title": "グループ", + "format": "select", + "currentEnum": [] + }, + "version": { + "type": "string", + "title": "バージョン情報", + "format": "text", + "title_i18n": { + "en": "Version Information", + "ja": "バージョン情報" + } + }, + "fileDate": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "fileDateType": { + "enum": [ + null, + "Accepted", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ], + "type": [ + "null", + "string" + ], + "title": "日付タイプ", + "format": "select", + "currentEnum": [ + "Accepted", + "Collected", + "Copyrighted", + "Created", + "Issued", + "Submitted", + "Updated", + "Valid" + ] + }, + "fileDateValue": { + "type": "string", + "title": "日付", + "format": "datetime", + "title_i18n": { + "en": "Date", + "ja": "日付" + } + } + } + }, + "title": "日付", + "format": "array" + }, + "filename": { + "type": "string", + "title": "表示名", + "format": "text", + "title_i18n": { + "en": "FileName", + "ja": "表示名" + } + }, + "filesize": { + "type": "array", + "items": { + "type": "object", + "format": "object", + "properties": { + "value": { + "type": "string", + "title": "サイズ", + "format": "text", + "title_i18n": { + "en": "Size", + "ja": "サイズ" + } + } + } + }, + "title": "サイズ", + "format": "array" + }, + "accessrole": { + "enum": [ + "open_access", + "open_date", + "open_login", + "open_no" + ], + "type": [ + "null", + "string" + ], + "title": "アクセス", + "format": "radios" + }, + "displaytype": { + "enum": [ + null, + "detail", + "simple", + "preview" + ], + "type": [ + "null", + "string" + ], + "title": "表示形式", + "format": "select", + "currentEnum": [ + "detail", + "simple", + "preview" + ] + }, + "licensefree": { + "type": "string", + "title": "自由ライセンス", + "format": "textarea", + "title_i18n": { + "en": "自由ライセンス", + "ja": "自由ライセンス" + } + }, + "licensetype": { + "type": [ + "null", + "string" + ], + "title": "ライセンス", + "format": "select", + "currentEnum": [] + } + } + }, + "title": "File", + "maxItems": 9999, + "minItems": 1 + }, + "item_1711083729173": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subitem_language": { + "enum": [ + null, + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ], + "type": [ + "null", + "string" + ], + "title": "言語", + "format": "select", + "currentEnum": [ + "jpn", + "eng", + "aar", + "abk", + "afr", + "aka", + "amh", + "ara", + "arg", + "asm", + "ava", + "ave", + "aym", + "aze", + "bak", + "bam", + "bel", + "ben", + "bis", + "bod", + "bos", + "bre", + "bul", + "cat", + "ces", + "cha", + "che", + "chu", + "chv", + "cor", + "cos", + "cre", + "cym", + "dan", + "deu", + "div", + "dzo", + "ell", + "epo", + "est", + "eus", + "ewe", + "fao", + "fas", + "fij", + "fin", + "fra", + "fry", + "ful", + "gla", + "gle", + "glg", + "glv", + "grn", + "guj", + "hat", + "hau", + "heb", + "her", + "hin", + "hmo", + "hrv", + "hun", + "hye", + "ibo", + "ido", + "iii", + "iku", + "ile", + "ina", + "ind", + "ipk", + "isl", + "ita", + "jav", + "kal", + "kan", + "kas", + "kat", + "kau", + "kaz", + "khm", + "kik", + "kin", + "kir", + "kom", + "kon", + "kor", + "kua", + "kur", + "lao", + "lat", + "lav", + "lim", + "lin", + "lit", + "ltz", + "lub", + "lug", + "mah", + "mal", + "mar", + "mkd", + "mlg", + "mlt", + "mon", + "mri", + "msa", + "mya", + "nau", + "nav", + "nbl", + "nde", + "ndo", + "nep", + "nld", + "nno", + "nob", + "nor", + "nya", + "oci", + "oji", + "ori", + "orm", + "oss", + "pan", + "pli", + "pol", + "por", + "pus", + "que", + "roh", + "ron", + "run", + "rus", + "sag", + "san", + "sin", + "slk", + "slv", + "sme", + "smo", + "sna", + "snd", + "som", + "sot", + "spa", + "sqi", + "srd", + "srp", + "ssw", + "sun", + "swa", + "swe", + "tah", + "tam", + "tat", + "tel", + "tgk", + "tgl", + "tha", + "tir", + "ton", + "tsn", + "tso", + "tuk", + "tur", + "twi", + "uig", + "ukr", + "urd", + "uzb", + "ven", + "vie", + "vol", + "wln", + "wol", + "xho", + "yid", + "yor", + "zha", + "zho", + "zul" + ] + } + } + }, + "title": "language02", + "maxItems": 9999, + "minItems": 1 + }, + "system_identifier_doi": { + "type": "object", + "title": "Persistent Identifier(DOI)", + "format": "object", + "properties": { + "subitem_systemidt_identifier": { + "type": "string", + "title": "SYSTEMIDT Identifier", + "format": "text" + }, + "subitem_systemidt_identifier_type": { + "enum": [ + "DOI", + "HDL", + "URI" + ], + "type": "string", + "title": "SYSTEMIDT Identifier Type", + "format": "select" + } + }, + "system_prop": true + }, + "system_identifier_hdl": { + "type": "object", + "title": "Persistent Identifier(HDL)", + "format": "object", + "properties": { + "subitem_systemidt_identifier": { + "type": "string", + "title": "SYSTEMIDT Identifier", + "format": "text" + }, + "subitem_systemidt_identifier_type": { + "enum": [ + "DOI", + "HDL", + "URI" + ], + "type": "string", + "title": "SYSTEMIDT Identifier Type", + "format": "select" + } + }, + "system_prop": true + }, + "system_identifier_uri": { + "type": "object", + "title": "Persistent Identifier(URI)", + "format": "object", + "properties": { + "subitem_systemidt_identifier": { + "type": "string", + "title": "SYSTEMIDT Identifier", + "format": "text" + }, + "subitem_systemidt_identifier_type": { + "enum": [ + "DOI", + "HDL", + "URI" + ], + "type": "string", + "title": "SYSTEMIDT Identifier Type", + "format": "select" + } + }, + "system_prop": true + } + }, + "description": "" +} \ No newline at end of file diff --git a/modules/weko-records-ui/tests/test_pdf.py b/modules/weko-records-ui/tests/test_pdf.py index e583ad616c..f73b3ae3c7 100644 --- a/modules/weko-records-ui/tests/test_pdf.py +++ b/modules/weko-records-ui/tests/test_pdf.py @@ -1,8 +1,23 @@ import pytest +import uuid +import copy +import json from mock import MagicMock, patch from six import BytesIO -from weko_records_ui.pdf import get_east_asian_width_count,make_combined_pdf + from invenio_files_rest.models import Bucket, Location, ObjectVersion +from invenio_pidstore.models import PersistentIdentifier, PIDStatus +from invenio_pidrelations.contrib.versioning import PIDVersioning +from invenio_pidrelations.contrib.records import RecordDraft +from invenio_records_files.models import RecordsBuckets + +from weko_deposit.api import WekoIndexer, WekoRecord +from weko_deposit.api import WekoDeposit as aWekoDeposit +from weko_records.models import ItemType, ItemTypeMapping, ItemTypeName +from weko_records.api import ItemsMetadata + +from weko_records_ui.pdf import get_east_asian_width_count,make_combined_pdf + # def get_east_asian_width_count(text): # .tox/c1/bin/pytest --cov=weko_records_ui tests/test_pdf.py::test_get_east_asian_width_count -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp @@ -11,6 +26,245 @@ def test_get_east_asian_width_count(): assert get_east_asian_width_count("english")==7 +def make_record(indexer, id, publisher, subjects, creator,affiliation, lang_langs, is_license=False): + filepath = "tests/data/helloworld.pdf" + filename = "helloworld.pdf" + mimetype = "application/pdf" + file_head=True + licensetype = "licensefree" if is_license else "" + licensefree = "test_license" if is_license else "" + record_data = { + "_oai":{"id":"oai:weko3.example.org:000000{}".format(id),"sets":["1710997084761"]}, + "path": ["1710997084761"], + "owner":"1","recid":id, + "title":["title1"], + "pubdate":{"attribute_name":"PubDate","attribute_value":"2024-03-21"}, + "_buckets":{}, + "_deposit":{ + "id":id,"pid":{"type":"depid","value":id,"revision_id":0}, + "owner":"1","owners":[1],"status":"published" + }, + "item_title":"title1", + "author_link":[], + "itemtype_id":"xxxxx", + "publish_date":"2024-03-21","publish_status":"0","weko_shared_id":-1, + "item_1711081249402":{"attribute_name":"Title","attribute_value_mlt":[{"subitem_title":"title1","subitem_title_language":"ja"}]}, + "item_1711081258940":{"attribute_name":"language01","attribute_value_mlt":[{"subitem_language":lang_langs[0]}]}, + "item_1711083729173":{"attribute_name":"language02","attribute_value_mlt":[{"subitem_language":lang} for lang in lang_langs]}, + "item_1711081274859":{ + "attribute_name":"publisher01", + "attribute_value_mlt":[ + {"subitem_publisher": publisher["val"], "subitem_publisher_language": publisher["lang"]} + ] + }, + "item_1711081333893":{ + "attribute_name":"subject01", + "attribute_value_mlt":[ + {"subitem_subject": subject["val"], "subitem_subject_language": subject["lang"]} for subject in subjects + ] + }, + "item_1711081408726":{ + "attribute_name":"creator01","attribute_type":"creator", + "attribute_value_mlt":[ + { + "creatorMails":[{"creatorMail":"test.taro@test.org"}], + "creatorNames":[{"creatorName": creator["val"],"creatorNameLang":creator["lang"]}], + "nameIdentifier":[{"nameIdentifier":"1","nameIdentifierScheme":"WEKO"}], + "creatorAffiliations":[{"affiliationNames":[{"affiliationName":affiliation["val"],"affiliationNameLang":affiliation["lang"]}]}] + } + ] + }, + "item_1617605131499":{ + "attribute_name":"File","attribute_type":"file", + "attribute_value_mlt":[ + { + "url":{"url":"https://weko3.example.org/record/{0}/files/{1}".format(id,filename)}, + "date": [{"dateType": "Available","dateValue": "2024-03-21"}], + "format": mimetype,"filename":filename,"filesize":[{"value":"10 KB"}], + "accessrole": "open_access", + "version_id": "94b16710-d2a5-4fbb-8915-9b63f3eaf21e", + "licensetype":licensetype, + "licensefree":licensefree + } + ] + } + } + + item_data = { + "id":id,"pid":{"type":"depid","value":id,"revision_id":0}, + "lang":"ja","owner":"1","title":"title1","owners":[1],"status":"published", + "$schema":"/items/jsonschema/xxxxx", + "pubdate":"2024-03-21","created_by":1,"shared_user_id":-1, + "item_1711081249402": [{"subitem_title": "title1","subitem_title_language": "ja"}], + "item_1711081258940":{"subitem_language":lang_langs[0]}, + "item_1711083729173":[{"subitem_language":lang} for lang in lang_langs], + "item_1711081274859": [{"subitem_publisher": publisher["val"],"subitem_publisher_language": publisher["lang"]}], + "item_1711081333893": [{"subitem_subject": subject["val"],"subitem_subject_language": subject["lang"]} for subject in subjects], + "item_1711081408726": [ + { + "creatorMails":[{"creatorMail":"test.taro@test.org"}], + "creatorNames":[{"creatorName":creator["val"],"creatorNameLang":creator["lang"]}], + "nameIdentifiers":[{"nameIdentifier":"1","nameIdentifierScheme":"WEKO"}], + "creatorAffiliations":[{"affiliationNames":[{"affiliationName":affiliation["val"],"affiliationNameLang":affiliation["lang"]}]}] + } + ], + "item_1617605131499":[ + { + "url": {"url": "https://weko3.example.org/record/{}/files/{}".format(id,filename)}, + "date":[{"dateType":"Available","dateValue":"2024-03-21"}], + "format":mimetype, "filename":filename,"filesize":[{"value":"10 KB"}], + "accessrole":"open_access","version_id": "94b16710-d2a5-4fbb-8915-9b63f3eaf21e", + "licensetype":licensetype,"licensefree":licensefree + } + ] + } + + + rec_uuid = uuid.uuid4() + + recid = PersistentIdentifier.create( + "recid", + str(id), + object_type="rec", + object_uuid=rec_uuid, + status=PIDStatus.REGISTERED, + ) + depid = PersistentIdentifier.create( + "depid", + str(id), + object_type="rec", + object_uuid=rec_uuid, + status=PIDStatus.REGISTERED, + ) + parent = None + doi = None + hdl = None + recid_v1 = PersistentIdentifier.create( + "recid", + str(id + 0.1), + object_type="rec", + object_uuid=rec_uuid, + status=PIDStatus.REGISTERED, + ) + rec_uuid2 = uuid.uuid4() + depid_v1 = PersistentIdentifier.create( + "depid", + str(id + 0.1), + object_type="rec", + object_uuid=rec_uuid2, + status=PIDStatus.REGISTERED, + ) + parent = PersistentIdentifier.create( + "parent", + "parent:{}".format(id), + object_type="rec", + object_uuid=rec_uuid2, + status=PIDStatus.REGISTERED, + ) + + h1 = PIDVersioning(parent=parent) + h1.insert_child(child=recid) + h1.insert_child(child=recid_v1) + RecordDraft.link(recid, depid) + RecordDraft.link(recid_v1, depid_v1) + + if id % 2 == 1: + doi = PersistentIdentifier.create( + "doi", + "https://doi.org/10.xyz/{}".format((str(id)).zfill(10)), + object_type="rec", + object_uuid=rec_uuid, + status=PIDStatus.REGISTERED, + ) + hdl = PersistentIdentifier.create( + "hdl", + "https://hdl.handle.net/0000/{}".format((str(id)).zfill(10)), + object_type="rec", + object_uuid=rec_uuid, + status=PIDStatus.REGISTERED, + ) + + record = WekoRecord.create(record_data, id_=rec_uuid) + # from six import BytesIO + import base64 + + bucket = Bucket.create() + record_buckets = RecordsBuckets.create(record=record.model, bucket=bucket) + + # stream = BytesIO(b"Hello, World") + obj = None + with open(filepath, "rb") as f: + stream = BytesIO(f.read()) + record.files[filename] = stream + record["item_1617605131499"]["attribute_value_mlt"][0]["file"] = ( + base64.b64encode(stream.getvalue()) + ).decode("utf-8") + with open(filepath, "rb") as f: + obj = ObjectVersion.create(bucket=bucket.id, key=filename, stream=f) + obj.is_head = file_head + deposit = aWekoDeposit(record, record.model) + deposit.commit() + record["item_1617605131499"]["attribute_value_mlt"][0]["version_id"] = str( + obj.version_id + ) + + record_data["content"] = [ + { + "date": [{"dateValue": "2021-07-12", "dateType": "Available"}], + "accessrole": "open_access", + "displaytype": "simple", + "filename": filename, + "attachment": {}, + "format": mimetype, + "mimetype": mimetype, + "filesize": [{"value": "1 KB"}], + "version_id": "{}".format(obj.version_id), + "url": {"url": "http://localhost/record/{0}/files/{1}".format(id, filename)}, + "file": (base64.b64encode(stream.getvalue())).decode("utf-8"), + } + ] + indexer.upload_metadata(record_data, rec_uuid, 1, False) + item = ItemsMetadata.create(item_data, id_=rec_uuid, item_type_id=1) + + record_v1 = WekoRecord.create(record_data, id_=rec_uuid2) + # from six import BytesIO + import base64 + + bucket_v1 = Bucket.create() + record_buckets = RecordsBuckets.create(record=record_v1.model, bucket=bucket_v1) + # stream = BytesIO(b"Hello, World") + record_v1.files[filename] = stream + obj_v1 = ObjectVersion.create(bucket=bucket_v1.id, key=filename, stream=stream) + obj_v1.is_head = False + record_v1["item_1617605131499"]["attribute_value_mlt"][0]["file"] = ( + base64.b64encode(stream.getvalue()) + ).decode("utf-8") + deposit_v1 = aWekoDeposit(record_v1, record_v1.model) + deposit_v1.commit() + record_v1["item_1617605131499"]["attribute_value_mlt"][0]["version_id"] = str( + obj_v1.version_id + ) + + record_data_v1 = copy.deepcopy(record_data) + record_data_v1["content"] = [ + { + "date": [{"dateValue": "2021-07-12", "dateType": "Available"}], + "accessrole": "open_access", + "displaytype": "simple", + "filename": filename, + "attachment": {}, + "format": mimetype, + "mimetype": mimetype, + "filesize": [{"value": "1 KB"}], + "version_id": "{}".format(obj_v1.version_id), + "url": {"url": "http://localhost/record/{0}/files/{1}".format(id, filename)}, + "file": (base64.b64encode(stream.getvalue())).decode("utf-8"), + } + ] + indexer.upload_metadata(record_data_v1, rec_uuid2, 1, False) + item_v1 = ItemsMetadata.create(item_data, id_=rec_uuid2, item_type_id=1) + return record + # def make_combined_pdf(pid, fileobj, obj, lang_user): # def pixels_to_mm(val): # def resize_to_fit(imgFilename): @@ -20,44 +274,197 @@ def test_get_east_asian_width_count(): # def get_current_activity_id(pid_object): # def get_url(pid_value): # def get_oa_policy(activity_id): -# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_pdf.py::test_make_combined_pdf -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp -def test_make_combined_pdf(app,records,itemtypes,pdfcoverpagesetting): - indexer, results = records - record = results[0]["record"] - obj = results[0]['obj'] - with app.test_request_context(headers=[("Accept-Language", "en")]): - res = make_combined_pdf(record.pid,record['item_1617605131499'],obj,None) - assert res.status_code==200 - - data1 = MagicMock() - data1.header_output_image = "tests/data/image01.jpg" - data2 = MagicMock() - - with patch("weko_records_ui.pdf.PDFCoverPageSettings.find", return_value=data1): - with patch("weko_records_ui.pdf.get_record_permalink", return_value=""): - data1.header_display_position = "left" - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 - - data1.header_display_position = "right" - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 - - with patch("weko_records_ui.pdf.WekoRecord.get_record_by_pid", return_value=record): - data1.header_display_position = "center" - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 - - with patch("weko_records_ui.pdf.get_pair_value", return_value=[("en", "en")]): - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 - - with patch("weko_records_ui.pdf.get_pair_value", return_value=[("", "")]): - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 - - with patch("weko_records_ui.pdf.ItemsMetadata.get_record", return_value={"title":""}): - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 - - data3 = { - "title": "", - "creator": MagicMock() - } - - with patch("weko_records_ui.pdf.tempfile.gettempdir", return_value="tests/data"): - assert make_combined_pdf(record.pid,data1,obj,None).status_code == 200 \ No newline at end of file +# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_pdf.py::test_make_combined_pdf -vv -s --cov-branch --cov-report=term --cov-report=html --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp +def test_make_combined_pdf(app, db, esindex, location, pdfcoverpagesetting, mocker): + temp_path = "tests/data" + mocker.patch("weko_records_ui.pdf.tempfile.gettempdir", return_value=temp_path) + import shutil, os + if os.path.isdir(temp_path+"/comb_pdfs"): + shutil.rmtree(temp_path+"/comb_pdfs") + item_type_name = ItemTypeName(id=1, name="test_itemtype") + item_type_schema = dict() + with open("tests/data/item_type_schema_pdftest.json", "r") as f: + item_type_schema = json.load(f) + + item_type_form = dict() + with open("tests/data/item_type_form_pdftest.json", "r") as f: + item_type_form = json.load(f) + + item_type_render = dict() + with open("tests/data/item_type_render_pdftest.json", "r") as f: + item_type_render = json.load(f) + + item_type_mapping = dict() + with open("tests/data/item_type_mapping_pdftest.json", "r") as f: + item_type_mapping = json.load(f) + item_type = ItemType( + id=1, name_id=1, schema=item_type_schema, form=item_type_form, render=item_type_render, tag=1 + ) + itemtype_mapping = ItemTypeMapping(id=1, item_type_id=1, mapping=item_type_mapping) + with db.session.begin_nested(): + db.session.add(item_type_name) + db.session.add(item_type) + db.session.add(itemtype_mapping) + db.session.commit() + indexer = WekoIndexer() + indexer.get_es_index() + records = [] + records.append(make_record(indexer, 1, {"val": "test_publisher", "lang": "en"}, [{"val": "test_subject", "lang": "en"}, {"val": "テスト主題", "lang": "ja"}], {"val": "test, taro", "lang": "en"}, {"val": "test_affiliation", "lang": "en"}, ["eng"])) + records.append(make_record(indexer, 2, {"val": "test_publisher", "lang": "" }, [{"val": "test_subject", "lang": "en"}, {"val": "テスト主題", "lang": "ja"}], {"val": "test, taro", "lang": "" }, {"val": "test_affiliation", "lang": "" }, ["jpn", "eng"])) + records.append(make_record(indexer, 3, {"val": "" , "lang": "en"}, [{"val": "test_subject", "lang": "en"}, {"val": "テスト主題", "lang": "ja"}], {"val": "" , "lang": "en"}, {"val": "" , "lang": "en"}, ["fra", "jpn"],True)) + records.append(make_record(indexer, 4, {"val": "test_publisher", "lang": "en"}, [{"val": "", "lang": ""}], {"val": "test, taro", "lang": "en"}, {"val": "test_affiliation", "lang": "en"}, ["eng"])) + db.session.commit() + + tests = [ + ( + "Language: English\nPublisher: test_publisher\nDate of Publication: 2024-03-21\nKeywords: test_subject\nAuthor: test, taro\nE-mail: \nAffiliation: test_affiliation", + "言語: English\n出版者: test_publisher\n公開日: 2024-03-21\nキーワード: テスト主題\n作成者: test, taro\nメールアドレス: \n所属: test_affiliation", + "Language: English\nPublisher: test_publisher\nDate of Publication: 2024-03-21\nKeywords: test_subject\nAuthor: test, taro\nE-mail: test.taro@test.org\nAffiliation: test_affiliation", + "Language: English\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: \nAuthor: \nE-mail: \nAffiliation: " + ), + ( + "Language: Japanese\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: test_subject\nAuthor: \nE-mail: \nAffiliation: ", + "言語: Japanese\n出版者: \n公開日: 2024-03-21\nキーワード: テスト主題\n作成者: \nメールアドレス: \n所属: ", + "Language: Japanese\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: test_subject\nAuthor: \nE-mail: test.taro@test.org\nAffiliation: ", + "Language: Japanese, English\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: \nAuthor: \nE-mail: \nAffiliation: " + ), + ( + "Language: fra\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: test_subject\nAuthor: \nE-mail: \nAffiliation: ", + "言語: fra\n出版者: \n公開日: 2024-03-21\nキーワード: テスト主題\n作成者: \nメールアドレス: \n所属: ", + "Language: fra\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: test_subject\nAuthor: \nE-mail: test.taro@test.org\nAffiliation: ", + "Language: fra, Japanese\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: \nAuthor: \nE-mail: \nAffiliation: " + ), + ( + "Language: English\nPublisher: test_publisher\nDate of Publication: 2024-03-21\nKeywords: \nAuthor: test, taro\nE-mail: \nAffiliation: test_affiliation", + "言語: English\n出版者: test_publisher\n公開日: 2024-03-21\nキーワード: \n作成者: test, taro\nメールアドレス: \n所属: test_affiliation", + "Language: English\nPublisher: test_publisher\nDate of Publication: 2024-03-21\nKeywords: \nAuthor: test, taro\nE-mail: test.taro@test.org\nAffiliation: test_affiliation", + "Language: English\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: \nAuthor: \nE-mail: \nAffiliation: " + ) + ] + + filename = "helloworld.pdf" + mock_page_setting = MagicMock() + mock_page_setting.header_output_string = "Weko Univ" + from fpdf import FPDF + mock_multi_cell = mocker.spy(FPDF, "multi_cell") + with patch("weko_records_ui.pdf.PDFCoverPageSettings.find", return_value=mock_page_setting): + for i, record in enumerate(records): + fileobj = record.files[filename] + obj = fileobj.obj + # header_display_position=left, header_desplay_type=string, + mock_page_setting.header_output_image = "tests/data/image01.jpg" + mock_page_setting.header_display_position = "left" + mock_page_setting.header_display_type = "string" + with app.test_request_context(headers=[('Accept-Language', 'en')]): + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[2][0][3] == tests[i][0] + mock_multi_cell.call_args_list.clear() + + # header_display_position=center, header_output_image_name is exist, header_desplay_type=Image, + mock_page_setting.header_display_position = "center" + mock_page_setting.header_output_image = "tests/data/image01.jpg" + mock_page_setting.header_display_type = "Image" + with app.test_request_context(headers=[('Accept-Language', 'ja')]): + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[1][0][3] == tests[i][1] + mock_multi_cell.call_args_list.clear() + + # header_display_position=center, header_output_image_name is not exist, header_desplay_type=Image, + mock_page_setting.header_display_position = "center" + mock_page_setting.header_output_image = "" + mock_page_setting.header_display_type = "Image" + with app.test_request_context(headers=[('Accept-Language', 'fr')]): + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[1][0][3] == tests[i][0] + mock_multi_cell.call_args_list.clear() + + # header_display_position=right, header_output_image_name is exist, header_desplay_type=string, + mock_page_setting.header_display_position = "right" + mock_page_setting.header_output_image = "tests/data/image01.jpg" + mock_page_setting.header_display_type = "string" + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[2][0][3] == tests[i][0] + mock_multi_cell.call_args_list.clear() + + # header_display_position=right, header_output_image_name isnot exist, header_desplay_type=string, + mock_page_setting.header_display_position = "right" + mock_page_setting.header_output_image = "" + mock_page_setting.header_display_type = "string" + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[2][0][3] == tests[i][0] + mock_multi_cell.call_args_list.clear() + + # header_display_position=left, header_output_image_name is not exist, header_desplay_type=string, + # item_setting_show_email is True + mock_page_setting.header_display_position = "left" + mock_page_setting.header_output_image = "" + mock_page_setting.header_display_type = "string" + with patch("weko_records_ui.pdf.item_setting_show_email", return_value=True): + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[2][0][3] == tests[i][2] + mock_multi_cell.call_args_list.clear() + + # publisher, subject, creatorMail, creatorName, affiliationName are hide, + # language is list + hide_list = [ + "item_1711081274859.subitem_publisher", + "item_1711081333893.subitem_subject", + "item_1711081408726.creatorMails.creatorMail", + "item_1711081408726.creatorNames.creatorName", + "item_1711081408726.creatorAffiliations.affiliationNames.affiliationName" + ] + item_map = { + "title.@value": "item_1711081249402.subitem_title", + "title.@attributes.xml:lang": "item_1711081249402.subitem_title_language", + "language.@value": "item_1711083729173.subitem_language", + "publisher.@value": "item_1711081274859.subitem_publisher", + "publisher.@attributes.xml:lang": "item_1711081274859.subitem_publisher_language", + "subject.@value": "item_1711081333893.subitem_subject", + "subject.@attributes.xml:lang": "item_1711081333893.subitem_subject_language", + "subject.@attributes.subjectURI": "item_1711081333893.subitem_subject_uri", + "subject.@attributes.subjectScheme": "item_1711081333893.subitem_subject_scheme", + "creator.affiliation.nameIdentifier.@value": "item_1711081408726.creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifier", + "creator.affiliation.nameIdentifier.@attributes.nameIdentifierURI": "item_1711081408726.creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierURI", + "creator.affiliation.nameIdentifier.@attributes.nameIdentifierScheme": "item_1711081408726.creatorAffiliations.affiliationNameIdentifiers.affiliationNameIdentifierScheme", + "creator.affiliation.affiliationName.@value": "item_1711081408726.creatorAffiliations.affiliationNames.affiliationName", + "creator.affiliation.affiliationName.@attributes.xml:lang": "item_1711081408726.creatorAffiliations.affiliationNames.affiliationNameLang", + "creator.creatorName.@value": "item_1711081408726.creatorNames.creatorName", + "creator.creatorName.@attributes.xml:lang": "item_1711081408726.creatorNames.creatorNameLang", + "creator.creatorAlternative.@value": "item_1711081408726.creatorAlternatives.creatorAlternative", + "creator.creatorAlternative.@attributes.xml:lang": "item_1711081408726.creatorAlternatives.creatorAlternativeLang", + "type.@value": "item_1711083182141.resourcetype", + "type.@attributes.rdf:resource": "item_1711083182141.resourceuri", + "file.URI.@value": "item_1711083273218.url.url", + "file.URI.@attributes.label": "item_1711083273218.url.label", + "file.URI.@attributes.objectType": "item_1711083273218.url.objectType", + "file.date.@value": "item_1711083273218.fileDate.fileDateValue", + "file.date.@attributes.dateType": "item_1711083273218.fileDate.fileDateType", + "file.extent.@value": "item_1711083273218.filesize.value", + "file.version.@value": "item_1711083273218.version", + "file.mimeType.@value": "item_1711083273218.format" + } + with patch("weko_items_ui.utils.get_hide_list_by_schema_form", return_value=hide_list): + with patch("weko_records_ui.pdf.get_mapping", return_value=item_map): + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[2][0][3] == tests[i][3] + mock_multi_cell.call_args_list.clear() + + # publisher, subject, creator are not exist + item_map = { + "title.@value": "item_1711081249402.subitem_title", + "title.@attributes.xml:lang": "item_1711081249402.subitem_title_language" + } + with patch("weko_records_ui.pdf.get_mapping",return_value=item_map): + res = make_combined_pdf(record.pid, fileobj, obj, None) + args_list = mock_multi_cell.call_args_list + assert args_list[2][0][3] == "Language: ja\nPublisher: \nDate of Publication: 2024-03-21\nKeywords: \nAuthor: \nE-mail: \nAffiliation: " + mock_multi_cell.call_args_list.clear() + if os.path.isdir(temp_path+"/comb_pdfs"): + shutil.rmtree(temp_path+"/comb_pdfs") \ No newline at end of file diff --git a/modules/weko-records-ui/tests/test_permissions.py b/modules/weko-records-ui/tests/test_permissions.py index c3154b797a..87f8555678 100644 --- a/modules/weko-records-ui/tests/test_permissions.py +++ b/modules/weko-records-ui/tests/test_permissions.py @@ -54,12 +54,33 @@ def test_page_permission_factory(app, records, users,db_file_permission): # def file_permission_factory(record, *args, **kwargs): # def can(self): -# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_permissions.py::test_get_permission -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp -def test_file_permission_factory(app, records, users,db_file_permission): +# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_permissions.py::test_file_permission_factory -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp +def test_file_permission_factory(app, records, users, db_file_permission): + app.config['OAUTH2SERVER_JWT_AUTH_HEADER'] = 'Authorization' indexer, results = records record = results[0]["record"] assert file_permission_factory(record).can() == None + # check_file_download_permission returns True + with patch("weko_records_ui.permissions.check_file_download_permission", return_value=True): + assert file_permission_factory(record).can() == True + + # check_file_download_permission returns False + with patch("weko_records_ui.permissions.check_file_download_permission", return_value=False): + assert file_permission_factory(record).can() == False + + # with OAuth2 + with app.test_request_context(headers={"Authorization": "Bearer testtoken"}): + with patch("weko_records_ui.permissions.check_file_download_permission", return_value=True), \ + patch("weko_records_ui.permissions.require_api_auth", lambda: lambda f: f), \ + patch("weko_records_ui.permissions.require_oauth_scopes", lambda x: lambda f: f): + assert file_permission_factory(record).can() == True + + with patch("weko_records_ui.permissions.check_file_download_permission", return_value=False), \ + patch("weko_records_ui.permissions.require_api_auth", lambda: lambda f: f), \ + patch("weko_records_ui.permissions.require_oauth_scopes", lambda x: lambda f: f): + assert file_permission_factory(record).can() == False + # def check_file_download_permission(record, fjson, is_display_file_info=False): # def site_license_check(): diff --git a/modules/weko-records-ui/tests/test_utils.py b/modules/weko-records-ui/tests/test_utils.py index d16b37e34b..b4a2c9fc60 100644 --- a/modules/weko-records-ui/tests/test_utils.py +++ b/modules/weko-records-ui/tests/test_utils.py @@ -27,6 +27,7 @@ get_billing_file_download_permission, get_list_licence, restore, + delete_version, soft_delete, is_billing_item, get_groups_price, @@ -43,6 +44,8 @@ get_terms, get_roles, check_items_settings, + get_values_by_selected_lang, + export_preprocess, #RoCrateConverter, #create_tsv ) @@ -61,7 +64,7 @@ from invenio_accounts.testutils import login_user_via_session from invenio_pidstore.models import PersistentIdentifier, PIDStatus from mock import patch -from weko_deposit.api import WekoRecord +from weko_deposit.api import WekoRecord, WekoDeposit from weko_records_ui.models import FileOnetimeDownload, FileSecretDownload from weko_records.api import ItemTypes,Mapping from werkzeug.exceptions import NotFound @@ -70,6 +73,7 @@ from weko_records.models import ItemType, ItemTypeMapping, ItemTypeName from flask_babelex import gettext as _ from datetime import datetime ,timedelta +from werkzeug.exceptions import Gone, NotFound # .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp @@ -217,6 +221,20 @@ def test_get_min_price_billing_file_download(users): def test_is_billing_item(app,itemtypes): assert is_billing_item(1)==False + +# def delete_version(recid): +# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py::test_delete_version -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp +def test_delete_version(app, records, users): + indexer, results = records + record = results[0]["record"] + recid = results[0]["recid"] + + with patch("flask_login.utils._get_user", return_value=users[2]["obj"]): + delete_version(record.pid.pid_value + '.1') + pid = PersistentIdentifier.query.filter_by( + pid_type='recid', pid_value=record.pid.pid_value + '.1').first() + assert pid.status == PIDStatus.DELETED + # def soft_delete(recid): # def get_cache_data(key: str): # def check_an_item_is_locked(item_id=None): @@ -293,6 +311,65 @@ def test_get_pair_value(app): assert name== ('ja_conference paperITEM00000001(public_open_access_open_access_simple)', 'ja') assert lang== ('en_conference paperITEM00000001(public_open_access_simple)', 'en') + name_keys = ['subitem_1551255647225', 'subitem_1551255647225'] + lang_keys = ['subitem_1551255648112', 'subitem_1551255647225'] + name,lang = get_pair_value(name_keys,lang_keys,datas) + +# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py::test_get_values_by_selected_lang -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp +def test_get_values_by_selected_lang(app): + # cur_lang + cur_lang = "ja" + source_title = [('ja',''),('','test0'),('ja','テスト1'), ('en','test'), ('ja','テスト2')] + test = ['テスト1', 'テスト2'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # not cur_lang, none language is first + source_title = [('None Language', 'test1'), ('en', 'test2'), ('None Language', 'test3'), ('fr', 'test4')] + test = ['test1', 'test3'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # not cur_lang, none language is not first, exist ja-Latn + source_title = [('en', 'test1'), ('en', 'test2'), ('ja-Latn', 'test3'), ('ja-Latn', 'test4')] + test = ['test3', 'test4'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # not cur_lang, none language is not first, not exist ja-Latn, exist en + source_title = [('en', 'test1'), ('en', 'test2'), ('None Language', 'test3'), ('None Language', 'test4')] + test = ['test1', 'test2'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # cur_lang=en, exist title_data_langs + cur_lang = 'en' + source_title = [('fr','test1'),('ch','test2'),('ch','test3'),('fr','test4')] + test = ['test1', 'test4'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # cur_lang !=en, exist title_data_langs + cur_lang = "ja" + source_title = [('fr','test1'),('ch','test2'),('ch','test3'),('fr','test4')] + test = ['test1', 'test4'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # return title_data_langs_none + app.config["WEKO_RECORDS_UI_LANG_DISP_FLG"] = True + cur_lang = "en" + source_title = [('ja','test0'),('None Language', 'test1'),('None Language', 'test2')] + test = ['test1', 'test2'] + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test + + # enとja-latnがない、noneがない、 + cur_lang = 'en' + source_title = [] + test = None + result = get_values_by_selected_lang(source_title, cur_lang) + assert result == test # def hide_item_metadata(record, settings=None, item_type_mapping=None, # .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py::test_hide_item_metadata -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp @@ -943,98 +1020,38 @@ def test_get_data_usage_application_data(app ,db): assert res[0].download_count == 100 -# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py::test_RoCrateConverter_convert -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp -def test_RoCrateConverter_convert(app, db): - with open('tests/data/rocrate/rocrate_mapping.json', 'r') as f: - mapping = json.load(f) - with open('tests/data/rocrate/records_metadata.json', 'r') as f: - record_data = json.load(f) - converter = RoCrateConverter() - rocrate = converter.convert(record_data, mapping) - assert rocrate - assert type(rocrate) == dict - - with open('tests/data/rocrate/test_mapping_rocrate_mapping.json', 'r') as f: - mapping = json.load(f) - with open('tests/data/rocrate/test_mapping_records_metadata.json', 'r') as f: - record_data = json.load(f) - rocrate = converter.convert(record_data, mapping) - assert rocrate['@graph'][0]['prop1'] == 'value1' - assert rocrate['@graph'][0]['prop2'] == ['value2'] - assert rocrate['@graph'][0]['prop3'] == ['value3_1', 'value3_2'] - assert rocrate['@graph'][0]['prop4_1'] == 'value4_1' - assert rocrate['@graph'][0]['prop4_2'] == 'value4_2' - assert 'prop4_3' not in rocrate['@graph'][0] - assert rocrate['@graph'][0]['prop5'] == ['value5_1', 'value5_2', 'value5_3'] - assert rocrate['@graph'][0]['prop6'] == ['value6_2'] - assert rocrate['@graph'][0]['prop7'] == ['value7_1'] - assert 'prop8' not in rocrate['@graph'][0] - assert 'prop9' not in rocrate['@graph'][0] - assert rocrate['@graph'][0]['prop10'] == ['value10_1_en', 'value10_2_1_en'] - assert rocrate['@graph'][0]['prop_static'] == 'value_static' - assert 'prop_none' not in rocrate['@graph'][0] - assert 'prop_none_lang' not in rocrate['@graph'][0] - - assert rocrate['@graph'][5]['name'] == 'name_en' - assert rocrate['@graph'][5]['additionalType'] == 'tab' - assert rocrate['@graph'][2]['fileprop1'] == 'filevalue1_1' - assert rocrate['@graph'][2]['fileprop2'] == 'filevalue2_1' - assert rocrate['@graph'][2]['fileprop3'] == ['filevalue3_1_1', 'filevalue3_2_1_1_1', 'filevalue3_2_1_1_2'] - assert rocrate['@graph'][2]['fileprop_static'] == 'filevalue_static' - assert rocrate['@graph'][3]['fileprop1'] == 'filevalue1_2' - assert rocrate['@graph'][3]['fileprop2'] == 'filevalue2_2' - assert rocrate['@graph'][3]['fileprop3'] == ['filevalue3_1_2', 'filevalue3_2_1_2_1', 'filevalue3_2_1_2_2'] - assert rocrate['@graph'][3]['fileprop_static'] == 'filevalue_static' - assert rocrate['@graph'][4]['fileprop1'] == 'filevalue1_3' - assert rocrate['@graph'][4]['fileprop2'] == 'filevalue2_3' - assert rocrate['@graph'][4]['fileprop3'] == ['filevalue3_1_3', 'filevalue3_2_1_3_1', 'filevalue3_2_1_3_2'] - assert rocrate['@graph'][4]['fileprop_static'] == 'filevalue_static' - - rocrate = converter.convert(record_data, mapping, 'ja') - assert rocrate['@graph'][0]['prop6'] == ['value6_3'] - assert rocrate['@graph'][0]['prop7'] == ['value7_2'] - assert rocrate['@graph'][0]['prop10'] == ['value10_1_ja', 'value10_2_1_ja'] - assert rocrate['@graph'][5]['name'] == 'name_ja' - - rocrate = converter.convert(record_data, mapping, 'other') - assert rocrate['@graph'][0]['prop6'] == ['value6_2'] - assert rocrate['@graph'][0]['prop7'] == ['value7_1'] - assert rocrate['@graph'][0]['prop10'] == ['value10_1_en', 'value10_2_1_en'] - assert rocrate['@graph'][5]['name'] == 'name' - - -# def create_tsv(files, language='en'): -# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py::test_create_tsv -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp -def test_create_tsv(app, records): - from weko_records_ui.config import ( - WEKO_RECORDS_UI_TSV_FIELD_NAMES_DEFAULT, - WEKO_RECORDS_UI_TSV_FIELD_NAMES_EN, - WEKO_RECORDS_UI_TSV_FIELD_NAMES_JA, - ) +# def update_secret_download(**kwargs) -> Optional[List[FileSecretDownload]]: +# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_utils.py::test_export_preprocess -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp +def test_export_preprocess(app, records, esindex): indexer, results = records record = results[0]["record"] + recid = results[0]["recid"] - # 16 set language en - res_tsv = create_tsv(record.files, 'en') - for field in WEKO_RECORDS_UI_TSV_FIELD_NAMES_EN: - assert field in res_tsv.getvalue() - - # 17 set language ja - res_tsv = create_tsv(record.files, 'ja') - for field in WEKO_RECORDS_UI_TSV_FIELD_NAMES_JA: - assert field in res_tsv.getvalue() - - # 18 shortage of fieldnames - fieldnames = ['名前', 'サイズ', 'ライセンス'] - with patch("weko_records_ui.config.WEKO_RECORDS_UI_TSV_FIELD_NAMES_EN", fieldnames): - res_tsv = create_tsv(record.files) - for field in fieldnames: - assert field in res_tsv.getvalue() - assert WEKO_RECORDS_UI_TSV_FIELD_NAMES_DEFAULT[3] in res_tsv.getvalue() - assert WEKO_RECORDS_UI_TSV_FIELD_NAMES_DEFAULT[4] in res_tsv.getvalue() - - # 19 not exist fieldnames - with patch("weko_records_ui.config.WEKO_RECORDS_UI_TSV_FIELD_NAMES_EN", None): - res_tsv = create_tsv(record.files) - for field in WEKO_RECORDS_UI_TSV_FIELD_NAMES_DEFAULT: - assert field in res_tsv.getvalue() + with app.test_request_context(): + schema_type = 'json' + # export json + res = export_preprocess(recid, record, schema_type) + res_dict = json.loads(res) + assert 'created' in res_dict + assert res_dict['id'] == 1 + assert res_dict['links'] == {} + assert res_dict['metadata'] == record + assert 'updated' in res_dict + + # export BibTeX + export_preprocess(recid, record, 'bibtex') + + # record update '@export_schema_type' + export_preprocess(recid, record, 'jpcoar_2.0') + + # fmt is False + mock_config = {'RECORDS_UI_EXPORT_FORMATS': {recid.pid_type: {schema_type: False}}} + with patch('flask.current_app.config', mock_config), \ + pytest.raises(Gone): + export_preprocess(recid, record, schema_type) + + # fmt is None + mock_config = {} + with patch('flask.current_app.config', mock_config), \ + pytest.raises(NotFound): + export_preprocess(recid, record, schema_type) diff --git a/modules/weko-records-ui/tests/test_views.py b/modules/weko-records-ui/tests/test_views.py index 60c4235234..34d9459b00 100644 --- a/modules/weko-records-ui/tests/test_views.py +++ b/modules/weko-records-ui/tests/test_views.py @@ -120,6 +120,31 @@ def test_publish_acl(client, records, users, id, status_code): assert res.location == "http://test_server/records/1" +# def export(pid, record, template=None, **kwargs): +# .tox/c1/bin/pytest --cov=weko_records_ui tests/test_views.py::test_publish -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp +def test_publish(client, records, users, communities, mocker): + login_user_via_session(client=client, email=users[0]["email"]) + indexer, records_info = records + + mock_commit = mocker.patch("weko_records_ui.views.db.session.commit") + mock_commit2 = mocker.patch("invenio_records.api.Record.commit") + + mock_update_es_data = mocker.patch("weko_deposit.api.WekoIndexer.update_es_data") + + # Test Case 1: community id exists + mock_request = mocker.patch("weko_records_ui.views.request") + mock_request.values = {"community": 1} + actual_response = publish(records_info[0]["recid"], records_info[0]["record"], template=None) + assert actual_response.status_code == 302 + assert actual_response.location == "/records/1?community=1" + + # Test Case 2: community id exists + mock_request.values = {} + actual_response = publish(records_info[0]["recid"], records_info[0]["record"], template=None) + assert actual_response.status_code == 302 + assert actual_response.location == "/records/1" + + # def export(pid, record, template=None, **kwargs): # .tox/c1/bin/pytest --cov=weko_records_ui tests/test_views.py::test_export_acl_guest -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records-ui/.tox/c1/tmp def test_export_acl_guest(client, records): diff --git a/modules/weko-records-ui/weko_records_ui/config.py b/modules/weko-records-ui/weko_records_ui/config.py index 3f0e997164..909a942304 100644 --- a/modules/weko-records-ui/weko_records_ui/config.py +++ b/modules/weko-records-ui/weko_records_ui/config.py @@ -236,6 +236,10 @@ serializer='weko_schema_ui.serializers.WekoCommonSchema', order=6, ), + 'zip': dict( + title='ZIP', + order=7, + ), } } diff --git a/modules/weko-records-ui/weko_records_ui/ext.py b/modules/weko-records-ui/weko_records_ui/ext.py index 3d8c80f06b..491ca87d19 100644 --- a/modules/weko-records-ui/weko_records_ui/ext.py +++ b/modules/weko-records-ui/weko_records_ui/ext.py @@ -20,6 +20,8 @@ """Flask extension for weko-records-ui.""" +from invenio_oauth2server.ext import verify_oauth_token_and_set_current_user + from . import config from .rest import create_blueprint from .views import blueprint @@ -44,6 +46,7 @@ def init_app(self, app): self.init_config(app) app.register_blueprint(blueprint) app.extensions['weko-records-ui'] = self + app.before_request(verify_oauth_token_and_set_current_user) def init_config(self, app): """Initialize configuration. diff --git a/modules/weko-records-ui/weko_records_ui/pdf.py b/modules/weko-records-ui/weko_records_ui/pdf.py index 45a74c40fd..960c5223be 100644 --- a/modules/weko-records-ui/weko_records_ui/pdf.py +++ b/modules/weko-records-ui/weko_records_ui/pdf.py @@ -36,7 +36,7 @@ from invenio_pidrelations.contrib.versioning import PIDVersioning from invenio_pidrelations.models import PIDRelation from invenio_pidstore.models import PersistentIdentifier, PIDStatus -from PyPDF2 import PdfFileReader, PdfFileWriter +from pypdf import PdfReader, PdfWriter from weko_deposit.api import WekoRecord from weko_items_autofill.utils import get_workflow_journal from weko_records.api import ItemsMetadata, ItemTypes @@ -46,7 +46,7 @@ from weko_workflow.api import WorkActivity from weko_records_ui.utils import get_record_permalink, \ - item_setting_show_email + item_setting_show_email,get_values_by_selected_lang from .models import PDFCoverPageSettings from .utils import get_license_pdf, get_pair_value @@ -62,6 +62,10 @@ def get_east_asian_width_count(text): count += 1 return count +LANG_CONVERT = { + "jpn": "Japanese", + "eng": "English" +} def make_combined_pdf(pid, fileobj, obj, lang_user): """Make the cover-page-combined PDF file. @@ -327,29 +331,28 @@ def get_oa_policy(activity_id): try: lang_field = item_map['language.@value'].split('.') + language = [] if isinstance(item_metadata_json[lang_field[0]], dict): - if item_metadata_json[lang_field[0]][lang_field[1]] == 'eng': - item_metadata_json['lang'] = 'English' - elif item_metadata_json[lang_field[0]][lang_field[1]] == 'jpn': - item_metadata_json['lang'] = 'Japanese' + lang_str = item_metadata_json[lang_field[0]][lang_field[1]] + language.append(LANG_CONVERT.get(lang_str, lang_str)) elif isinstance(item_metadata_json[lang_field[0]], list): - if item_metadata_json[lang_field[0]][0][lang_field[1]] == 'eng': - item_metadata_json['lang'] = 'English' - elif item_metadata_json[lang_field[0]][0][lang_field[1]] == 'jpn': - item_metadata_json['lang'] = 'Japanese' + for lang_metadata in item_metadata_json[lang_field[0]]: + lang_str = lang_metadata[lang_field[1]] + language.append(LANG_CONVERT.get(lang_str, lang_str)) + item_metadata_json['lang'] = language except BaseException: - pass + item_metadata_json['lang'] = [item_metadata_json['lang']] if 'lang' in item_metadata_json else [] try: lang = item_metadata_json.get('lang') except (KeyError, IndexError): - lang = None + lang = [] # get publisher info publisher_attr_lang = 'publisher.@attributes.xml:lang' publisher_value = 'publisher.@value' + publisher = [] try: - multi_lang_value = {} for i in item_map[publisher_value].split(','): value_key_list = i.split('.') publisher_item_id = value_key_list[0] @@ -364,18 +367,18 @@ def get_oa_policy(activity_id): if publisher_item_id == lang_key_list[0]: publisher_lang_ids = lang_key_list[1:] publisher_text_ids = value_key_list[1:] - publisher = [] publishers = item_metadata_json[publisher_item_id] pair_name_language_publisher = get_pair_value(publisher_text_ids, publisher_lang_ids, publishers) + multi_lang_value = [] for publisher_name, publisher_lang in pair_name_language_publisher: if not publisher_lang: publisher_lang == 'None Language' - multi_lang_value[publisher_lang] = publisher_name - value = get_value_by_selected_lang(multi_lang_value, cur_lang) - if value: - publisher.append(value) + multi_lang_value.append((publisher_lang, publisher_name)) + values = get_values_by_selected_lang(multi_lang_value, cur_lang) + if values: + publisher+=values except (KeyError, IndexError): publisher = [] @@ -388,8 +391,7 @@ def get_oa_policy(activity_id): # get keyword info keyword_attr_lang = 'subject.@attributes.xml:lang' keyword_attr_value = 'subject.@value' - keywords_ja = [] - keywords_en = [] + keywords = [] try: for i in item_map[keyword_attr_value].split(','): value_key_list = i.split('.') @@ -409,14 +411,16 @@ def get_oa_policy(activity_id): pair_name_language_keyword = get_pair_value(keyword_item_values, keyword_item_langs, keyword_base) + multi_lang_value = [] for name, keyword_lang in pair_name_language_keyword: - if keyword_lang == 'ja' and name: - keywords_ja.append(name) - elif keyword_lang == 'en' and name: - keywords_en.append(name) + if not keyword_lang: + keyword_lang = 'None Language' + multi_lang_value.append((keyword_lang, name)) + values = get_values_by_selected_lang(multi_lang_value, cur_lang) + if values: + keywords+=values except (KeyError, IndexError): - keywords_ja = [] - keywords_en = [] + keywords = [] # get creator info _creator = 'creator.creatorName.@value' @@ -493,11 +497,10 @@ def get_oa_policy(activity_id): seperator = ', ' metadata_dict = { - "lang": lang, + "lang": seperator.join(lang), "publisher": seperator.join(publisher), "pubdate": pubdate, - "keywords_ja": seperator.join(keywords_ja), - "keywords_en": seperator.join(keywords_en), + "keywords": seperator.join(keywords), "creator_mail": seperator.join(creator_mail_list), "creator_name": seperator.join(creator_name_list), "affiliation": seperator.join(creator_affiliation_list) @@ -516,12 +519,9 @@ def get_oa_policy(activity_id): "{}: {}".format( lang_data["Metadata"]["PUBLICDATE"], metadata_dict["pubdate"]), - "{} (Ja): {}".format( - lang_data["Metadata"]["KEY"], - metadata_dict["keywords_ja"]), - "{} (En): {}".format( + "{}: {}".format( lang_data["Metadata"]["KEY"], - metadata_dict["keywords_en"]), + metadata_dict["keywords"]), "{}: {}".format( lang_data["Metadata"]["AUTHOR"], metadata_dict["creator_name"]), @@ -606,13 +606,13 @@ def get_oa_policy(activity_id): b_output = io.BytesIO(output) # Combine cover page and existing pages - cover_page = PdfFileReader(b_output, strict=False) + cover_page = PdfReader(b_output, strict=False) f = obj.file.storage().open() - existing_pages = PdfFileReader(f) + existing_pages = PdfReader(f) # In the case the PDF file is encrypted by the password, ''(i.e. not # encrypted intentionally) - if existing_pages.isEncrypted: + if existing_pages.is_encrypted: try: existing_pages.decrypt('') @@ -629,7 +629,7 @@ def get_oa_policy(activity_id): ) # In the case the PDF file is encrypted by the password except '' - if existing_pages.isEncrypted: + if existing_pages.is_encrypted: return ObjectResource.send_object( obj.bucket, obj, expected_chksum=fileobj.get('checksum'), @@ -641,26 +641,26 @@ def get_oa_policy(activity_id): as_attachment=False ) - combined_pages = PdfFileWriter() - combined_pages.addPage(cover_page.getPage(0)) + combined_pages = PdfWriter() + combined_pages.add_page(cover_page.pages[0]) - for page_num in range(existing_pages.numPages): - existing_page = existing_pages.getPage(page_num) - combined_pages.addPage(existing_page) + for page_num in range(len(existing_pages.pages)): + existing_page = existing_pages.pages[page_num] + combined_pages.add_page(existing_page) # Download the newly generated combined PDF file try: - combined_filename = 'CV_' + datetime.now().strftime('%Y%m%d') + '_' + \ - fileobj['filename'] + download_filename = 'CV_' + fileobj['filename'] except (KeyError, IndexError): - combined_filename = 'CV_' + title + '.pdf' + download_filename = 'CV_' + title + '.pdf' dir_path = tempfile.gettempdir() + '/comb_pdfs/' if not os.path.isdir(dir_path): os.mkdir(dir_path) - combined_filepath = dir_path + '{}.pdf'.format(combined_filename) + combined_filepath = dir_path + 'CV_{}_{}.pdf'.format( + datetime.now().strftime('%Y%m%d'), fileobj.file_id) with open(combined_filepath, 'wb') as f: try: @@ -718,7 +718,7 @@ def get_oa_policy(activity_id): return send_file( combined_filepath, as_attachment=True, - attachment_filename=combined_filename, + attachment_filename=download_filename, mimetype='application/pdf', cache_timeout=-1 ) diff --git a/modules/weko-records-ui/weko_records_ui/permissions.py b/modules/weko-records-ui/weko_records_ui/permissions.py index 53432b36ab..51cbf73b18 100644 --- a/modules/weko-records-ui/weko_records_ui/permissions.py +++ b/modules/weko-records-ui/weko_records_ui/permissions.py @@ -25,12 +25,14 @@ import traceback from typing import List, Optional -from flask import abort, current_app +from flask import abort, current_app, request from flask_babelex import get_locale, to_user_timezone, to_utc from flask_security import current_user from invenio_access import Permission, action_factory from invenio_accounts.models import User from invenio_db import db +from invenio_deposit.scopes import write_scope +from invenio_oauth2server import require_api_auth, require_oauth_scopes from weko_groups.api import Group, Membership, MembershipState from weko_index_tree.utils import check_index_permissions, get_user_roles from weko_records.api import ItemTypes @@ -76,10 +78,21 @@ def can(self): def file_permission_factory(record, *args, **kwargs): """File permission factory.""" + @require_api_auth() + @require_oauth_scopes(write_scope.id) + def can_by_oauth(fjson): + return check_file_download_permission(record, fjson) + def can(self): + is_ok = False fjson = kwargs.get('fjson') - item_type = kwargs.get('item_type', None) - return check_file_download_permission(record, fjson, item_type) + if request.headers and \ + request.headers.get(current_app.config['OAUTH2SERVER_JWT_AUTH_HEADER']): + is_ok = can_by_oauth(fjson) + else: + item_type = kwargs.get('item_type', None) + is_ok = check_file_download_permission(record, fjson, item_type) + return is_ok return type('FileDownLoadPermissionChecker', (), {'can': can})() diff --git a/modules/weko-records-ui/weko_records_ui/static/js/weko_records_ui/app.js b/modules/weko-records-ui/weko_records_ui/static/js/weko_records_ui/app.js index e4b47c9d3e..938e84770d 100644 --- a/modules/weko-records-ui/weko_records_ui/static/js/weko_records_ui/app.js +++ b/modules/weko-records-ui/weko_records_ui/static/js/weko_records_ui/app.js @@ -437,4 +437,8 @@ function OnLinkClick(uri, pid_value, accessrole) { } }); window.open(uri); -} \ No newline at end of file +} + +function exportZip() { + document.getElementById("export_zip_form").submit() +} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/body_contents.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/body_contents.html index 95974b6945..888935ad1e 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/body_contents.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/body_contents.html @@ -356,7 +356,11 @@

    {{_('Item')}}

    {% endif%} {% endif %}
    + {%- if community -%} + {{ output_item_detail(record, files, files_thumbnail, pid, record.items_show_list, true, is_logged_in, open_day_display_flg, m_community=community.id) }} + {%- else -%} {{ output_item_detail(record, files, files_thumbnail, pid, record.items_show_list, true, is_logged_in, open_day_display_flg) }} + {%- endif -%}
    {%- if 'main_entry_personal_name' in record %}

    diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/export.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/export.html index 03235fef42..185a14066e 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/export.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/export.html @@ -46,6 +46,16 @@

    {{_('Export')}}

    {%- if 'BIBTEX' in fmt['title'] %}
  • {{fmt['title']}}
  • {%- endif %} + {%- if 'ZIP' in fmt['title'] %} +
  • {{fmt['title']}}
  • +
    + + + + +
    + {%- endif %} {%- endfor %} {%- endif %} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/head.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/head.html index b882b2f2f4..dbce0f7246 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/head.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/head.html @@ -23,8 +23,13 @@ {%- if pid in active_versions and pid | pid_value_version %}
    - {{ _('There is a') }} {{ _('newer version') }} {{ _('of this record available.') }} + {{ _('There is a') }}  + {%- if community -%} + {{ _('newer version') }} + {%- else -%} + {{ _('newer version') }} + {%- endif -%} +  {{ _('of this record available.') }}
    {%- endif %} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/preview_carousel.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/preview_carousel.html index fc212f4142..0432707f0a 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/preview_carousel.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/preview_carousel.html @@ -99,6 +99,10 @@ + {%- elif 'text/csv' in file.mimetype -%} + {%- elif 'text' in file.mimetype -%} {%- else -%} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/share.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/share.html index 801d2b6e8b..7c3ea4c96b 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/share.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/share.html @@ -21,28 +21,49 @@

    {{_('Share')}}

    +{%- set share_lang = "ja_JP" if current_i18n.language == "ja" else "en_US" %} {%- if config.get('ENABLE_COOKIE_CONSENT', False) %} - - - + +
    + + + + +
    + +
    + + + {%- else %} - - - +
    + +
    + + + + + + {%- endif %}

    Cite as

    @@ -71,6 +92,22 @@

    Cite as

    +

    Other

    +
    + + + + print +
    +
    diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/versions.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/versions.html index 9c9c008508..0f98eec2dc 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/versions.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/box/versions.html @@ -8,7 +8,11 @@

    {{_('Versions')}}

    {%- set current_version_index = all_versions[-1].pid_value | pid_value_version | int %} - {{ version_label_const + current_version_index | string }} + {%- if community -%} + {{ version_label_const + current_version_index | string }} + {%- else -%} + {{ version_label_const + current_version_index | string }} + {%- endif -%} {{ all_versions[-1].updated }} @@ -23,7 +27,11 @@

    {{_('Versions')}}

    {%- set version_date = pid_version.updated %} 2 %}ng-show="versionsCollapse" {% endif %}> - {{ version_label }} + {%- if community -%} + {{ version_label }} + {%- else -%} + {{ version_label }} + {%- endif -%} {{ version_date }} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/detail.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/detail.html index 3d7ecbfc4b..95ed314419 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/detail.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/detail.html @@ -28,18 +28,6 @@ {% assets "weko_records_ui_js" %}{% endassets %} {% assets "weko_records_ui_preview_carousel_js" %}{% endassets %} - {%- set site_info = site_info|get_site_info %} - {%- set addthis_user_id = site_info.get("addthis_user_id",config.ADDTHIS_USER_ID) %} - - - - {% assets "weko_theme_js_widget" %}{% endassets %} {% assets "weko_records_ui_bootstrap_popover_js" %}{% endassets %} {%- endblock javascript %} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/file_details.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/file_details.html index 5b34bd5a36..04b0f91365 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/file_details.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/file_details.html @@ -39,14 +39,7 @@ {% assets "weko_records_ui_js" %}{% endassets %} {% assets "weko_records_ui_preview_carousel_js" %}{% endassets %} - - - -{%- set site_info = site_info|get_site_info %} -{%- set addthis_user_id = site_info.get("addthis_user_id",config.ADDTHIS_USER_ID) %} - - - {% assets "weko_theme_js_widget" %}{% endassets %} +{% assets "weko_theme_js_widget" %}{% endassets %} {%- endblock javascript %} {%- block page_body_tabs %} diff --git a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/item_detail.html b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/item_detail.html index 1869b8a4e3..823ef61111 100644 --- a/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/item_detail.html +++ b/modules/weko-records-ui/weko_records_ui/templates/weko_records_ui/item_detail.html @@ -29,7 +29,8 @@ m_is_top_page=False, m_is_logged_in=False, m_open_day_display_flg=true, - m_cur_step=None) %} + m_cur_step=None, + m_community=None) %} {% autoescape False %} {% if m_record.item_type_info %} @@ -155,7 +156,11 @@
    {% if m_record | check_permission %} {% if '0' in public_status %} diff --git a/modules/weko-records-ui/weko_records_ui/utils.py b/modules/weko-records-ui/weko_records_ui/utils.py index 5c91458dfb..9b853a3594 100644 --- a/modules/weko-records-ui/weko_records_ui/utils.py +++ b/modules/weko-records-ui/weko_records_ui/utils.py @@ -22,6 +22,7 @@ import base64 import os +import six from datetime import datetime as dt from datetime import timedelta from decimal import Decimal @@ -42,6 +43,7 @@ from invenio_pidrelations.contrib.versioning import PIDVersioning from invenio_pidstore.models import PersistentIdentifier, PIDStatus from invenio_records.models import RecordMetadata +from invenio_records_ui.utils import obj_or_import_string from lxml import etree from passlib.handlers.oracle import oracle10 from weko_admin.models import AdminSettings @@ -49,7 +51,7 @@ from weko_deposit.api import WekoDeposit, WekoRecord from weko_records.api import FeedbackMailList, ItemTypes, Mapping from weko_records.serializers.utils import get_mapping -from weko_records.utils import replace_fqdn +from weko_records.utils import custom_record_medata_for_export, replace_fqdn from weko_records.models import ItemReference from weko_schema_ui.models import PublishStatus from weko_workflow.api import WorkActivity, WorkFlow, UpdateItem @@ -332,6 +334,8 @@ def delete_version(recid): latest_version = get_latest_version(id_without_version) latest_pid = PersistentIdentifier.query.filter_by( pid_type='recid', pid_value=latest_version).first() + latest_record = WekoDeposit.get_record(latest_pid.object_uuid) + _publish_status = latest_record.get('publish_status', PublishStatus.PUBLIC.value) # update parent item if is_latest_version: pid_without_ver = PersistentIdentifier.query.filter_by( @@ -352,7 +356,7 @@ def delete_version(recid): parent_deposit["relation_version_is_last"] = True parent_deposit.publish() new_parent_record.commit() - updated_item.publish(new_parent_record) + updated_item.publish(new_parent_record, _publish_status) weko_record = WekoRecord.get_record_by_pid( pid_without_ver.pid_value) if weko_record: @@ -377,7 +381,7 @@ def delete_version(recid): draft_deposit["relation_version_is_last"] = True draft_deposit.publish() new_draft_record.commit() - updated_item.publish(new_draft_record) + updated_item.publish(new_draft_record, _publish_status) # update item link info of draft record weko_record = WekoRecord.get_record_by_pid( draft_deposit.pid.pid_value) @@ -614,6 +618,73 @@ def get_pair_value(name_keys, lang_keys, datas): datas.get(name_keys[0])): yield name, lang +def get_values_by_selected_lang(source_title, current_lang): + """Get value by selected lang. + + @param source_title: e.g. [('None Language': 'test'), ('ja': 'テスト1'), ('ja', 'テスト2')] + @param current_lang: e.g. 'ja' + @return: e.g. ['テスト1','テスト2'] + """ + value_cur = [] + value_en = [] + value_latn = [] + title_data_langs = [] + title_data_langs_none = [] + for lang, value in source_title: + title = {} + if not value: + continue + elif current_lang == lang: + value_cur.append(value) + else: + title[lang] = value + if lang == "en": + value_en.append(value) + elif lang == "ja-Latn": + value_latn.append(value) + elif lang == "None Language": + title_data_langs_none.append(value) + elif lang: + title_data_langs.append(title) + if len(value_cur) > 0: + return value_cur + + if len(title_data_langs_none)>0: + source = source_title[0][1] + target = title_data_langs_none[0] + if source==target: + return title_data_langs_none + + if len(value_latn) > 0: + return value_latn + + if len(value_en) > 0 and ( + current_lang != "ja" + or not current_app.config.get("WEKO_RECORDS_UI_LANG_DISP_FLG", False) + ): + return value_en + + if len(title_data_langs) > 0: + if current_lang == "en": + target_lang = "" + for t in title_data_langs: + + if list(t)[0] != "ja" or not current_app.config.get( + "WEKO_RECORDS_UI_LANG_DISP_FLG", False + ): + target_lang = list(t)[0] + if target_lang: + return [title_data[target_lang] for title_data in title_data_langs if target_lang in title_data] + + else: + target_lang = list(title_data_langs[0].keys())[0] + return [title_data[target_lang] for title_data in title_data_langs if target_lang in title_data] + + if len(title_data_langs_none) > 0: + return title_data_langs_none + else: + return None + def hide_item_metadata(record, settings=None, item_type_data=None): """Hiding emails and hidden item metadata. @@ -1949,4 +2020,37 @@ def update_secret_download(**kwargs) -> Optional[List[FileSecretDownload]]: updated List[FileSecretDownload] or None """ current_app.logger.debug("update_secret_download:{}".format(kwargs)) - return FileSecretDownload.update_download(**kwargs) \ No newline at end of file + return FileSecretDownload.update_download(**kwargs) + + +def export_preprocess(pid, record, schema_type): + """Preprocess for export. + + Args: + PersistentIdentifier : pid: + WekoRecord : record: + str : schema_type: + Returns: + str : data for export + """ + formats = current_app.config.get('RECORDS_UI_EXPORT_FORMATS', {}).get(pid.pid_type, {}) + fmt = formats.get(schema_type) + + if fmt is False: + # If value is set to False, it means it was deprecated. + abort(410) + elif fmt is None: + abort(404) + else: + custom_record_medata_for_export(record) + + if 'json' not in schema_type and 'bibtex' not in schema_type: + record.update({'@export_schema_type': schema_type}) + + serializer = obj_or_import_string(fmt['serializer']) + data = serializer.serialize(pid, record) + + if isinstance(data, six.binary_type): + data = data.decode('utf8') + + return data diff --git a/modules/weko-records-ui/weko_records_ui/views.py b/modules/weko-records-ui/weko_records_ui/views.py index e8abc09ea9..b6b3a5dcef 100644 --- a/modules/weko-records-ui/weko_records_ui/views.py +++ b/modules/weko-records-ui/weko_records_ui/views.py @@ -72,7 +72,7 @@ from .permissions import check_content_clickable, check_created_id, \ check_file_download_permission, check_original_pdf_download_permission, \ check_permission_period, file_permission_factory, get_permission -from .utils import create_secret_url, get_billing_file_download_permission, \ +from .utils import create_secret_url, export_preprocess, get_billing_file_download_permission, \ get_google_detaset_meta, get_google_scholar_meta, get_groups_price, \ get_min_price_billing_file_download, get_record_permalink, hide_by_email, \ delete_version, is_show_email_of_creator,hide_by_itemtype @@ -137,6 +137,7 @@ def publish(pid, record, template=None, **kwargs): from weko_deposit.api import WekoIndexer status = request.values.get('status') publish_status = record.get('publish_status') + comm_id = request.values.get('community') pid_ver = PIDVersioning(child=pid) last_record = WekoRecord.get_record_by_pid(pid_ver.last_child.pid_value) @@ -156,7 +157,10 @@ def publish(pid, record, template=None, **kwargs): indexer.update_es_data(record, update_revision=False, field='publish_status') indexer.update_es_data(last_record, update_revision=False, field='publish_status') - return redirect(url_for('.recid', pid_value=pid.pid_value)) + if comm_id: + return redirect(url_for('.recid', pid_value=pid.pid_value, community=comm_id)) + else: + return redirect(url_for('.recid', pid_value=pid.pid_value)) def export(pid, record, template=None, **kwargs): @@ -170,34 +174,16 @@ def export(pid, record, template=None, **kwargs): :param kwargs: Additional view arguments based on URL rule. :return: The rendered template. """ - formats = current_app.config.get('RECORDS_UI_EXPORT_FORMATS', {}).get( - pid.pid_type) schema_type = request.view_args.get('format') - fmt = formats.get(schema_type) - if fmt is False: - # If value is set to False, it means it was deprecated. - abort(410) - elif fmt is None: - abort(404) - else: - # Custom Record Metadata for export JSON - custom_record_medata_for_export(record) - if 'json' not in schema_type and 'bibtex' not in schema_type: - record.update({'@export_schema_type': schema_type}) - - serializer = obj_or_import_string(fmt['serializer']) - data = serializer.serialize(pid, record) - if isinstance(data, six.binary_type): - data = data.decode('utf8') + data = export_preprocess(pid, record, schema_type) + response = make_response(data) - response = make_response(data) - - if 'json' in schema_type or 'bibtex' in schema_type: - response.headers['Content-Type'] = 'text/plain' - else: - response.headers['Content-Type'] = 'text/xml' + if 'json' in schema_type or 'bibtex' in schema_type: + response.headers['Content-Type'] = 'text/plain' + else: + response.headers['Content-Type'] = 'text/xml' - return response + return response @blueprint.app_template_filter('get_image_src') @@ -975,13 +961,16 @@ def citation(record, pid, style=None, ln=None): def soft_delete(recid): """Soft delete item.""" try: - if not has_update_version_role(current_user): + _id = recid + if recid.startswith('del_ver_'): + _id = _id.replace('del_ver_', '') + record = WekoRecord.get_record_by_pid(_id) + if not check_created_id(record): abort(403) if recid.startswith('del_ver_'): - recid = recid.replace('del_ver_', '') - delete_version(recid) + delete_version(_id) else: - soft_delete_imp(recid) + soft_delete_imp(_id) db.session.commit() return make_response('PID: ' + str(recid) + ' DELETED', 200) except Exception as ex: @@ -1002,7 +991,8 @@ def soft_delete(recid): def restore(recid): """Restore item.""" try: - if not has_update_version_role(current_user): + record = WekoRecord.get_record_by_pid(recid) + if not check_created_id(record): abort(403) restore_imp(recid) return make_response('PID: ' + str(recid) + ' RESTORED', 200) diff --git a/modules/weko-records/requirements.txt b/modules/weko-records/requirements.txt index a35a5e630b..c8b9cabb3f 100644 --- a/modules/weko-records/requirements.txt +++ b/modules/weko-records/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-records/requirements2.txt b/modules/weko-records/requirements2.txt index 1050907838..20dc1882b7 100644 --- a/modules/weko-records/requirements2.txt +++ b/modules/weko-records/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-records/tests/conftest.py b/modules/weko-records/tests/conftest.py index 75bb8c6898..28707b2d1e 100644 --- a/modules/weko-records/tests/conftest.py +++ b/modules/weko-records/tests/conftest.py @@ -49,7 +49,7 @@ from invenio_pidrelations import InvenioPIDRelations from invenio_pidstore import InvenioPIDStore from invenio_records import InvenioRecords -from invenio_search import InvenioSearch +from invenio_search import InvenioSearch, current_search_client from weko_admin.models import AdminSettings from weko_deposit import WekoDeposit @@ -63,7 +63,7 @@ from weko_records import WekoRecords from weko_records.api import ItemTypes, Mapping from weko_records.config import WEKO_ITEMTYPE_EXCLUDED_KEYS -from weko_records.models import ItemTypeName, SiteLicenseInfo, FeedbackMailList, ItemReference +from weko_records.models import ItemTypeName, SiteLicenseInfo, FeedbackMailList, ItemReference, ItemTypeProperty from tests.helpers import json_data, create_record @@ -100,9 +100,10 @@ def base_app(instance_path): THEME_SITEURL="https://localhost", WEKO_ITEMTYPE_EXCLUDED_KEYS=WEKO_ITEMTYPE_EXCLUDED_KEYS, INDEX_IMG='indextree/36466818-image.jpg', - SEARCH_UI_SEARCH_INDEX='tenant1', + SEARCH_UI_SEARCH_INDEX='test-weko', INDEXER_DEFAULT_DOCTYPE='item-v1.0.0', INDEXER_FILE_DOC_TYPE='content', + INDEXER_DEFAULT_INDEX="{}-weko-item-v1.0.0".format('test'), I18N_LANGUAGES=[("ja", "Japanese"), ("en", "English")], WEKO_PERMISSION_SUPER_ROLE_USER=WEKO_PERMISSION_SUPER_ROLE_USER, WEKO_PERMISSION_ROLE_COMMUNITY=WEKO_PERMISSION_ROLE_COMMUNITY, @@ -333,6 +334,30 @@ def db_index(app, db): db.session.commit() +@pytest.fixture() +def esindex(app): + current_search_client.indices.delete(index="test-*") + with open("tests/data/item-v1.0.0.json", "r") as f: + mapping = json.load(f) + try: + current_search_client.indices.create( + "test-weko-item-v1.0.0", body=mapping + ) + current_search_client.indices.put_alias( + index="test-weko-item-v1.0.0", name="test-weko" + ) + except: + current_search_client.indices.create("test-weko-items", body=mapping) + current_search_client.indices.put_alias( + index="test-weko-items", name="test-weko" + ) + + try: + yield current_search_client + finally: + current_search_client.indices.delete(index="test-*") + + @pytest.fixture() def item_type(app, db): _item_type_name = ItemTypeName(name='test') @@ -437,6 +462,228 @@ def item_type_mapping2(app, db): } return Mapping.create(2, _mapping) +@pytest.fixture() +def item_type_property(app, db): + """Create item type property.""" + + _schema = { + "type": "object", + "format": "object", + "properties": { + "subitem_value": { + "type": "string", + "title": "タイトル", + "format": "text", + } + } + } + + _form = { + "key": "parentkey", + "type": "fieldset", + "items": [ + { + "key": "parentkey.subitem_value", + "type": "text", + "title": "タイトル", + }, + ], + } + + _forms = { + "add": "New", + "key": "parentkey", + "items": [ + { + "key": "parentkey[].subitem_value", + "type": "text", + "title": "タイトル", + }, + ], + "style": { + "add": "btn-success" + }, + } + + item_type_property1 = ItemTypeProperty( + id = 1000, + name='title', + schema=_schema, + form=_form, + forms=_forms, + sort = 1, + ) + + db.session.add(item_type_property1) + db.session.commit() + + return item_type_property1 + +@pytest.fixture() +def item_type_with_form(app, db, item_type_property): + _item_type_name = ItemTypeName(name='test') + + prop_schema = item_type_property.schema + prop_form = item_type_property.form + prop_forms = item_type_property.forms + + _default_settings = { + "isHide": False, + "required": False, + "isShowList": False, + "isNonDisplay": False, + "isSpecifyNewline": False + } + + _schema = { + "type": "object", + 'properties': { + "pubdate": { + "type": "string", + "title": "PubDate", + "format": "datetime" + }, + "item_3_form": { + "type": "array", + "items": prop_schema, + "title": "item3", + "maxItems": 9999, + "minItems": 1 + }, + "item_4_form": prop_schema, + "item_5_form": { + "type": "array", + "items": prop_schema, + "title": "item5", + "properties": {}, + "format": "sample", + }, + } + } + + form_item3 = json.loads(json.dumps(prop_forms, ensure_ascii=False).replace("parentkey", "item_3_form")) + form_item3.update(_default_settings) + [props.update(_default_settings) for props in form_item3['items']] + + form_item4 = json.loads(json.dumps(prop_form, ensure_ascii=False).replace("parentkey", "item_4_form")) + form_item4.update(_default_settings) + [props.update(_default_settings) for props in form_item4['items']] + + form_item5 = json.loads(json.dumps(prop_forms, ensure_ascii=False).replace("parentkey", "item_5_form")) + form_item5.update(_default_settings) + [props.update(_default_settings) for props in form_item3['items']] + + _form = [ + { + "key": "pubdate", + "type": "template", + "title": "PubDate", + "format": "yyyy-MM-dd", + "required": True, + "title_i18n": { + "en": "PubDate", + "ja": "公開日" + }, + "templateUrl": "/static/templates/weko_deposit/datepicker.html" + }, + form_item3, + form_item4, + ] + + _render = { + 'meta_fix': {}, + 'meta_list': { + "item_3_form": { + "title": "Title", + "option": { + "crtf": True, + "hidden": False, + "multiple": True, + "required": True, + "showlist": True + }, + "input_type": "cus_1000", + "title_i18n": { + "en": "Title", + "ja": "タイトル" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_4_form": { + "title": "Title2", + "option": { + "crtf": True, + "hidden": False, + "multiple": False, + "required": True, + "showlist": True + }, + "input_type": "cus_1000", + "title_i18n": { + "en": "Title2", + "ja": "タイトル2" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + "item_5_form": { + "title": "Title", + "option": { + "crtf": True, + "hidden": False, + "multiple": True, + "required": True, + "showlist": True + }, + "input_type": "cus_1000", + "title_i18n": { + "en": "Title3", + "ja": "タイトル3" + }, + "input_value": "", + "input_maxItems": "9999", + "input_minItems": "1" + }, + }, + 'table_row_map': { + 'schema': _schema + }, + 'table_row': ['item_1', 'item_2'], + "table_row_map": { + "schema": _schema, + "form": _form + }, + "schemaeditor": { + "schema": _schema, + } + } + + return ItemTypes.create( + name='test', + item_type_name=_item_type_name, + schema=_schema, + form=_form, + render=_render, + tag=1 + ) + +@pytest.fixture() +def item_type_mapping_with_form(app, db, item_type_with_form): + _mapping = { + 'item_1': { + 'jpcoar_mapping': { + 'item': { + '@value': 'interim' + } + } + } + } + return Mapping.create(item_type_with_form.id, _mapping) + + @pytest.fixture() def mock_execute(): def factory(data): diff --git a/modules/weko-records/tests/data/item-v1.0.0.json b/modules/weko-records/tests/data/item-v1.0.0.json new file mode 100644 index 0000000000..5f1817ad97 --- /dev/null +++ b/modules/weko-records/tests/data/item-v1.0.0.json @@ -0,0 +1,1221 @@ +{ + "settings": { + "number_of_shards": 1, + "number_of_replicas": 1, + "index.mapping.total_fields.limit": 50000, + "analysis": { + "tokenizer": { + "ja_tokenizer": { + "type": "kuromoji_tokenizer", + "mode": "search" + }, + "ngram_tokenizer": { + "type": "nGram", + "min_gram": 1, + "max_gram": 3, + "token_chars": [ + "letter", + "digit" + ] + } + }, + "char_filter": { + "weko_char_filter": { + "type": "mapping", + "mappings_path": "kui.txt" + } + }, + "analyzer": { + "default": { + "tokenizer": "ngram_tokenizer", + "filter": [ + "kuromoji_baseform", + "kuromoji_part_of_speech", + "cjk_width", + "stop", + "kuromoji_stemmer", + "lowercase" + ], + "char_filter": [ + "weko_char_filter" + ] + }, + "ngram_analyzer": { + "type": "custom", + "char_filter": [ + "weko_char_filter", + "html_strip" + ], + "tokenizer": "ngram_tokenizer", + "filter": [ + "cjk_width", + "lowercase" + ] + }, + "wk_analyzer": { + "type": "custom", + "char_filter": [ + "html_strip" + ], + "tokenizer": "standard", + "filter": [ + "standard", + "lowercase", + "stop", + "cjk_width" + ] + }, + "paths": { + "tokenizer": "path_hierarchy" + } + } + } + }, + "mappings": { + "item-v1.0.0": { + "properties": { + "path": { + "type": "keyword", + "index": true, + "fields": { + "tree": { + "type": "text", + "fielddata": true, + "analyzer": "paths" + } + } + }, + "item_type_id": { + "type": "keyword", + "index": true + }, + "itemtype": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "fielddata": true, + "copy_to": [ + "search_other" + ] + }, + "publish_status": { + "type": "keyword", + "index": true + }, + "publish_date": { + "type": "date", + "format": "yyyy-MM-dd||yyyy-MM||yyyy" + }, + "_created": { + "type": "date" + }, + "_updated": { + "type": "date" + }, + "_oai": { + "type": "object", + "properties": { + "id": { + "type": "keyword", + "index": true + }, + "sets": { + "type": "keyword", + "index": true + }, + "updated": { + "type": "date" + } + } + }, + "control_number": { + "type": "keyword", + "index": true + }, + "title": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_title" + ] + }, + "feedback_mail_list": { + "type": "nested", + "properties": { + "author_id": { + "type": "keyword", + "index": true + }, + "email": { + "type": "keyword", + "index": true + } + } + }, + "alternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_title" + ] + }, + "creator": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "creatorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "familyName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "givenName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "creatorAlternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_creator" + ] + }, + "affiliation": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "affiliationName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + } + } + }, + "contributor": { + "type": "object", + "properties": { + "@attributes": { + "type": "object", + "properties": { + "contributorType": { + "type": "keyword" + } + } + }, + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "contributorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "familyName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "givenName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "contributorAlternative": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_contributor" + ] + }, + "affiliation": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "affiliationName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + } + } + }, + "accessRights": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "apc": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "rights": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "rightsHolder": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "rightsHolderName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "subject": { + "type": "object", + "properties": { + "value": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "subjectScheme": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "description": { + "type": "object", + "properties": { + "value": { + "type": "keyword", + "ignore_above": 256, + "copy_to": [ + "search_des" + ] + }, + "descriptionType": { + "type": "keyword" + } + } + }, + "publisher": { + "type": "text", + "copy_to": [ + "search_publisher" + ] + }, + "date": { + "type": "nested", + "properties": { + "dateType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + }, + "value": { + "type": "keyword" + } + } + }, + "language": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "version": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "versionType": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "identifierRegistration": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "relation": { + "type": "object", + "properties": { + "relatedIdentifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "relatedTitle": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "relationType": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "index": true + }, + "item_links": { + "type": "keyword", + "index": true + }, + "item_title": { + "type": "keyword", + "index": true + } + } + } + } + }, + "temporal": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + }, + "text1": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text2": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text3": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text4": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text5": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text6": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text7": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text8": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text9": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text10": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text11": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text12": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text13": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text14": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text15": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text16": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text17": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text18": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text19": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text20": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text21": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text22": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text23": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text24": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text25": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text26": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text27": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text28": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text29": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "text30": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + } + } + }, + "integer_range1":{ + "type": "integer_range" + }, + "integer_range2":{ + "type": "integer_range" + }, + "integer_range3":{ + "type": "integer_range" + }, + "integer_range4":{ + "type": "integer_range" + }, + "integer_range5":{ + "type": "integer_range" + }, + "float_range1":{ + "type": "float_range" + }, + "float_range2":{ + "type": "float_range" + }, + "float_range3":{ + "type": "float_range" + }, + "float_range4":{ + "type": "float_range" + }, + "float_range5":{ + "type": "float_range" + }, + "geo_point1":{ + "type": "geo_point" + }, + "date_range1":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range2":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range3":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range4":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + "date_range5":{ + "type" : "date_range", + "format" : "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM||yyyy||epoch_millis" + }, + + "geo_shape1":{ + "type" : "geo_shape" + }, + "geoLocation": { + "type": "object", + "properties": { + "geoLocationPoint": { + "type": "object", + "properties": { + "pointLongitude": { + "type": "geo_point" + }, + "pointLatitude": { + "type": "geo_point" + } + } + }, + "geoLocationBox": { + "type": "object", + "properties": { + "westBoundLongitude": { + "type": "geo_point" + }, + "eastBoundLongitude": { + "type": "geo_point" + }, + "southBoundLatitude": { + "type": "geo_point" + }, + "northBoundLatitude": { + "type": "geo_point" + } + } + }, + "geoLocationPlace": { + "type": "keyword", + "copy_to": [ + "search_other" + ] + } + } + }, + "fundingReference": { + "type": "object", + "properties": { + "funderIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "funderName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "awardNumber": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "awardTitle": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "sourceIdentifier": { + "type": "nested", + "properties": { + "value": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "identifierType": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_attr" + ] + } + } + }, + "sourceTitle": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + }, + "copy_to": [ + "search_other" + ] + }, + "author_link": { + "type": "text", + "fields" : { + "raw" : { + "type" : "keyword", + "ignore_above" : 256 + } + } + }, + "volume": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "issue": { + "type": "text", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "numPages": { + "type": "text" + }, + "pageStart": { + "type": "text" + }, + "pageEnd": { + "type": "text" + }, + "dissertationNumber": { + "type": "text", + "copy_to": [ + "search_other" + ] + }, + "degreeName": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + }, + "copy_to": [ + "search_other" + ] + }, + "dateGranted": { + "type": "keyword" + }, + "degreeGrantor": { + "type": "object", + "properties": { + "nameIdentifier": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_identifier" + ] + }, + "degreeGrantorName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other", + "dgName" + ] + } + } + }, + "conference": { + "type": "object", + "properties": { + "conferenceName": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferenceSequence": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferencePlace": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + }, + "conferenceCountry": { + "type": "keyword", + "index": true, + "copy_to": [ + "search_other" + ] + } + } + }, + "file": { + "type": "object", + "properties": { + "URI": { + "type": "nested", + "properties": { + "value": { + "type": "text" + }, + "objectType": { + "type": "keyword", + "index": true + } + } + }, + "mimeType": { + "type": "keyword", + "index": true + }, + "extent": { + "type": "keyword", + "index": true + }, + "date": { + "type": "nested", + "properties": { + "dateType": { + "type": "keyword", + "index": true + }, + "value": { + "type": "keyword" + } + } + }, + "version": { + "type": "text" + } + } + }, + "content": { + "type": "nested", + "properties": { + "file_id": { + "type": "keyword", + "index": true + }, + "groups": { + "type": "keyword", + "index": true + }, + "file_name": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "display_name": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "license_notation": { + "type": "text" + }, + "file": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true, + "fields": { + "ja": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true + } + } + }, + "attachment": { + "properties": { + "content": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true, + "fields": { + "ja": { + "type": "text", + "term_vector": "with_positions_offsets", + "store": true + } + } + } + } + } + } + }, + "weko_creator_id": { + "type": "text", + "fielddata": true, + "index": true + }, + "weko_id": { + "type": "text", + "fielddata": true, + "index": true + }, + "search_title": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_creator": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_contributor": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_other": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_identifier": { + "type": "text" + }, + "search_attr": { + "type": "text" + }, + "search_string": { + "type": "text" + }, + "search_publisher": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "search_des": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + }, + "dgName": { + "type": "text", + "fields": { + "ja": { + "type": "text" + } + } + } + }, + "dynamic_templates": [ + { + "weko_id": { + "match_mapping_type": "string", + "match_pattern": "regex", + "match": "^weko_id$", + "mapping": { + "type": "text", + "fielddata": true, + "index": false, + "copy_to": "weko_id" + } + } + }, + { + "string": { + "match_mapping_type": "string", + "mapping": { + "type": "text", + "index": false, + "copy_to": "search_string", + "fields": { + "raw": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + { + "date_string": { + "match_mapping_type": "date", + "mapping": { + "type": "text", + "index": false, + "copy_to": "search_string", + "fields": { + "raw": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + } + ] + } + } +} diff --git a/modules/weko-records/tests/data/meta00.json b/modules/weko-records/tests/data/meta00.json index 1cbff27aa7..bb79d13eb5 100644 --- a/modules/weko-records/tests/data/meta00.json +++ b/modules/weko-records/tests/data/meta00.json @@ -27,6 +27,14 @@ "subitem_1551255907416": "ja" } ] + }, + { + "subitem_1551255898956": [ + { + "subitem_1551255905565": "Creator", + "subitem_1551255907416": "en" + } + ] } ] }, diff --git a/modules/weko-records/tests/test_api.py b/modules/weko-records/tests/test_api.py index 59b3e051b4..f3118de4a3 100644 --- a/modules/weko-records/tests/test_api.py +++ b/modules/weko-records/tests/test_api.py @@ -25,6 +25,7 @@ import pytest from unittest import TestCase import json +from elasticsearch import helpers from elasticsearch.exceptions import RequestError from invenio_records.api import Record from invenio_records.errors import MissingModelError @@ -42,7 +43,7 @@ from weko_records.models import ItemType, ItemTypeName, \ SiteLicenseInfo, SiteLicenseIpAddress from jsonschema.validators import Draft4Validator -from datetime import datetime +from datetime import datetime, timedelta # class RecordBase(dict): # .tox/c1/bin/pytest --cov=weko_records tests/test_api.py::test_recordbase -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-records/.tox/c1/tmp @@ -477,6 +478,40 @@ def all_2(): # def __update_item_type(cls, id_, schema, form, render): # def __update_metadata(cls, item_type_id, item_type_name, old_render, new_render): # def __get_records_by_item_type_name(cls, item_type_name): +# .tox/c1/bin/pytest --cov=weko_records tests/test_api.py::test__get_records_by_item_type_name -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-records/.tox/c1/tmp +def test__get_records_by_item_type_name(app, esindex): + item_type_name = "test_item_type" + def _generate_es_data(num, start_datetime=datetime.now()): + for i in range(num): + doc = { + "_index": "test-weko-item-v1.0.0", + "_type": "item-v1.0.0", + "_id": f"2d1a2520-9080-437f-a304-230adc8{i:05d}", + "_source": { + "_item_metadata": { + "title": [f"test_title_{i}"], + }, + "relation_version_is_last": True, + "path": ["66"], + "control_number": f"{i:05d}", + "_created": (start_datetime + timedelta(seconds=i)).isoformat(), + "_updated": (start_datetime + timedelta(seconds=i)).isoformat(), + "publish_date": (datetime.now() - timedelta(days=1)).strftime('%Y-%m-%d'), + "publish_status": "0", + }, + } + if i % 2 == 0: + doc["_source"]["itemtype"] = item_type_name + else: + doc["_source"]["itemtype"] = "test_item_type2" + yield doc + + generate_data_num = 20002 + helpers.bulk(esindex, _generate_es_data(generate_data_num), refresh='true') + + # result over 10000 + assert len(ItemTypes._ItemTypes__get_records_by_item_type_name(item_type_name)) == int(generate_data_num/2) + # class ItemTypes(RecordBase): # def get_record(cls, id_, with_deleted=False): @@ -867,6 +902,23 @@ def test_revision_ItemTypes(app): # .tox/c1/bin/pytest --cov=weko_records tests/test_api.py::TestItemTypes::test_update_attribute_options -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records/.tox/c1/tmp class TestItemTypes: + + # def (cls, itemtype_id, specified_list=[], renew_value='None'): + # .tox/c1/bin/pytest --cov=weko_records tests/test_api.py::TestItemTypes::test_reload -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records/.tox/c1/tmp + def test_reload(self, app, db, user, item_type_with_form, item_type_mapping_with_form): + + item_type_id = item_type_with_form.id + + with patch('weko_records.api.db.session.merge', return_value=""): + with patch('weko_records.api.db.session.commit', return_value=""): + result = ItemTypes.reload(item_type_id) + assert result["msg"] == "Fix ItemType({}) mapping".format(item_type_id) + assert result["code"] == 0 + + result = ItemTypes.reload(item_type_id, specified_list=[1000]) + assert result["msg"] == "Update ItemType({})".format(item_type_id) + assert result["code"] == 0 + # .tox/c1/bin/pytest --cov=weko_records tests/test_api.py::TestItemTypes::test_update_property_enum -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-records/.tox/c1/tmp def test_update_property_enum(app): old_value = {'type': 'array', 'items': {'type': 'object', 'title': 'dcterms_date', 'format': 'object', 'properties': {'subitem_dcterms_date': {'type': 'string', 'title': '日付(リテラル)', 'format': 'text', 'title_i18n': {'en': 'Date Literal', 'ja': '日付(リテラル)'}}, 'subitem_dcterms_date_language': {'enum': [None, 'ja', 'ja-Kana', 'ja-Latn', 'en', 'fr', 'it', 'de', 'es', 'zh-cn', 'zh-tw', 'ru', 'la', 'ms', 'eo', 'ar', 'el', 'ko'], 'type': ['null', 'string'], 'title': '言語', 'format': 'select', 'editAble': True}}, 'system_prop': False}, 'title': 'dcterms_date', 'maxItems': 9999, 'minItems': 1, 'system_prop': False} @@ -880,66 +932,65 @@ def test_update_property_enum(app): expected_dict = {'type': 'array', 'items': {'type': 'object', 'title': 'dcterms_date', 'format': 'object', 'properties': {'subitem_dcterms_date': {'type': 'string', 'title': '日付(リテラル)', 'format': 'text', 'title_i18n': {'en': 'Date Literal', 'ja': '日付(リテラル)'}}, 'subitem_dcterms_date_language': {'enum': [None, 'ja', 'ja-Kana', 'ja-Latn', 'en', 'fr', 'it', 'de', 'es', 'zh-cn', 'zh-tw', 'ru', 'la', 'ms', 'eo', 'ar', 'el', 'ko'], 'type': ['null', 'string'], 'title': '言語', 'format': 'select', 'editAble': True}}, 'system_prop': False}, 'title': 'dcterms_date', 'maxItems': 9999, 'minItems': 1, 'system_prop': False} ItemTypes.update_property_enum(old_value,new_value) TestCase().assertDictEqual(new_value, expected_dict) - - def test_update_attribute_options(app): - + # .tox/c1/bin/pytest --cov=weko_records tests/test_api.py::TestItemTypes::test_update_attribute_options -vv -s -v --cov-branch --cov-report=term --cov-report=html --basetemp=/code/modules/weko-records/.tox/c1/tmp + def test_update_attribute_options(self, app): a = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報","isHide":True, "required": True, "isShowList": True, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": True}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} b = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":True, "required": True, "isShowList": True, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": True}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":True, "required": True, "isShowList": True, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": True}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} + expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":True, "required": True, "isShowList": True, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": True}], "title": "Version", "isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"},"title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}} ItemTypes.update_attribute_options(a,b,"None") TestCase().assertDictEqual(b, expected_dict) a = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": False, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} b = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": False, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": False, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False, "key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": False, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"},"title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}} ItemTypes.update_attribute_options(a,b,"None") TestCase().assertDictEqual(b, expected_dict) a = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報","title_i18n": {"en": "Version", "ja": "バージョン情報"},"title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} b = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報","title_i18n": {"en": "Version", "ja": "バージョン情報"},"title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"isHide": False,"isNonDisplay": False,"isShowList": False,"isSpecifyNewline": False,"required":False,"key": "key.subkey", "type": "text", "title": "バージョン情報", "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False, "key": "key", "type": "fieldset", "items": [{"isHide": False,"isNonDisplay": False,"isShowList": False,"isSpecifyNewline": False,"required":False,"key": "key.subkey", "type": "text", "title": "バージョン情報", "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}} ItemTypes.update_attribute_options(a,b,"None") TestCase().assertDictEqual(b, expected_dict) a = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} b = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": False, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False, "key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "バージョン情報", "isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "isNonDisplay": True, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}, "isSpecifyNewline": False}], "title": "Version", "title_i18n": {"en": "Version", "ja": "バージョン情報"}, "title_i18n_temp": {"en": "Version", "ja": "バージョン情報"}} ItemTypes.update_attribute_options(a,b, "None") TestCase().assertDictEqual(b, expected_dict) a = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "subkey","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "subkey", "ja": "subkey"}, "isNonDisplay": True, "title_i18n_temp": {"en": "subkey", "ja": "subkey"}, "isSpecifyNewline": False,"items": [{"key": "key.subkey.subkey", "type": "text", "title": "subkey.subkey","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isNonDisplay": True, "title_i18n_temp": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isSpecifyNewline": False}]}], "title": "Version", "title_i18n": {"en": "key", "ja": "key"}} b = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "subkey","isHide":True, "required": True, "isShowList": True, "title_i18n": {"en": "subkey", "ja": "subkey"}, "isNonDisplay": False, "title_i18n_temp": {"en": "subkey", "ja": "subkey"}, "isSpecifyNewline": True,"items": [{"key": "key.subkey.subkey", "type": "text", "title": "subkey.subkey","isHide":True, "required": True, "isShowList": True, "title_i18n": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isNonDisplay": False, "title_i18n_temp": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isSpecifyNewline": True}]}], "title": "Version", "title_i18n": {"en": "key", "ja": "key"}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "subkey","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "subkey", "ja": "subkey"}, "isNonDisplay": True, "title_i18n_temp": {"en": "subkey", "ja": "subkey"}, "isSpecifyNewline": False,"items": [{"key": "key.subkey.subkey", "type": "text", "title": "subkey.subkey","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isNonDisplay": True, "title_i18n_temp": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isSpecifyNewline": False}]}], "title": "Version", "title_i18n": {"en": "key", "ja": "key"}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False, "key": "key", "type": "fieldset", "items": [{"key": "key.subkey", "type": "text", "title": "subkey","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "subkey", "ja": "subkey"}, "isNonDisplay": True, "title_i18n_temp": {"en": "subkey", "ja": "subkey"}, "isSpecifyNewline": False,"items": [{"key": "key.subkey.subkey", "type": "text", "title": "subkey.subkey","isHide":False, "required": False, "isShowList": False, "title_i18n": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isNonDisplay": True, "title_i18n_temp": {"en": "subkey.subkey", "ja": "subkey.subkey"}, "isSpecifyNewline": False}]}], "title": "Version", "title_i18n": {"en": "key", "ja": "key"},"title_i18n_temp": {"en": "key", "ja": "key"}} ItemTypes.update_attribute_options(a,b, "None") TestCase().assertDictEqual(b, expected_dict) old_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": [{"name": "ja", "value": "ja"}, {"name": "en", "value": "en"}], "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"}}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}, {"name": "d", "value": "d"}, {"name": "e", "value": "e"}, {"name": "f", "value": "f"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} new_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": '', "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"}}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": [{"name": "ja", "value": "ja"}, {"name": "en", "value": "en"}], "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}, {"name": "d", "value": "d"}, {"name": "e", "value": "e"}, {"name": "f", "value": "f"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False,"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": [{"name": "ja", "value": "ja"}, {"name": "en", "value": "en"}], "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}, {"name": "d", "value": "d"}, {"name": "e", "value": "e"}, {"name": "f", "value": "f"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""},"title_i18n_temp": {"en": "", "ja": ""}} ItemTypes.update_attribute_options(old_value,new_value,"None") TestCase().assertDictEqual(new_value, expected_dict) old_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": [{"name": "ja", "value": "ja"}, {"name": "en", "value": "en"}], "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"}}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}, {"name": "d", "value": "d"}, {"name": "e", "value": "e"}, {"name": "f", "value": "f"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} new_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": '', "title_i18n": {"en": "Language", "ja": "言語"}}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": [{"name": "ja", "value": "ja"}, {"name": "en", "value": "en"}], "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}, {"name": "d", "value": "d"}, {"name": "e", "value": "e"}, {"name": "f", "value": "f"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False,"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_language", "type": "select", "title": "言語", "titleMap": [{"name": "ja", "value": "ja"}, {"name": "en", "value": "en"}], "title_i18n": {"en": "Language", "ja": "言語"}, "title_i18n_temp": {"en": "Language", "ja": "言語"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}, {"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}, {"name": "d", "value": "d"}, {"name": "e", "value": "e"}, {"name": "f", "value": "f"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""},"title_i18n_temp": {"en": "", "ja": ""}} ItemTypes.update_attribute_options(old_value,new_value, "None") TestCase().assertDictEqual(new_value, expected_dict) old_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} new_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False,"key": "key", "key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}, "title_i18n_temp": {"en": "", "ja": ""}} ItemTypes.update_attribute_options(old_value,new_value,"VAL") TestCase().assertDictEqual(new_value, expected_dict) old_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} new_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False,"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} ItemTypes.update_attribute_options(old_value,new_value,"LOC") TestCase().assertDictEqual(new_value, expected_dict) old_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Value", "ja": "値"}, "title_i18n_temp": {"en": "Value", "ja": "値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} new_value = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"}}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} - expected_dict = {"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}, {"name": "c", "value": "c"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} + expected_dict = {"isHide": False, "isShowList": False, "isNonDisplay": False, "isSpecifyNewline": False, "required": False,"key": "key", "type": "fieldset", "items": [{"key": "key.subitem_select_item", "type": "select", "title": "値", "titleMap": [{"name": "a", "value": "a"}, {"name": "b", "value": "b"}], "title_i18n": {"en": "Test Value", "ja": "テスト値"}, "title_i18n_temp": {"en": "Test Value", "ja": "テスト値"},'isHide': False,'isNonDisplay': False,'isShowList': False, 'isSpecifyNewline': False,'required': False}], "title": "abcdef", "title_i18n": {"en": "", "ja": ""}} ItemTypes.update_attribute_options(old_value,new_value,"ALL") TestCase().assertDictEqual(new_value, expected_dict) diff --git a/modules/weko-records/tests/test_utils.py b/modules/weko-records/tests/test_utils.py index b7d0a67eda..832d58d784 100644 --- a/modules/weko-records/tests/test_utils.py +++ b/modules/weko-records/tests/test_utils.py @@ -1168,23 +1168,79 @@ def test_remove_weko2_special_character(): # .tox/c1/bin/pytest --cov=weko_records tests/test_utils.py::test_selected_value_by_language -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-records/.tox/c1/tmp def test_selected_value_by_language(app, meta): res = selected_value_by_language([], [], '', '', None, {}) + record = meta[0] + assert res==None + _val_id = 'item_1551264308487.subitem_1551255647225' + res = selected_value_by_language([], [], '', _val_id, None, {}, hide_list=['invalid_subitem_key']) + record = meta[0] + assert res==None + + _val_id = 'item_1551264308487.subitem_1551255647225' + res = selected_value_by_language([], [], '', _val_id, 'en', {}, hide_list=['item_1551264308487.subitem_1551255647225']) + record = meta[0] + assert res==None + + _val_id = 'item_1551264308487.subitem_1551255647225' + res = selected_value_by_language([], ['タイトル日本語', 'Title'], '', _val_id, 'en', {}, hide_list=['invalid_subitem_key']) + record = meta[0] assert res==None _lang_id = 'item_1551264308487.subitem_1551255648112' _val_id = 'item_1551264308487.subitem_1551255647225' - res = selected_value_by_language(['ja', 'en'], ['タイトル日本語', 'Title'], _lang_id, _val_id, 'en', meta[0]) + res = selected_value_by_language(['ja', 'en'], ['タイトル日本語', 'Title'], _lang_id, _val_id, 'en', record) assert res=='Title' app.config['WEKO_RECORDS_UI_LANG_DISP_FLG'] = False _lang_id = 'item_1551264340087.subitem_1551255898956.subitem_1551255907416' _val_id = 'item_1551264340087.subitem_1551255898956.subitem_1551255905565' - res = selected_value_by_language(['ja'], ['作者'], _lang_id, _val_id, 'en', meta[0]) - assert res=='作者' + res = selected_value_by_language(['ja'], ['作者'], _lang_id, _val_id, 'en', record) + assert res=='Creator' + + with patch("weko_records.utils.check_info_in_metadata", return_value="Mocked Value"): + res = selected_value_by_language(['ja'], ['作者'], _lang_id, _val_id, 'en', record) + assert res=='Mocked Value' + + with patch("weko_records.utils.check_info_in_metadata", return_value='Creator'): + res = selected_value_by_language(['en'], ['作者'], _lang_id, _val_id, 'en', record) + assert res=='Creator' + app.config['WEKO_RECORDS_UI_LANG_DISP_FLG'] = True - res = selected_value_by_language(['en'], ['Creator'], _lang_id, _val_id, 'en', meta[0]) - assert res=='作者' + res = selected_value_by_language(['ja'], ['作者'], _lang_id, _val_id, 'en', record) + assert res=='Creator' with patch("weko_records.utils.check_info_in_metadata", return_value="en"): - res = selected_value_by_language(["ja-Latn"], ['ja-Latn'], _lang_id, _val_id, 'en', meta[0]) + res = selected_value_by_language(["ja-Latn"], ['ja-Latn'], _lang_id, _val_id, 'en', record) assert res=='en' + app.config['WEKO_RECORDS_UI_LANG_DISP_FLG'] = False + _lang_id = 'item_1551264308487.subitem_1551255648112,item_1551264308488.subitem_1551255648113' + _val_id = 'item_1551264308487.subitem_1551255647225,item_1551264308488.subitem_1551255647226' + record['item_1551264308488'] = { + "attribute_name": "Title", + "attribute_value_mlt": [ + { + "subitem_1551255647226": "タイトル日本語-2", + "subitem_1551255648113": "ja" + }, + { + "subitem_1551255647226": "Title-2", + "subitem_1551255648113": "en" + } + ] + } + res = selected_value_by_language(['ja', 'en', 'ja', 'en'], ['タイトル日本語', 'Title', 'タイトル日本語-2', 'Title-2'], _lang_id, _val_id, 'en', record) + assert res=='Title' + + record["item_1551264308487"]["attribute_value_mlt"][0].pop("subitem_1551255648112") + record["item_1551264308487"]["attribute_value_mlt"][1].pop("subitem_1551255648112") + res = selected_value_by_language(['ja', 'en'], ['タイトル日本語', 'Title', 'タイトル日本語-2', 'Title-2'], _lang_id, _val_id, 'en', record) + assert res=='タイトル日本語' + + record.pop("item_1551264308487") + res = selected_value_by_language(['ja', 'en'], ['タイトル日本語-2', 'Title-2'], _lang_id, _val_id, 'en', record) + assert res=='Title-2' + + with patch("weko_records.utils.check_info_in_metadata", return_value='Creator'): + res = selected_value_by_language(['en'], ['作者'], _lang_id, _val_id, 'en', record, hide_list=['en']) + assert res=='Creator' + # .tox/c1/bin/pytest --cov=weko_records tests/test_utils.py::test_selected_value_by_language_2 -v -s -vv --cov-branch --cov-report=term --cov-config=tox.ini --basetemp=/code/modules/weko-records/.tox/c1/tmp def test_selected_value_by_language_2(app, meta): _lang_id = 'item_1551264308487.subitem_15512556481122' diff --git a/modules/weko-records/weko_records/api.py b/modules/weko-records/weko_records/api.py index b8ca2ecb4f..3d7e2c2266 100644 --- a/modules/weko-records/weko_records/api.py +++ b/modules/weko-records/weko_records/api.py @@ -585,17 +585,14 @@ def __get_records_by_item_type_name(cls, item_type_name): :param item_type_name: Item Type Name. :return: Record list. """ - name = urllib.parse.quote_plus(item_type_name) - query_string = "itemtype:{}".format( - name) + from weko_search_ui.utils import execute_search_with_pagination result = [] try: search = RecordsSearch( index=current_app.config['SEARCH_UI_SEARCH_INDEX']) - search = search.query(QueryString(query=query_string)) + search = search.query('term', **{"itemtype.keyword": item_type_name}) search = search.sort('-publish_date', '-_updated') - search_result = search.execute().to_dict() - result = search_result.get('hits', {}).get('hits', []) + result = execute_search_with_pagination(search, -1) except NotFoundError as e: current_app.logger.debug("Indexes do not exist yet: ", str(e)) return result @@ -922,7 +919,6 @@ def reload(cls, itemtype_id, specified_list=[], renew_value='None'): itemtype_id (_type_): _description_ specified_list: renew properties id list renew_value: None, ALL, VAL, LOC - """ # with db.session.begin_nested(): result = {"msg":"Update ItemType({})".format(itemtype_id),"code":0} @@ -955,11 +951,13 @@ def reload(cls, itemtype_id, specified_list=[], renew_value='None'): data['table_row_map']['schema']['properties'][_prop_id].pop('properties') if 'format' in data['table_row_map']['schema']['properties'][_prop_id]: data['table_row_map']['schema']['properties'][_prop_id].pop('format') - - tmp_data = pickle.loads(pickle.dumps(data['table_row_map']['form'][idx], -1)) + + tmp_data = pickle.loads(pickle.dumps(data['table_row_map']['form'][idx], -1)) _forms = json.loads(json.dumps(pickle.loads(pickle.dumps(_prop.forms, -1))).replace('parentkey',_prop_id)) data['table_row_map']['form'][idx]=pickle.loads(pickle.dumps(_forms, -1)) - cls.update_attribute_options(tmp_data, data['table_row_map']['form'][idx], renew_value) + + _tmp_data = data['table_row_map']['form'][idx] + cls.update_attribute_options(tmp_data, _tmp_data, renew_value) cls.update_property_enum(item_type.render['table_row_map']['schema']['properties'][_prop_id],data['table_row_map']['schema']['properties'][_prop_id]) else: tmp_data = pickle.loads(pickle.dumps(data['table_row_map']['form'][idx], -1)) @@ -967,7 +965,8 @@ def reload(cls, itemtype_id, specified_list=[], renew_value='None'): # cls.update_property_enum(item_type.render['table_row_map']['schema']['properties'],data['table_row_map']['schema']['properties'][_prop_id]) _form = json.loads(json.dumps(pickle.loads(pickle.dumps(_prop.form, -1))).replace('parentkey',_prop_id)) data['table_row_map']['form'][idx]=pickle.loads(pickle.dumps(_form, -1)) - cls.update_attribute_options(tmp_data, data['table_row_map']['form'][idx], renew_value) + _tmp_data = data['table_row_map']['form'][idx] + cls.update_attribute_options(tmp_data, _tmp_data, renew_value) cls.update_property_enum(item_type.render['table_row_map']['schema']['properties'][_prop_id],data['table_row_map']['schema']['properties'][_prop_id]) from weko_itemtypes_ui.utils import fix_json_schema,update_required_schema_not_exist_in_form, update_text_and_textarea @@ -1125,8 +1124,6 @@ def getItemByItemsKey(cls,prop,key): return ret return None - - class ItemTypeEditHistory(object): """Define API for Itemtype Property creation and manipulation.""" diff --git a/modules/weko-records/weko_records/serializers/schemas/csl.py b/modules/weko-records/weko_records/serializers/schemas/csl.py index 25ec8fe330..7d26c730eb 100644 --- a/modules/weko-records/weko_records/serializers/schemas/csl.py +++ b/modules/weko-records/weko_records/serializers/schemas/csl.py @@ -176,20 +176,28 @@ def get_version(self, obj): def get_issue_date(self, obj): """Get issue date.""" + date_parts = [[]] metadata = get_data_from_mapping('datacite:date', obj) if not metadata: return missing if re.search("\d{4}-\d{2}-\d{2}",metadata): format = "%Y-%m-%d" + metadata = datetime.strptime(metadata, format) + date = from_isodate(metadata) + date_parts = [[date.year, date.month, date.day]] elif re.search("\d{4}-\d{2}",metadata): format = "%Y-%m" + metadata = datetime.strptime(metadata, format) + date = from_isodate(metadata) + date_parts = [[date.year, date.month]] elif re.search("\d{4}",metadata): format = "%Y" + metadata = datetime.strptime(metadata, format) + date = from_isodate(metadata) + date_parts = [[date.year]] else: raise ValidationError("Incorrect format") - metadata = datetime.strptime(metadata, format) - date = from_isodate(metadata) - date_parts = [[date.year, date.month, date.day]] + result = {'date-parts': date_parts} return result if date else missing diff --git a/modules/weko-records/weko_records/serializers/utils.py b/modules/weko-records/weko_records/serializers/utils.py index 3fdcf98876..3bf6ea471f 100644 --- a/modules/weko-records/weko_records/serializers/utils.py +++ b/modules/weko-records/weko_records/serializers/utils.py @@ -68,7 +68,7 @@ def get_schema_key_info(schema, parent_key, schema_json={}): for item_id in item_type_list: if item_id in item_type_mapping: maps = item_type_mapping.get(item_id) - if isinstance(maps,dict) and mapping_type in maps.keys() and isinstance(maps[mapping_type], dict): + if isinstance(maps, dict) and mapping_type in maps.keys() and isinstance(maps[mapping_type], dict): item_schema = get_schema_key_info(maps[mapping_type], '', {}) for k, v in item_schema.items(): if k in schema: diff --git a/modules/weko-records/weko_records/utils.py b/modules/weko-records/weko_records/utils.py index feecd22c0c..a8413e645d 100644 --- a/modules/weko-records/weko_records/utils.py +++ b/modules/weko-records/weko_records/utils.py @@ -312,7 +312,15 @@ def copy_field_test(dc, map, jrc, iid=None): b = None if idx < len(_lte): b = _lte[idx] - ranges.append(convert_range_value(a, b)) + try: + ranges.append(convert_range_value(a, b)) + except: + _error_col = val.get("path", {}).get("gte") \ + if val.get("path", {}).get("gte") else val.get("path", {}).get("lte") + raise ValueError( + "can not convert to range value. start:{} end:{}. column: {}".format( + a, b, _error_col) + ) if len(ranges) > 0: value_range = {id: ranges} jrc.update(value_range) @@ -331,7 +339,15 @@ def copy_field_test(dc, map, jrc, iid=None): b = None if idx < len(_lte): b = _lte[idx] - dateRanges.append(convert_date_range_value(a, b)) + try: + dateRanges.append(convert_date_range_value(a, b)) + except: + _error_col = val.get("path", {}).get("gte") \ + if val.get("path", {}).get("gte") else val.get("path", {}).get("lte") + raise ValueError( + "can not convert to range value. start:{} end:{}. column: {}".format( + a, b, _error_col) + ) if len(dateRanges) > 0: value_range = {id: dateRanges} jrc.update(value_range) @@ -403,20 +419,13 @@ def convert_range_value(start, end=None): else: ret = {_start: end, _end: start} else: - try: - a = float(start) - b = float(end) + a = float(start) + b = float(end) - if a < b: - ret = {_start: start, _end: end} - else: - ret = {_start: end, _end: start} - except ValueError: - current_app.logger.exception( - "can not convert to range value. start:{0} end:{1}".format( - start, end - ) - ) + if a < b: + ret = {_start: start, _end: end} + else: + ret = {_start: end, _end: start} return ret @@ -479,15 +488,18 @@ def makeDateRangeValue(start, end): a = None b = None if p2.match(start): - a = time.strptime(start, "%Y-%m-%d") - b = time.strptime(end, "%Y-%m-%d") - + _s = start.split('-') + _e = end.split('-') + a = time.strptime('{:0>4}-{}-{}'.format(_s[0], _s[1], _s[2]), "%Y-%m-%d") + b = time.strptime('{:0>4}-{}-{}'.format(_e[0], _e[1], _e[2]), "%Y-%m-%d") elif p3.match(start): - a = time.strptime(start, "%Y-%m") - b = time.strptime(end, "%Y-%m") + _s = start.split('-') + _e = end.split('-') + a = time.strptime('{:0>4}-{}'.format(_s[0], _s[1]), "%Y-%m") + b = time.strptime('{:0>4}-{}'.format(_e[0], _e[1]), "%Y-%m") elif p4.match(start): - a = time.strptime(start, "%Y") - b = time.strptime(end, "%Y") + a = time.strptime('{:0>4}'.format(start), "%Y") + b = time.strptime('{:0>4}'.format(end), "%Y") if a is not None and b is not None: if a < b: @@ -906,6 +918,11 @@ def data_comment(result, data_result, stt_key, is_specify_newline_array): result = get_author_comment( data_result, key, result, is_specify_newline_array ) + elif "is_biographic_prop" in data_result[key] \ + and data_result[key].pop("is_biographic_prop"): + for k, v in data_result[key].items(): + if "value" in v: + result.append(v["value"]) else: if "lang_id" in data_result[key]: lang_id = ( @@ -1989,7 +2006,7 @@ def selected_value_by_language( result = None lang_key_list = lang_key_str.split(",") val_key_list = val_key_str.split(",") - + for val_key in val_key_list: val_parent_key = val_key.split(".")[0] val_sub_key = val_key.split(".")[-1] @@ -2044,28 +2061,40 @@ def selected_value_by_language( ): noreturn = True break - if len(lg) > 0: + if lg: value = check_info_in_metadata( lang_key, val_key, lg, _item_metadata ) if value is not None: result = value + break if noreturn: result = None # 1st value when registering without language if not result and len(value_array) > 0: result = check_info_in_metadata(lang_key, val_key, None, _item_metadata) - if not result: + if result: break - if not result: + if result: + break + + if not result: + for val_key in val_key_list: + val_parent_key = val_key.split(".")[0] + val_sub_key = val_key.split(".")[-1] + prop_hidden = meta_option.get(val_parent_key, {}).get('option', {}).get('hidden', False) + for h in hide_list: + if h.startswith(val_parent_key) and h.endswith(val_sub_key): + prop_hidden = True + if ( (value_array is not None and len(value_array) > 0) and isinstance(lang_selected, str) and not prop_hidden ): result = check_info_in_metadata('', val_key, None, _item_metadata) - if result: - break + if result: + break return result @@ -2170,10 +2199,10 @@ def get_value_and_lang_by_key(key, data_json, data_result, stt_key): data_result = {**data_result, **{save_key: {}}} if ( save_key in data_result.keys() - and (j["title"].strip() in "Language") - or (j["title_ja"].strip() in "Language") - or (j["title_ja"].strip() in "言語") - or (j["title"].strip() in "言語") + and (j["title"].strip() == "Language") + or (j["title_ja"].strip() == "Language") + or (j["title_ja"].strip() == "言語") + or (j["title"].strip() == "言語") ): data_result[save_key] = { **data_result[save_key], @@ -2522,7 +2551,12 @@ def add_biographic( ) stt_key.append(bibliographic_key) is_specify_newline_array.append({s["key"]: True}) - data_result.update({bibliographic_key: {s["key"]: {"value": [bibliographic]}}}) + data_result.update({ + bibliographic_key: { + s["key"]: {"value": bibliographic}, + "is_biographic_prop": True + } + }) return stt_key, data_result, is_specify_newline_array diff --git a/modules/weko-redis/requirements2.txt b/modules/weko-redis/requirements2.txt index a088fb33ec..c922171b46 100644 --- a/modules/weko-redis/requirements2.txt +++ b/modules/weko-redis/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -190,7 +190,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/weko-schema-ui/requirements.txt b/modules/weko-schema-ui/requirements.txt index 893fd14b03..798ce371ca 100644 --- a/modules/weko-schema-ui/requirements.txt +++ b/modules/weko-schema-ui/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 @@ -132,6 +131,7 @@ SQLAlchemy==1.2.19 SQLAlchemy-Continuum==1.3.6 SQLAlchemy-Utils==0.35.0 testpath==0.3.1 +tika tornado==4.5.3 traitlets==4.3.2 ua-parser==0.7.3 diff --git a/modules/weko-schema-ui/requirements2.txt b/modules/weko-schema-ui/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/weko-schema-ui/requirements2.txt +++ b/modules/weko-schema-ui/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/weko-schema-ui/tests/test_WekoBibTexSerializer.py b/modules/weko-schema-ui/tests/test_WekoBibTexSerializer.py index 9780fccb21..7ce86790a7 100644 --- a/modules/weko-schema-ui/tests/test_WekoBibTexSerializer.py +++ b/modules/weko-schema-ui/tests/test_WekoBibTexSerializer.py @@ -1,4 +1,5 @@ import pytest +from mock import patch from lxml import etree @@ -91,13 +92,17 @@ def test_bibtexfields(app,db,db_oaischema): # def __get_item_id(root): # def __get_dates(dates): # def __get_identifier(identifier_type, identifier_types_data): + # .tox/c1/bin/pytest --cov=weko_schema_ui tests/test_WekoBibTexSerializer.py::test_wekobibtexserializer -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-schema-ui/.tox/c1/tmp -def test_wekobibtexserializer(app, records, db_oaischema, itemtypes): +def test_wekobibtexserializer(app, records, db_oaischema, itemtypes, esindex): from weko_schema_ui.serializers.WekoBibTexSerializer import WekoBibTexSerializer from weko_schema_ui.serializers.wekoxml import WekoXMLSerializer app.config['WEKO_SCHEMA_JPCOAR_V1_SCHEMA_NAME'] = 'jpcoar_mapping' + jp_dcndl = '{http://ndl.go.jp/dcndl/terms/}' + jp_datacite = '{https://schema.datacite.org/meta/kernel-4/}' + indexer, results = records record = results[0]['record'] pid = results[0]['recid'] @@ -106,6 +111,94 @@ def test_wekobibtexserializer(app, records, db_oaischema, itemtypes): ret = serializer.serialize(pid,record) assert ret=='@misc{,\n month = {},\n year = {}\n}\n\n' + # datetype = Available + serializer = WekoBibTexSerializer() + assert isinstance(serializer,WekoBibTexSerializer) + with patch.dict('weko_schema_ui.config.WEKO_SCHEMA_DATE_DATETYPE_MAPPING', {'dataset': 'Available'}): + ret = serializer.serialize(pid,record) + assert ret==( + '@misc{oai:weko3.example.org:00000001,\n' + ' author = {情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro},\n' + ' month = {Jun},\n' + ' note = {Description\n' + 'Description
    Description, 概要\n' + '概要\n' + '概要\n' + '概要},\n' + ' title = {ja_conference ' + 'paperITEM00000009(public_open_access_open_access_simple)},\n' + ' year = {2021},\n' + ' yomi = {ジョウホウ, タロウ and ジョウホウ, タロウ and ジョウホウ, タロウ}\n' + '}\n' + '\n' + ) + + # set date_priority_mapping + serializer = WekoBibTexSerializer() + assert isinstance(serializer,WekoBibTexSerializer) + serializer.date_priority_mapping = {'dataset': [jp_dcndl + 'dateGranted']} + ret = serializer.serialize(pid,record) + assert ret==( + '@misc{oai:weko3.example.org:00000001,\n' + ' author = {情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro},\n' + ' month = {Jun},\n' + ' note = {Description\n' + 'Description
    Description, 概要\n' + '概要\n' + '概要\n' + '概要},\n' + ' title = {ja_conference ' + 'paperITEM00000009(public_open_access_open_access_simple)},\n' + ' year = {2021},\n' + ' yomi = {ジョウホウ, タロウ and ジョウホウ, タロウ and ジョウホウ, タロウ}\n' + '}\n' + '\n' + ) + + # get pubdate + serializer = WekoBibTexSerializer() + assert isinstance(serializer,WekoBibTexSerializer) + with patch.dict('weko_schema_ui.config.WEKO_SCHEMA_DATE_DATETYPE_MAPPING', {'dataset': 'XXXXX'}): + ret = serializer.serialize(pid,record) + assert ret==( + '@misc{oai:weko3.example.org:00000001,\n' + ' author = {情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro},\n' + ' month = {Aug},\n' + ' note = {Description\n' + 'Description
    Description, 概要\n' + '概要\n' + '概要\n' + '概要},\n' + ' title = {ja_conference ' + 'paperITEM00000009(public_open_access_open_access_simple)},\n' + ' year = {2021},\n' + ' yomi = {ジョウホウ, タロウ and ジョウホウ, タロウ and ジョウホウ, タロウ}\n' + '}\n' + '\n' + ) + + # Duplicate Dates + serializer = WekoBibTexSerializer() + assert isinstance(serializer,WekoBibTexSerializer) + serializer.base_date_priority = [jp_datacite + 'date'] + ret = serializer.serialize(pid,record) + assert ret==( + '@misc{oai:weko3.example.org:00000001,\n' + ' author = {情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro and 情報, 太郎 and Joho, Taro},\n' + ' month = {Jun, Jun, },\n' + ' note = {Description\n' + 'Description
    Description, 概要\n' + '概要\n' + '概要\n' + '概要},\n' + ' title = {ja_conference ' + 'paperITEM00000009(public_open_access_open_access_simple)},\n' + ' year = {2021, 2021, 2021},\n' + ' yomi = {ジョウホウ, タロウ and ジョウホウ, タロウ and ジョウホウ, タロウ}\n' + '}\n' + '\n' + ) + record = results[1]['record'] pid = results[1]['recid'] serializer = WekoBibTexSerializer() diff --git a/modules/weko-schema-ui/weko_schema_ui/config.py b/modules/weko-schema-ui/weko_schema_ui/config.py index e79d95943a..a12fe91278 100644 --- a/modules/weko-schema-ui/weko_schema_ui/config.py +++ b/modules/weko-schema-ui/weko_schema_ui/config.py @@ -178,3 +178,9 @@ 'isSupplementTo','isIdenticalTo','isDerivedFrom','isSourceOf' ] """jpcoar:relation relationType Controlled Vocabularies""" + +WEKO_SCHEMA_DATE_DEFAULT_DATETYPE = "Issued" + +WEKO_SCHEMA_DATE_DATETYPE_MAPPING = { + 'departmental bulletin paper': WEKO_SCHEMA_DATE_DEFAULT_DATETYPE +} \ No newline at end of file diff --git a/modules/weko-schema-ui/weko_schema_ui/mappings/v2/weko/item-v1.0.0.json b/modules/weko-schema-ui/weko_schema_ui/mappings/v2/weko/item-v1.0.0.json index 86f964a66e..fa80777cea 100644 --- a/modules/weko-schema-ui/weko_schema_ui/mappings/v2/weko/item-v1.0.0.json +++ b/modules/weko-schema-ui/weko_schema_ui/mappings/v2/weko/item-v1.0.0.json @@ -379,7 +379,7 @@ "search_other" ] }, - "versionType": { + "versiontype": { "type": "string", "copy_to": [ "search_other" diff --git a/modules/weko-schema-ui/weko_schema_ui/mappings/v6/weko/item-v1.0.0.json b/modules/weko-schema-ui/weko_schema_ui/mappings/v6/weko/item-v1.0.0.json index 076a8ba0b0..a87ea652bd 100644 --- a/modules/weko-schema-ui/weko_schema_ui/mappings/v6/weko/item-v1.0.0.json +++ b/modules/weko-schema-ui/weko_schema_ui/mappings/v6/weko/item-v1.0.0.json @@ -396,7 +396,7 @@ "search_other" ] }, - "versionType": { + "versiontype": { "type": "text", "copy_to": [ "search_other" diff --git a/modules/weko-schema-ui/weko_schema_ui/schema.py b/modules/weko-schema-ui/weko_schema_ui/schema.py index 0723512f1e..bbe2770486 100644 --- a/modules/weko-schema-ui/weko_schema_ui/schema.py +++ b/modules/weko-schema-ui/weko_schema_ui/schema.py @@ -304,10 +304,11 @@ def get_mapping(): mp = mjson.dumps() if isinstance(mp, dict): for k, v in mp.items(): - if k in self._record: - self._record[k].update({self._schema_name: v.get(self._schema_name)}) - else: - self._record[k] = {self._schema_name: v.get(self._schema_name)} + if isinstance(v, dict): + if k in self._record: + self._record[k].update({self._schema_name: v.get(self._schema_name)}) + else: + self._record[k] = {self._schema_name: v.get(self._schema_name)} return _id @@ -979,7 +980,7 @@ def replace_resource_type_for_jpcoar_v2(atr_vm_item): 'RESOURCE_TYPE_URI'][new_type] def replace_nameIdentifierScheme_for_jpcoar_v1(atr_vm_item): - if 'nameIdentifiers' in atr_vm_item and atr_vm_item['nameIdentifiers'] is not None: + if 'nameIdentifiers' in atr_vm_item and isinstance(atr_vm_item['nameIdentifiers'], dict): for idx,val in enumerate(atr_vm_item['nameIdentifiers']): if 'nameIdentifierScheme' in val and val['nameIdentifierScheme'] in current_app.config['WEKO_SCHEMA_JPCOAR_V1_NAMEIDSCHEME_REPLACE']: new_type = current_app.config[ @@ -987,7 +988,7 @@ def replace_nameIdentifierScheme_for_jpcoar_v1(atr_vm_item): val['nameIdentifierScheme'] = new_type def replace_nameIdentifierScheme_for_jpcoar_v2(atr_vm_item): - if 'nameIdentifiers' in atr_vm_item and atr_vm_item['nameIdentifiers'] is not None: + if 'nameIdentifiers' in atr_vm_item and isinstance(atr_vm_item['nameIdentifiers'], dict): for idx,val in enumerate(atr_vm_item['nameIdentifiers']): if 'nameIdentifierScheme' in val and val['nameIdentifierScheme'] in current_app.config['WEKO_SCHEMA_JPCOAR_V2_NAMEIDSCHEME_REPLACE']: new_type = current_app.config[ @@ -1046,11 +1047,8 @@ def replace_nameIdentifierScheme_for_jpcoar_v2(atr_vm_item): else: # current_app.logger.error(item_type.schema["properties"][key_item_parent]) atr_name = "" - if self._item_type and self._item_type.schema: - if "properties" in self._item_type.schema: - if key_item_parent in self._item_type.schema.get("properties"): - if "title" in self._item_type.schema.get("properties").get(key_item_parent): - atr_name = self._item_type.schema["properties"][key_item_parent]["title"] + if self._item_type and self._item_type.schema and "title" in self._item_type.schema.get("properties", {}).get(key_item_parent, {}): + atr_name = self._item_type.schema["properties"][key_item_parent]["title"] vlst_child = get_mapping_value(mpdic, {}, key_item_parent, atr_name) diff --git a/modules/weko-schema-ui/weko_schema_ui/serializers/WekoBibTexSerializer.py b/modules/weko-schema-ui/weko_schema_ui/serializers/WekoBibTexSerializer.py index a3b14298df..f76e6c6b69 100644 --- a/modules/weko-schema-ui/weko_schema_ui/serializers/WekoBibTexSerializer.py +++ b/modules/weko-schema-ui/weko_schema_ui/serializers/WekoBibTexSerializer.py @@ -27,6 +27,7 @@ from bibtexparser.bwriter import BibTexWriter from flask import current_app +from ..config import WEKO_SCHEMA_DATE_DEFAULT_DATETYPE, WEKO_SCHEMA_DATE_DATETYPE_MAPPING from ..schema import SchemaTree, cache_schema from .wekoxml import WekoXMLSerializer @@ -133,6 +134,7 @@ def __init__(self): jp_jp = '{' + self.__ns['jpcoar'] + '}' jp_dc = '{' + self.__ns['dc'] + '}' jp_datacite = '{' + self.__ns['datacite'] + '}' + jp_dcndl = '{' + self.__ns['dcndl'] + '}' self.__find_pattern = './/{}' self.__fields_mapping = { @@ -165,6 +167,17 @@ def __init__(self): BibTexFields.URL: jp_jp + 'identifier', } + + date_default = jp_datacite + 'date[@dateType="@DATE_TYPE"]' + + self.base_date_priority = [ + date_default, + ] + + self.date_priority_mapping = { + 'departmental bulletin paper': [jp_dcndl + 'dateGranted'] + } + def ____get_bibtex_type_fields(self, bibtex_type): """Get all fields of BibTex type. @@ -471,7 +484,7 @@ def serialize(self, pid, record, validate_mode=False): ','.join(lst_invalid_fields), record.get('recid'))) return err_msg - db.entries.append(self.__get_bibtex_data(root, bibtex_type)) + db.entries.append(self.__get_bibtex_data(root, bibtex_type, record)) writer = BibTexWriter() result = writer.write(db) return result @@ -524,6 +537,37 @@ def __get_bibtex_type(self, root): break return type_result + def __get_date_by_resource_type(self, root, record): + """Get date by resource type. + + @param root: + @param record: + @return: + """ + type_value = '' + date_priority_list = [] + date_result = [] + + for element in root.findall('.//dc:type', self.__ns): + type_value = element.text + + self.base_date_priority[0] = self.base_date_priority[0].replace( + '@DATE_TYPE', WEKO_SCHEMA_DATE_DATETYPE_MAPPING.get(type_value, WEKO_SCHEMA_DATE_DEFAULT_DATETYPE)) + + if self.date_priority_mapping.get(type_value): + date_priority_list = self.date_priority_mapping.get(type_value) + date_priority_list += self.base_date_priority + + for priority_path in date_priority_list: + for element in root.findall( + self.__find_pattern.format(priority_path), self.__ns): + if element.text not in date_result: + date_result.append(element.text) + if date_result: + return date_result + + return record.get('pubdate', {}).get('attribute_value') + def __validate_fields(self, root, bibtex_type): """Validate required fields of bibtex type. @@ -620,18 +664,19 @@ def __combine_all_fields(self, bibtex_type): # all_fields.extend(item) return all_fields - def __get_bibtex_data(self, root, bibtex_type): + def __get_bibtex_data(self, root, bibtex_type, record): """Get Bibtex data base on Bibtex type. @param root: @param bibtex_type: + @param record: @return: """ def process_by_att(att, expected_val, existed_lst): - date_type = element.get(att) - if date_type and date_type.lower() == expected_val and \ + att_type = element.get(att) + if att_type and att_type.lower() == expected_val and \ element.text not in existed_lst: - dates.append(element.text) + existed_lst.append(element.text) def process_author(): author_lang = element.get(xml_ns + 'lang') @@ -668,14 +713,11 @@ def process_url(): self.__find_pattern.format(self.__fields_mapping[field]), self.__ns) if len(elements) != 0: value = '' - dates = [] for element in elements: - if not element: + if element is None or \ + field in [BibTexFields.YEAR, BibTexFields.MONTH]: continue - if field == BibTexFields.YEAR or \ - field == BibTexFields.MONTH: - process_by_att('dateType', 'issued', dates) - elif field == BibTexFields.AUTHOR: + if field == BibTexFields.AUTHOR: process_author() elif field == BibTexFields.DOI: process_by_att(xml_ns + 'identifierType', 'doi', dois) @@ -692,10 +734,6 @@ def process_url(): page_start = value elif field == BibTexFields.PAGE_END: page_end = value - elif field == BibTexFields.YEAR or \ - field == BibTexFields.MONTH and len(dates) != 0: - data[BibTexFields.YEAR.value], data[ - BibTexFields.MONTH.value] = self.__get_dates(dates) elif field == BibTexFields.AUTHOR: if creator[BibTexFields.AUTHOR.value]: data[field.value] = and_str.join( @@ -717,6 +755,8 @@ def process_url(): if page_start != '' and page_end != '': data['pages'] = str(page_start) + '--' + str(page_end) + date_by_resource_type = self.__get_date_by_resource_type(root, record) + data['year'], data['month'] = self.__get_dates(date_by_resource_type) data['ENTRYTYPE'] = bibtex_type.value data['ID'] = self.__get_item_id(root) @@ -734,11 +774,10 @@ def __get_item_id(root): item_id = '' namespace = 'http://www.openarchives.org/OAI/2.0/' request_tag = '{' + namespace + '}' + 'request' - if isinstance(root, list): - for element in root: - if element and request_tag == element.tag: - subs = element.get('identifier', '').split('/') - item_id = subs[len(subs) - 1] + for element in root: + if element is not None and request_tag == element.tag: + subs = element.get('identifier', '').split('/') + item_id = subs[len(subs) - 1] return item_id @@ -753,6 +792,8 @@ def __get_dates(dates): """ year = '' month = '' + if type(dates) is str: + dates = [dates] for element in dates: date_element = element.split('-') year += ', ' if year != '' else '' diff --git a/modules/weko-search-ui/requirements.txt b/modules/weko-search-ui/requirements.txt index da093eba3b..125e2daf10 100644 --- a/modules/weko-search-ui/requirements.txt +++ b/modules/weko-search-ui/requirements.txt @@ -32,7 +32,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -110,8 +110,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 @@ -179,6 +178,7 @@ netaddr==0.8.0 # raven==6.10.0 marshmallow-sqlalchemy==0.23.1 flask-marshmallow==0.14.0 +tika==2.6.0 # # packages-invenio.txt # diff --git a/modules/weko-search-ui/requirements2.txt b/modules/weko-search-ui/requirements2.txt index 4a7e47ef20..73622de27c 100644 --- a/modules/weko-search-ui/requirements2.txt +++ b/modules/weko-search-ui/requirements2.txt @@ -49,7 +49,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-search-ui/tests/conftest.py b/modules/weko-search-ui/tests/conftest.py index a8b5b2b97d..dcbcb3e7f2 100644 --- a/modules/weko-search-ui/tests/conftest.py +++ b/modules/weko-search-ui/tests/conftest.py @@ -1016,9 +1016,18 @@ def indices(app, db): testIndexPrivate = Index( index_name="testIndexPrivate", public_state=False, id=55 ) + testIndexSix = Index( + index_name="testIndexSix", + browsing_role="Contributor", + public_state=True, + id=66, + position=1, + item_custom_sort={}, + ) db.session.add(testIndexThree) db.session.add(testIndexThreeChild) + db.session.add(testIndexSix) return { "index_dict": dict(testIndexThree), @@ -2691,26 +2700,35 @@ def es_item_file_pipeline(es): @pytest.fixture() def identifier(db): - doi_identifier = Identifier( - id=1, - repository="Root Index", - jalc_flag=True, - jalc_crossref_flag=True, - jalc_datacite_flag=True, - ndl_jalc_flag=True, - jalc_doi="xyz.jalc", - jalc_crossref_doi="xyz.crossref", - jalc_datacite_doi="xyz.datacite", - ndl_jalc_doi="xyz.ndl", - suffix="def", - created_userId="1", - created_date=datetime.strptime("2022-09-28 04:33:42", "%Y-%m-%d %H:%M:%S"), - updated_userId="1", - updated_date=datetime.strptime("2022-09-28 04:33:42", "%Y-%m-%d %H:%M:%S"), - ) - db.session.add(doi_identifier) + identifier_info = { + "Root Index":{ + "JaLC": "xyz.jalc", + "Crossref": "xyz.crossref", + "DataCite": "xyz.datacite", + "NDL JaLC": "xyz.ndl", + } + } + identifiers = [] + for index, info in identifier_info.items(): + identifiers.append(Identifier( + repository=index, + jalc_flag=True, + jalc_crossref_flag=True, + jalc_datacite_flag=True, + ndl_jalc_flag=True, + jalc_doi=info["JaLC"], + jalc_crossref_doi=info["Crossref"], + jalc_datacite_doi=info["DataCite"], + ndl_jalc_doi=info["NDL JaLC"], + suffix="def", + created_userId=1, + created_date=datetime.strptime("2018/07/28 0:00:00", "%Y/%m/%d %H:%M:%S"), + updated_userId=1, + updated_date=datetime.strptime("2018/07/28 0:00:00", "%Y/%m/%d %H:%M:%S"), + )) + db.session.add_all(identifiers) db.session.commit() - return doi_identifier + return identifier_info def record_indexer_receiver(sender, json=None, record=None, index=None, diff --git a/modules/weko-search-ui/tests/test_admin.py b/modules/weko-search-ui/tests/test_admin.py index 9fdab6afe3..9bbde003c2 100644 --- a/modules/weko-search-ui/tests/test_admin.py +++ b/modules/weko-search-ui/tests/test_admin.py @@ -129,9 +129,34 @@ def test_index_acl(self,client, users, db_records2): with patch("flask_login.utils._get_user", return_value=user): with patch("flask.templating._render", return_value=""): - res = client.get(url) + res = client.get(url, query_string={"item_management": "update"}) assert res.status == '200 OK' + # .tox/c1/bin/pytest --cov=weko_search_ui tests/test_admin.py::TestItemManagementBulkSearch::test_index -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp + def test_index(self, i18n_app, users, indices2, mocker): + i18n_app.config['WEKO_SEARCH_TYPE_INDEX'] = 'index' + user = users[3]['obj'] + + with i18n_app.test_client() as client: + url = url_for("items/search.index", _external=True) + with patch("flask_login.utils._get_user", return_value=user): + with patch("flask.templating._render", return_value=""): + mock_execute_search_with_pagination = mocker.patch("weko_search_ui.utils.execute_search_with_pagination") + mock_execute_search_with_pagination.return_value = [] + + # management_type is bulk delete + res = client.get(url, query_string={"item_management": "delete", "q": 3}) + assert res.status == '200 OK' + + # management_type is bulk update + res = client.get(url, query_string={"item_management": "update"}) + assert res.status == '200 OK' + + # management_type is not found + res = client.get(url) + assert res.status == '500 INTERNAL SERVER ERROR' + + # def is_visible(): ~ GOOD # .tox/c1/bin/pytest --cov=weko_search_ui tests/test_admin.py::test_ItemManagementBulkSearch_is_visible -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp def test_ItemManagementBulkSearch_is_visible(i18n_app, users, db_records2): diff --git a/modules/weko-search-ui/tests/test_api.py b/modules/weko-search-ui/tests/test_api.py index d0c655d008..6933859210 100644 --- a/modules/weko-search-ui/tests/test_api.py +++ b/modules/weko-search-ui/tests/test_api.py @@ -103,39 +103,70 @@ def test_get_nested_sorting(i18n_app, users, app): assert SearchSetting.get_nested_sorting(key_str) == check_key - +# .tox/c1/bin/pytest --cov=weko_search_ui tests/test_api.py::test_get_search_detail_keyword -vv -s --cov-branch --cov-report=term --cov-report=html --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp # def get_search_detail_keyword(str): -def test_get_search_detail_keyword(i18n_app, users, db): - from sqlalchemy.sql import func +def test_get_search_detail_keyword(i18n_app, users, db,redis_connect): + from weko_records.models import ItemTypeName,ItemType + from weko_index_tree.models import Index + names = ["test_itemtype01", "test's itemtype02",""] + redis_connect.delete("index_tree_view_127.0.0.1_en") + for i, name in enumerate(names): + id = i+1 + item_type_name = ItemTypeName(id=id,name=name) + db.session.add(item_type_name) + item_type = ItemType(name_id=id,schema={},form={},render={},tag=1) + db.session.add(item_type) + db.session.commit() + [{ + "pid":"","cid":"","id":"","name":"","parent":"","children":[] + }] + db.session.add(Index(id=1,parent=0,position=0,index_name="test_index1",index_name_english="test_index1")) + db.session.add(Index(id=2,parent=0,position=1,index_name="test_index2",index_name_english="test_index2")) + db.session.add(Index(id=3,parent=2,position=0,index_name="test_index2_1",index_name_english="test_index2_1")) + db.session.add(Index(id=4,parent=2,position=1,index_name="test_index'2_2",index_name_english="test_index'2_2")) + db.session.commit() + index_tree = [ + {"pid":0,"cid":1,"id":"1","name":"test_index1","children":[]}, + { + "pid":0,"cid":2,"id":"2","name":"test_index2","children":[ + {"pid":2,"cid":3,"id":"3","name":"test_index2_1","parent":"2","children":[]}, + {"pid":2,"cid":4,"id":"4","name":"test_index'2_2","parent":"2","children":[]} + ]}, + {"pid":0,"cid":"","id":"5","name":"","chidren":[]} + ] - test_1 = SearchManagement( - id=1, - default_dis_sort_index=json.dumps({"custom_sort": "custom_sort"}), - sort_setting={ - "allow": [ - { - "id": "_rfind" - } - ] - }, - default_dis_sort_keyword=json.dumps({"custom_sort": "custom_sort"}) + # not exist search_management + with patch("weko_search_ui.api.Indexes.get_browsing_tree",return_value=index_tree): + res = get_search_detail_keyword("") + assert type(res) == str + res = json.loads(res) + assert len(res.get("condition_setting",[])) > 0 + for r in res.get("condition_setting",[]): + if r.get("id") == "iid": + assert r.get("check_val") == [{"checkStus":False,"contents":"test_index1","id":1},{"checkStus":False,"contents":"test_index2","id":2},{"checkStus":False,"contents":"test_index2/test_index2_1","id":3},{"checkStus":False,"contents":"test_index2/test_index'2_2","id":4},{"checkStus":False,"contents":"","id":""}] + if r.get("id") == "itemtype": + assert r.get("check_val") == [{"checkStus":False,"contents":"test_itemtype01","id":"test_itemtype01"},{"checkStus":False,"contents":"test's itemtype02","id":"test's itemtype02"},{"checkStus":False,"contents":"","id":""}] + + # exist search_management + search_management = SearchManagement( + search_conditions=[ + {"id":"title","mapping":["title"],"contents":"","inputVal":"","inputType":"text","contents_value":{"en":"Title","ja":"タイトル"}}, + {"id":"iid","mapping":["iid"],"contents":"","inputVal":"","check_val":[],"inputType":"checkbox_list","contents_value":{"en":"Index","ja":"インデックス"}}, + {"id":"itemtype","mapping":["itemtype"],"contents":"","inputVal":"","check_val":[],"inputType":"checkbox_list","contents_value":{"en":"Item Type","ja":"アイテムタイプ"}} + ] ) - data_1 = [[1, 2], [3, 4]] - data_2 = [{ - "id": 1, - "parent_name": "test" - }] - - assert isinstance(get_search_detail_keyword("str"), str) - assert len(json.loads(get_search_detail_keyword("str")).get('condition_setting')) > 0 - - db.session.add(test_1) + db.session.add(search_management) db.session.commit() - - with patch("weko_records.utils.get_keywords_data_load", return_value=data_1): - with patch("weko_search_ui.api.get_childinfo", return_value=data_2): - assert len(json.loads(get_search_detail_keyword("str")).get('condition_setting')) <= 0 - + with patch("weko_search_ui.api.Indexes.get_browsing_tree",return_value=index_tree): + res = get_search_detail_keyword("") + assert type(res) == str + test = {"condition_setting":[ + {"contents":"タイトル","contents_value":{"en":"Title","ja":"タイトル"},"id":"title","inputType":"text","inputVal":"","mapping":["title"]}, + {"check_val":[{"checkStus":False,"contents":"test_index1","id":1},{"checkStus":False,"contents":"test_index2","id":2},{"checkStus":False,"contents":"test_index2/test_index2_1","id":3},{"checkStus":False,"contents":"test_index2/test_index'2_2","id":4},{"checkStus":False,"contents":"","id":""}],"contents":"インデックス","contents_value":{"en":"Index","ja":"インデックス"},"id":"iid","inputType":"checkbox_list","inputVal":"","mapping":["iid"]}, + {"check_val":[{"checkStus":False,"contents":"test_itemtype01","id":"test_itemtype01"},{"checkStus":False,"contents":"test's itemtype02","id":"test's itemtype02"},{"checkStus":False,"contents":"","id":""}],"contents":"アイテムタイプ","contents_value":{"en":"Item Type","ja":"アイテムタイプ"},"id":"itemtype","inputType":"checkbox_list","inputVal":"","mapping":["itemtype"]} + ]} + assert json.loads(res) == test + # def get_childinfo(index_tree, result_list=[], parename=""): def test_get_childinfo(i18n_app, users): index_tree = { diff --git a/modules/weko-search-ui/tests/test_query.py b/modules/weko-search-ui/tests/test_query.py index c12cb3f8f4..60bd9b259d 100644 --- a/modules/weko-search-ui/tests/test_query.py +++ b/modules/weko-search-ui/tests/test_query.py @@ -165,6 +165,19 @@ def test_default_search_factory(app, users, communities): with patch('invenio_records_rest.facets.default_facets_factory', return_value=_rv): res = default_search_factory(self=None, search=search) assert res + + _data["lang"] = "jpn,other" + with app.test_request_context(headers=[('Accept-Language','en')], data=_data): + with patch("weko_search_ui.query.Indexes.get_browsing_tree_paths",return_value=["33", "33/44"]): + from flask_login.utils import login_user + login_user(users[3]["obj"]) + app.preprocess_request() + app.extensions['invenio-oauth2server'] = 1 + app.extensions['invenio-queues'] = 1 + res = default_search_factory(self=None, search=search) + query = (res[0].query()).to_dict() + assert query == {"query": {"bool": {"filter": [{"bool": {"must": [{"bool": {"should": [{"bool": {"must": [{"terms": {"publish_status": ["0", "1"]}}, {"match": {"weko_creator_id": "5"}}]}}, {"bool": {"must": [{"terms": {"publish_status": ["0", "1"]}}, {"match": {"weko_shared_id": "5"}}]}}, {"bool": {"must": [{"terms": {"publish_status": ["0", "1"]}}]}}], "must": [{"terms": {"path": ["33", "44"]}}]}}, {"bool": {"must": [{"match": {"relation_version_is_last": "true"}}]}}, {"bool": {"should": [{"match": {"language": {"operator": "and", "query": "jpn"}}}, {"bool": {"filter": [{"script": {"script": {"source": "boolean flg=false; for(lang in doc['language']){if (!params.param1.contains(lang)){flg=true;}} return flg;", "params": {"param1": ["jpn", "eng", "fra", "ita", "deu", "spa", "zho", "rus", "lat", "msa", "epo", "ara", "ell", "kor", "other"]}}}}]}}]}}, {"bool": {"should": [{"nested": {"path": "relation.relatedIdentifier", "query": {"bool": {"must": [{"match": {"relation.relatedIdentifier.value": {"operator": "and", "query": "1"}}}, {"term": {"relation.relatedIdentifier.identifierType": "identifier"}}]}}}}]}}, {"bool": {"should": [{"nested": {"path": "content", "query": {"bool": {"must": [{"terms": {"content.licensetype.raw": ["test_license"]}}]}}}}]}}, {"nested": {"path": "file.date", "query": {"bool": {"should": [{"term": {"file.date.dateType": "Accepted"}}], "must": [{"range": {"file.date.value": {"gte": "2022-10-01", "lte": "2022-10-30"}}}]}}}}, {"range": {"date_range1": {"gte": "2022-10-01", "lte": "2022-10-30"}}}, {"match": {"text1": {"operator": "and", "query": "test_text"}}}]}}], "must": [{"match_all": {}}]}}, "_source": {"excludes": ["content"]}} + # def item_path_search_factory(self, search, index_id=None): diff --git a/modules/weko-search-ui/tests/test_utils.py b/modules/weko-search-ui/tests/test_utils.py index e8ce42f03d..8a586b6ba4 100644 --- a/modules/weko-search-ui/tests/test_utils.py +++ b/modules/weko-search-ui/tests/test_utils.py @@ -3,11 +3,14 @@ import copy import json import os +import time import unittest -from datetime import datetime +from datetime import datetime, timedelta import uuid import pytest +from elasticsearch import helpers +from elasticsearch_dsl import Search from flask import current_app, make_response, request from flask_babelex import Babel from flask_login import current_user @@ -45,6 +48,7 @@ define_default_dict, delete_exported, delete_records, + execute_search_with_pagination, export_all, get_change_identifier_mode_content, get_content_workflow, @@ -174,9 +178,62 @@ def __init__(self): def can(self): return True + +# def execute_search_with_pagination(search_instance, get_all=False, size=None): +# .tox/c1/bin/pytest --cov=weko_search_ui tests/test_utils.py::test_execute_search_with_pagination -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp +def test_execute_search_with_pagination(i18n_app, indices, users, db_records, mocker, esindex): + i18n_app.config['WEKO_SEARCH_TYPE_INDEX'] = 'index' + i18n_app.config['OAISERVER_ES_MAX_CLAUSE_COUNT'] = 1 + i18n_app.config['WEKO_ADMIN_MANAGEMENT_OPTIONS'] = WEKO_ADMIN_MANAGEMENT_OPTIONS + + mocker.patch("weko_search_ui.query.search_permission",side_effect=MockSearchPerm) + + def _generate_es_data(num, start_datetime=datetime.now()): + for i in range(num): + doc = { + "_index": i18n_app.config.get("INDEXER_DEFAULT_INDEX", "test-weko-item-v1.0.0"), + "_type": "item-v1.0.0", + "_id": f"2d1a2520-9080-437f-a304-230adc8{i:05d}", + "_source": { + "_item_metadata": { + "title": [f"test_title_{i}"], + }, + "relation_version_is_last": True, + "path": ["66"], + "control_number": f"{i:05d}", + "_created": (start_datetime + timedelta(seconds=i)).isoformat(), + "publish_status": "0", + }, + "sort": i, + } + yield doc + + generate_data_num = 20005 + preset_records_num = len(db_records) + expected_data_num = generate_data_num + preset_records_num + 3 + helpers.bulk(esindex, _generate_es_data(generate_data_num), refresh='true') + i18n_app.config['RECORDS_REST_SORT_OPTIONS'] = {"test-weko":{"controlnumber":{"title":"ID","fields": ["control_number"],"default_order": "asc","order": 2}}} + search = Search(using=esindex) + search._sort.append( {"_created": {"order": "asc", "unmapped_type": "long"}}) + + with i18n_app.test_request_context(query_string={"sort": "control_number", "q": "66"}): + with patch("flask_login.utils._get_user", return_value=users[3]["obj"]): + # max_result_size < 0 + assert len(execute_search_with_pagination(search, max_result_size=-1)) == expected_data_num + # max_result_size default + assert len(execute_search_with_pagination(search)) == 10000 + # max_result_size = 1 + assert len(execute_search_with_pagination(search, max_result_size=1)) == 1 + # max_result_size = 15000 + assert len(execute_search_with_pagination(search, max_result_size=15000)) == 15000 + # max_result_size = 30000 + assert len(execute_search_with_pagination(search, max_result_size=30000)) == expected_data_num + + +# def execute_search_with_pagination(search_instance, get_all=False, size=None): # def get_tree_items(index_tree_id): ERROR ~ AttributeError: '_AppCtxGlobals' object has no attribute 'identity' # .tox/c1/bin/pytest --cov=weko_search_ui tests/test_utils.py::test_get_tree_items -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp -def test_get_tree_items(i18n_app, indices, users, mocker): +def test_get_tree_items(i18n_app, indices, users, mocker, esindex): i18n_app.config['WEKO_SEARCH_TYPE_INDEX'] = 'index' i18n_app.config['OAISERVER_ES_MAX_CLAUSE_COUNT'] = 1 i18n_app.config['WEKO_ADMIN_MANAGEMENT_OPTIONS'] = WEKO_ADMIN_MANAGEMENT_OPTIONS @@ -192,6 +249,8 @@ def to_dict(self): return self.data def __init__(self,data): self.data=data + def extra(self,size): + return self def execute(self): return self.MockExecute(self.data) def mock_search_factory(self, search,index_id=None): @@ -202,6 +261,42 @@ def mock_search_factory(self, search,index_id=None): # with patch("weko_search_ui.query.item_path_search_factory", return_value="{'abc': 123}"): assert get_tree_items(33) + def _generate_es_data(num, start_datetime=datetime.now()): + for i in range(num): + doc = { + "_index": i18n_app.config.get("INDEXER_DEFAULT_INDEX", "test-weko-item-v1.0.0"), + "_type": "item-v1.0.0", + "_id": f"2d1a2520-9080-437f-a304-230adc8{i:05d}", + "_source": { + "_item_metadata": { + "title": [f"test_title_{i}"], + }, + "relation_version_is_last": True, + "path": ["66"], + "control_number": f"{i:05d}", + "_created": (start_datetime + timedelta(seconds=i)).isoformat(), + "publish_status": "0", + }, + } + yield doc + + generate_data_num = 20005 + helpers.bulk(esindex, _generate_es_data(generate_data_num), refresh='true') + i18n_app.config['RECORDS_REST_SORT_OPTIONS'] = {"test-weko":{"controlnumber":{"title":"ID","fields": ["control_number"],"default_order": "asc","order": 2}}} + + with i18n_app.test_request_context(query_string={"sort": "control_number", "q": "66"}): + with patch("flask_login.utils._get_user", return_value=users[3]["obj"]): + # max_result_size < 0 + assert len(get_tree_items(66, max_result_size=-1)) == generate_data_num + # max_result_size default + assert len(get_tree_items(66)) == 10000 + # max_result_size = 1 + assert len(get_tree_items(66, max_result_size=1)) == 1 + # max_result_size = 15000 + assert len(get_tree_items(66, max_result_size=15000)) == 15000 + # max_result_size = 30000 + assert len(get_tree_items(66, max_result_size=30000)) == generate_data_num + # def delete_records(index_tree_id, ignore_items): def test_delete_records(i18n_app, db_activity): @@ -900,7 +995,8 @@ def test_handle_check_doi_indexes(i18n_app, es_item_file_pipeline, es_records): # def handle_check_doi_ra(list_record): -def test_handle_check_doi_ra(i18n_app, es_item_file_pipeline, es_records): +# .tox/c1/bin/pytest --cov=weko_search_ui tests/test_utils.py::test_handle_check_doi_ra -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp +def test_handle_check_doi_ra(i18n_app, db,es_item_file_pipeline, es_records,identifier): # list_record = [es_records['results'][0]['item']] item = MagicMock() @@ -913,7 +1009,54 @@ def test_handle_check_doi_ra(i18n_app, es_item_file_pipeline, es_records): with patch("weko_deposit.api.WekoRecord.get_record_by_pid", return_value="1"): # Doesn't return any value assert not handle_check_doi_ra([item]) - + + def create_record_with_doi(recid, doi_type, doi_value=""): + """create item with doi""" + from tests.helpers import create_record + doi_prefix = identifier["Root Index"].get(doi_type,"") + if not doi_value: + doi_value = "{prefix}/{suffix}".format( + prefix=doi_prefix, + suffix="{:010}".format(recid) + ) + record_tmp = {"_oai": {"id": "oai:weko3.example.org:{:08}".format(recid), "sets": ["1"]}, "path": ["1"], "owner": "1", "recid": str(recid), "title": [f"record_with_doi: {recid}"], "pubdate": {"attribute_name": "PubDate", "attribute_value": "2022-08-20"}, "_buckets": {"deposit": "3e99cfca-098b-42ed-b8a0-20ddd09b3e02"}, "_deposit": {"id": str(recid), "pid": {"type": "depid", "value": str(recid), "revision_id": 0}, "owner": "1", "owners": [1], "status": "draft", "created_by": 1, "owners_ext": {"email": "wekosoftware@nii.ac.jp", "username": "", "displayname": ""}}, "item_title": f"record_with_doi: {recid}", "author_link": [], "item_type_id": "1", "publish_date": "2022-08-20", "publish_status": "0", "weko_shared_id": -1, "item_1617186331708": {"attribute_name": "Title", "attribute_value_mlt": [{"subitem_1551255647225": f"record_with_doi: {recid}", "subitem_1551255648112": "ja"}]}, "item_1617258105262": {"attribute_name": "Resource Type", "attribute_value_mlt": [{"resourceuri": "http://purl.org/coar/resource_type/c_5794", "resourcetype": "conference paper"}]}, "item_1617186819068":{"attribute_name":"","attribute_value_mlt":[{"subitem_identifier_reg_text":doi_value,"subitem_identifier_reg_type":doi_type}]},"relation_version_is_last": True} + item_tmp = {"id": str(recid), "pid": {"type": "depid", "value": str(recid), "revision_id": 0}, "lang": "ja", "owner": "1", "title": f"record_with_doi: {recid}", "owners": [1], "status": "published", "$schema": "/items/jsonschema/1", "pubdate": "2022-08-20", "created_by": 1, "owners_ext": {"email": "wekosoftware@nii.ac.jp", "username": "", "displayname": ""}, "shared_user_id": -1, "item_1617186331708": [{"subitem_1551255647225": f"record_with_doi: {recid}", "subitem_1551255648112": "ja"}], "item_1617258105262": {"resourceuri": "http://purl.org/coar/resource_type/c_5794", "resourcetype": "conference paper"},"item_1617186819068":[{"subitem_identifier_reg_text":doi_value,"subitem_identifier_reg_type":doi_type}]} + _,pid_recid,_,_,_,_ = create_record(record_tmp, item_tmp) + doi = PersistentIdentifier.query.filter_by(pid_type="doi",pid_value="https://doi.org/10.xyz/{:010}".format(recid)).one_or_none() + doi_url = f"https://doi.org/{doi_value}" + if doi: + doi.pid_value = doi_url + db.session.merge(doi) + else: + doi = PersistentIdentifier.create("doi",doi_url,object_type="rec",object_uuid=pid_recid.object_uuid,status=PIDStatus.REGISTERED) + db.session.add(doi) + db.session.commit() + + create_record_with_doi(10, "JaLC") # JaLC DOI + create_record_with_doi(11, "Crossref") # Crossref + create_record_with_doi(12, "DataCite") # DataCite + create_record_with_doi(13, "NDL JaLC") # NDL JaLC + create_record_with_doi(14, "JaLC","xyz.jalc/0000000014") # JaLC, NDL JaLC prefix + + item = [ + {"errors":[],"doi":"xyz.jalc/0000000010"}, # exist doi, not exist doi_ra + {"errors":[],"doi":"xyz.jalc/0000000010", "doi_ra":"wrong doi"},# wrong doi_ra + {"errors":[],"id":"10","doi":"xyz.jalc/000000010", "doi_ra":"JaLC","is_change_identifier":False,"status":"keep"}, # exist doi, exist doi_ra + {"errors":[],"id":"10","doi":"xyz.crossref/000000010", "doi_ra":"Crossref","is_change_identifier":False,"status":"keep"}, # exist doi, exist doi_ra + {"errors":[],"id":"14","doi":"xyz.ndl/0000000014", "doi_ra":"NDL LaLC","is_change_identifier":False,"status":"keep"}, # exist doi, exist doi_ra + ] + + test = [ + {"errors":["Please specify DOI_RA."],"doi":"xyz.jalc/0000000010"}, # exist doi, not exist doi_ra + {"errors":["DOI_RA should be set by on of JaLC, Crossref, DataCite, NDL JaLC"],"doi":"xyz.jalc/0000000010", "doi_ra":"wrong doi"},# wrong doi_ra + {"errors":["Specified DOI_RA is different from existing DOI_RA"],"id":"10","doi":"xyz.jalc/000000010", "doi_ra":"JaLC","is_change_identifier":False,"status":"keep"}, # exist doi, exist doi_ra + {"errors":[],"id":"10","doi":"xyz.crossref/000000010", "doi_ra":"Crossref","is_change_identifier":False,"status":"keep"}, # exist doi, exist doi_ra + {"errors":[],"id":"14","doi":"xyz.ndl/0000000014", "doi_ra":"NDL LaLC","is_change_identifier":False,"status":"keep"}, # exist doi, exist doi_ra + ] + with patch("weko_search_ui.utils.handle_doi_required_check",return_value=False): + handle_check_doi_ra(item) + assert item == test + # def handle_check_doi(list_record): # .tox/c1/bin/pytest --cov=weko_search_ui tests/test_utils.py::test_handle_check_doi -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp @@ -1220,6 +1363,7 @@ def test_register_item_doi(i18n_app, db_activity, identifier, mocker): assert args[2] == test_data # is_change_identifier is False, doi_ra is NDL, doi_duplicated is True + mock_without_version.pid_doi = None item = { "id":"7", "is_change_identifier":False, @@ -1388,6 +1532,7 @@ def test_get_list_key_of_iso_date(): "item_1617187056579.bibliographicIssueDates.bibliographicIssueDate", "item_1617187136212.subitem_1551256096004", "item_1617605131499.fileDate.fileDateValue", + "item_1617605131499.date[0].dateValue" ] with open(form, encoding="utf-8") as f: df = json.load(f) @@ -2490,18 +2635,31 @@ def test_get_key_by_property(i18n_app): # def get_data_by_property(item_metadata, item_map, mapping_key): +# .tox/c1/bin/pytest --cov=weko_search_ui tests/test_utils.py::test_get_data_by_property -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-search-ui/.tox/c1/tmp def test_get_data_by_property(i18n_app): item_metadata = {} item_map = {"mapping_key": "test.test"} mapping_key = "mapping_key" - assert get_data_by_property(item_metadata, item_map, mapping_key) - assert get_data_by_property(item_metadata, {}, mapping_key) + data, key_list = get_data_by_property(item_metadata, item_map, mapping_key) + assert data == None + assert key_list == "test.test" + data, key_list = get_data_by_property(item_metadata, {}, mapping_key) + assert data == None + assert key_list == None with patch( "weko_workflow.utils.get_sub_item_value", return_value=[True, ["value"]] ): - assert get_data_by_property(item_metadata, item_map, mapping_key) + data, key_list = get_data_by_property(item_metadata, item_map, mapping_key) + assert data == ["value"] + assert key_list == "test.test" + + item_map = {"mapping_key": "test.test,test1.test1"} + mapping_key = "mapping_key" + data, key_list = get_data_by_property(item_metadata, item_map, mapping_key) + assert data == ["value", "value"] + assert key_list == "test.test,test1.test1" # def get_filenames_from_metadata(metadata): diff --git a/modules/weko-search-ui/weko_search_ui/admin.py b/modules/weko-search-ui/weko_search_ui/admin.py index bc7fb60120..6cc06ee3f5 100644 --- a/modules/weko-search-ui/weko_search_ui/admin.py +++ b/modules/weko-search-ui/weko_search_ui/admin.py @@ -289,7 +289,7 @@ def index(self): recursive_tree = Indexes.get_recursive_tree(q) if current_tree is not None: - tree_items = get_tree_items(current_tree.id) + tree_items = get_tree_items(current_tree.id, 1) has_items = len(tree_items) > 0 if recursive_tree is not None: has_child_trees = len(recursive_tree) > 1 diff --git a/modules/weko-search-ui/weko_search_ui/api.py b/modules/weko-search-ui/weko_search_ui/api.py index 641020ebff..405cd024d4 100644 --- a/modules/weko-search-ui/weko_search_ui/api.py +++ b/modules/weko-search-ui/weko_search_ui/api.py @@ -164,7 +164,7 @@ def get_nested_sorting(cls, key_str): return nested_sorting -def get_search_detail_keyword(str): +def get_search_detail_keyword(str_): """Get search detail keyword.""" res = sm.get() options = None @@ -204,10 +204,12 @@ def get_search_detail_keyword(str): if key_lang == current_i18n.language: k_v["contents"] = contents_value[key_lang] if k_v.get("check_val"): - for val in k_v.get("check_val"): - if val.get("contents"): - val["contents"] = escape_str(_(val["contents"])) - + if k_v.get("id") != "iid": + for val in k_v.get("check_val"): + if val.get("contents"): + val["contents"] = escape_str(_(val["contents"])) + if val.get("id") and isinstance(val.get("id"), str): + val["id"] = escape_str(_(val["id"])) key_options["condition_setting"] = options key_options_str = json.dumps(key_options) diff --git a/modules/weko-search-ui/weko_search_ui/config.py b/modules/weko-search-ui/weko_search_ui/config.py index 05584ae690..2bca10e703 100644 --- a/modules/weko-search-ui/weko_search_ui/config.py +++ b/modules/weko-search-ui/weko_search_ui/config.py @@ -248,20 +248,20 @@ "", { "id_attr": { - "identifier": ("relation.relatedIdentifier", "identifierType=*"), + "identifier": ("relation.relatedIdentifier", "identifierType=identifier"), "URI": ("identifier", "identifierType=*"), - "fullTextURL": ("file.URI", "objectType=*"), - "selfDOI": ("identifierRegistration", "identifierType=*"), - "ISBN": ("relation.relatedIdentifier", "identifierType=ISBN"), - "ISSN": ("sourceIdentifier", "identifierType=ISSN"), + "fullTextURL": ("file.URI", "objectType=fullTextURL"), + "selfDOI": ("identifierRegistration", "identifierType=selfDOI"), + "ISBN": ("relation.relatedIdentifier", "identifierType=*"), + "ISSN": ("sourceIdentifier", "identifierType=*"), "NCID": [ - ("relation.relatedIdentifier", "identifierType=NCID"), - ("sourceIdentifier", "identifierType=NCID"), + ("relation.relatedIdentifier", "identifierType=*"), + ("sourceIdentifier", "identifierType=*"), ], - "pmid": ("relation.relatedIdentifier", "identifierType=PMID"), - "doi": ("relation.relatedIdentifier", "identifierType=DOI"), - "NAID": ("relation.relatedIdentifier", "identifierType=NAID"), - "ichushi": ("relation.relatedIdentifier", "identifierType=ICHUSHI"), + "PMID": ("relation.relatedIdentifier", "identifierType=*"), + "DOI": ("relation.relatedIdentifier", "identifierType=*"), + "NAID": ("relation.relatedIdentifier", "identifierType=*"), + "ICHUSHI": ("relation.relatedIdentifier", "identifierType=*"), } }, ), @@ -342,13 +342,13 @@ "ara", "ell", "kor", - "-", + "other" ] }, "srctitle": ["sourceTitle", "sourceTitle.ja"], "spatial": "geoLocation.geoLocationPlace", "temporal": "temporal", - "version": "versionType", + "version": "versiontype", "dissno": "dissertationNumber", "degreename": ["degreeName", "degreeName.ja"], "dgname": ["dgName", "dgName.ja"], diff --git a/modules/weko-search-ui/weko_search_ui/query.py b/modules/weko-search-ui/weko_search_ui/query.py index 31a09b10f4..505a67d449 100644 --- a/modules/weko-search-ui/weko_search_ui/query.py +++ b/modules/weko-search-ui/weko_search_ui/query.py @@ -206,9 +206,16 @@ def _get_keywords_query(k, v): ] for j in kvl: - name_dict = dict(operator="and") - name_dict.update(dict(query=j)) - shud.append(Q("match", **{key: name_dict})) + + if j == "other" and k=="language": + source = "boolean flg=false; for(lang in doc['language']){if (!params.param1.contains(lang)){flg=true;}} return flg;" + params = {"param1":vlst} + script = Q("script",script={"source":source,"params":params}) + shud.append(Q("bool",filter=script)) + else: + name_dict = dict(operator="and") + name_dict.update(dict(query=j)) + shud.append(Q("match", **{key: name_dict})) if shud: return Q("bool", should=shud) @@ -298,7 +305,7 @@ def _get_nested_query(k, v): if "=*" in alst[1]: name = alst[0] + "." + val_attr_lst[0] qt = [ - Q("term", **{name: val_attr_lst[1]}) + Q("term", **{name: key}) ] mut.extend(qt or []) diff --git a/modules/weko-search-ui/weko_search_ui/rest.py b/modules/weko-search-ui/weko_search_ui/rest.py index d61fbee4de..36222c3512 100644 --- a/modules/weko-search-ui/weko_search_ui/rest.py +++ b/modules/weko-search-ui/weko_search_ui/rest.py @@ -368,6 +368,7 @@ def get(self, **kwargs): nlst.append(current_idx) agp.clear() # process index tree image info + custom_sort_data = None if len(nlst): index_id = nlst[0].get("key").split("/")[-1] index_info = Indexes.get_index(index_id=index_id) @@ -376,11 +377,15 @@ def get(self, **kwargs): nlst[0]["img"] = index_info.image_name nlst[0]["display_format"] = index_info.display_format nlst[0]["rss_status"] = index_info.rss_status + if index_id == q: + custom_sort_data = index_info # Update rss_status for index child for idx in range(0, len(nlst)): index_id = nlst[idx].get("key").split("/")[-1] index_info = Indexes.get_index(index_id=index_id) nlst[idx]["rss_status"] = index_info.rss_status + if index_id == q: + custom_sort_data = index_info agp.append(nlst) for hit in rd["hits"]["hits"]: try: @@ -390,9 +395,9 @@ def get(self, **kwargs): hit["_source"]["_comment"] = _comment # Register custom_sort cn = hit["_source"]["control_number"] - if index_info.item_custom_sort.get(cn): + if custom_sort_data and custom_sort_data.item_custom_sort.get(cn): hit["_source"]["custom_sort"] = { - str(index_info.id): str(index_info.item_custom_sort.get(cn)) + str(custom_sort_data.id): str(custom_sort_data.item_custom_sort.get(cn)) } except Exception: pass diff --git a/modules/weko-search-ui/weko_search_ui/static/css/weko_search_ui/dot_leaders.css b/modules/weko-search-ui/weko_search_ui/static/css/weko_search_ui/dot_leaders.css index 3f923bccb3..b9d17adb8c 100644 --- a/modules/weko-search-ui/weko_search_ui/static/css/weko_search_ui/dot_leaders.css +++ b/modules/weko-search-ui/weko_search_ui/static/css/weko_search_ui/dot_leaders.css @@ -26,7 +26,7 @@ ul.leaders li:after { ul.leaders span:first-child { padding-right: 5px; - background: #ffffff; + background: #ffffff !important; height:100%; max-width: 80%; display:inline-block; @@ -35,11 +35,10 @@ ul.leaders span:first-child { ul.leaders span + span { float: right; padding-left: 5px; - background: transparent; + background: #ffffff !important; position: relative; z-index: 1; height:100%; - background-color: #ffffff } .bg-color-white { diff --git a/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/app.js b/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/app.js index 391e6483b2..88a35c3bb3 100644 --- a/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/app.js +++ b/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/app.js @@ -408,26 +408,16 @@ function itemExportCtrl($scope, $rootScope, $http, $location) { $scope.exportItems = function () { if ($rootScope.item_export_checkboxes.length <= $rootScope.max_export_num) { - records_metadata = $scope.getExportItemsMetadata(); $('#record_ids').val(JSON.stringify($rootScope.item_export_checkboxes)); $('#invalid_record_ids').val(JSON.stringify([])); - let export_metadata = {} - $rootScope.item_export_checkboxes.map(function(recid) { - $.each(records_metadata, function (index, value) { - if (value.id == recid) { - export_metadata[recid] = value; - } - }); - }) let exportBibtex = document.getElementById("export_format_radio_bibtex").checked if (exportBibtex) { - let invalidBibtexRecordIds = $scope.validateBibtexExport(Object.keys(export_metadata)); + let invalidBibtexRecordIds = $scope.validateBibtexExport($rootScope.item_export_checkboxes.map(String)); if (invalidBibtexRecordIds.length > 0) { $('#invalid_record_ids').val(JSON.stringify(invalidBibtexRecordIds)); $scope.showErrMsgBibtex(invalidBibtexRecordIds); } } - $('#record_metadata').val(JSON.stringify(export_metadata)); $('#export_items_form').submit(); // Submit form and let controller handle file making } $('#item_export_button').attr("disabled", false); @@ -462,44 +452,6 @@ function itemExportCtrl($scope, $rootScope, $http, $location) { }); } - $scope.getExportItemsMetadata = function () { - let cur_url = new URL(window.location.href); - let q = cur_url.searchParams.get("q"); - let search_type = cur_url.searchParams.get("search_type"); - const currentTime = new Date().getTime(); - let request_url = ''; - - if (search_type == "2") { - request_url = '/api/index/?page=1&size=9999&search_type=' + search_type + '&q=' + q; - } else { - if (search_type === null) { - search_type = "0"; - } - if (q === null) { - q = ""; - } - request_url = '/api/records/?page=1&size=9999&search_type=' + search_type + '&q=' + q; - } - - let search_results = [] - $('#item_export_button').attr("disabled", true); - $.ajax({ - method: 'GET', - url: request_url, - async: false, - contentType: 'application/json', - dataType: 'json', - success: function (data, status) { - search_results = data.hits.hits; - }, - error: function (status, error) { - console.log(error); - } - }); - - return search_results; - } - $scope.checkForRestrictedContent = function (record_id) { record_ids = []; angular.forEach($scope.vm.invenioSearchResults.hits.hits, function (record) { diff --git a/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/import.js b/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/import.js index a6c280a3cc..c34e44305c 100644 --- a/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/import.js +++ b/modules/weko-search-ui/weko_search_ui/static/js/weko_search_ui/import.js @@ -889,7 +889,7 @@ class CheckComponent extends React.Component { contentType: "application/json; charset=utf-8", success: function (response) { const date = moment() - const fileName = 'check_' + date.format("YYYY-DD-MM") + '.' + file_format; + const fileName = 'check_' + date.format("YYYY-MM-DD") + '.' + file_format; const blob = new Blob([response], { type: 'text/' + file_format }); if (window.navigator && window.navigator.msSaveOrOpenBlob) { @@ -1054,7 +1054,7 @@ class ResultComponent extends React.Component { contentType: "application/json; charset=utf-8", success: function (response) { const date = moment() - const fileName = 'List_Download_' + date.format("YYYY-DD-MM") + '.' + file_format; + const fileName = 'List_Download_' + date.format("YYYY-MM-DD") + '.' + file_format; const blob = new Blob([response], { type: 'text/' + file_format }); if (window.navigator && window.navigator.msSaveOrOpenBlob) { diff --git a/modules/weko-search-ui/weko_search_ui/utils.py b/modules/weko-search-ui/weko_search_ui/utils.py index 64d0fd164f..6b3019f1aa 100644 --- a/modules/weko-search-ui/weko_search_ui/utils.py +++ b/modules/weko-search-ui/weko_search_ui/utils.py @@ -21,6 +21,7 @@ """Weko Search-UI admin.""" import csv +import chardet import json import os import re @@ -125,6 +126,7 @@ WEKO_IMPORT_VALIDATE_MESSAGE, WEKO_REPO_USER, WEKO_SEARCH_TYPE_DICT, + WEKO_SEARCH_MAX_RESULT, WEKO_SEARCH_UI_BULK_EXPORT_LIMIT, WEKO_SEARCH_UI_BULK_EXPORT_MSG, WEKO_SEARCH_UI_BULK_EXPORT_RUN_MSG, @@ -196,7 +198,48 @@ def __repr__(self): ) -def get_tree_items(index_tree_id): +def execute_search_with_pagination( + search_instance, + max_result_size=WEKO_SEARCH_MAX_RESULT +): + """Execute search with pagination. + + @param search_instance: search instance + @param max_result_size: maximum number of records to get + if < 0, get all records + @return: search result + """ + if max_result_size < 0: + search_size = 10000 + else: + search_size = min(max_result_size, 10000) + max_result_size -= search_size + + search_instance = search_instance.extra(size=search_size) + search_result = search_instance.execute() + records = search_result.to_dict().get('hits', {}).get('hits', []) + result = records + + while len(records) == 10000 and max_result_size != 0: + if max_result_size < 0: + search_size = 10000 + else: + search_size = min(max_result_size, 10000) + max_result_size -= search_size + + search_after = records[-1]['sort'] + search_instance = search_instance.extra( + size=search_size, + search_after=search_after + ) + search_result = search_instance.execute() + records = search_result.to_dict().get('hits', {}).get('hits', []) + result.extend(records) + + return result + + +def get_tree_items(index_tree_id, max_result_size=WEKO_SEARCH_MAX_RESULT): """Get tree items.""" records_search = RecordsSearch() records_search = records_search.with_preference_param().params(version=False) @@ -204,14 +247,12 @@ def get_tree_items(index_tree_id): search_instance, _ = item_path_search_factory( None, records_search, index_id=index_tree_id ) - search_result = search_instance.execute() - rd = search_result.to_dict() - return rd.get("hits").get("hits") + return execute_search_with_pagination(search_instance, max_result_size) def delete_records(index_tree_id, ignore_items): """Bulk delete records.""" - hits = get_tree_items(index_tree_id) + hits = get_tree_items(index_tree_id, max_result_size=-1) result = [] for hit in hits: @@ -628,27 +669,10 @@ def getEncode(filepath): Returns: [type]: [description] """ - encs = [ - "iso-2022-jp", - "euc-jp", - "shift_jis", - "utf-8", - "utf-8-sig", - "utf-16be", - "utf-16le", - "utf-32be", - "utf-32le", - "", - ] - for enc in encs: - if enc != "": - with open(filepath, encoding=enc) as fr: - try: - fr = fr.read() - except UnicodeDecodeError: - continue - return enc - return enc + with open(filepath, mode='rb') as fr: + b = fr.read() + enc = chardet.detect(b) + return enc.get('encoding', 'utf-8-sig') def read_stats_file(file_path: str, file_name: str, file_format: str) -> dict: @@ -2011,7 +2035,7 @@ def check_existed(item_id, doi_ra): current_app.logger.debug("item_id:{0} doi_ra:{1}".format(item_id, doi_ra)) current_app.logger.debug("doi_type:{0} _value:{1}".format(doi_type, _value)) - if doi_type and doi_type[0] != doi_ra: + if doi_type and doi_type[0] != doi_ra and (doi_ra != 'NDL JaLC' or doi_type[0] != 'JaLC'): error = _("Specified {} is different from " + "existing {}.").format( "DOI_RA", "DOI_RA" ) @@ -2377,7 +2401,7 @@ def check_doi_duplicated(doi_ra, data): data, WEKO_IMPORT_DOI_TYPE.index(doi_ra) + 1 ) - elif doi_ra == "NDL JaLC" and doi: + elif doi_ra == "NDL JaLC" and doi and not pid_doi: data = { "identifier_grant_jalc_doi_link": IDENTIFIER_GRANT_LIST[1][2] + "/" @@ -2715,7 +2739,7 @@ def get_list_key_of_iso_date(schemaform): keys = [] for item in schemaform: if not item.get("items"): - if item.get("templateUrl", "") == DATE_ISO_TEMPLATE_URL: + if (item.get("templateUrl", "") == DATE_ISO_TEMPLATE_URL) or ("dateValue" in item.get("key","")): keys.append(item.get("key").replace("[]", "")) else: keys.extend(get_list_key_of_iso_date(item.get("items"))) @@ -3011,6 +3035,8 @@ def recursive_sub(keys, node, uri_key, current_type): elif is_ndl: item["doi_ra"] = item_doi_ra + item_doi_ra = "JaLC" if item_doi_ra == "NDL JaLC" else item_doi_ra + registerd_doi_ra = "JaLC" if registerd_doi_ra == "NDL JaLC" else registerd_doi_ra if identifierRegistration_key in item["metadata"]: if existed_doi and checked_registerd_doi_ra and checked_item_doi_ra: if 'subitem_identifier_reg_type' in item["metadata"][identifierRegistration_key]: @@ -3943,13 +3969,13 @@ def get_data_by_property(item_metadata, item_map, mapping_key): return None, None for key in key_list.split(","): attribute = item_metadata.get(key.split(".")[0]) - if not attribute: - return None, key_list - else: + if attribute: data_result = get_sub_item_value(attribute, key.split(".")[-1]) if data_result: for value in data_result: data.append(value) + if data == []: + data = None return data, key_list diff --git a/modules/weko-sitemap/requirements.txt b/modules/weko-sitemap/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-sitemap/requirements.txt +++ b/modules/weko-sitemap/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-sitemap/requirements2.txt b/modules/weko-sitemap/requirements2.txt index d5d089311f..aa3d83f677 100644 --- a/modules/weko-sitemap/requirements2.txt +++ b/modules/weko-sitemap/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-swordserver/requirements.txt b/modules/weko-swordserver/requirements.txt index af1f66fa7d..774304f2fe 100644 --- a/modules/weko-swordserver/requirements.txt +++ b/modules/weko-swordserver/requirements.txt @@ -32,7 +32,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -110,8 +110,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-swordserver/requirements2.txt b/modules/weko-swordserver/requirements2.txt index d5d089311f..aa3d83f677 100644 --- a/modules/weko-swordserver/requirements2.txt +++ b/modules/weko-swordserver/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 pytest-mock diff --git a/modules/weko-theme/requirements.txt b/modules/weko-theme/requirements.txt index 893fd14b03..f3b066063d 100644 --- a/modules/weko-theme/requirements.txt +++ b/modules/weko-theme/requirements.txt @@ -33,7 +33,7 @@ elasticsearch==6.1.1 elasticsearch-dsl==6.4.0 entrypoints==0.2.3 Flask==1.0.4 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -111,8 +111,7 @@ ptyprocess==0.5.2 pycparser==2.18 Pygments==2.2.0 PyJWT==1.5.3 -#PyPDF2==1.26.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fix/nii#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 python-dateutil==2.6.1 python-editor==1.0.3 diff --git a/modules/weko-theme/requirements2.txt b/modules/weko-theme/requirements2.txt index 5644d1522b..7761d2b91a 100644 --- a/modules/weko-theme/requirements2.txt +++ b/modules/weko-theme/requirements2.txt @@ -48,7 +48,7 @@ entrypoints==0.2.3 feedgen==0.7.0 filelock==3.4.1 Flask==1.1.0 -Flask-Admin==1.5.3 +flask-admin==1.5.4 Flask-Alembic==2.0.1 Flask-Assets==0.12 Flask-BabelEx==0.9.4 @@ -191,7 +191,7 @@ Pygments==2.2.0 PyJWT==1.5.3 PyLD==2.0.3 pyparsing==3.1.0 --e git+https://github.com/RCOSDP/PyPDF2.git@fefc684a3a74aff6f99e5dff24f9b4dd1c95169d#egg=PyPDF2 +pypdf==4.3.1 pyPEG2==2.15.2 pytest==4.2.0 python-dateutil==2.6.1 diff --git a/modules/weko-theme/tests/test_views.py b/modules/weko-theme/tests/test_views.py index 5234fc50db..c670feb1de 100644 --- a/modules/weko-theme/tests/test_views.py +++ b/modules/weko-theme/tests/test_views.py @@ -12,7 +12,6 @@ index, edit, get_default_search_setting, - get_site_info, get_init_display_setting ) @@ -53,6 +52,75 @@ def test_get_default_search_setting(i18n_app, users): res = client.get(url_for("weko_theme.get_default_search_setting")) assert res.status_code == 200 +# .tox/c1/bin/pytest --cov=weko_theme tests/test_views.py::test_get_site_info -vv -s --cov-branch --cov-report=term --basetemp=/code/modules/weko-theme/.tox/c1/tmp +#def get_site_info(site_info) +def test_get_site_info(i18n_app, db): + WekoTheme(i18n_app) + assert "get_site_info" in current_app.jinja_env.filters.keys() + + from weko_admin.models import SiteInfo + with i18n_app.test_request_context("/test_request"): + # not exist favicon, ogp_image, prefix + siteinfo1 = SiteInfo( + copy_right="test_copy_right1", + description="test site info1.", + keyword="test keyword1", + favicon_name="test favicon name1", + site_name=[{"name":"name1","language":"en","index":"0"}], + notify=[{"notify_name":"notify1","language":"en"}], + ogp_image_name="test ogp image name1" + ) + db.session.add(siteinfo1) + db.session.commit() + test = { + "title": "name1", + "login_instructions":"notify1", + "site_name":[{"name":"name1","language":"en","index":"0"}], + "description":"test site info1.", + "copy_right": "test_copy_right1", + "keyword": "test keyword1", + "favicon": "", + "ogp_image": "", + "url": "http://TEST_SERVER/test_request", + "notify": [{"notify_name":"notify1","language":"en"}], + "enable_notify": False, + "google_tracking_id_user": "" + } + result = current_app.jinja_env.filters["get_site_info"](siteinfo1) + assert result == test + SiteInfo.query.delete() + db.session.commit() + + siteinfo2 = SiteInfo( + copy_right="test_copy_right2", + description="test site info2.", + keyword="test keyword2", + favicon_name="test favicon name2", + favicon="data:image/x-icon;base64,/static/favicon.ico", + site_name=[{"name":"name2","language":"en","index":"0"}], + notify=[{"notify_name":"notify2","language":"en"}], + ogp_image_name="test ogp image name2", + ogp_image="/static/ogp.ico", + google_tracking_id_user="12345" + ) + db.session.add(siteinfo2) + db.session.commit() + test = { + "title": "name2", + "login_instructions":"notify2", + "site_name":[{"name":"name2","language":"en","index":"0"}], + "description":"test site info2.", + "copy_right": "test_copy_right2", + "keyword": "test keyword2", + "favicon": "http://TEST_SERVER/api/admin/favicon", + "ogp_image": "http://TEST_SERVER/api/admin/ogp_image", + "url": "http://TEST_SERVER/test_request", + "notify": [{"notify_name":"notify2","language":"en"}], + "enable_notify": False, + "google_tracking_id_user": "12345" + } + result = current_app.jinja_env.filters["get_site_info"](siteinfo2) + assert result == test # def get_init_display_setting(settings): def test_get_init_display_setting(i18n_app, users): diff --git a/modules/weko-theme/weko_theme/static/js/weko_theme/search_detail.js b/modules/weko-theme/weko_theme/static/js/weko_theme/search_detail.js index 9b5707f4ee..3b8d1b1209 100644 --- a/modules/weko-theme/weko_theme/static/js/weko_theme/search_detail.js +++ b/modules/weko-theme/weko_theme/static/js/weko_theme/search_detail.js @@ -56,11 +56,7 @@ obj_of_condition.key_options = $scope.detail_search_key; obj_of_condition.key_value = angular.copy(db_data[item.inx]); if (db_data[item.inx].inputType == 'checkbox_list'){ - if (db_data[item.inx].check_val.length>$scope.load_delimiter){ - obj_of_condition.key_value.limit=$scope.load_delimiter; - }else{ - obj_of_condition.key_value.limit=db_data[item.inx].check_val.length; - } + $scope.generate_check_box_list_check_val(item, db_data, obj_of_condition) } $scope.condition_data.push(obj_of_condition) }); @@ -103,11 +99,7 @@ obj_of_condition.key_options = $scope.detail_search_key; obj_of_condition.key_value = angular.copy(db_data[$scope.detail_search_key[sub_detail].inx]); if (db_data[$scope.detail_search_key[sub_detail].inx].inputType == 'checkbox_list'){ - if (db_data[$scope.detail_search_key[sub_detail].inx].check_val.length>$scope.load_delimiter){ - obj_of_condition.key_value.limit=$scope.load_delimiter; - }else{ - obj_of_condition.key_value.limit=db_data[$scope.detail_search_key[sub_detail].inx].check_val.length; - } + $scope.generate_check_box_list_check_val($scope.detail_search_key[sub_detail],db_data,obj_of_condition) } $scope.condition_data.push(obj_of_condition) break; @@ -380,11 +372,7 @@ obj_of_condition.key_options = $scope.detail_search_key; obj_of_condition.key_value = angular.copy(db_data[item.inx]); if (db_data[item.inx].inputType == 'checkbox_list'){ - if (db_data[item.inx].check_val.length>$scope.load_delimiter){ - obj_of_condition.key_value.limit=$scope.load_delimiter; - }else{ - obj_of_condition.key_value.limit=db_data[item.inx].check_val.length; - } + $scope.generate_check_box_list_check_val(item, db_data, obj_of_condition) } $scope.condition_data.push(obj_of_condition); }); @@ -399,8 +387,33 @@ }else{ next = now + $scope.load_delimiter; } + $scope.unescape_check_val($scope.condition_data[index].key_value.check_val,next,now) $scope.condition_data[index].key_value.limit = next; } + $scope.generate_check_box_list_check_val = function (target, db_data, obj_of_condition) { + if (db_data[target.inx].check_val.length>$scope.load_delimiter){ + obj_of_condition.key_value.limit=$scope.load_delimiter; + }else{ + obj_of_condition.key_value.limit=db_data[target.inx].check_val.length; + } + $scope.unescape_check_val(obj_of_condition.key_value.check_val,obj_of_condition.key_value.limit) + } + + $scope.unescape_check_val = function(check_val, to, from=0){ + for (var i=from; i$scope.load_delimiter){ - obj_of_condition.key_value.limit=$scope.load_delimiter; - }else{ - obj_of_condition.key_value.limit=db_data[$scope.detail_search_key[sub_default_key].inx].check_val.length; - } + $scope.generate_check_box_list_check_val($scope.detail_search_key[sub_default_key],db_data, obj_of_condition) } break; } @@ -457,8 +466,6 @@ } } $scope.validateDate = function (event) { - console.log("called") - console.log(event) let target = event.target var elem = document.getElementById(target.id); // 13はエンターキー diff --git a/modules/weko-theme/weko_theme/static/js/weko_theme/top_page.js b/modules/weko-theme/weko_theme/static/js/weko_theme/top_page.js index 4e5b87531b..f3eca799fa 100644 --- a/modules/weko-theme/weko_theme/static/js/weko_theme/top_page.js +++ b/modules/weko-theme/weko_theme/static/js/weko_theme/top_page.js @@ -175,7 +175,7 @@ require([ key_sort = "-" + key_sort; } - if (!window.location.search.includes(key_sort)) { + if (!search.includes("sort")) { search = insertParam(search, "sort", key_sort); } diff --git a/modules/weko-theme/weko_theme/static/js/weko_theme/widget.js b/modules/weko-theme/weko_theme/static/js/weko_theme/widget.js index da8caa1e45..e2cf4f006c 100644 --- a/modules/weko-theme/weko_theme/static/js/weko_theme/widget.js +++ b/modules/weko-theme/weko_theme/static/js/weko_theme/widget.js @@ -264,11 +264,15 @@ const PageBodyGrid = function () { }; this.buildAccessCounter = function (widgetId, created_date, languageDescription) { + let precedingMessage = languageDescription.preceding_message ? languageDescription.preceding_message + " " : ""; + let followingMessage = languageDescription.following_message ? " " + languageDescription.following_message : ""; + let otherMessage = languageDescription.other_message ? languageDescription.other_message : ""; + let countStartDate = languageDescription.count_start_date ? languageDescription.count_start_date : created_date; let data = this.getAccessTopPageValue(); let result = 0; // Convert to display-able number - if (data && data[widgetId] && data[widgetId][created_date]) { - let widget = data[widgetId][created_date]; + if (data && data[widgetId] && data[widgetId][countStartDate]) { + let widget = data[widgetId][countStartDate]; let initNum = widget.access_counter ? Number(widget.access_counter) : 0; result = widget.all.count ? Number(widget.all.count) : 0; if (typeof(initNum) == 'number') { @@ -276,13 +280,10 @@ const PageBodyGrid = function () { } } - let precedingMessage = languageDescription.preceding_message ? languageDescription.preceding_message + " " : ""; - let followingMessage = languageDescription.following_message ? " " + languageDescription.following_message : ""; - let otherMessage = languageDescription.other_message ? languageDescription.other_message : ""; - return '
    ' + '
    ' - + precedingMessage + '' + result + '' + followingMessage + '
    ' + '
    ' + otherMessage + '
    ' @@ -484,9 +485,9 @@ const PageBodyGrid = function () { let accessCounter = 0; $(".text-access-counter").each(function () { let widgetId = $(this).data("widgetId"); - let createdDate = $(this).data("createdDate"); - if (data && data[widgetId] && data[widgetId][createdDate]) { - var widget = data[widgetId][createdDate]; + let countStartDate = $(this).data("countStartDate") ? $(this).data("countStartDate") : $(this).data("createdDate"); + if (data && data[widgetId] && data[widgetId][countStartDate]) { + var widget = data[widgetId][countStartDate]; let result = widget.access_counter ? Number(widget.access_counter) : 0; accessCounter = result + (widget.all.count ? Number(widget.all.count) : 0); } @@ -505,8 +506,10 @@ const PageBodyGrid = function () { current_language = "en"; } var currentTime = new Date().getTime(); + var current_path=location.pathname + var url = (current_path === "/" || current_path.indexOf("/c/") !==-1) ? "/main" : current_path; $.ajax({ - url: '/api/admin/access_counter_record/' + repository_id + '/' + current_language, + url: '/api/admin/access_counter_record/' + repository_id + url + '/' + current_language, method: 'GET', async: false, success: function(response) { diff --git a/modules/weko-theme/weko_theme/templates/weko_theme/base.html b/modules/weko-theme/weko_theme/templates/weko_theme/base.html index 6b54d3285c..961af6b7e9 100644 --- a/modules/weko-theme/weko_theme/templates/weko_theme/base.html +++ b/modules/weko-theme/weko_theme/templates/weko_theme/base.html @@ -176,8 +176,9 @@ learnMore: "詳細を見る", }, contextualConsent:{ - description: "サードパティ製アプリケーションを利用しています。", - acceptOnce: "一時的に同意する" + description: "{title}が提供する外部コンテンツを読み込みますか?", + acceptOnce: "一時的に同意する", + acceptAlways: "常に同意する" }, ok: "同意", poweredBy: "Powered by Klaro", @@ -237,9 +238,9 @@ onlyOnce: true, }, { - name: 'addthis', + name: 'facebook', default: false, - title: 'Addthis', + title: 'Facebook', purposes: ['analytics'], callback: function (consent, service) { console.log( @@ -250,6 +251,20 @@ optOut: false, onlyOnce: true, }, + { + name: 'x', + default: false, + title: 'X', + purposes: ['analytics'], + callback: function (consent, service) { + console.log( + 'User consent for service ' + service.name + ': consent=' + consent + ); + }, + required: false, + optOut: false, + onlyOnce: true, + } ], }; diff --git a/modules/weko-theme/weko_theme/templates/weko_theme/body_search_detail_new.html b/modules/weko-theme/weko_theme/templates/weko_theme/body_search_detail_new.html index 26343ecf6e..638d69af82 100644 --- a/modules/weko-theme/weko_theme/templates/weko_theme/body_search_detail_new.html +++ b/modules/weko-theme/weko_theme/templates/weko_theme/body_search_detail_new.html @@ -185,3 +185,4 @@
    + \ No newline at end of file diff --git a/modules/weko-theme/weko_theme/templates/weko_theme/page_admin.html b/modules/weko-theme/weko_theme/templates/weko_theme/page_admin.html index 7032f122fd..3047b2de06 100644 --- a/modules/weko-theme/weko_theme/templates/weko_theme/page_admin.html +++ b/modules/weko-theme/weko_theme/templates/weko_theme/page_admin.html @@ -74,6 +74,7 @@ lang="{{ g.ln.split('_', 1)[0]|safe }}"{% if rtl_direction %} {{ rtl_direction|safe }} {% endif %}{% endif %} itemscope itemtype="http://schema.org/WebPage" data-spy="scroll" data-target=".scrollspy-target"> + {%- block browserupgrade %}