diff --git a/CHANGES.rst b/CHANGES.rst index cf48c621..db8198b5 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,8 @@ Changelog New features ------------ ++ `#73`_, `#106`_: Add support for the ICAT schema 5.0 extensions. + + `#102`_, `#104`_: Make the obj argument to client.new() case insensitive. @@ -28,6 +30,11 @@ New features Incompatible changes and deprecations ------------------------------------- ++ The order and arrangement of data objects in the dump file created + by :ref:`icatdump` has been changed. In some cases, older versions + of :ref:`icatingest` will fail to read dump files written by new + versions of :ref:`icatdump`. + + As a consequence of switching to pathlib for filesystem paths some return values and variables are now :class:`pathlib.Path` objects rather then :class:`str`. This affects: @@ -74,6 +81,7 @@ Bug fixes and minor changes + Some (more) example scripts now require ICAT 4.4.0 or newer. .. _#66: https://github.com/icatproject/python-icat/issues/66 +.. _#73: https://github.com/icatproject/python-icat/issues/73 .. _#74: https://github.com/icatproject/python-icat/issues/74 .. _#75: https://github.com/icatproject/python-icat/pull/75 .. _#77: https://github.com/icatproject/python-icat/issues/77 @@ -83,6 +91,7 @@ Bug fixes and minor changes .. _#103: https://github.com/icatproject/python-icat/pull/103 .. _#104: https://github.com/icatproject/python-icat/pull/104 .. _#105: https://github.com/icatproject/python-icat/pull/105 +.. _#106: https://github.com/icatproject/python-icat/pull/106 0.21.0 (2022-01-28) diff --git a/doc/examples/add-investigation-data.py b/doc/examples/add-investigation-data.py index fd6f2c67..f6a41498 100755 --- a/doc/examples/add-investigation-data.py +++ b/doc/examples/add-investigation-data.py @@ -76,6 +76,18 @@ def makeparam(t, pdata): invsearch = "Investigation[name='%s']" % investigationdata['name'] investigation = client.assertedSearch(invsearch)[0] +instrumentname = data['instruments'][investigationdata['instrument']]['name'] +instrsearch = "Instrument[name='%s' %s]" % (instrumentname, facility_const) +instrument = client.assertedSearch(instrsearch)[0] + +technique = None +if "technique" in client.typemap: + t = data['instruments'][investigationdata['instrument']]['technique'] + if t: + tn = data['techniques'][t]['name'] + techsearch = "Technique [name='%s']" % tn + technique = client.assertedSearch(techsearch)[0] + need_dataset_types = set() need_datafile_formats = set() for ds in investigationdata['datasets']: @@ -146,5 +158,11 @@ def makeparam(t, pdata): pdata)) dataset.datafiles.append(datafile) - dataset.create() + if 'datasetInstruments' in dataset.InstMRel: + di = client.new("datasetInstrument", instrument=instrument) + dataset.datasetInstruments.append(di) + if 'datasetTechniques' in dataset.InstMRel and technique: + dt = client.new("datasetTechnique", technique=technique) + dataset.datasetTechniques.append(dt) + dataset.create() diff --git a/doc/examples/create-investigation.py b/doc/examples/create-investigation.py index 4be7fb65..b529faca 100755 --- a/doc/examples/create-investigation.py +++ b/doc/examples/create-investigation.py @@ -10,6 +10,8 @@ import yaml import icat import icat.config +from icat.helper import parse_attr_string +from icat.query import Query logging.basicConfig(level=logging.INFO) @@ -116,6 +118,28 @@ def getUser(client, attrs): if 'instrument' in s.InstRel: s.instrument = instrument investigation.shifts.append(s) +if 'investigationFacilityCycles' in investigation.InstMRel: + # ICAT 5.0 or newer + sd = investigation.startDate or investigation.endDate + ed = investigation.endDate or investigation.startDate + if sd and ed: + query = Query(client, "FacilityCycle", conditions={ + "startDate": "<= '%s'" % parse_attr_string(ed, "Date"), + "endDate": "> '%s'" % parse_attr_string(sd, "Date"), + }) + for fc in client.search(query): + ifc = client.new("investigationFacilityCycle", facilityCycle=fc) + investigation.investigationFacilityCycles.append(ifc) +if 'fundingReferences' in investigation.InstMRel: + for fr in investigationdata['fundingReferences']: + funding_ref = client.new('fundingReference') + initobj(funding_ref, data['fundings'][fr]) + try: + funding_ref.create() + except icat.ICATObjectExistsError: + funding_ref = client.searchMatching(funding_ref) + inv_fund = client.new('investigationFunding', funding=funding_ref) + investigation.fundingReferences.append(inv_fund) investigation.create() investigation.addInstrument(instrument) investigation.addKeywords(investigationdata['keywords']) diff --git a/doc/examples/example_data.yaml b/doc/examples/example_data.yaml index 3ae94189..9dee4f39 100644 --- a/doc/examples/example_data.yaml +++ b/doc/examples/example_data.yaml @@ -3,6 +3,70 @@ applications: facility: example_facility name: gnomoanalytics version: 69 +data_publication_types: + curated: + description: Curated data publication + facility: example_facility + name: curated + raw: + description: Open access raw data + facility: example_facility + name: raw +data_publications: + data_pub1: + dataset: + complete: true + datafiles: + - datafileCreateTime: 2012-08-01 00:52:23+02:00 + datafileModTime: 2012-08-01 00:52:23+02:00 + fileSize: 264188 + format: hdf5 + name: A000027.hdf5 + endDate: 2012-08-01 00:52:23+02:00 + investigation: 12100409-ST + name: pub-00027 + startDate: 2012-07-31 22:20:37+02:00 + type: other + dates: + - date: '2012-08-01' + dateType: Created + - date: '2022-04-29' + dateType: Submitted + description: >- + We provide the first 65535 integers from sequence A000027 of the + On-Line Encyclopedia of Integer Sequences. The data consists of an + HDF5 file, having one single entry: a one dimensional integer + array. + facility: example_facility + fundingReferences: + - fund1 + pid: DOI:00.0815/pub-00027 + publicationDate: 2022-10-31 + relatedItems: + - fullReference: >- + OEIS Foundation Inc. (2022), The positive integers, Entry + A000027 in The On-Line Encyclopedia of Integer Sequences + identifier: URL:http://oeis.org/A000027 + relatedItemType: Other + relationType: References + title: The positive integers + subject: integer sequence; OEIS; On-Line Encyclopedia of Integer Sequences + title: Data from OEIS sequence A000027 + type: curated + users: + - affiliations: + - fullReference: "Universit\xE9 de Nancy" + name: '01: Nancy' + - fullReference: University of Chicago + name: '02: Chicago' + pid: ROR:024mw5h28 + contributorType: Creator + email: nbour@example.org + familyName: Bourbaki + fullName: Bourbaki, Nicolas + givenName: Nicolas + orderKey: '01' + user: nbour datafile_formats: csv: description: Comma separated values @@ -10,11 +74,17 @@ datafile_formats: name: CSV type: text/csv version: N/A + hdf5: + description: Hierarchical Data Format version 5 + facility: example_facility + name: HDF5 + type: application/x-hdf5 + version: N/A nexus: description: A common data format for neutron, x-ray and muon science facility: example_facility name: NeXus - type: application/x-hdf + type: application/x-hdf5 version: N/A text: description: Plain text file @@ -53,12 +123,17 @@ facilities: name: ESNF url: http://www.esnf.example.org/ facility_cycles: - - cycles: - - [2, 15, 8, 15] - - [8, 15, 2, 15] - endYear: 17 - facility: example_facility - startYear: 7 +- cycles: + - [2, 15, 8, 15] + - [8, 15, 2, 15] + endYear: 17 + facility: example_facility + startYear: 7 +fundings: + fund1: + awardNumber: AIS3241330750 + funderIdentifier: Crossref Funder ID:10.13039/100005376 + funderName: American Mathematical Society instruments: e2: description: > @@ -70,7 +145,8 @@ instruments: fullName: E2 - Flat-Cone Diffractometer instrumentscientist: acord name: E2 - pid: 00.0815/inst-00001 + pid: DOI:00.0815/inst-00001 + technique: ndiff type: null eddi: description: > @@ -88,7 +164,8 @@ instruments: fullName: EDDI - Energy Dispersive Diffraction instrumentscientist: acord name: EDDI - pid: 00.0815/inst-00048 + pid: DOI:00.0815/inst-00048 + technique: null type: null hike: description: > @@ -103,7 +180,8 @@ instruments: fullName: HIKE - High Kinetic Energy Photoelectron Spectroscopy instrumentscientist: acord name: HIKE - pid: 00.0815/inst-00027 + pid: DOI:00.0815/inst-00027 + technique: haxpes type: null investigation_types: calibration: @@ -150,9 +228,10 @@ investigations: name: e201216 startDate: '2008-03-20T08:20:00+01:00' type: raw - doi: 00.0815/inv-00122 + doi: DOI:00.0815/inv-00122 endDate: null facility: example_facility + fundingReferences: [] instrument: hike invcol: - nbour @@ -168,7 +247,7 @@ investigations: type: probe sample: name: Durol SC - pid: ESNFHNS8AYEZ + pid: IGSN:ESNFHNS8AYEZ type: durol shifts: - comment: Beamtime at HIKE @@ -244,9 +323,10 @@ investigations: name: e208342 startDate: '2010-10-09T07:00:00+02:00' type: raw - doi: 00.0815/inv-00601 + doi: DOI:00.0815/inv-00601 endDate: '2010-10-12T17:00:00+02:00' facility: example_facility + fundingReferences: [] instrument: e2 invcol: [] invguest: @@ -268,7 +348,7 @@ investigations: parameters: - stringValue: 2046c9a7-ab07-4594-84a2-101617073a79 type: sample_ref - pid: ESNFZDVHICBD + pid: IGSN:ESNFZDVHICBD type: nimnga shifts: - comment: Beamtime at E2 @@ -318,9 +398,11 @@ investigations: name: e208946 startDate: '2012-08-02T07:30:00+02:00' type: raw - doi: 00.0815/inv-00409 + doi: DOI:00.0815/inv-00409 endDate: '2012-08-06T03:10:08+02:00' facility: example_facility + fundingReferences: + - fund1 instrument: eddi invcol: [] invguest: @@ -340,7 +422,7 @@ investigations: parameters: - stringValue: c1b0a101-03aa-4d02-a1a2-e2826ba7871b type: sample_ref - pid: ESNFX8C7B53W + pid: IGSN:ESNFX8C7B53W type: nio shifts: - comment: Beamtime at EDDI @@ -355,44 +437,44 @@ jobs: application: gnomoanalytics input: datasets: - - investigation: 10100601-ST - name: e208341 + - investigation: 10100601-ST + name: e208341 datafiles: - - dataset: e208945 - investigation: 12100409-ST - name: e208945.nxs + - dataset: e208945 + investigation: 12100409-ST + name: e208945.nxs parameters: - - stringValue: Make a synthesis of 10100601-ST and 12100409-ST - type: comment + - stringValue: Make a synthesis of 10100601-ST and 12100409-ST + type: comment output: datasets: - - complete: true - datafiles: - - datafileCreateTime: '2012-07-16T16:30:17+02:00' - datafileModTime: '2012-07-16T16:30:17+02:00' - fileSize: 14965 - format: nexus - name: e208947.nxs - parameters: - - dateTimeValue: '2012-07-17T09:28:18+02:00' - type: lastaccess - endDate: '2012-07-16T16:30:17+02:00' - investigation: 12100409-ST - name: e208947 - startDate: '2012-07-16T13:42:05+02:00' - type: analyzed - datafiles: + - complete: true + datafiles: - datafileCreateTime: '2012-07-16T16:30:17+02:00' datafileModTime: '2012-07-16T16:30:17+02:00' - dataset: e208945 - fileSize: 28937 + fileSize: 14965 format: nexus - investigation: 12100409-ST - name: e208945-2.nxs + name: e208947.nxs parameters: - - dateTimeValue: '2014-10-02T14:32:51+02:00' - type: lastaccess - doi: 00.0815/dat-004711 + - dateTimeValue: '2012-07-17T09:28:18+02:00' + type: lastaccess + endDate: '2012-07-16T16:30:17+02:00' + investigation: 12100409-ST + name: e208947 + startDate: '2012-07-16T13:42:05+02:00' + type: analyzed + datafiles: + - datafileCreateTime: '2012-07-16T16:30:17+02:00' + datafileModTime: '2012-07-16T16:30:17+02:00' + dataset: e208945 + fileSize: 28937 + format: nexus + investigation: 12100409-ST + name: e208945-2.nxs + parameters: + - dateTimeValue: '2014-10-02T14:32:51+02:00' + type: lastaccess + doi: DOI:00.0815/dat-004711 parameter_types: comment: applicableToDataCollection: true @@ -426,9 +508,9 @@ parameter_types: units: N/A valueType: STRING values: - - muon - - neutron - - photon + - muon + - neutron + - photon reactor_power: applicableToDataset: true facility: example_facility @@ -463,15 +545,15 @@ parameter_types: units: N/A valueType: STRING values: - - buono - - brutto - - cattivo + - buono + - brutto + - cattivo publications: pub1: investigation: 10100601-ST fullReference: >- A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 - doi: 0.1002/adma.201101001 + doi: DOI:00.1002/adma.201101001 related_datafiles: rdf1: dest: @@ -484,8 +566,8 @@ related_datafiles: investigation: 12100409-ST name: e208341.nxs parameters: - - dateTimeValue: '2014-10-02T14:32:51+02:00' - type: lastaccess + - dateTimeValue: '2014-10-02T14:32:51+02:00' + type: lastaccess relation: copy source: dataset: e208341 @@ -508,13 +590,30 @@ studies: study1: endDate: '2012-09-30T20:00:00+02:00' investigations: - - 10100601-ST - - 12100409-ST + - 10100601-ST + - 12100409-ST name: 12-008 - pid: 00.0815/m-00333 + pid: DOI:00.0815/m-00333 startDate: '2012-07-09T08:00:00+02:00' status: COMPLETE user: nbour +techniques: + arpes: + name: Angle Resolved Photoemission Spectroscopy + description: Angle Resolved Photoemission Spectroscopy + pid: PaNET:PaNET01089 + haxpes: + name: Hard X-ray Photoelectron Spectroscopy + description: Hard X-ray Photoelectron Spectroscopy + pid: PaNET:PaNET01103 + ndiff: + name: Neutron Diffraction + description: Neutron Diffraction + pid: PaNET:PaNET01217 + xtomo: + name: X-ray Tomography + description: X-ray Tomography + pid: PaNET:PaNET01207 users: acord: affiliation: University of Ravenna, Institute of Modern History diff --git a/doc/examples/icatdump-4.10.xml b/doc/examples/icatdump-4.10.xml index bea4f72e..6fe3a3b6 100644 --- a/doc/examples/icatdump-4.10.xml +++ b/doc/examples/icatdump-4.10.xml @@ -1,10 +1,10 @@ - 2020-04-17T17:59:17+00:00 + 2022-11-23T16:13:28+00:00 https://icat.example.com:8181/ICATService/ICAT?wsdl - 4.10 - icatdump (python-icat 0.16.0) + 4.10.0 + icatdump (python-icat 0.21.1.dev138) @@ -59,6 +59,10 @@ db/rbeck 0000-0002-3267 + + Data Ingester + simple/dataingest + IDS reader simple/idsreader @@ -71,6 +75,12 @@ User Office simple/useroffice + + ingest + + + + investigation_08100122-EF_owner @@ -160,185 +170,185 @@ Application - CRUD - DataCollection [createId=:user] + R + DatafileFormat - CRUD - DataCollectionDatafile <-> DataCollection [createId=:user] + R + DatasetType - CRUD - DataCollectionDataset <-> DataCollection [createId=:user] + R + Facility - CRUD - DataCollectionParameter <-> DataCollection [createId=:user] + R + FacilityCycle R - DatafileFormat + Grouping <-> UserGroup <-> User [name=:user] R - DatasetType + Instrument R - Facility + InvestigationType R - FacilityCycle + ParameterType R - Grouping <-> UserGroup <-> User [name=:user] + PermissibleStringValue - R - Instrument + CRUD + SELECT o FROM DataCollection o WHERE o.createId = :user - R - InvestigationType + CRUD + SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE s1.createId = :user CRUD - Job [createId=:user] + SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE s1.createId = :user - R - ParameterType - - - R - PermissibleStringValue - - CRUD - RelatedDatafile [createId=:user] + SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE s1.createId = :user - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' - + CUD SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + CUD SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' - + CUD SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + R SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + CUD SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' - + R SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - + CUD SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' - + R SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - + R SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - + R SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP - + R SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - + CUD SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + + CRUD + SELECT o FROM Job o WHERE o.createId = :user + + R SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + CRUD + SELECT o FROM RelatedDatafile o WHERE o.createId = :user + R SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user @@ -396,221 +406,251 @@ User + CRU + Datafile + + + + CRU + DatafileParameter + + + + CRU + Dataset + + + + CRU + DatasetParameter + + + + R + Investigation + + + + R + Shift + + + R DataCollection - + R DataCollectionDatafile - + R DataCollectionDataset - + R DataCollectionParameter - + R Datafile - + R DatafileParameter - + R Dataset - + R DatasetParameter - + R Grouping - + R InstrumentScientist - + R Investigation - + R InvestigationGroup - + R InvestigationInstrument - + R InvestigationParameter - + R InvestigationUser - + R Job - + R Keyword - + R PublicStep - + R Publication - + R RelatedDatafile - + R Rule - + R Sample - + R SampleParameter - + R Shift - + R Study - + R StudyInvestigation - + R UserGroup - + RU Sample - + UD SampleType - + CRUD FacilityCycle - + CRUD Grouping - + CRUD InstrumentScientist - + CRUD Investigation - + CRUD InvestigationGroup - + CRUD InvestigationInstrument - + CRUD InvestigationParameter - + CRUD InvestigationUser - + CRUD Keyword - + CRUD Publication - + CRUD Shift - + CRUD Study - + CRUD StudyInvestigation - + CRUD User - + CRUD UserGroup @@ -724,7 +764,7 @@ E2 - Flat-Cone Diffractometer E2 - 00.0815/inst-00001 + DOI:00.0815/inst-00001 @@ -735,7 +775,7 @@ EDDI - Energy Dispersive Diffraction EDDI - 00.0815/inst-00048 + DOI:00.0815/inst-00048 @@ -746,7 +786,7 @@ HIKE - High Kinetic Energy Photoelectron Spectroscopy HIKE - 00.0815/inst-00027 + DOI:00.0815/inst-00027 @@ -948,10 +988,17 @@ N/A + + Hierarchical Data Format version 5 + HDF5 + application/x-hdf5 + N/A + + A common data format for neutron, x-ray and muon science NeXus - application/x-hdf + application/x-hdf5 N/A @@ -1103,7 +1150,7 @@ - 00.0815/inv-00122 + DOI:00.0815/inv-00122 08100122-EF 2008-03-13T10:39:42+00:00 Durol single crystal @@ -1153,7 +1200,7 @@ Durol SC - ESNFHNS8AYEZ + IGSN:ESNFHNS8AYEZ @@ -1189,7 +1236,7 @@ - 00.0815/inv-00601 + DOI:00.0815/inv-00601 2010-10-12T15:00:00+00:00 10100601-ST 2010-09-30T10:27:24+00:00 @@ -1233,7 +1280,7 @@ - 0.1002/adma.201101001 + DOI:00.1002/adma.201101001 A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 @@ -1251,7 +1298,7 @@ NiMnGa 991027 - ESNFZDVHICBD + IGSN:ESNFZDVHICBD @@ -1357,7 +1404,7 @@ - 00.0815/inv-00409 + DOI:00.0815/inv-00409 2012-08-06T01:10:08+00:00 12100409-ST 2012-07-26T15:44:24+00:00 @@ -1409,7 +1456,7 @@ Nickel(II) oxide SC - ESNFX8C7B53W + IGSN:ESNFX8C7B53W @@ -1516,26 +1563,18 @@ - - 2012-09-30T18:00:00+00:00 - 12-008 - 00.0815/m-00333 - 2012-07-09T06:00:00+00:00 - COMPLETE - - - - - - - - - - copy - - - + + + + + + + + + + + @@ -1547,8 +1586,8 @@ - - 00.0815/dat-004711 + + DOI:00.0815/dat-004711 @@ -1556,10 +1595,31 @@ + + + + 2012-09-30T18:00:00+00:00 + 12-008 + DOI:00.0815/m-00333 + 2012-07-09T06:00:00+00:00 + COMPLETE + + + + + + + + + + copy + + + - - + + diff --git a/doc/examples/icatdump-4.10.yaml b/doc/examples/icatdump-4.10.yaml index 001db1ba..a1606168 100644 --- a/doc/examples/icatdump-4.10.yaml +++ b/doc/examples/icatdump-4.10.yaml @@ -1,10 +1,14 @@ %YAML 1.1 -# Date: Fri, 17 Apr 2020 17:58:50 +0000 +# Date: Wed, 23 Nov 2022 16:13:26 +0000 # Service: https://icat.example.com:8181/ICATService/ICAT?wsdl -# ICAT-API: 4.10 -# Generator: icatdump (python-icat 0.16.0) +# ICAT-API: 4.10.0 +# Generator: icatdump (python-icat 0.21.1.dev138) --- grouping: + Grouping_name-ingest: + name: ingest + userGroups: + - user: User_name-simple=2Fdataingest Grouping_name-investigation=5F08100122=2DEF=5Fowner: name: investigation_08100122-EF_owner userGroups: @@ -135,199 +139,202 @@ rule: crudFlags: R what: Application Rule_00000002: - crudFlags: CRUD - what: DataCollection [createId=:user] - Rule_00000003: - crudFlags: CRUD - what: DataCollectionDatafile <-> DataCollection [createId=:user] - Rule_00000004: - crudFlags: CRUD - what: DataCollectionDataset <-> DataCollection [createId=:user] - Rule_00000005: - crudFlags: CRUD - what: DataCollectionParameter <-> DataCollection [createId=:user] - Rule_00000006: crudFlags: R what: DatafileFormat - Rule_00000007: + Rule_00000003: crudFlags: R what: DatasetType - Rule_00000008: + Rule_00000004: crudFlags: R what: Facility - Rule_00000009: + Rule_00000005: crudFlags: R what: FacilityCycle - Rule_00000010: + Rule_00000006: crudFlags: R what: Grouping <-> UserGroup <-> User [name=:user] - Rule_00000011: + Rule_00000007: crudFlags: R what: Instrument - Rule_00000012: + Rule_00000008: crudFlags: R what: InvestigationType - Rule_00000013: - crudFlags: CRUD - what: Job [createId=:user] - Rule_00000014: + Rule_00000009: crudFlags: R what: ParameterType - Rule_00000015: + Rule_00000010: crudFlags: R what: PermissibleStringValue - Rule_00000016: + Rule_00000011: crudFlags: CRUD - what: RelatedDatafile [createId=:user] - Rule_00000017: + what: SELECT o FROM DataCollection o WHERE o.createId = :user + Rule_00000012: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000013: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000014: + crudFlags: CRUD + what: SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000015: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' - Rule_00000018: + Rule_00000016: crudFlags: CUD what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' - Rule_00000019: + Rule_00000017: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000020: + Rule_00000018: crudFlags: CUD what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user - Rule_00000021: + Rule_00000019: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000022: + Rule_00000020: crudFlags: R what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000023: + Rule_00000021: crudFlags: CUD what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' - Rule_00000024: + Rule_00000022: crudFlags: CUD what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000025: + Rule_00000023: crudFlags: R what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000026: + Rule_00000024: crudFlags: CUD what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' - Rule_00000027: + Rule_00000025: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000028: + Rule_00000026: crudFlags: CUD what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user - Rule_00000029: + Rule_00000027: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000030: + Rule_00000028: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' - Rule_00000031: + Rule_00000029: crudFlags: R what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000032: + Rule_00000030: crudFlags: CUD what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - Rule_00000033: + Rule_00000031: crudFlags: CUD what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000034: + Rule_00000032: crudFlags: R what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000035: + Rule_00000033: crudFlags: R what: SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' - Rule_00000036: + Rule_00000034: crudFlags: R what: SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - Rule_00000037: + Rule_00000035: crudFlags: R what: SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - Rule_00000038: + Rule_00000036: crudFlags: R what: SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP - Rule_00000039: + Rule_00000037: crudFlags: R what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000040: + Rule_00000038: crudFlags: CUD what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - Rule_00000041: + Rule_00000039: crudFlags: CUD what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000042: + Rule_00000040: crudFlags: R what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000043: + Rule_00000041: + crudFlags: CRUD + what: SELECT o FROM Job o WHERE o.createId = :user + Rule_00000042: crudFlags: R what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000044: + Rule_00000043: crudFlags: R what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000045: + Rule_00000044: crudFlags: R what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000046: + Rule_00000045: crudFlags: R what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000046: + crudFlags: CRUD + what: SELECT o FROM RelatedDatafile o WHERE o.createId = :user Rule_00000047: crudFlags: R what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups @@ -394,178 +401,202 @@ rule: crudFlags: R what: User Rule_00000061: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Datafile + Rule_00000062: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatafileParameter + Rule_00000063: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Dataset + Rule_00000064: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatasetParameter + Rule_00000065: + crudFlags: R + grouping: Grouping_name-ingest + what: Investigation + Rule_00000066: + crudFlags: R + grouping: Grouping_name-ingest + what: Shift + Rule_00000067: crudFlags: R grouping: Grouping_name-rall what: DataCollection - Rule_00000062: + Rule_00000068: crudFlags: R grouping: Grouping_name-rall what: DataCollectionDatafile - Rule_00000063: + Rule_00000069: crudFlags: R grouping: Grouping_name-rall what: DataCollectionDataset - Rule_00000064: + Rule_00000070: crudFlags: R grouping: Grouping_name-rall what: DataCollectionParameter - Rule_00000065: + Rule_00000071: crudFlags: R grouping: Grouping_name-rall what: Datafile - Rule_00000066: + Rule_00000072: crudFlags: R grouping: Grouping_name-rall what: DatafileParameter - Rule_00000067: + Rule_00000073: crudFlags: R grouping: Grouping_name-rall what: Dataset - Rule_00000068: + Rule_00000074: crudFlags: R grouping: Grouping_name-rall what: DatasetParameter - Rule_00000069: + Rule_00000075: crudFlags: R grouping: Grouping_name-rall what: Grouping - Rule_00000070: + Rule_00000076: crudFlags: R grouping: Grouping_name-rall what: InstrumentScientist - Rule_00000071: + Rule_00000077: crudFlags: R grouping: Grouping_name-rall what: Investigation - Rule_00000072: + Rule_00000078: crudFlags: R grouping: Grouping_name-rall what: InvestigationGroup - Rule_00000073: + Rule_00000079: crudFlags: R grouping: Grouping_name-rall what: InvestigationInstrument - Rule_00000074: + Rule_00000080: crudFlags: R grouping: Grouping_name-rall what: InvestigationParameter - Rule_00000075: + Rule_00000081: crudFlags: R grouping: Grouping_name-rall what: InvestigationUser - Rule_00000076: + Rule_00000082: crudFlags: R grouping: Grouping_name-rall what: Job - Rule_00000077: + Rule_00000083: crudFlags: R grouping: Grouping_name-rall what: Keyword - Rule_00000078: + Rule_00000084: crudFlags: R grouping: Grouping_name-rall what: PublicStep - Rule_00000079: + Rule_00000085: crudFlags: R grouping: Grouping_name-rall what: Publication - Rule_00000080: + Rule_00000086: crudFlags: R grouping: Grouping_name-rall what: RelatedDatafile - Rule_00000081: + Rule_00000087: crudFlags: R grouping: Grouping_name-rall what: Rule - Rule_00000082: + Rule_00000088: crudFlags: R grouping: Grouping_name-rall what: Sample - Rule_00000083: + Rule_00000089: crudFlags: R grouping: Grouping_name-rall what: SampleParameter - Rule_00000084: + Rule_00000090: crudFlags: R grouping: Grouping_name-rall what: Shift - Rule_00000085: + Rule_00000091: crudFlags: R grouping: Grouping_name-rall what: Study - Rule_00000086: + Rule_00000092: crudFlags: R grouping: Grouping_name-rall what: StudyInvestigation - Rule_00000087: + Rule_00000093: crudFlags: R grouping: Grouping_name-rall what: UserGroup - Rule_00000088: + Rule_00000094: crudFlags: RU grouping: Grouping_name-scientific=5Fstaff what: Sample - Rule_00000089: + Rule_00000095: crudFlags: UD grouping: Grouping_name-scientific=5Fstaff what: SampleType - Rule_00000090: + Rule_00000096: crudFlags: CRUD grouping: Grouping_name-useroffice what: FacilityCycle - Rule_00000091: + Rule_00000097: crudFlags: CRUD grouping: Grouping_name-useroffice what: Grouping - Rule_00000092: + Rule_00000098: crudFlags: CRUD grouping: Grouping_name-useroffice what: InstrumentScientist - Rule_00000093: + Rule_00000099: crudFlags: CRUD grouping: Grouping_name-useroffice what: Investigation - Rule_00000094: + Rule_00000100: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationGroup - Rule_00000095: + Rule_00000101: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationInstrument - Rule_00000096: + Rule_00000102: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationParameter - Rule_00000097: + Rule_00000103: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationUser - Rule_00000098: + Rule_00000104: crudFlags: CRUD grouping: Grouping_name-useroffice what: Keyword - Rule_00000099: + Rule_00000105: crudFlags: CRUD grouping: Grouping_name-useroffice what: Publication - Rule_00000100: + Rule_00000106: crudFlags: CRUD grouping: Grouping_name-useroffice what: Shift - Rule_00000101: + Rule_00000107: crudFlags: CRUD grouping: Grouping_name-useroffice what: Study - Rule_00000102: + Rule_00000108: crudFlags: CRUD grouping: Grouping_name-useroffice what: StudyInvestigation - Rule_00000103: + Rule_00000109: crudFlags: CRUD grouping: Grouping_name-useroffice what: User - Rule_00000104: + Rule_00000110: crudFlags: CRUD grouping: Grouping_name-useroffice what: UserGroup @@ -616,6 +647,9 @@ user: givenName: Rudolph name: db/rbeck orcidId: 0000-0002-3267 + User_name-simple=2Fdataingest: + fullName: Data Ingester + name: simple/dataingest User_name-simple=2Fidsreader: fullName: IDS reader name: simple/idsreader @@ -638,11 +672,17 @@ datafileFormat: name: CSV type: text/csv version: N/A + DatafileFormat_facility-(name-ESNF)_name-HDF5_version-N=2FA: + description: Hierarchical Data Format version 5 + facility: Facility_name-ESNF + name: HDF5 + type: application/x-hdf5 + version: N/A DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA: description: A common data format for neutron, x-ray and muon science facility: Facility_name-ESNF name: NeXus - type: application/x-hdf + type: application/x-hdf5 version: N/A DatafileFormat_facility-(name-ESNF)_name-Text_version-N=2FA: description: Plain text file @@ -794,7 +834,7 @@ instrument: instrumentScientists: - user: User_name-db=2Facord name: E2 - pid: 00.0815/inst-00001 + pid: DOI:00.0815/inst-00001 Instrument_facility-(name-ESNF)_name-EDDI: description: 'The experimental station EDDI (Energy Dispersive Diffraction) is a fixed station at the 7T-MPW-EDDI beamline. The beamline provides the direct @@ -811,7 +851,7 @@ instrument: instrumentScientists: - user: User_name-db=2Facord name: EDDI - pid: 00.0815/inst-00048 + pid: DOI:00.0815/inst-00048 Instrument_facility-(name-ESNF)_name-HIKE: description: 'The system is designed for hard X-ray high kinetic energy photoelectron spectroscopy (HAXPES or HIKE) experiments in the excitation energy range from @@ -826,7 +866,7 @@ instrument: instrumentScientists: - user: User_name-db=2Facord name: HIKE - pid: 00.0815/inst-00027 + pid: DOI:00.0815/inst-00027 investigationType: InvestigationType_name-Calibration_facility-(name-ESNF): facility: Facility_name-ESNF @@ -1007,7 +1047,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-raw investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP: - doi: 00.0815/inv-00122 + doi: DOI:00.0815/inv-00122 facility: Facility_name-ESNF investigationGroups: - grouping: Grouping_name-investigation=5F08100122=2DEF=5Fowner @@ -1044,7 +1084,7 @@ sample: Sample_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-Durol=20SC: investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP name: Durol SC - pid: ESNFHNS8AYEZ + pid: IGSN:ESNFHNS8AYEZ type: SampleType_facility-(name-ESNF)_name-Durol=20SC_molecularFormula-C10H14 --- datafile: @@ -1129,7 +1169,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-raw investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN: - doi: 00.0815/inv-00601 + doi: DOI:00.0815/inv-00601 endDate: '2010-10-12T15:00:00+00:00' facility: Facility_name-ESNF investigationGroups: @@ -1154,7 +1194,7 @@ investigation: - stringValue: neutron type: ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA publications: - - doi: 0.1002/adma.201101001 + - doi: DOI:00.1002/adma.201101001 fullReference: A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 shifts: - comment: Beamtime at E2 @@ -1176,7 +1216,7 @@ sample: parameters: - stringValue: 2046c9a7-ab07-4594-84a2-101617073a79 type: ParameterType_facility-(name-ESNF)_name-Sample=20reference_units-N=2FA - pid: ESNFZDVHICBD + pid: IGSN:ESNFZDVHICBD type: SampleType_facility-(name-ESNF)_name-NiMnGa_molecularFormula-NiMnGa --- datafile: @@ -1264,7 +1304,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-analyzed investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP: - doi: 00.0815/inv-00409 + doi: DOI:00.0815/inv-00409 endDate: '2012-08-06T01:10:08+00:00' facility: Facility_name-ESNF investigationGroups: @@ -1304,11 +1344,17 @@ sample: parameters: - stringValue: c1b0a101-03aa-4d02-a1a2-e2826ba7871b type: ParameterType_facility-(name-ESNF)_name-Sample=20reference_units-N=2FA - pid: ESNFX8C7B53W + pid: IGSN:ESNFX8C7B53W type: SampleType_facility-(name-ESNF)_name-Nickel=28II=29=20oxide=20SC_molecularFormula-NiO --- dataCollection: DataCollection_00000001: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339)_name-e208339=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215 + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201216 + DataCollection_00000002: dataCollectionDatafiles: - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Enxs dataCollectionDatasets: @@ -1316,17 +1362,18 @@ dataCollection: parameters: - stringValue: Make a synthesis of 10100601-ST and 12100409-ST type: ParameterType_facility-(name-ESNF)_name-Comment_units-N=2FA - DataCollection_00000002: + DataCollection_00000003: dataCollectionDatafiles: - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2D2=2Enxs dataCollectionDatasets: - dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947 - doi: 00.0815/dat-004711 + doi: DOI:00.0815/dat-004711 +--- job: Job_00000001: application: Application_facility-(name-ESNF)_name-gnomoanalytics_version-69 - inputDataCollection: DataCollection_00000001 - outputDataCollection: DataCollection_00000002 + inputDataCollection: DataCollection_00000002 + outputDataCollection: DataCollection_00000003 relatedDatafile: ? RelatedDatafile_sourceDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Enxs)_destDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs) : destDatafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs @@ -1336,7 +1383,7 @@ study: Study_00000001: endDate: '2012-09-30T18:00:00+00:00' name: 12-008 - pid: 00.0815/m-00333 + pid: DOI:00.0815/m-00333 startDate: '2012-07-09T06:00:00+00:00' status: COMPLETE studyInvestigations: diff --git a/doc/examples/icatdump-4.4.xml b/doc/examples/icatdump-4.4.xml index 64f7fa84..b365c598 100644 --- a/doc/examples/icatdump-4.4.xml +++ b/doc/examples/icatdump-4.4.xml @@ -1,10 +1,10 @@ - 2020-04-17T19:04:17+00:00 + 2022-11-23T16:39:42+00:00 https://icat.example.com:8181/ICATService/ICAT?wsdl - 4.4 - icatdump (python-icat 0.16.0) + 4.4.0 + icatdump (python-icat 0.21.1.dev138) @@ -31,6 +31,10 @@ Rudolph Beck-Dülmen db/rbeck + + Data Ingester + simple/dataingest + IDS reader simple/idsreader @@ -43,6 +47,12 @@ User Office simple/useroffice + + ingest + + + + investigation_08100122-EF_owner @@ -132,185 +142,185 @@ Application - CRUD - DataCollection [createId=:user] + R + DatafileFormat - CRUD - DataCollectionDatafile <-> DataCollection [createId=:user] + R + DatasetType - CRUD - DataCollectionDataset <-> DataCollection [createId=:user] + R + Facility - CRUD - DataCollectionParameter <-> DataCollection [createId=:user] + R + FacilityCycle R - DatafileFormat + Grouping <-> UserGroup <-> User [name=:user] R - DatasetType + Instrument R - Facility + InvestigationType R - FacilityCycle + ParameterType R - Grouping <-> UserGroup <-> User [name=:user] + PermissibleStringValue - R - Instrument + CRUD + SELECT o FROM DataCollection o WHERE o.createId = :user - R - InvestigationType + CRUD + SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE s1.createId = :user CRUD - Job [createId=:user] + SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE s1.createId = :user - R - ParameterType - - - R - PermissibleStringValue - - CRUD - RelatedDatafile [createId=:user] + SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE s1.createId = :user - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' - + CUD SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + CUD SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' - + CUD SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + R SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + CUD SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' - + R SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - + CUD SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' - + R SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - + R SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - + R SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP - + R SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - + CUD SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + + CRUD + SELECT o FROM Job o WHERE o.createId = :user + + R SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + CRUD + SELECT o FROM RelatedDatafile o WHERE o.createId = :user + R SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user @@ -368,221 +378,251 @@ User + CRU + Datafile + + + + CRU + DatafileParameter + + + + CRU + Dataset + + + + CRU + DatasetParameter + + + + R + Investigation + + + + R + Shift + + + R DataCollection - + R DataCollectionDatafile - + R DataCollectionDataset - + R DataCollectionParameter - + R Datafile - + R DatafileParameter - + R Dataset - + R DatasetParameter - + R Grouping - + R InstrumentScientist - + R Investigation - + R InvestigationGroup - + R InvestigationInstrument - + R InvestigationParameter - + R InvestigationUser - + R Job - + R Keyword - + R PublicStep - + R Publication - + R RelatedDatafile - + R Rule - + R Sample - + R SampleParameter - + R Shift - + R Study - + R StudyInvestigation - + R UserGroup - + RU Sample - + UD SampleType - + CRUD FacilityCycle - + CRUD Grouping - + CRUD InstrumentScientist - + CRUD Investigation - + CRUD InvestigationGroup - + CRUD InvestigationInstrument - + CRUD InvestigationParameter - + CRUD InvestigationUser - + CRUD Keyword - + CRUD Publication - + CRUD Shift - + CRUD Study - + CRUD StudyInvestigation - + CRUD User - + CRUD UserGroup @@ -917,10 +957,17 @@ N/A + + Hierarchical Data Format version 5 + HDF5 + application/x-hdf5 + N/A + + A common data format for neutron, x-ray and muon science NeXus - application/x-hdf + application/x-hdf5 N/A @@ -1072,7 +1119,7 @@ - 00.0815/inv-00122 + DOI:00.0815/inv-00122 08100122-EF 2008-03-13T10:39:42+00:00 Durol single crystal @@ -1156,7 +1203,7 @@ - 00.0815/inv-00601 + DOI:00.0815/inv-00601 2010-10-12T15:00:00+00:00 10100601-ST 2010-09-30T10:27:24+00:00 @@ -1200,7 +1247,7 @@ - 0.1002/adma.201101001 + DOI:00.1002/adma.201101001 A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 @@ -1321,7 +1368,7 @@ - 00.0815/inv-00409 + DOI:00.0815/inv-00409 2012-08-06T01:10:08+00:00 12100409-ST 2012-07-26T15:44:24+00:00 @@ -1478,12 +1525,18 @@ - - copy - - - + + + + + + + + + + + @@ -1495,7 +1548,7 @@ - + @@ -1503,10 +1556,17 @@ + + + + copy + + + - - + + diff --git a/doc/examples/icatdump-4.4.yaml b/doc/examples/icatdump-4.4.yaml index 9950f93b..46fcfeaa 100644 --- a/doc/examples/icatdump-4.4.yaml +++ b/doc/examples/icatdump-4.4.yaml @@ -1,10 +1,14 @@ %YAML 1.1 -# Date: Fri, 17 Apr 2020 19:03:56 +0000 +# Date: Wed, 23 Nov 2022 16:39:39 +0000 # Service: https://icat.example.com:8181/ICATService/ICAT?wsdl -# ICAT-API: 4.4 -# Generator: icatdump (python-icat 0.16.0) +# ICAT-API: 4.4.0 +# Generator: icatdump (python-icat 0.21.1.dev138) --- grouping: + Grouping_name-ingest: + name: ingest + userGroups: + - user: User_name-simple=2Fdataingest Grouping_name-investigation=5F08100122=2DEF=5Fowner: name: investigation_08100122-EF_owner userGroups: @@ -135,199 +139,202 @@ rule: crudFlags: R what: Application Rule_00000002: - crudFlags: CRUD - what: DataCollection [createId=:user] - Rule_00000003: - crudFlags: CRUD - what: DataCollectionDatafile <-> DataCollection [createId=:user] - Rule_00000004: - crudFlags: CRUD - what: DataCollectionDataset <-> DataCollection [createId=:user] - Rule_00000005: - crudFlags: CRUD - what: DataCollectionParameter <-> DataCollection [createId=:user] - Rule_00000006: crudFlags: R what: DatafileFormat - Rule_00000007: + Rule_00000003: crudFlags: R what: DatasetType - Rule_00000008: + Rule_00000004: crudFlags: R what: Facility - Rule_00000009: + Rule_00000005: crudFlags: R what: FacilityCycle - Rule_00000010: + Rule_00000006: crudFlags: R what: Grouping <-> UserGroup <-> User [name=:user] - Rule_00000011: + Rule_00000007: crudFlags: R what: Instrument - Rule_00000012: + Rule_00000008: crudFlags: R what: InvestigationType - Rule_00000013: - crudFlags: CRUD - what: Job [createId=:user] - Rule_00000014: + Rule_00000009: crudFlags: R what: ParameterType - Rule_00000015: + Rule_00000010: crudFlags: R what: PermissibleStringValue - Rule_00000016: + Rule_00000011: crudFlags: CRUD - what: RelatedDatafile [createId=:user] - Rule_00000017: + what: SELECT o FROM DataCollection o WHERE o.createId = :user + Rule_00000012: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000013: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000014: + crudFlags: CRUD + what: SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000015: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' - Rule_00000018: + Rule_00000016: crudFlags: CUD what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' - Rule_00000019: + Rule_00000017: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000020: + Rule_00000018: crudFlags: CUD what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user - Rule_00000021: + Rule_00000019: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000022: + Rule_00000020: crudFlags: R what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000023: + Rule_00000021: crudFlags: CUD what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' - Rule_00000024: + Rule_00000022: crudFlags: CUD what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000025: + Rule_00000023: crudFlags: R what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000026: + Rule_00000024: crudFlags: CUD what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' - Rule_00000027: + Rule_00000025: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000028: + Rule_00000026: crudFlags: CUD what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user - Rule_00000029: + Rule_00000027: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000030: + Rule_00000028: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' - Rule_00000031: + Rule_00000029: crudFlags: R what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000032: + Rule_00000030: crudFlags: CUD what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - Rule_00000033: + Rule_00000031: crudFlags: CUD what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000034: + Rule_00000032: crudFlags: R what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000035: + Rule_00000033: crudFlags: R what: SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' - Rule_00000036: + Rule_00000034: crudFlags: R what: SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - Rule_00000037: + Rule_00000035: crudFlags: R what: SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - Rule_00000038: + Rule_00000036: crudFlags: R what: SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP - Rule_00000039: + Rule_00000037: crudFlags: R what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000040: + Rule_00000038: crudFlags: CUD what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - Rule_00000041: + Rule_00000039: crudFlags: CUD what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000042: + Rule_00000040: crudFlags: R what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000043: + Rule_00000041: + crudFlags: CRUD + what: SELECT o FROM Job o WHERE o.createId = :user + Rule_00000042: crudFlags: R what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000044: + Rule_00000043: crudFlags: R what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000045: + Rule_00000044: crudFlags: R what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000046: + Rule_00000045: crudFlags: R what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000046: + crudFlags: CRUD + what: SELECT o FROM RelatedDatafile o WHERE o.createId = :user Rule_00000047: crudFlags: R what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups @@ -394,178 +401,202 @@ rule: crudFlags: R what: User Rule_00000061: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Datafile + Rule_00000062: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatafileParameter + Rule_00000063: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Dataset + Rule_00000064: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatasetParameter + Rule_00000065: + crudFlags: R + grouping: Grouping_name-ingest + what: Investigation + Rule_00000066: + crudFlags: R + grouping: Grouping_name-ingest + what: Shift + Rule_00000067: crudFlags: R grouping: Grouping_name-rall what: DataCollection - Rule_00000062: + Rule_00000068: crudFlags: R grouping: Grouping_name-rall what: DataCollectionDatafile - Rule_00000063: + Rule_00000069: crudFlags: R grouping: Grouping_name-rall what: DataCollectionDataset - Rule_00000064: + Rule_00000070: crudFlags: R grouping: Grouping_name-rall what: DataCollectionParameter - Rule_00000065: + Rule_00000071: crudFlags: R grouping: Grouping_name-rall what: Datafile - Rule_00000066: + Rule_00000072: crudFlags: R grouping: Grouping_name-rall what: DatafileParameter - Rule_00000067: + Rule_00000073: crudFlags: R grouping: Grouping_name-rall what: Dataset - Rule_00000068: + Rule_00000074: crudFlags: R grouping: Grouping_name-rall what: DatasetParameter - Rule_00000069: + Rule_00000075: crudFlags: R grouping: Grouping_name-rall what: Grouping - Rule_00000070: + Rule_00000076: crudFlags: R grouping: Grouping_name-rall what: InstrumentScientist - Rule_00000071: + Rule_00000077: crudFlags: R grouping: Grouping_name-rall what: Investigation - Rule_00000072: + Rule_00000078: crudFlags: R grouping: Grouping_name-rall what: InvestigationGroup - Rule_00000073: + Rule_00000079: crudFlags: R grouping: Grouping_name-rall what: InvestigationInstrument - Rule_00000074: + Rule_00000080: crudFlags: R grouping: Grouping_name-rall what: InvestigationParameter - Rule_00000075: + Rule_00000081: crudFlags: R grouping: Grouping_name-rall what: InvestigationUser - Rule_00000076: + Rule_00000082: crudFlags: R grouping: Grouping_name-rall what: Job - Rule_00000077: + Rule_00000083: crudFlags: R grouping: Grouping_name-rall what: Keyword - Rule_00000078: + Rule_00000084: crudFlags: R grouping: Grouping_name-rall what: PublicStep - Rule_00000079: + Rule_00000085: crudFlags: R grouping: Grouping_name-rall what: Publication - Rule_00000080: + Rule_00000086: crudFlags: R grouping: Grouping_name-rall what: RelatedDatafile - Rule_00000081: + Rule_00000087: crudFlags: R grouping: Grouping_name-rall what: Rule - Rule_00000082: + Rule_00000088: crudFlags: R grouping: Grouping_name-rall what: Sample - Rule_00000083: + Rule_00000089: crudFlags: R grouping: Grouping_name-rall what: SampleParameter - Rule_00000084: + Rule_00000090: crudFlags: R grouping: Grouping_name-rall what: Shift - Rule_00000085: + Rule_00000091: crudFlags: R grouping: Grouping_name-rall what: Study - Rule_00000086: + Rule_00000092: crudFlags: R grouping: Grouping_name-rall what: StudyInvestigation - Rule_00000087: + Rule_00000093: crudFlags: R grouping: Grouping_name-rall what: UserGroup - Rule_00000088: + Rule_00000094: crudFlags: RU grouping: Grouping_name-scientific=5Fstaff what: Sample - Rule_00000089: + Rule_00000095: crudFlags: UD grouping: Grouping_name-scientific=5Fstaff what: SampleType - Rule_00000090: + Rule_00000096: crudFlags: CRUD grouping: Grouping_name-useroffice what: FacilityCycle - Rule_00000091: + Rule_00000097: crudFlags: CRUD grouping: Grouping_name-useroffice what: Grouping - Rule_00000092: + Rule_00000098: crudFlags: CRUD grouping: Grouping_name-useroffice what: InstrumentScientist - Rule_00000093: + Rule_00000099: crudFlags: CRUD grouping: Grouping_name-useroffice what: Investigation - Rule_00000094: + Rule_00000100: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationGroup - Rule_00000095: + Rule_00000101: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationInstrument - Rule_00000096: + Rule_00000102: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationParameter - Rule_00000097: + Rule_00000103: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationUser - Rule_00000098: + Rule_00000104: crudFlags: CRUD grouping: Grouping_name-useroffice what: Keyword - Rule_00000099: + Rule_00000105: crudFlags: CRUD grouping: Grouping_name-useroffice what: Publication - Rule_00000100: + Rule_00000106: crudFlags: CRUD grouping: Grouping_name-useroffice what: Shift - Rule_00000101: + Rule_00000107: crudFlags: CRUD grouping: Grouping_name-useroffice what: Study - Rule_00000102: + Rule_00000108: crudFlags: CRUD grouping: Grouping_name-useroffice what: StudyInvestigation - Rule_00000103: + Rule_00000109: crudFlags: CRUD grouping: Grouping_name-useroffice what: User - Rule_00000104: + Rule_00000110: crudFlags: CRUD grouping: Grouping_name-useroffice what: UserGroup @@ -588,6 +619,9 @@ user: User_name-db=2Frbeck: fullName: "Rudolph Beck-D\xFClmen" name: db/rbeck + User_name-simple=2Fdataingest: + fullName: Data Ingester + name: simple/dataingest User_name-simple=2Fidsreader: fullName: IDS reader name: simple/idsreader @@ -610,11 +644,17 @@ datafileFormat: name: CSV type: text/csv version: N/A + DatafileFormat_facility-(name-ESNF)_name-HDF5_version-N=2FA: + description: Hierarchical Data Format version 5 + facility: Facility_name-ESNF + name: HDF5 + type: application/x-hdf5 + version: N/A DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA: description: A common data format for neutron, x-ray and muon science facility: Facility_name-ESNF name: NeXus - type: application/x-hdf + type: application/x-hdf5 version: N/A DatafileFormat_facility-(name-ESNF)_name-Text_version-N=2FA: description: Plain text file @@ -976,7 +1016,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-raw investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP: - doi: 00.0815/inv-00122 + doi: DOI:00.0815/inv-00122 facility: Facility_name-ESNF investigationGroups: - grouping: Grouping_name-investigation=5F08100122=2DEF=5Fowner @@ -1096,7 +1136,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-raw investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN: - doi: 00.0815/inv-00601 + doi: DOI:00.0815/inv-00601 endDate: '2010-10-12T15:00:00+00:00' facility: Facility_name-ESNF investigationGroups: @@ -1121,7 +1161,7 @@ investigation: - stringValue: neutron type: ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA publications: - - doi: 0.1002/adma.201101001 + - doi: DOI:00.1002/adma.201101001 fullReference: A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 shifts: - comment: Beamtime at E2 @@ -1228,7 +1268,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-analyzed investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP: - doi: 00.0815/inv-00409 + doi: DOI:00.0815/inv-00409 endDate: '2012-08-06T01:10:08+00:00' facility: Facility_name-ESNF investigationGroups: @@ -1271,6 +1311,12 @@ sample: --- dataCollection: DataCollection_00000001: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339)_name-e208339=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215 + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201216 + DataCollection_00000002: dataCollectionDatafiles: - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Enxs dataCollectionDatasets: @@ -1278,16 +1324,17 @@ dataCollection: parameters: - stringValue: Make a synthesis of 10100601-ST and 12100409-ST type: ParameterType_facility-(name-ESNF)_name-Comment_units-N=2FA - DataCollection_00000002: + DataCollection_00000003: dataCollectionDatafiles: - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2D2=2Enxs dataCollectionDatasets: - dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947 +--- job: Job_00000001: application: Application_facility-(name-ESNF)_name-gnomoanalytics_version-69 - inputDataCollection: DataCollection_00000001 - outputDataCollection: DataCollection_00000002 + inputDataCollection: DataCollection_00000002 + outputDataCollection: DataCollection_00000003 relatedDatafile: ? RelatedDatafile_sourceDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Enxs)_destDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs) : destDatafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs diff --git a/doc/examples/icatdump-4.7.xml b/doc/examples/icatdump-4.7.xml index 07fc613f..7f27fbb4 100644 --- a/doc/examples/icatdump-4.7.xml +++ b/doc/examples/icatdump-4.7.xml @@ -1,10 +1,10 @@ - 2020-04-17T18:30:30+00:00 + 2022-11-23T16:26:45+00:00 https://icat.example.com:8181/ICATService/ICAT?wsdl - 4.7 - icatdump (python-icat 0.16.0) + 4.7.0 + icatdump (python-icat 0.21.1.dev138) @@ -42,6 +42,10 @@ db/rbeck 0000-0002-3267 + + Data Ingester + simple/dataingest + IDS reader simple/idsreader @@ -54,6 +58,12 @@ User Office simple/useroffice + + ingest + + + + investigation_08100122-EF_owner @@ -143,185 +153,185 @@ Application - CRUD - DataCollection [createId=:user] + R + DatafileFormat - CRUD - DataCollectionDatafile <-> DataCollection [createId=:user] + R + DatasetType - CRUD - DataCollectionDataset <-> DataCollection [createId=:user] + R + Facility - CRUD - DataCollectionParameter <-> DataCollection [createId=:user] + R + FacilityCycle R - DatafileFormat + Grouping <-> UserGroup <-> User [name=:user] R - DatasetType + Instrument R - Facility + InvestigationType R - FacilityCycle + ParameterType R - Grouping <-> UserGroup <-> User [name=:user] + PermissibleStringValue - R - Instrument + CRUD + SELECT o FROM DataCollection o WHERE o.createId = :user - R - InvestigationType + CRUD + SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE s1.createId = :user CRUD - Job [createId=:user] + SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE s1.createId = :user - R - ParameterType - - - R - PermissibleStringValue - - CRUD - RelatedDatafile [createId=:user] + SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE s1.createId = :user - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' - + CUD SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user - + R SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + CUD SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' - + CUD SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + R SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - + CUD SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' - + R SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - + CUD SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' - + R SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - + R SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - + R SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP - + R SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + CUD SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - + CUD SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + + CRUD + SELECT o FROM Job o WHERE o.createId = :user + + R SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - + R SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + CRUD + SELECT o FROM RelatedDatafile o WHERE o.createId = :user + R SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user @@ -379,221 +389,251 @@ User + CRU + Datafile + + + + CRU + DatafileParameter + + + + CRU + Dataset + + + + CRU + DatasetParameter + + + + R + Investigation + + + + R + Shift + + + R DataCollection - + R DataCollectionDatafile - + R DataCollectionDataset - + R DataCollectionParameter - + R Datafile - + R DatafileParameter - + R Dataset - + R DatasetParameter - + R Grouping - + R InstrumentScientist - + R Investigation - + R InvestigationGroup - + R InvestigationInstrument - + R InvestigationParameter - + R InvestigationUser - + R Job - + R Keyword - + R PublicStep - + R Publication - + R RelatedDatafile - + R Rule - + R Sample - + R SampleParameter - + R Shift - + R Study - + R StudyInvestigation - + R UserGroup - + RU Sample - + UD SampleType - + CRUD FacilityCycle - + CRUD Grouping - + CRUD InstrumentScientist - + CRUD Investigation - + CRUD InvestigationGroup - + CRUD InvestigationInstrument - + CRUD InvestigationParameter - + CRUD InvestigationUser - + CRUD Keyword - + CRUD Publication - + CRUD Shift - + CRUD Study - + CRUD StudyInvestigation - + CRUD User - + CRUD UserGroup @@ -928,10 +968,17 @@ N/A + + Hierarchical Data Format version 5 + HDF5 + application/x-hdf5 + N/A + + A common data format for neutron, x-ray and muon science NeXus - application/x-hdf + application/x-hdf5 N/A @@ -1083,7 +1130,7 @@ - 00.0815/inv-00122 + DOI:00.0815/inv-00122 08100122-EF 2008-03-13T10:39:42+00:00 Durol single crystal @@ -1167,7 +1214,7 @@ - 00.0815/inv-00601 + DOI:00.0815/inv-00601 2010-10-12T15:00:00+00:00 10100601-ST 2010-09-30T10:27:24+00:00 @@ -1211,7 +1258,7 @@ - 0.1002/adma.201101001 + DOI:00.1002/adma.201101001 A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 @@ -1332,7 +1379,7 @@ - 00.0815/inv-00409 + DOI:00.0815/inv-00409 2012-08-06T01:10:08+00:00 12100409-ST 2012-07-26T15:44:24+00:00 @@ -1489,24 +1536,18 @@ - - 12-008 - 2012-07-09T06:00:00+00:00 - COMPLETE - - - - - - - - - - copy - - - + + + + + + + + + + + @@ -1518,8 +1559,8 @@ - - 00.0815/dat-004711 + + DOI:00.0815/dat-004711 @@ -1527,10 +1568,29 @@ + + + + 12-008 + 2012-07-09T06:00:00+00:00 + COMPLETE + + + + + + + + + + copy + + + - - + + diff --git a/doc/examples/icatdump-4.7.yaml b/doc/examples/icatdump-4.7.yaml index 6d4707fd..7f2b9b38 100644 --- a/doc/examples/icatdump-4.7.yaml +++ b/doc/examples/icatdump-4.7.yaml @@ -1,10 +1,14 @@ %YAML 1.1 -# Date: Fri, 17 Apr 2020 18:30:08 +0000 +# Date: Wed, 23 Nov 2022 16:26:41 +0000 # Service: https://icat.example.com:8181/ICATService/ICAT?wsdl -# ICAT-API: 4.7 -# Generator: icatdump (python-icat 0.16.0) +# ICAT-API: 4.7.0 +# Generator: icatdump (python-icat 0.21.1.dev138) --- grouping: + Grouping_name-ingest: + name: ingest + userGroups: + - user: User_name-simple=2Fdataingest Grouping_name-investigation=5F08100122=2DEF=5Fowner: name: investigation_08100122-EF_owner userGroups: @@ -135,199 +139,202 @@ rule: crudFlags: R what: Application Rule_00000002: - crudFlags: CRUD - what: DataCollection [createId=:user] - Rule_00000003: - crudFlags: CRUD - what: DataCollectionDatafile <-> DataCollection [createId=:user] - Rule_00000004: - crudFlags: CRUD - what: DataCollectionDataset <-> DataCollection [createId=:user] - Rule_00000005: - crudFlags: CRUD - what: DataCollectionParameter <-> DataCollection [createId=:user] - Rule_00000006: crudFlags: R what: DatafileFormat - Rule_00000007: + Rule_00000003: crudFlags: R what: DatasetType - Rule_00000008: + Rule_00000004: crudFlags: R what: Facility - Rule_00000009: + Rule_00000005: crudFlags: R what: FacilityCycle - Rule_00000010: + Rule_00000006: crudFlags: R what: Grouping <-> UserGroup <-> User [name=:user] - Rule_00000011: + Rule_00000007: crudFlags: R what: Instrument - Rule_00000012: + Rule_00000008: crudFlags: R what: InvestigationType - Rule_00000013: - crudFlags: CRUD - what: Job [createId=:user] - Rule_00000014: + Rule_00000009: crudFlags: R what: ParameterType - Rule_00000015: + Rule_00000010: crudFlags: R what: PermissibleStringValue - Rule_00000016: + Rule_00000011: crudFlags: CRUD - what: RelatedDatafile [createId=:user] - Rule_00000017: + what: SELECT o FROM DataCollection o WHERE o.createId = :user + Rule_00000012: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000013: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000014: + crudFlags: CRUD + what: SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000015: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' - Rule_00000018: + Rule_00000016: crudFlags: CUD what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' - Rule_00000019: + Rule_00000017: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000020: + Rule_00000018: crudFlags: CUD what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user - Rule_00000021: + Rule_00000019: crudFlags: R what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000022: + Rule_00000020: crudFlags: R what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000023: + Rule_00000021: crudFlags: CUD what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' - Rule_00000024: + Rule_00000022: crudFlags: CUD what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000025: + Rule_00000023: crudFlags: R what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user - Rule_00000026: + Rule_00000024: crudFlags: CUD what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' - Rule_00000027: + Rule_00000025: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000028: + Rule_00000026: crudFlags: CUD what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user - Rule_00000029: + Rule_00000027: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000030: + Rule_00000028: crudFlags: R what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' - Rule_00000031: + Rule_00000029: crudFlags: R what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000032: + Rule_00000030: crudFlags: CUD what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - Rule_00000033: + Rule_00000031: crudFlags: CUD what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000034: + Rule_00000032: crudFlags: R what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000035: + Rule_00000033: crudFlags: R what: SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' - Rule_00000036: + Rule_00000034: crudFlags: R what: SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - Rule_00000037: + Rule_00000035: crudFlags: R what: SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user - Rule_00000038: + Rule_00000036: crudFlags: R what: SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP - Rule_00000039: + Rule_00000037: crudFlags: R what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000040: + Rule_00000038: crudFlags: CUD what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' - Rule_00000041: + Rule_00000039: crudFlags: CUD what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000042: + Rule_00000040: crudFlags: R what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000043: + Rule_00000041: + crudFlags: CRUD + what: SELECT o FROM Job o WHERE o.createId = :user + Rule_00000042: crudFlags: R what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000044: + Rule_00000043: crudFlags: R what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000045: + Rule_00000044: crudFlags: R what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user - Rule_00000046: + Rule_00000045: crudFlags: R what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000046: + crudFlags: CRUD + what: SELECT o FROM RelatedDatafile o WHERE o.createId = :user Rule_00000047: crudFlags: R what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups @@ -394,178 +401,202 @@ rule: crudFlags: R what: User Rule_00000061: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Datafile + Rule_00000062: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatafileParameter + Rule_00000063: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Dataset + Rule_00000064: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatasetParameter + Rule_00000065: + crudFlags: R + grouping: Grouping_name-ingest + what: Investigation + Rule_00000066: + crudFlags: R + grouping: Grouping_name-ingest + what: Shift + Rule_00000067: crudFlags: R grouping: Grouping_name-rall what: DataCollection - Rule_00000062: + Rule_00000068: crudFlags: R grouping: Grouping_name-rall what: DataCollectionDatafile - Rule_00000063: + Rule_00000069: crudFlags: R grouping: Grouping_name-rall what: DataCollectionDataset - Rule_00000064: + Rule_00000070: crudFlags: R grouping: Grouping_name-rall what: DataCollectionParameter - Rule_00000065: + Rule_00000071: crudFlags: R grouping: Grouping_name-rall what: Datafile - Rule_00000066: + Rule_00000072: crudFlags: R grouping: Grouping_name-rall what: DatafileParameter - Rule_00000067: + Rule_00000073: crudFlags: R grouping: Grouping_name-rall what: Dataset - Rule_00000068: + Rule_00000074: crudFlags: R grouping: Grouping_name-rall what: DatasetParameter - Rule_00000069: + Rule_00000075: crudFlags: R grouping: Grouping_name-rall what: Grouping - Rule_00000070: + Rule_00000076: crudFlags: R grouping: Grouping_name-rall what: InstrumentScientist - Rule_00000071: + Rule_00000077: crudFlags: R grouping: Grouping_name-rall what: Investigation - Rule_00000072: + Rule_00000078: crudFlags: R grouping: Grouping_name-rall what: InvestigationGroup - Rule_00000073: + Rule_00000079: crudFlags: R grouping: Grouping_name-rall what: InvestigationInstrument - Rule_00000074: + Rule_00000080: crudFlags: R grouping: Grouping_name-rall what: InvestigationParameter - Rule_00000075: + Rule_00000081: crudFlags: R grouping: Grouping_name-rall what: InvestigationUser - Rule_00000076: + Rule_00000082: crudFlags: R grouping: Grouping_name-rall what: Job - Rule_00000077: + Rule_00000083: crudFlags: R grouping: Grouping_name-rall what: Keyword - Rule_00000078: + Rule_00000084: crudFlags: R grouping: Grouping_name-rall what: PublicStep - Rule_00000079: + Rule_00000085: crudFlags: R grouping: Grouping_name-rall what: Publication - Rule_00000080: + Rule_00000086: crudFlags: R grouping: Grouping_name-rall what: RelatedDatafile - Rule_00000081: + Rule_00000087: crudFlags: R grouping: Grouping_name-rall what: Rule - Rule_00000082: + Rule_00000088: crudFlags: R grouping: Grouping_name-rall what: Sample - Rule_00000083: + Rule_00000089: crudFlags: R grouping: Grouping_name-rall what: SampleParameter - Rule_00000084: + Rule_00000090: crudFlags: R grouping: Grouping_name-rall what: Shift - Rule_00000085: + Rule_00000091: crudFlags: R grouping: Grouping_name-rall what: Study - Rule_00000086: + Rule_00000092: crudFlags: R grouping: Grouping_name-rall what: StudyInvestigation - Rule_00000087: + Rule_00000093: crudFlags: R grouping: Grouping_name-rall what: UserGroup - Rule_00000088: + Rule_00000094: crudFlags: RU grouping: Grouping_name-scientific=5Fstaff what: Sample - Rule_00000089: + Rule_00000095: crudFlags: UD grouping: Grouping_name-scientific=5Fstaff what: SampleType - Rule_00000090: + Rule_00000096: crudFlags: CRUD grouping: Grouping_name-useroffice what: FacilityCycle - Rule_00000091: + Rule_00000097: crudFlags: CRUD grouping: Grouping_name-useroffice what: Grouping - Rule_00000092: + Rule_00000098: crudFlags: CRUD grouping: Grouping_name-useroffice what: InstrumentScientist - Rule_00000093: + Rule_00000099: crudFlags: CRUD grouping: Grouping_name-useroffice what: Investigation - Rule_00000094: + Rule_00000100: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationGroup - Rule_00000095: + Rule_00000101: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationInstrument - Rule_00000096: + Rule_00000102: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationParameter - Rule_00000097: + Rule_00000103: crudFlags: CRUD grouping: Grouping_name-useroffice what: InvestigationUser - Rule_00000098: + Rule_00000104: crudFlags: CRUD grouping: Grouping_name-useroffice what: Keyword - Rule_00000099: + Rule_00000105: crudFlags: CRUD grouping: Grouping_name-useroffice what: Publication - Rule_00000100: + Rule_00000106: crudFlags: CRUD grouping: Grouping_name-useroffice what: Shift - Rule_00000101: + Rule_00000107: crudFlags: CRUD grouping: Grouping_name-useroffice what: Study - Rule_00000102: + Rule_00000108: crudFlags: CRUD grouping: Grouping_name-useroffice what: StudyInvestigation - Rule_00000103: + Rule_00000109: crudFlags: CRUD grouping: Grouping_name-useroffice what: User - Rule_00000104: + Rule_00000110: crudFlags: CRUD grouping: Grouping_name-useroffice what: UserGroup @@ -599,6 +630,9 @@ user: fullName: "Rudolph Beck-D\xFClmen" name: db/rbeck orcidId: 0000-0002-3267 + User_name-simple=2Fdataingest: + fullName: Data Ingester + name: simple/dataingest User_name-simple=2Fidsreader: fullName: IDS reader name: simple/idsreader @@ -621,11 +655,17 @@ datafileFormat: name: CSV type: text/csv version: N/A + DatafileFormat_facility-(name-ESNF)_name-HDF5_version-N=2FA: + description: Hierarchical Data Format version 5 + facility: Facility_name-ESNF + name: HDF5 + type: application/x-hdf5 + version: N/A DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA: description: A common data format for neutron, x-ray and muon science facility: Facility_name-ESNF name: NeXus - type: application/x-hdf + type: application/x-hdf5 version: N/A DatafileFormat_facility-(name-ESNF)_name-Text_version-N=2FA: description: Plain text file @@ -987,7 +1027,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-raw investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP: - doi: 00.0815/inv-00122 + doi: DOI:00.0815/inv-00122 facility: Facility_name-ESNF investigationGroups: - grouping: Grouping_name-investigation=5F08100122=2DEF=5Fowner @@ -1107,7 +1147,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-raw investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN: - doi: 00.0815/inv-00601 + doi: DOI:00.0815/inv-00601 endDate: '2010-10-12T15:00:00+00:00' facility: Facility_name-ESNF investigationGroups: @@ -1132,7 +1172,7 @@ investigation: - stringValue: neutron type: ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA publications: - - doi: 0.1002/adma.201101001 + - doi: DOI:00.1002/adma.201101001 fullReference: A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 shifts: - comment: Beamtime at E2 @@ -1239,7 +1279,7 @@ dataset: type: DatasetType_facility-(name-ESNF)_name-analyzed investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP: - doi: 00.0815/inv-00409 + doi: DOI:00.0815/inv-00409 endDate: '2012-08-06T01:10:08+00:00' facility: Facility_name-ESNF investigationGroups: @@ -1282,6 +1322,12 @@ sample: --- dataCollection: DataCollection_00000001: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339)_name-e208339=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215 + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201216 + DataCollection_00000002: dataCollectionDatafiles: - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Enxs dataCollectionDatasets: @@ -1289,17 +1335,18 @@ dataCollection: parameters: - stringValue: Make a synthesis of 10100601-ST and 12100409-ST type: ParameterType_facility-(name-ESNF)_name-Comment_units-N=2FA - DataCollection_00000002: + DataCollection_00000003: dataCollectionDatafiles: - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2D2=2Enxs dataCollectionDatasets: - dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947 - doi: 00.0815/dat-004711 + doi: DOI:00.0815/dat-004711 +--- job: Job_00000001: application: Application_facility-(name-ESNF)_name-gnomoanalytics_version-69 - inputDataCollection: DataCollection_00000001 - outputDataCollection: DataCollection_00000002 + inputDataCollection: DataCollection_00000002 + outputDataCollection: DataCollection_00000003 relatedDatafile: ? RelatedDatafile_sourceDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Enxs)_destDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs) : destDatafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs diff --git a/doc/examples/icatdump-5.0.xml b/doc/examples/icatdump-5.0.xml new file mode 100644 index 00000000..dd7d07ca --- /dev/null +++ b/doc/examples/icatdump-5.0.xml @@ -0,0 +1,2105 @@ + + + + 2022-11-23T15:30:14+00:00 + https://icat.example.com:8181/ICATService/ICAT?wsdl + 5.0.0 + icatdump (python-icat 0.21.1.dev138) + + + + University of Ravenna, Institute of Modern History + acord@example.org + Cordus + Aelius Cordus + Aelius + db/acord + 0000-0002-3262 + + + Goethe University Frankfurt, Faculty of Philosophy and History + ahau@example.org + Hau + Arnold Hau + Arnold + db/ahau + 0000-0002-3263 + + + Université Paul-Valéry Montpellier 3 + jbotu@example.org + Botul + Jean-Baptiste Botul + Jean-Baptiste + db/jbotu + 0000-0002-3264 + + + jdoe@example.org + Doe + John Doe + John + db/jdoe + + + University of Nancago + nbour@example.org + Bourbaki + Nicolas Bourbaki + Nicolas + db/nbour + 0000-0002-3266 + + + Kaiser-Wilhelms-Akademie für das militärärztliche Bildungswesen + rbeck@example.org + Beck-Dülmen + Rudolph Beck-Dülmen + Rudolph + db/rbeck + 0000-0002-3267 + + + Data Ingester + simple/dataingest + + + IDS reader + simple/idsreader + + + Pub reader + simple/pubreader + + + Root + simple/root + + + User Office + simple/useroffice + + + ingest + + + + + + investigation_08100122-EF_owner + + + + + + investigation_08100122-EF_reader + + + + + + investigation_08100122-EF_writer + + + + + + + + + + + + investigation_10100601-ST_owner + + + + + + investigation_10100601-ST_reader + + + + + + + + + + + + investigation_10100601-ST_writer + + + + + + investigation_12100409-ST_owner + + + + + + investigation_12100409-ST_reader + + + + + + investigation_12100409-ST_writer + + + + + + publisher + + + + + + pubreader + + + + + + rall + + + + + + scientific_staff + + + + + + useroffice + + + + + + R + Application + + + R + DataPublicationType + + + R + DatafileFormat + + + R + DatasetType + + + R + Facility + + + R + FacilityCycle + + + R + Grouping <-> UserGroup <-> User [name=:user] + + + R + Instrument + + + R + InvestigationType + + + R + ParameterType + + + R + PermissibleStringValue + + + CRUD + SELECT o FROM DataCollection o WHERE o.createId = :user + + + CRUD + SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE s1.createId = :user + + + CRUD + SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE s1.createId = :user + + + CRUD + SELECT o FROM DataCollectionInvestigation o JOIN o.dataCollection AS s1 WHERE s1.createId = :user + + + CRUD + SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE s1.createId = :user + + + R + SELECT o FROM DataPublication o WHERE o.publicationDate < CURRENT_TIMESTAMP + + + R + SELECT o FROM Datafile o JOIN o.dataCollectionDatafiles AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.dataCollectionDatasets AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + + + CUD + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role = 'writer' + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user + + + CUD + SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND s4.role = 'writer' + + + CUD + SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user + + + R + SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE s7.name = :user + + + R + SELECT o FROM Dataset o JOIN o.dataCollectionDatasets AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + + + R + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + + + CUD + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user AND s1.role = 'writer' + + + R + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE o.complete = False AND s4.name = :user + + + R + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' + + + R + SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + + + CUD + SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + + + CUD + SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + + + CUD + SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' + + + R + SELECT o FROM Investigation o JOIN o.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + + + R + SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user + + + R + SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE s3.name = :user + + + R + SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP + + + R + SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + + + CUD + SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CRUD + SELECT o FROM Job o WHERE o.createId = :user + + + R + SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CRUD + SELECT o FROM RelatedDatafile o WHERE o.createId = :user + + + R + SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CUD + SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + + + CUD + SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation AS s2 JOIN s2.investigationGroups AS s3 JOIN s3.grouping AS s4 JOIN s4.userGroups AS s5 JOIN s5.user AS s6 WHERE s6.name = :user + + + CUD + SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation AS s2 JOIN s2.investigationGroups AS s3 JOIN s3.grouping AS s4 JOIN s4.userGroups AS s5 JOIN s5.user AS s6 WHERE s6.name = :user AND s3.role = 'writer' + + + CUD + SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation AS s2 JOIN s2.investigationInstruments AS s3 JOIN s3.instrument AS s4 JOIN s4.instrumentScientists AS s5 JOIN s5.user AS s6 WHERE s6.name = :user + + + R + SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation AS s2 JOIN s2.investigationInstruments AS s3 JOIN s3.instrument AS s4 JOIN s4.instrumentScientists AS s5 JOIN s5.user AS s6 WHERE s6.name = :user + + + R + SELECT o FROM Shift o JOIN o.investigation AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + R + SELECT o FROM Shift o JOIN o.investigation AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + + + CRUD + SELECT o FROM UserGroup o JOIN o.grouping AS g JOIN g.investigationGroups AS s1 JOIN s1.investigation AS s2 JOIN s2.investigationGroups AS s3 JOIN s3.grouping AS s4 JOIN s4.userGroups AS s5 JOIN s5.user AS s6 WHERE s6.name = :user AND s3.role = 'owner' AND s1.role in ('reader', 'writer') + + + CR + SampleType + + + R + Study <-> User [name=:user] + + + R + Technique + + + R + User + + + CRU + Datafile + + + + CRU + DatafileParameter + + + + CRU + Dataset + + + + CRU + DatasetInstrument + + + + CRU + DatasetParameter + + + + CRU + DatasetTechnique + + + + R + Investigation + + + + R + Shift + + + + CRUD + Affiliation + + + + CRUD + DataPublication + + + + CRUD + DataPublicationDate + + + + CRUD + DataPublicationFunding + + + + CRUD + DataPublicationUser + + + + CRUD + FundingReference + + + + CRUD + RelatedItem + + + + R + SELECT o FROM DataPublication o + + + + R + SELECT o FROM Datafile o JOIN o.dataCollectionDatafiles AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.dataCollectionDatasets AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + + + + R + SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i JOIN i.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + + + + R + SELECT o FROM Dataset o JOIN o.dataCollectionDatasets AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + + + + R + SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + + + + R + SELECT o FROM Investigation o JOIN o.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + + + + R + Affiliation + + + + R + DataCollection + + + + R + DataCollectionDatafile + + + + R + DataCollectionDataset + + + + R + DataCollectionInvestigation + + + + R + DataCollectionParameter + + + + R + DataPublication + + + + R + DataPublicationDate + + + + R + DataPublicationFunding + + + + R + DataPublicationUser + + + + R + Datafile + + + + R + DatafileParameter + + + + R + Dataset + + + + R + DatasetInstrument + + + + R + DatasetParameter + + + + R + DatasetTechnique + + + + R + FundingReference + + + + R + Grouping + + + + R + InstrumentScientist + + + + R + Investigation + + + + R + InvestigationFacilityCycle + + + + R + InvestigationFunding + + + + R + InvestigationGroup + + + + R + InvestigationInstrument + + + + R + InvestigationParameter + + + + R + InvestigationUser + + + + R + Job + + + + R + Keyword + + + + R + PublicStep + + + + R + Publication + + + + R + RelatedDatafile + + + + R + RelatedItem + + + + R + Rule + + + + R + Sample + + + + R + SampleParameter + + + + R + Shift + + + + R + Study + + + + R + StudyInvestigation + + + + R + UserGroup + + + + RU + Sample + + + + UD + SampleType + + + + CRUD + FacilityCycle + + + + CRUD + FundingReference + + + + CRUD + Grouping + + + + CRUD + InstrumentScientist + + + + CRUD + Investigation + + + + CRUD + InvestigationFunding + + + + CRUD + InvestigationGroup + + + + CRUD + InvestigationInstrument + + + + CRUD + InvestigationParameter + + + + CRUD + InvestigationUser + + + + CRUD + Keyword + + + + CRUD + Publication + + + + CRUD + Shift + + + + CRUD + Study + + + + CRUD + StudyInvestigation + + + + CRUD + User + + + + CRUD + UserGroup + + + + dataCollectionDatafiles + DataCollection + + + dataCollectionDatasets + DataCollection + + + dataCollectionInvestigations + DataCollection + + + parameters + DataCollection + + + content + DataPublication + + + dates + DataPublication + + + fundingReferences + DataPublication + + + relatedItems + DataPublication + + + users + DataPublication + + + funding + DataPublicationFunding + + + affiliations + DataPublicationUser + + + user + DataPublicationUser + + + dataset + Datafile + + + parameters + Datafile + + + datafiles + Dataset + + + datasetInstruments + Dataset + + + datasetTechniques + Dataset + + + investigation + Dataset + + + parameters + Dataset + + + sample + Dataset + + + userGroups + Grouping + + + instrumentScientists + Instrument + + + fundingReferences + Investigation + + + investigationGroups + Investigation + + + investigationInstruments + Investigation + + + investigationUsers + Investigation + + + keywords + Investigation + + + parameters + Investigation + + + publications + Investigation + + + samples + Investigation + + + shifts + Investigation + + + funding + InvestigationFunding + + + grouping + InvestigationGroup + + + inputDataCollection + Job + + + outputDataCollection + Job + + + parameters + Sample + + + studyInvestigations + Study + + + + + Angle Resolved Photoemission Spectroscopy + Angle Resolved Photoemission Spectroscopy + PaNET:PaNET01089 + + + Hard X-ray Photoelectron Spectroscopy + Hard X-ray Photoelectron Spectroscopy + PaNET:PaNET01103 + + + Neutron Diffraction + Neutron Diffraction + PaNET:PaNET01217 + + + X-ray Tomography + X-ray Tomography + PaNET:PaNET01207 + + + ESNF is an example facility + Example Synchrotron and Neutron Facility + ESNF + http://www.esnf.example.org/ + + + A 3-dimensional part of the reciprocal space can be scanned in less then five steps by combining the "off-plane Bragg-scattering" and the flat-cone layer concept while using a new computer-controlled tilting axis of the detector bank. + + E2 - Flat-Cone Diffractometer + E2 + DOI:00.0815/inst-00001 + + + + + + + The experimental station EDDI (Energy Dispersive Diffraction) is a fixed station at the 7T-MPW-EDDI beamline. The beamline provides the direct white photon beam emitted by the 7T multipole wiggler and is operated in the energy-dispersive mode of diffraction. For the experiments two diffractometers with Eularian cradle segments (GE Inspection Technologies) are at the disposal for light and heavy weight samples. For the acquisition of the diffraction patterns as well as the fluorescence signals two Germanium solid state detectors (Canberra) are available. + + EDDI - Energy Dispersive Diffraction + EDDI + DOI:00.0815/inst-00048 + + + + + + + The system is designed for hard X-ray high kinetic energy photoelectron spectroscopy (HAXPES or HIKE) experiments in the excitation energy range from 2 keV to 12 keV with an optimized recorded kinetic energy range from 150 eV to 10000 eV. The typical experiments running on the HIKE end station are investigations of bulk electronic properties - core levels and valence band, buried interfaces and x-ray standing waves. + + HIKE - High Kinetic Energy Photoelectron Spectroscopy + HIKE + DOI:00.0815/inst-00027 + + + + + + + true + true + true + true + true + false + Comment + N/A + STRING + false + + + + false + true + true + false + false + false + Last access + N/A + DATE_AND_TIME + false + + + + false + false + true + false + false + false + Magnetic field + T + Tesla + NUMERIC + false + + + + false + false + true + true + false + false + Probe + N/A + STRING + false + + + muon + + + neutron + + + photon + + + + false + false + true + false + false + false + Reactor power + MW + Megawatt + NUMERIC + false + + + + false + false + false + false + true + false + Sample reference + N/A + STRING + false + + + + false + false + true + false + false + false + Sample temperature + C + Celsius + NUMERIC + false + + + + false + false + true + false + false + false + Sample temperature + K + Kelvin + NUMERIC + false + + + + false + false + false + true + false + false + Scoundrel + N/A + STRING + false + + + brutto + + + buono + + + cattivo + + + + Curated data publication + curated + + + + Open access raw data + raw + + + + Calibration + + + + Commercial experiment + + + + Engineering + + + + Experiment + + + + Simulation + + + + C10H14 + Durol SC + + + + NiMnGa + NiMnGa + + + + NiO + Nickel(II) oxide SC + + + + data arising from the analysis of other data + analyzed + + + + data not belonging to any other category + other + + + + data collected from experiments on instruments + raw + + + + Comma separated values + CSV + text/csv + N/A + + + + Hierarchical Data Format version 5 + HDF5 + application/x-hdf5 + N/A + + + + A common data format for neutron, x-ray and muon science + NeXus + application/x-hdf5 + N/A + + + + Plain text file + Text + text/plain + N/A + + + + XML document text + XML + application/xml + N/A + + + + Unknown file format + other + N/A + + + + 2007-08-14T22:00:00+00:00 + 071 + 2007-02-14T23:00:00+00:00 + + + + 2008-02-14T23:00:00+00:00 + 072 + 2007-08-14T22:00:00+00:00 + + + + 2008-08-14T22:00:00+00:00 + 081 + 2008-02-14T23:00:00+00:00 + + + + 2009-02-14T23:00:00+00:00 + 082 + 2008-08-14T22:00:00+00:00 + + + + 2009-08-14T22:00:00+00:00 + 091 + 2009-02-14T23:00:00+00:00 + + + + 2010-02-14T23:00:00+00:00 + 092 + 2009-08-14T22:00:00+00:00 + + + + 2010-08-14T22:00:00+00:00 + 101 + 2010-02-14T23:00:00+00:00 + + + + 2011-02-14T23:00:00+00:00 + 102 + 2010-08-14T22:00:00+00:00 + + + + 2011-08-14T22:00:00+00:00 + 111 + 2011-02-14T23:00:00+00:00 + + + + 2012-02-14T23:00:00+00:00 + 112 + 2011-08-14T22:00:00+00:00 + + + + 2012-08-14T22:00:00+00:00 + 121 + 2012-02-14T23:00:00+00:00 + + + + 2013-02-14T23:00:00+00:00 + 122 + 2012-08-14T22:00:00+00:00 + + + + 2013-08-14T22:00:00+00:00 + 131 + 2013-02-14T23:00:00+00:00 + + + + 2014-02-14T23:00:00+00:00 + 132 + 2013-08-14T22:00:00+00:00 + + + + 2014-08-14T22:00:00+00:00 + 141 + 2014-02-14T23:00:00+00:00 + + + + 2015-02-14T23:00:00+00:00 + 142 + 2014-08-14T22:00:00+00:00 + + + + 2015-08-14T22:00:00+00:00 + 151 + 2015-02-14T23:00:00+00:00 + + + + 2016-02-14T23:00:00+00:00 + 152 + 2015-08-14T22:00:00+00:00 + + + + 2016-08-14T22:00:00+00:00 + 161 + 2016-02-14T23:00:00+00:00 + + + + 2017-02-14T23:00:00+00:00 + 162 + 2016-08-14T22:00:00+00:00 + + + + gnomoanalytics + 69 + + + + + + AIS3241330750 + Crossref Funder ID:10.13039/100005376 + American Mathematical Society + + + + + DOI:00.0815/inv-00122 + 1 + 368369 + 08100122-EF + 2008-03-13T10:39:42+00:00 + Durol single crystal + 1.1-P + + + + + + + owner + + + + reader + + + + writer + + + + + + + Principal Investigator + + + + Investigator + + + + Investigator + + + + Durol + + + photon + + + + Beamtime at HIKE + 2008-03-13T15:00:00+00:00 + 2008-03-13T07:00:00+00:00 + + + + + Durol SC + IGSN:ESNFHNS8AYEZ + + + + + false + 1 + 368369 + e201215 + 2008-03-13T10:39:42+00:00 + + + + + + + + + + + + false + 0 + 0 + e201216 + 2008-03-20T07:20:00+00:00 + + + + + + + + + + + + ac69460a + 2008-06-18T07:31:11+00:00 + 2008-06-18T07:31:11+00:00 + 368369 + e201215.nxs + + + + 2008-06-18T07:31:11+00:00 + + + + + + + DOI:00.0815/inv-00601 + 2010-10-12T15:00:00+00:00 + 4 + 127125 + 10100601-ST + 2010-09-30T10:27:24+00:00 + Ni-Mn-Ga flat cone + 1.1-N + + + + + + + owner + + + + reader + + + + writer + + + + + + + Principal Investigator + + + + Gallium + + + Manganese + + + NiMnGa + + + Nickel + + + neutron + + + + DOI:00.1002/adma.201101001 + A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 + + + Beamtime at E2 + 2010-10-06T06:00:00+00:00 + 2010-09-29T06:00:00+00:00 + + + + Beamtime at E2 + 2010-10-13T06:00:00+00:00 + 2010-10-09T06:00:00+00:00 + + + + + NiMnGa 991027 + IGSN:ESNFZDVHICBD + + + + 2046c9a7-ab07-4594-84a2-101617073a79 + + + + + false + 2010-10-01T06:17:48+00:00 + 2 + 73874 + e208339 + 2010-09-30T10:27:24+00:00 + + + + + + + + + + + 7.3 + + + + 5.0 + + + + + false + 2010-10-05T08:32:21+00:00 + 2 + 53251 + e208341 + 2010-10-02T02:00:21+00:00 + + + + + + + + + + + 2.7 + + + + 5.0 + + + + + false + 2010-10-12T15:00:00+00:00 + 0 + 0 + e208342 + 2010-10-09T05:00:00+00:00 + + + + + + + + + + + + 81c44870 + 2010-10-01T06:17:48+00:00 + 2010-10-01T06:17:48+00:00 + 446 + e208339.dat + + + + 2010-10-01T06:51:56+00:00 + + + + + 8b369ddc + 2010-10-01T06:52:22+00:00 + 2010-10-01T06:52:22+00:00 + 73428 + e208339.nxs + + + + 2012-07-12T14:45:26+00:00 + + + + + 284558f4 + 2010-10-05T08:32:21+00:00 + 2010-10-05T08:32:21+00:00 + 394 + e208341.dat + + + + 2010-10-05T09:31:45+00:00 + + + + + 7c72b4bc + 2010-10-05T09:31:53+00:00 + 2010-10-05T09:31:53+00:00 + 52857 + e208341.nxs + + + + 2012-07-16T14:12:08+00:00 + + + + + + + DOI:00.0815/inv-00409 + 2012-08-06T01:10:08+00:00 + 6 + 757836 + 12100409-ST + 2012-07-26T15:44:24+00:00 + NiO SC OF1 JUH HHL + 1.1-P + + + + + + + + + + owner + + + + reader + + + + writer + + + + + + + Principal Investigator + + + + NiO + + + Nickel + + + Nickel oxide + + + oxide + + + photon + + + + Beamtime at EDDI + 2012-08-07T04:00:00+00:00 + 2012-07-24T04:00:00+00:00 + + + + + Nickel(II) oxide SC + IGSN:ESNFX8C7B53W + + + + c1b0a101-03aa-4d02-a1a2-e2826ba7871b + + + + + false + 2012-07-30T01:10:08+00:00 + 4 + 478683 + e208945 + 2012-07-26T15:44:24+00:00 + + + + + + + + 3.92 + + + + 277.07 + + + + + false + 2012-08-06T01:10:08+00:00 + 0 + 0 + e208946 + 2012-08-02T05:30:00+00:00 + + + + + + + + + true + 2012-07-16T14:30:17+00:00 + 1 + 14965 + e208947 + 2012-07-16T11:42:05+00:00 + + + + + true + 2012-07-31T22:52:23+00:00 + 1 + 264188 + pub-00027 + 2012-07-31T20:20:37+00:00 + + + + + 7c72b4bc + 2010-10-05T09:31:53+00:00 + 2010-10-05T09:31:53+00:00 + 52857 + e208341.nxs + + + + 2014-10-02T12:32:51+00:00 + + + + + 2012-07-16T14:30:17+00:00 + 2012-07-16T14:30:17+00:00 + 28937 + e208945-2.nxs + + + + 2014-10-02T12:32:51+00:00 + + + + + bd55affa + 2012-07-30T01:10:08+00:00 + 2012-07-30T01:10:08+00:00 + 459 + e208945.dat + + + + 2014-10-02T12:32:51+00:00 + + + + + 1db15f18 + 2013-06-03T10:22:43+00:00 + 2013-06-03T10:22:43+00:00 + 396430 + e208945.nxs + + + + 2014-10-02T12:32:51+00:00 + + + + + 2012-07-16T14:30:17+00:00 + 2012-07-16T14:30:17+00:00 + 14965 + e208947.nxs + + + + 2012-07-17T07:28:18+00:00 + + + + + 2012-07-31T22:52:23+00:00 + 2012-07-31T22:52:23+00:00 + 264188 + A000027.hdf5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Make a synthesis of 10100601-ST and 12100409-ST + + + + + DOI:00.0815/dat-004711 + + + + + + + + + + + + + + + + We provide the first 65535 integers from sequence A000027 of the On-Line Encyclopedia of Integer Sequences. The data consists of an HDF5 file, having one single entry: a one dimensional integer array. + DOI:00.0815/pub-00027 + 2022-10-30T23:00:00+00:00 + integer sequence; OEIS; On-Line Encyclopedia of Integer Sequences + Data from OEIS sequence A000027 + + + + + 2012-08-01 + Created + + + 2022-04-29 + Submitted + + + + + + OEIS Foundation Inc. (2022), The positive integers, Entry A000027 in The On-Line Encyclopedia of Integer Sequences + URL:http://oeis.org/A000027 + Other + References + The positive integers + + + + Creator + nbour@example.org + Bourbaki + Bourbaki, Nicolas + Nicolas + 01 + + + + Université de Nancy + 01: Nancy + + + University of Chicago + 02: Chicago + ROR:024mw5h28 + + + + + + 2012-09-30T18:00:00+00:00 + 12-008 + DOI:00.0815/m-00333 + 2012-07-09T06:00:00+00:00 + COMPLETE + + + + + + + + + + copy + + + + + + + + + + diff --git a/doc/examples/icatdump-5.0.yaml b/doc/examples/icatdump-5.0.yaml new file mode 100644 index 00000000..50a0af42 --- /dev/null +++ b/doc/examples/icatdump-5.0.yaml @@ -0,0 +1,1808 @@ +%YAML 1.1 +# Date: Wed, 23 Nov 2022 15:30:08 +0000 +# Service: https://icat.example.com:8181/ICATService/ICAT?wsdl +# ICAT-API: 5.0.0 +# Generator: icatdump (python-icat 0.21.1.dev138) +--- +grouping: + Grouping_name-ingest: + name: ingest + userGroups: + - user: User_name-simple=2Fdataingest + Grouping_name-investigation=5F08100122=2DEF=5Fowner: + name: investigation_08100122-EF_owner + userGroups: + - user: User_name-db=2Fjbotu + Grouping_name-investigation=5F08100122=2DEF=5Freader: + name: investigation_08100122-EF_reader + userGroups: + - user: User_name-db=2Fjdoe + Grouping_name-investigation=5F08100122=2DEF=5Fwriter: + name: investigation_08100122-EF_writer + userGroups: + - user: User_name-db=2Fjbotu + - user: User_name-db=2Fnbour + - user: User_name-db=2Frbeck + Grouping_name-investigation=5F10100601=2DST=5Fowner: + name: investigation_10100601-ST_owner + userGroups: + - user: User_name-db=2Fahau + Grouping_name-investigation=5F10100601=2DST=5Freader: + name: investigation_10100601-ST_reader + userGroups: + - user: User_name-db=2Fjbotu + - user: User_name-db=2Fjdoe + - user: User_name-db=2Fnbour + Grouping_name-investigation=5F10100601=2DST=5Fwriter: + name: investigation_10100601-ST_writer + userGroups: + - user: User_name-db=2Fahau + Grouping_name-investigation=5F12100409=2DST=5Fowner: + name: investigation_12100409-ST_owner + userGroups: + - user: User_name-db=2Fnbour + Grouping_name-investigation=5F12100409=2DST=5Freader: + name: investigation_12100409-ST_reader + userGroups: + - user: User_name-db=2Frbeck + Grouping_name-investigation=5F12100409=2DST=5Fwriter: + name: investigation_12100409-ST_writer + userGroups: + - user: User_name-db=2Fnbour + Grouping_name-publisher: + name: publisher + userGroups: + - user: User_name-simple=2Fuseroffice + Grouping_name-pubreader: + name: pubreader + userGroups: + - user: User_name-simple=2Fpubreader + Grouping_name-rall: + name: rall + userGroups: + - user: User_name-simple=2Fidsreader + Grouping_name-scientific=5Fstaff: + name: scientific_staff + userGroups: + - user: User_name-db=2Facord + Grouping_name-useroffice: + name: useroffice + userGroups: + - user: User_name-simple=2Fuseroffice +publicStep: + PublicStep_origin-DataCollection_field-dataCollectionDatafiles: + field: dataCollectionDatafiles + origin: DataCollection + PublicStep_origin-DataCollection_field-dataCollectionDatasets: + field: dataCollectionDatasets + origin: DataCollection + PublicStep_origin-DataCollection_field-dataCollectionInvestigations: + field: dataCollectionInvestigations + origin: DataCollection + PublicStep_origin-DataCollection_field-parameters: + field: parameters + origin: DataCollection + PublicStep_origin-DataPublicationFunding_field-funding: + field: funding + origin: DataPublicationFunding + PublicStep_origin-DataPublicationUser_field-affiliations: + field: affiliations + origin: DataPublicationUser + PublicStep_origin-DataPublicationUser_field-user: + field: user + origin: DataPublicationUser + PublicStep_origin-DataPublication_field-content: + field: content + origin: DataPublication + PublicStep_origin-DataPublication_field-dates: + field: dates + origin: DataPublication + PublicStep_origin-DataPublication_field-fundingReferences: + field: fundingReferences + origin: DataPublication + PublicStep_origin-DataPublication_field-relatedItems: + field: relatedItems + origin: DataPublication + PublicStep_origin-DataPublication_field-users: + field: users + origin: DataPublication + PublicStep_origin-Datafile_field-dataset: + field: dataset + origin: Datafile + PublicStep_origin-Datafile_field-parameters: + field: parameters + origin: Datafile + PublicStep_origin-Dataset_field-datafiles: + field: datafiles + origin: Dataset + PublicStep_origin-Dataset_field-datasetInstruments: + field: datasetInstruments + origin: Dataset + PublicStep_origin-Dataset_field-datasetTechniques: + field: datasetTechniques + origin: Dataset + PublicStep_origin-Dataset_field-investigation: + field: investigation + origin: Dataset + PublicStep_origin-Dataset_field-parameters: + field: parameters + origin: Dataset + PublicStep_origin-Dataset_field-sample: + field: sample + origin: Dataset + PublicStep_origin-Grouping_field-userGroups: + field: userGroups + origin: Grouping + PublicStep_origin-Instrument_field-instrumentScientists: + field: instrumentScientists + origin: Instrument + PublicStep_origin-InvestigationFunding_field-funding: + field: funding + origin: InvestigationFunding + PublicStep_origin-InvestigationGroup_field-grouping: + field: grouping + origin: InvestigationGroup + PublicStep_origin-Investigation_field-fundingReferences: + field: fundingReferences + origin: Investigation + PublicStep_origin-Investigation_field-investigationGroups: + field: investigationGroups + origin: Investigation + PublicStep_origin-Investigation_field-investigationInstruments: + field: investigationInstruments + origin: Investigation + PublicStep_origin-Investigation_field-investigationUsers: + field: investigationUsers + origin: Investigation + PublicStep_origin-Investigation_field-keywords: + field: keywords + origin: Investigation + PublicStep_origin-Investigation_field-parameters: + field: parameters + origin: Investigation + PublicStep_origin-Investigation_field-publications: + field: publications + origin: Investigation + PublicStep_origin-Investigation_field-samples: + field: samples + origin: Investigation + PublicStep_origin-Investigation_field-shifts: + field: shifts + origin: Investigation + PublicStep_origin-Job_field-inputDataCollection: + field: inputDataCollection + origin: Job + PublicStep_origin-Job_field-outputDataCollection: + field: outputDataCollection + origin: Job + PublicStep_origin-Sample_field-parameters: + field: parameters + origin: Sample + PublicStep_origin-Study_field-studyInvestigations: + field: studyInvestigations + origin: Study +rule: + Rule_00000001: + crudFlags: R + what: Application + Rule_00000002: + crudFlags: R + what: DataPublicationType + Rule_00000003: + crudFlags: R + what: DatafileFormat + Rule_00000004: + crudFlags: R + what: DatasetType + Rule_00000005: + crudFlags: R + what: Facility + Rule_00000006: + crudFlags: R + what: FacilityCycle + Rule_00000007: + crudFlags: R + what: Grouping <-> UserGroup <-> User [name=:user] + Rule_00000008: + crudFlags: R + what: Instrument + Rule_00000009: + crudFlags: R + what: InvestigationType + Rule_00000010: + crudFlags: R + what: ParameterType + Rule_00000011: + crudFlags: R + what: PermissibleStringValue + Rule_00000012: + crudFlags: CRUD + what: SELECT o FROM DataCollection o WHERE o.createId = :user + Rule_00000013: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDatafile o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000014: + crudFlags: CRUD + what: SELECT o FROM DataCollectionDataset o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000015: + crudFlags: CRUD + what: SELECT o FROM DataCollectionInvestigation o JOIN o.dataCollection AS s1 + WHERE s1.createId = :user + Rule_00000016: + crudFlags: CRUD + what: SELECT o FROM DataCollectionParameter o JOIN o.dataCollection AS s1 WHERE + s1.createId = :user + Rule_00000017: + crudFlags: R + what: SELECT o FROM DataPublication o WHERE o.publicationDate < CURRENT_TIMESTAMP + Rule_00000018: + crudFlags: R + what: SELECT o FROM Datafile o JOIN o.dataCollectionDatafiles AS s1 JOIN s1.dataCollection + AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + Rule_00000019: + crudFlags: R + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.dataCollectionDatasets + AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate + < CURRENT_TIMESTAMP + Rule_00000020: + crudFlags: R + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN ds.type AS s1 WHERE i.releaseDate < CURRENT_TIMESTAMP AND s1.name = 'raw' + Rule_00000021: + crudFlags: R + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN i.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN + s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + Rule_00000022: + crudFlags: CUD + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS + s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user AND s1.role + = 'writer' + Rule_00000023: + crudFlags: R + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS + s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000024: + crudFlags: CUD + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE ds.complete = False AND s4.name = :user + Rule_00000025: + crudFlags: R + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000026: + crudFlags: R + what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset + AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping + AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user + Rule_00000027: + crudFlags: CUD + what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset + AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationGroups AS s4 JOIN s4.grouping + AS s5 JOIN s5.userGroups AS s6 JOIN s6.user AS s7 WHERE s7.name = :user AND + s4.role = 'writer' + Rule_00000028: + crudFlags: CUD + what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset + AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN + s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE + s7.name = :user + Rule_00000029: + crudFlags: R + what: SELECT o FROM DatafileParameter o JOIN o.datafile AS s1 JOIN s1.dataset + AS s2 JOIN s2.investigation AS s3 JOIN s3.investigationInstruments AS s4 JOIN + s4.instrument AS s5 JOIN s5.instrumentScientists AS s6 JOIN s6.user AS s7 WHERE + s7.name = :user + Rule_00000030: + crudFlags: R + what: SELECT o FROM Dataset o JOIN o.dataCollectionDatasets AS s1 JOIN s1.dataCollection + AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate < CURRENT_TIMESTAMP + Rule_00000031: + crudFlags: R + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.dataCollectionInvestigations + AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate + < CURRENT_TIMESTAMP + Rule_00000032: + crudFlags: CUD + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + o.complete = False AND s4.name = :user AND s1.role = 'writer' + Rule_00000033: + crudFlags: R + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user + Rule_00000034: + crudFlags: CUD + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE o.complete = False AND s4.name = :user + Rule_00000035: + crudFlags: R + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000036: + crudFlags: R + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN o.type AS t WHERE + i.releaseDate < CURRENT_TIMESTAMP AND t.name = 'raw' + Rule_00000037: + crudFlags: R + what: SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000038: + crudFlags: CUD + what: SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + Rule_00000039: + crudFlags: CUD + what: SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000040: + crudFlags: R + what: SELECT o FROM DatasetInstrument o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000041: + crudFlags: R + what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000042: + crudFlags: CUD + what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + Rule_00000043: + crudFlags: CUD + what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000044: + crudFlags: R + what: SELECT o FROM DatasetParameter o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000045: + crudFlags: R + what: SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000046: + crudFlags: CUD + what: SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationGroups AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user AND s1.role = 'writer' + Rule_00000047: + crudFlags: CUD + what: SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000048: + crudFlags: R + what: SELECT o FROM DatasetTechnique o JOIN o.dataset AS ds JOIN ds.investigation + AS i JOIN i.investigationInstruments AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists + AS s3 JOIN s3.user AS s4 WHERE s4.name = :user + Rule_00000049: + crudFlags: R + what: SELECT o FROM Grouping o JOIN o.investigationGroups AS ig JOIN ig.investigation + AS s1 JOIN s1.investigationGroups AS s2 JOIN s2.grouping AS s3 JOIN s3.userGroups + AS s4 JOIN s4.user AS s5 WHERE s5.name = :user AND s2.role = 'owner' + Rule_00000050: + crudFlags: R + what: SELECT o FROM Investigation o JOIN o.dataCollectionInvestigations AS s1 + JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.publicationDate + < CURRENT_TIMESTAMP + Rule_00000051: + crudFlags: R + what: SELECT o FROM Investigation o JOIN o.investigationGroups AS ig JOIN ig.grouping + AS s1 JOIN s1.userGroups AS s2 JOIN s2.user AS s3 WHERE s3.name = :user + Rule_00000052: + crudFlags: R + what: SELECT o FROM Investigation o JOIN o.investigationInstruments AS ii JOIN + ii.instrument AS s1 JOIN s1.instrumentScientists AS s2 JOIN s2.user AS s3 WHERE + s3.name = :user + Rule_00000053: + crudFlags: R + what: SELECT o FROM Investigation o WHERE o.releaseDate < CURRENT_TIMESTAMP + Rule_00000054: + crudFlags: R + what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user + Rule_00000055: + crudFlags: CUD + what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user AND s1.role = 'writer' + Rule_00000056: + crudFlags: CUD + what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000057: + crudFlags: R + what: SELECT o FROM InvestigationParameter o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000058: + crudFlags: CRUD + what: SELECT o FROM Job o WHERE o.createId = :user + Rule_00000059: + crudFlags: R + what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user + Rule_00000060: + crudFlags: R + what: SELECT o FROM Keyword o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000061: + crudFlags: R + what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user + Rule_00000062: + crudFlags: R + what: SELECT o FROM Publication o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000063: + crudFlags: CRUD + what: SELECT o FROM RelatedDatafile o WHERE o.createId = :user + Rule_00000064: + crudFlags: R + what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user + Rule_00000065: + crudFlags: CUD + what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user AND s1.role = 'writer' + Rule_00000066: + crudFlags: CUD + what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000067: + crudFlags: R + what: SELECT o FROM Sample o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000068: + crudFlags: R + what: SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation + AS s2 JOIN s2.investigationGroups AS s3 JOIN s3.grouping AS s4 JOIN s4.userGroups + AS s5 JOIN s5.user AS s6 WHERE s6.name = :user + Rule_00000069: + crudFlags: CUD + what: SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation + AS s2 JOIN s2.investigationGroups AS s3 JOIN s3.grouping AS s4 JOIN s4.userGroups + AS s5 JOIN s5.user AS s6 WHERE s6.name = :user AND s3.role = 'writer' + Rule_00000070: + crudFlags: CUD + what: SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation + AS s2 JOIN s2.investigationInstruments AS s3 JOIN s3.instrument AS s4 JOIN s4.instrumentScientists + AS s5 JOIN s5.user AS s6 WHERE s6.name = :user + Rule_00000071: + crudFlags: R + what: SELECT o FROM SampleParameter o JOIN o.sample AS s1 JOIN s1.investigation + AS s2 JOIN s2.investigationInstruments AS s3 JOIN s3.instrument AS s4 JOIN s4.instrumentScientists + AS s5 JOIN s5.user AS s6 WHERE s6.name = :user + Rule_00000072: + crudFlags: R + what: SELECT o FROM Shift o JOIN o.investigation AS i JOIN i.investigationGroups + AS s1 JOIN s1.grouping AS s2 JOIN s2.userGroups AS s3 JOIN s3.user AS s4 WHERE + s4.name = :user + Rule_00000073: + crudFlags: R + what: SELECT o FROM Shift o JOIN o.investigation AS i JOIN i.investigationInstruments + AS s1 JOIN s1.instrument AS s2 JOIN s2.instrumentScientists AS s3 JOIN s3.user + AS s4 WHERE s4.name = :user + Rule_00000074: + crudFlags: CRUD + what: SELECT o FROM UserGroup o JOIN o.grouping AS g JOIN g.investigationGroups + AS s1 JOIN s1.investigation AS s2 JOIN s2.investigationGroups AS s3 JOIN s3.grouping + AS s4 JOIN s4.userGroups AS s5 JOIN s5.user AS s6 WHERE s6.name = :user AND + s3.role = 'owner' AND s1.role in ('reader', 'writer') + Rule_00000075: + crudFlags: CR + what: SampleType + Rule_00000076: + crudFlags: R + what: Study <-> User [name=:user] + Rule_00000077: + crudFlags: R + what: Technique + Rule_00000078: + crudFlags: R + what: User + Rule_00000079: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Datafile + Rule_00000080: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatafileParameter + Rule_00000081: + crudFlags: CRU + grouping: Grouping_name-ingest + what: Dataset + Rule_00000082: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatasetInstrument + Rule_00000083: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatasetParameter + Rule_00000084: + crudFlags: CRU + grouping: Grouping_name-ingest + what: DatasetTechnique + Rule_00000085: + crudFlags: R + grouping: Grouping_name-ingest + what: Investigation + Rule_00000086: + crudFlags: R + grouping: Grouping_name-ingest + what: Shift + Rule_00000087: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: Affiliation + Rule_00000088: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: DataPublication + Rule_00000089: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: DataPublicationDate + Rule_00000090: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: DataPublicationFunding + Rule_00000091: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: DataPublicationUser + Rule_00000092: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: FundingReference + Rule_00000093: + crudFlags: CRUD + grouping: Grouping_name-publisher + what: RelatedItem + Rule_00000094: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM DataPublication o + Rule_00000095: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM Datafile o JOIN o.dataCollectionDatafiles AS s1 JOIN s1.dataCollection + AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + Rule_00000096: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.dataCollectionDatasets + AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id + IS NOT NULL + Rule_00000097: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM Datafile o JOIN o.dataset AS ds JOIN ds.investigation AS i + JOIN i.dataCollectionInvestigations AS s1 JOIN s1.dataCollection AS s2 JOIN + s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + Rule_00000098: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM Dataset o JOIN o.dataCollectionDatasets AS s1 JOIN s1.dataCollection + AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT NULL + Rule_00000099: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM Dataset o JOIN o.investigation AS i JOIN i.dataCollectionInvestigations + AS s1 JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id + IS NOT NULL + Rule_00000100: + crudFlags: R + grouping: Grouping_name-pubreader + what: SELECT o FROM Investigation o JOIN o.dataCollectionInvestigations AS s1 + JOIN s1.dataCollection AS s2 JOIN s2.dataPublications AS s3 WHERE s3.id IS NOT + NULL + Rule_00000101: + crudFlags: R + grouping: Grouping_name-rall + what: Affiliation + Rule_00000102: + crudFlags: R + grouping: Grouping_name-rall + what: DataCollection + Rule_00000103: + crudFlags: R + grouping: Grouping_name-rall + what: DataCollectionDatafile + Rule_00000104: + crudFlags: R + grouping: Grouping_name-rall + what: DataCollectionDataset + Rule_00000105: + crudFlags: R + grouping: Grouping_name-rall + what: DataCollectionInvestigation + Rule_00000106: + crudFlags: R + grouping: Grouping_name-rall + what: DataCollectionParameter + Rule_00000107: + crudFlags: R + grouping: Grouping_name-rall + what: DataPublication + Rule_00000108: + crudFlags: R + grouping: Grouping_name-rall + what: DataPublicationDate + Rule_00000109: + crudFlags: R + grouping: Grouping_name-rall + what: DataPublicationFunding + Rule_00000110: + crudFlags: R + grouping: Grouping_name-rall + what: DataPublicationUser + Rule_00000111: + crudFlags: R + grouping: Grouping_name-rall + what: Datafile + Rule_00000112: + crudFlags: R + grouping: Grouping_name-rall + what: DatafileParameter + Rule_00000113: + crudFlags: R + grouping: Grouping_name-rall + what: Dataset + Rule_00000114: + crudFlags: R + grouping: Grouping_name-rall + what: DatasetInstrument + Rule_00000115: + crudFlags: R + grouping: Grouping_name-rall + what: DatasetParameter + Rule_00000116: + crudFlags: R + grouping: Grouping_name-rall + what: DatasetTechnique + Rule_00000117: + crudFlags: R + grouping: Grouping_name-rall + what: FundingReference + Rule_00000118: + crudFlags: R + grouping: Grouping_name-rall + what: Grouping + Rule_00000119: + crudFlags: R + grouping: Grouping_name-rall + what: InstrumentScientist + Rule_00000120: + crudFlags: R + grouping: Grouping_name-rall + what: Investigation + Rule_00000121: + crudFlags: R + grouping: Grouping_name-rall + what: InvestigationFacilityCycle + Rule_00000122: + crudFlags: R + grouping: Grouping_name-rall + what: InvestigationFunding + Rule_00000123: + crudFlags: R + grouping: Grouping_name-rall + what: InvestigationGroup + Rule_00000124: + crudFlags: R + grouping: Grouping_name-rall + what: InvestigationInstrument + Rule_00000125: + crudFlags: R + grouping: Grouping_name-rall + what: InvestigationParameter + Rule_00000126: + crudFlags: R + grouping: Grouping_name-rall + what: InvestigationUser + Rule_00000127: + crudFlags: R + grouping: Grouping_name-rall + what: Job + Rule_00000128: + crudFlags: R + grouping: Grouping_name-rall + what: Keyword + Rule_00000129: + crudFlags: R + grouping: Grouping_name-rall + what: PublicStep + Rule_00000130: + crudFlags: R + grouping: Grouping_name-rall + what: Publication + Rule_00000131: + crudFlags: R + grouping: Grouping_name-rall + what: RelatedDatafile + Rule_00000132: + crudFlags: R + grouping: Grouping_name-rall + what: RelatedItem + Rule_00000133: + crudFlags: R + grouping: Grouping_name-rall + what: Rule + Rule_00000134: + crudFlags: R + grouping: Grouping_name-rall + what: Sample + Rule_00000135: + crudFlags: R + grouping: Grouping_name-rall + what: SampleParameter + Rule_00000136: + crudFlags: R + grouping: Grouping_name-rall + what: Shift + Rule_00000137: + crudFlags: R + grouping: Grouping_name-rall + what: Study + Rule_00000138: + crudFlags: R + grouping: Grouping_name-rall + what: StudyInvestigation + Rule_00000139: + crudFlags: R + grouping: Grouping_name-rall + what: UserGroup + Rule_00000140: + crudFlags: RU + grouping: Grouping_name-scientific=5Fstaff + what: Sample + Rule_00000141: + crudFlags: UD + grouping: Grouping_name-scientific=5Fstaff + what: SampleType + Rule_00000142: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: FacilityCycle + Rule_00000143: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: FundingReference + Rule_00000144: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: Grouping + Rule_00000145: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: InstrumentScientist + Rule_00000146: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: Investigation + Rule_00000147: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: InvestigationFunding + Rule_00000148: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: InvestigationGroup + Rule_00000149: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: InvestigationInstrument + Rule_00000150: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: InvestigationParameter + Rule_00000151: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: InvestigationUser + Rule_00000152: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: Keyword + Rule_00000153: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: Publication + Rule_00000154: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: Shift + Rule_00000155: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: Study + Rule_00000156: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: StudyInvestigation + Rule_00000157: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: User + Rule_00000158: + crudFlags: CRUD + grouping: Grouping_name-useroffice + what: UserGroup +user: + User_name-db=2Facord: + affiliation: University of Ravenna, Institute of Modern History + email: acord@example.org + familyName: Cordus + fullName: Aelius Cordus + givenName: Aelius + name: db/acord + orcidId: 0000-0002-3262 + User_name-db=2Fahau: + affiliation: Goethe University Frankfurt, Faculty of Philosophy and History + email: ahau@example.org + familyName: Hau + fullName: Arnold Hau + givenName: Arnold + name: db/ahau + orcidId: 0000-0002-3263 + User_name-db=2Fjbotu: + affiliation: "Universit\xE9 Paul-Val\xE9ry Montpellier 3" + email: jbotu@example.org + familyName: Botul + fullName: Jean-Baptiste Botul + givenName: Jean-Baptiste + name: db/jbotu + orcidId: 0000-0002-3264 + User_name-db=2Fjdoe: + email: jdoe@example.org + familyName: Doe + fullName: John Doe + givenName: John + name: db/jdoe + User_name-db=2Fnbour: + affiliation: University of Nancago + email: nbour@example.org + familyName: Bourbaki + fullName: Nicolas Bourbaki + givenName: Nicolas + name: db/nbour + orcidId: 0000-0002-3266 + User_name-db=2Frbeck: + affiliation: "Kaiser-Wilhelms-Akademie f\xFCr das milit\xE4r\xE4rztliche Bildungswesen" + email: rbeck@example.org + familyName: "Beck-D\xFClmen" + fullName: "Rudolph Beck-D\xFClmen" + givenName: Rudolph + name: db/rbeck + orcidId: 0000-0002-3267 + User_name-simple=2Fdataingest: + fullName: Data Ingester + name: simple/dataingest + User_name-simple=2Fidsreader: + fullName: IDS reader + name: simple/idsreader + User_name-simple=2Fpubreader: + fullName: Pub reader + name: simple/pubreader + User_name-simple=2Froot: + fullName: Root + name: simple/root + User_name-simple=2Fuseroffice: + fullName: User Office + name: simple/useroffice +--- +application: + Application_facility-(name-ESNF)_name-gnomoanalytics_version-69: + facility: Facility_name-ESNF + name: gnomoanalytics + version: '69' +dataPublicationType: + DataPublicationType_facility-(name-ESNF)_name-curated: + description: Curated data publication + facility: Facility_name-ESNF + name: curated + DataPublicationType_facility-(name-ESNF)_name-raw: + description: Open access raw data + facility: Facility_name-ESNF + name: raw +datafileFormat: + DatafileFormat_facility-(name-ESNF)_name-CSV_version-N=2FA: + description: Comma separated values + facility: Facility_name-ESNF + name: CSV + type: text/csv + version: N/A + DatafileFormat_facility-(name-ESNF)_name-HDF5_version-N=2FA: + description: Hierarchical Data Format version 5 + facility: Facility_name-ESNF + name: HDF5 + type: application/x-hdf5 + version: N/A + DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA: + description: A common data format for neutron, x-ray and muon science + facility: Facility_name-ESNF + name: NeXus + type: application/x-hdf5 + version: N/A + DatafileFormat_facility-(name-ESNF)_name-Text_version-N=2FA: + description: Plain text file + facility: Facility_name-ESNF + name: Text + type: text/plain + version: N/A + DatafileFormat_facility-(name-ESNF)_name-XML_version-N=2FA: + description: XML document text + facility: Facility_name-ESNF + name: XML + type: application/xml + version: N/A + DatafileFormat_facility-(name-ESNF)_name-other_version-N=2FA: + description: Unknown file format + facility: Facility_name-ESNF + name: other + version: N/A +datasetType: + DatasetType_facility-(name-ESNF)_name-analyzed: + description: data arising from the analysis of other data + facility: Facility_name-ESNF + name: analyzed + DatasetType_facility-(name-ESNF)_name-other: + description: data not belonging to any other category + facility: Facility_name-ESNF + name: other + DatasetType_facility-(name-ESNF)_name-raw: + description: data collected from experiments on instruments + facility: Facility_name-ESNF + name: raw +facility: + Facility_name-ESNF: + description: ESNF is an example facility + fullName: Example Synchrotron and Neutron Facility + name: ESNF + url: http://www.esnf.example.org/ +facilityCycle: + FacilityCycle_facility-(name-ESNF)_name-071: + endDate: '2007-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '071' + startDate: '2007-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-072: + endDate: '2008-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '072' + startDate: '2007-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-081: + endDate: '2008-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: 081 + startDate: '2008-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-082: + endDate: '2009-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: 082 + startDate: '2008-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-091: + endDate: '2009-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: 091 + startDate: '2009-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-092: + endDate: '2010-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: 092 + startDate: '2009-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-101: + endDate: '2010-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '101' + startDate: '2010-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-102: + endDate: '2011-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '102' + startDate: '2010-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-111: + endDate: '2011-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '111' + startDate: '2011-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-112: + endDate: '2012-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '112' + startDate: '2011-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-121: + endDate: '2012-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '121' + startDate: '2012-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-122: + endDate: '2013-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '122' + startDate: '2012-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-131: + endDate: '2013-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '131' + startDate: '2013-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-132: + endDate: '2014-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '132' + startDate: '2013-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-141: + endDate: '2014-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '141' + startDate: '2014-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-142: + endDate: '2015-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '142' + startDate: '2014-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-151: + endDate: '2015-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '151' + startDate: '2015-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-152: + endDate: '2016-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '152' + startDate: '2015-08-14T22:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-161: + endDate: '2016-08-14T22:00:00+00:00' + facility: Facility_name-ESNF + name: '161' + startDate: '2016-02-14T23:00:00+00:00' + FacilityCycle_facility-(name-ESNF)_name-162: + endDate: '2017-02-14T23:00:00+00:00' + facility: Facility_name-ESNF + name: '162' + startDate: '2016-08-14T22:00:00+00:00' +instrument: + Instrument_facility-(name-ESNF)_name-E2: + description: 'A 3-dimensional part of the reciprocal space can be scanned in less + then five steps by combining the "off-plane Bragg-scattering" and the flat-cone + layer concept while using a new computer-controlled tilting axis of the detector + bank. + + ' + facility: Facility_name-ESNF + fullName: E2 - Flat-Cone Diffractometer + instrumentScientists: + - user: User_name-db=2Facord + name: E2 + pid: DOI:00.0815/inst-00001 + Instrument_facility-(name-ESNF)_name-EDDI: + description: 'The experimental station EDDI (Energy Dispersive Diffraction) is + a fixed station at the 7T-MPW-EDDI beamline. The beamline provides the direct + white photon beam emitted by the 7T multipole wiggler and is operated in the + energy-dispersive mode of diffraction. For the experiments two diffractometers + with Eularian cradle segments (GE Inspection Technologies) are at the disposal + for light and heavy weight samples. For the acquisition of the diffraction + patterns as well as the fluorescence signals two Germanium solid state detectors + (Canberra) are available. + + ' + facility: Facility_name-ESNF + fullName: EDDI - Energy Dispersive Diffraction + instrumentScientists: + - user: User_name-db=2Facord + name: EDDI + pid: DOI:00.0815/inst-00048 + Instrument_facility-(name-ESNF)_name-HIKE: + description: 'The system is designed for hard X-ray high kinetic energy photoelectron + spectroscopy (HAXPES or HIKE) experiments in the excitation energy range from + 2 keV to 12 keV with an optimized recorded kinetic energy range from 150 eV + to 10000 eV. The typical experiments running on the HIKE end station are investigations + of bulk electronic properties - core levels and valence band, buried interfaces + and x-ray standing waves. + + ' + facility: Facility_name-ESNF + fullName: HIKE - High Kinetic Energy Photoelectron Spectroscopy + instrumentScientists: + - user: User_name-db=2Facord + name: HIKE + pid: DOI:00.0815/inst-00027 +investigationType: + InvestigationType_name-Calibration_facility-(name-ESNF): + facility: Facility_name-ESNF + name: Calibration + InvestigationType_name-Commercial=20experiment_facility-(name-ESNF): + facility: Facility_name-ESNF + name: Commercial experiment + InvestigationType_name-Engineering_facility-(name-ESNF): + facility: Facility_name-ESNF + name: Engineering + InvestigationType_name-Experiment_facility-(name-ESNF): + facility: Facility_name-ESNF + name: Experiment + InvestigationType_name-Simulation_facility-(name-ESNF): + facility: Facility_name-ESNF + name: Simulation +parameterType: + ParameterType_facility-(name-ESNF)_name-Comment_units-N=2FA: + applicableToDataCollection: true + applicableToDatafile: true + applicableToDataset: true + applicableToInvestigation: true + applicableToSample: true + enforced: false + facility: Facility_name-ESNF + name: Comment + units: N/A + valueType: STRING + verified: false + ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA: + applicableToDataCollection: false + applicableToDatafile: true + applicableToDataset: true + applicableToInvestigation: false + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Last access + units: N/A + valueType: DATE_AND_TIME + verified: false + ParameterType_facility-(name-ESNF)_name-Magnetic=20field_units-T: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: true + applicableToInvestigation: false + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Magnetic field + units: T + unitsFullName: Tesla + valueType: NUMERIC + verified: false + ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: true + applicableToInvestigation: true + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Probe + permissibleStringValues: + - value: muon + - value: neutron + - value: photon + units: N/A + valueType: STRING + verified: false + ParameterType_facility-(name-ESNF)_name-Reactor=20power_units-MW: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: true + applicableToInvestigation: false + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Reactor power + units: MW + unitsFullName: Megawatt + valueType: NUMERIC + verified: false + ParameterType_facility-(name-ESNF)_name-Sample=20reference_units-N=2FA: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: false + applicableToInvestigation: false + applicableToSample: true + enforced: false + facility: Facility_name-ESNF + name: Sample reference + units: N/A + valueType: STRING + verified: false + ParameterType_facility-(name-ESNF)_name-Sample=20temperature_units-C: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: true + applicableToInvestigation: false + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Sample temperature + units: C + unitsFullName: Celsius + valueType: NUMERIC + verified: false + ParameterType_facility-(name-ESNF)_name-Sample=20temperature_units-K: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: true + applicableToInvestigation: false + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Sample temperature + units: K + unitsFullName: Kelvin + valueType: NUMERIC + verified: false + ParameterType_facility-(name-ESNF)_name-Scoundrel_units-N=2FA: + applicableToDataCollection: false + applicableToDatafile: false + applicableToDataset: false + applicableToInvestigation: true + applicableToSample: false + enforced: false + facility: Facility_name-ESNF + name: Scoundrel + permissibleStringValues: + - value: brutto + - value: buono + - value: cattivo + units: N/A + valueType: STRING + verified: false +sampleType: + SampleType_facility-(name-ESNF)_name-Durol=20SC_molecularFormula-C10H14: + facility: Facility_name-ESNF + molecularFormula: C10H14 + name: Durol SC + SampleType_facility-(name-ESNF)_name-NiMnGa_molecularFormula-NiMnGa: + facility: Facility_name-ESNF + molecularFormula: NiMnGa + name: NiMnGa + SampleType_facility-(name-ESNF)_name-Nickel=28II=29=20oxide=20SC_molecularFormula-NiO: + facility: Facility_name-ESNF + molecularFormula: NiO + name: Nickel(II) oxide SC +technique: + Technique_name-Angle=20Resolved=20Photoemission=20Spectroscopy: + description: Angle Resolved Photoemission Spectroscopy + name: Angle Resolved Photoemission Spectroscopy + pid: PaNET:PaNET01089 + Technique_name-Hard=20X=2Dray=20Photoelectron=20Spectroscopy: + description: Hard X-ray Photoelectron Spectroscopy + name: Hard X-ray Photoelectron Spectroscopy + pid: PaNET:PaNET01103 + Technique_name-Neutron=20Diffraction: + description: Neutron Diffraction + name: Neutron Diffraction + pid: PaNET:PaNET01217 + Technique_name-X=2Dray=20Tomography: + description: X-ray Tomography + name: X-ray Tomography + pid: PaNET:PaNET01207 +--- +fundingReference: + FundingReference_funderName-American=20Mathematical=20Society_awardNumber-AIS3241330750: + awardNumber: AIS3241330750 + funderIdentifier: Crossref Funder ID:10.13039/100005376 + funderName: American Mathematical Society +--- +datafile: + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215)_name-e201215=2Enxs + : checksum: ac69460a + datafileCreateTime: '2008-06-18T07:31:11+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2008-06-18T07:31:11+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215 + fileSize: 368369 + name: e201215.nxs + parameters: + - dateTimeValue: '2008-06-18T07:31:11+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA +dataset: + Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-HIKE + datasetTechniques: + - technique: Technique_name-Hard=20X=2Dray=20Photoelectron=20Spectroscopy + fileCount: 1 + fileSize: 368369 + investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP + name: e201215 + sample: Sample_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-Durol=20SC + startDate: '2008-03-13T10:39:42+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw + Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201216: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-HIKE + datasetTechniques: + - technique: Technique_name-Hard=20X=2Dray=20Photoelectron=20Spectroscopy + fileCount: 0 + fileSize: 0 + investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP + name: e201216 + sample: Sample_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-Durol=20SC + startDate: '2008-03-20T07:20:00+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw +investigation: + Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP: + doi: DOI:00.0815/inv-00122 + facility: Facility_name-ESNF + fileCount: 1 + fileSize: 368369 + investigationFacilityCycles: + - facilityCycle: FacilityCycle_facility-(name-ESNF)_name-081 + investigationGroups: + - grouping: Grouping_name-investigation=5F08100122=2DEF=5Fowner + role: owner + - grouping: Grouping_name-investigation=5F08100122=2DEF=5Freader + role: reader + - grouping: Grouping_name-investigation=5F08100122=2DEF=5Fwriter + role: writer + investigationInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-HIKE + investigationUsers: + - role: Principal Investigator + user: User_name-db=2Fjbotu + - role: Investigator + user: User_name-db=2Fnbour + - role: Investigator + user: User_name-db=2Frbeck + keywords: + - name: Durol + name: 08100122-EF + parameters: + - stringValue: photon + type: ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA + shifts: + - comment: Beamtime at HIKE + endDate: '2008-03-13T15:00:00+00:00' + instrument: Instrument_facility-(name-ESNF)_name-HIKE + startDate: '2008-03-13T07:00:00+00:00' + startDate: '2008-03-13T10:39:42+00:00' + title: Durol single crystal + type: InvestigationType_name-Experiment_facility-(name-ESNF) + visitId: 1.1-P +sample: + Sample_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-Durol=20SC: + investigation: Investigation_facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP + name: Durol SC + pid: IGSN:ESNFHNS8AYEZ + type: SampleType_facility-(name-ESNF)_name-Durol=20SC_molecularFormula-C10H14 +--- +datafile: + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339)_name-e208339=2Edat + : checksum: 81c44870 + datafileCreateTime: '2010-10-01T06:17:48+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-other_version-N=2FA + datafileModTime: '2010-10-01T06:17:48+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339 + fileSize: 446 + name: e208339.dat + parameters: + - dateTimeValue: '2010-10-01T06:51:56+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339)_name-e208339=2Enxs + : checksum: 8b369ddc + datafileCreateTime: '2010-10-01T06:52:22+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2010-10-01T06:52:22+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339 + fileSize: 73428 + name: e208339.nxs + parameters: + - dateTimeValue: '2012-07-12T14:45:26+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Edat + : checksum: 284558f4 + datafileCreateTime: '2010-10-05T08:32:21+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-other_version-N=2FA + datafileModTime: '2010-10-05T08:32:21+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341 + fileSize: 394 + name: e208341.dat + parameters: + - dateTimeValue: '2010-10-05T09:31:45+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Enxs + : checksum: 7c72b4bc + datafileCreateTime: '2010-10-05T09:31:53+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2010-10-05T09:31:53+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341 + fileSize: 52857 + name: e208341.nxs + parameters: + - dateTimeValue: '2012-07-16T14:12:08+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA +dataset: + Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-E2 + datasetTechniques: + - technique: Technique_name-Neutron=20Diffraction + endDate: '2010-10-01T06:17:48+00:00' + fileCount: 2 + fileSize: 73874 + investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN + name: e208339 + parameters: + - numericValue: '7.3' + type: ParameterType_facility-(name-ESNF)_name-Magnetic=20field_units-T + - numericValue: '5.0' + type: ParameterType_facility-(name-ESNF)_name-Reactor=20power_units-MW + sample: Sample_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-NiMnGa=20991027 + startDate: '2010-09-30T10:27:24+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw + Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-E2 + datasetTechniques: + - technique: Technique_name-Neutron=20Diffraction + endDate: '2010-10-05T08:32:21+00:00' + fileCount: 2 + fileSize: 53251 + investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN + name: e208341 + parameters: + - numericValue: '2.7' + type: ParameterType_facility-(name-ESNF)_name-Magnetic=20field_units-T + - numericValue: '5.0' + type: ParameterType_facility-(name-ESNF)_name-Reactor=20power_units-MW + sample: Sample_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-NiMnGa=20991027 + startDate: '2010-10-02T02:00:21+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw + Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208342: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-E2 + datasetTechniques: + - technique: Technique_name-Neutron=20Diffraction + endDate: '2010-10-12T15:00:00+00:00' + fileCount: 0 + fileSize: 0 + investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN + name: e208342 + sample: Sample_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-NiMnGa=20991027 + startDate: '2010-10-09T05:00:00+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw +investigation: + Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN: + doi: DOI:00.0815/inv-00601 + endDate: '2010-10-12T15:00:00+00:00' + facility: Facility_name-ESNF + fileCount: 4 + fileSize: 127125 + investigationFacilityCycles: + - facilityCycle: FacilityCycle_facility-(name-ESNF)_name-102 + investigationGroups: + - grouping: Grouping_name-investigation=5F10100601=2DST=5Fowner + role: owner + - grouping: Grouping_name-investigation=5F10100601=2DST=5Freader + role: reader + - grouping: Grouping_name-investigation=5F10100601=2DST=5Fwriter + role: writer + investigationInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-E2 + investigationUsers: + - role: Principal Investigator + user: User_name-db=2Fahau + keywords: + - name: Gallium + - name: Manganese + - name: NiMnGa + - name: Nickel + name: 10100601-ST + parameters: + - stringValue: neutron + type: ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA + publications: + - doi: DOI:00.1002/adma.201101001 + fullReference: A. Hau. Properties of NiMnGa. Adv. Mater. 2011, 1 + shifts: + - comment: Beamtime at E2 + endDate: '2010-10-06T06:00:00+00:00' + instrument: Instrument_facility-(name-ESNF)_name-E2 + startDate: '2010-09-29T06:00:00+00:00' + - comment: Beamtime at E2 + endDate: '2010-10-13T06:00:00+00:00' + instrument: Instrument_facility-(name-ESNF)_name-E2 + startDate: '2010-10-09T06:00:00+00:00' + startDate: '2010-09-30T10:27:24+00:00' + title: Ni-Mn-Ga flat cone + type: InvestigationType_name-Experiment_facility-(name-ESNF) + visitId: 1.1-N +sample: + Sample_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-NiMnGa=20991027: + investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN + name: NiMnGa 991027 + parameters: + - stringValue: 2046c9a7-ab07-4594-84a2-101617073a79 + type: ParameterType_facility-(name-ESNF)_name-Sample=20reference_units-N=2FA + pid: IGSN:ESNFZDVHICBD + type: SampleType_facility-(name-ESNF)_name-NiMnGa_molecularFormula-NiMnGa +--- +datafile: + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs + : checksum: 7c72b4bc + datafileCreateTime: '2010-10-05T09:31:53+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2010-10-05T09:31:53+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945 + fileSize: 52857 + name: e208341.nxs + parameters: + - dateTimeValue: '2014-10-02T12:32:51+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2D2=2Enxs + : datafileCreateTime: '2012-07-16T14:30:17+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2012-07-16T14:30:17+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945 + fileSize: 28937 + name: e208945-2.nxs + parameters: + - dateTimeValue: '2014-10-02T12:32:51+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Edat + : checksum: bd55affa + datafileCreateTime: '2012-07-30T01:10:08+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-other_version-N=2FA + datafileModTime: '2012-07-30T01:10:08+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945 + fileSize: 459 + name: e208945.dat + parameters: + - dateTimeValue: '2014-10-02T12:32:51+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Enxs + : checksum: 1db15f18 + datafileCreateTime: '2013-06-03T10:22:43+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2013-06-03T10:22:43+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945 + fileSize: 396430 + name: e208945.nxs + parameters: + - dateTimeValue: '2014-10-02T12:32:51+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947)_name-e208947=2Enxs + : datafileCreateTime: '2012-07-16T14:30:17+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-NeXus_version-N=2FA + datafileModTime: '2012-07-16T14:30:17+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947 + fileSize: 14965 + name: e208947.nxs + parameters: + - dateTimeValue: '2012-07-17T07:28:18+00:00' + type: ParameterType_facility-(name-ESNF)_name-Last=20access_units-N=2FA + ? Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-pub=2D00027)_name-A000027=2Ehdf5 + : datafileCreateTime: '2012-07-31T22:52:23+00:00' + datafileFormat: DatafileFormat_facility-(name-ESNF)_name-HDF5_version-N=2FA + datafileModTime: '2012-07-31T22:52:23+00:00' + dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-pub=2D00027 + fileSize: 264188 + name: A000027.hdf5 +dataset: + Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-EDDI + endDate: '2012-07-30T01:10:08+00:00' + fileCount: 4 + fileSize: 478683 + investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + name: e208945 + parameters: + - numericValue: '3.92' + type: ParameterType_facility-(name-ESNF)_name-Sample=20temperature_units-C + - numericValue: '277.07' + type: ParameterType_facility-(name-ESNF)_name-Sample=20temperature_units-K + sample: Sample_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-Nickel=28II=29=20oxide=20SC + startDate: '2012-07-26T15:44:24+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw + Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208946: + complete: false + datasetInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-EDDI + endDate: '2012-08-06T01:10:08+00:00' + fileCount: 0 + fileSize: 0 + investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + name: e208946 + sample: Sample_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-Nickel=28II=29=20oxide=20SC + startDate: '2012-08-02T05:30:00+00:00' + type: DatasetType_facility-(name-ESNF)_name-raw + Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947: + complete: true + endDate: '2012-07-16T14:30:17+00:00' + fileCount: 1 + fileSize: 14965 + investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + name: e208947 + startDate: '2012-07-16T11:42:05+00:00' + type: DatasetType_facility-(name-ESNF)_name-analyzed + Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-pub=2D00027: + complete: true + endDate: '2012-07-31T22:52:23+00:00' + fileCount: 1 + fileSize: 264188 + investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + name: pub-00027 + startDate: '2012-07-31T20:20:37+00:00' + type: DatasetType_facility-(name-ESNF)_name-other +investigation: + Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP: + doi: DOI:00.0815/inv-00409 + endDate: '2012-08-06T01:10:08+00:00' + facility: Facility_name-ESNF + fileCount: 6 + fileSize: 757836 + fundingReferences: + - funding: FundingReference_funderName-American=20Mathematical=20Society_awardNumber-AIS3241330750 + investigationFacilityCycles: + - facilityCycle: FacilityCycle_facility-(name-ESNF)_name-121 + investigationGroups: + - grouping: Grouping_name-investigation=5F12100409=2DST=5Fowner + role: owner + - grouping: Grouping_name-investigation=5F12100409=2DST=5Freader + role: reader + - grouping: Grouping_name-investigation=5F12100409=2DST=5Fwriter + role: writer + investigationInstruments: + - instrument: Instrument_facility-(name-ESNF)_name-EDDI + investigationUsers: + - role: Principal Investigator + user: User_name-db=2Fnbour + keywords: + - name: NiO + - name: Nickel + - name: Nickel oxide + - name: oxide + name: 12100409-ST + parameters: + - stringValue: photon + type: ParameterType_facility-(name-ESNF)_name-Probe_units-N=2FA + shifts: + - comment: Beamtime at EDDI + endDate: '2012-08-07T04:00:00+00:00' + instrument: Instrument_facility-(name-ESNF)_name-EDDI + startDate: '2012-07-24T04:00:00+00:00' + startDate: '2012-07-26T15:44:24+00:00' + title: NiO SC OF1 JUH HHL + type: InvestigationType_name-Experiment_facility-(name-ESNF) + visitId: 1.1-P +sample: + Sample_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-Nickel=28II=29=20oxide=20SC: + investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + name: Nickel(II) oxide SC + parameters: + - stringValue: c1b0a101-03aa-4d02-a1a2-e2826ba7871b + type: ParameterType_facility-(name-ESNF)_name-Sample=20reference_units-N=2FA + pid: IGSN:ESNFX8C7B53W + type: SampleType_facility-(name-ESNF)_name-Nickel=28II=29=20oxide=20SC_molecularFormula-NiO +--- +dataCollection: + DataCollection_00000001: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208339)_name-e208339=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201215 + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201216 + DataCollection_00000002: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-08100122=2DEF_visitId-1=2E1=2DP)_name-e201216 + dataCollectionInvestigations: + - investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + DataCollection_00000003: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341 + parameters: + - stringValue: Make a synthesis of 10100601-ST and 12100409-ST + type: ParameterType_facility-(name-ESNF)_name-Comment_units-N=2FA + DataCollection_00000004: + dataCollectionDatafiles: + - datafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208945=2D2=2Enxs + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208947 + doi: DOI:00.0815/dat-004711 + DataCollection_00000005: + dataCollectionDatasets: + - dataset: Dataset_investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-pub=2D00027 +--- +dataPublication: + DataPublication_facility-(name-ESNF)_pid-DOI=3A00=2E0815=2Fpub=2D00027: + content: DataCollection_00000005 + dates: + - date: '2012-08-01' + dateType: Created + - date: '2022-04-29' + dateType: Submitted + description: 'We provide the first 65535 integers from sequence A000027 of the + On-Line Encyclopedia of Integer Sequences. The data consists of an HDF5 file, + having one single entry: a one dimensional integer array.' + facility: Facility_name-ESNF + fundingReferences: + - funding: FundingReference_funderName-American=20Mathematical=20Society_awardNumber-AIS3241330750 + pid: DOI:00.0815/pub-00027 + publicationDate: '2022-10-30T23:00:00+00:00' + relatedItems: + - fullReference: OEIS Foundation Inc. (2022), The positive integers, Entry A000027 + in The On-Line Encyclopedia of Integer Sequences + identifier: URL:http://oeis.org/A000027 + relatedItemType: Other + relationType: References + title: The positive integers + subject: integer sequence; OEIS; On-Line Encyclopedia of Integer Sequences + title: Data from OEIS sequence A000027 + type: DataPublicationType_facility-(name-ESNF)_name-curated +dataPublicationUser: + ? DataPublicationUser_publication-(facility-(name-ESNF)_pid-DOI=3A00=2E0815=2Fpub=2D00027)_user-(name-db=2Fnbour)_contributorType-Creator + : affiliations: + - fullReference: "Universit\xE9 de Nancy" + name: '01: Nancy' + - fullReference: University of Chicago + name: '02: Chicago' + pid: ROR:024mw5h28 + contributorType: Creator + email: nbour@example.org + familyName: Bourbaki + fullName: Bourbaki, Nicolas + givenName: Nicolas + orderKey: '01' + publication: DataPublication_facility-(name-ESNF)_pid-DOI=3A00=2E0815=2Fpub=2D00027 + user: User_name-db=2Fnbour +--- +job: + Job_00000001: + application: Application_facility-(name-ESNF)_name-gnomoanalytics_version-69 + inputDataCollection: DataCollection_00000003 + outputDataCollection: DataCollection_00000004 +relatedDatafile: + ? RelatedDatafile_sourceDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Enxs)_destDatafile-(dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs) + : destDatafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP)_name-e208945)_name-e208341=2Enxs + relation: copy + sourceDatafile: Datafile_dataset-(investigation-(facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN)_name-e208341)_name-e208341=2Enxs +study: + Study_00000001: + endDate: '2012-09-30T18:00:00+00:00' + name: 12-008 + pid: DOI:00.0815/m-00333 + startDate: '2012-07-09T06:00:00+00:00' + status: COMPLETE + studyInvestigations: + - investigation: Investigation_facility-(name-ESNF)_name-10100601=2DST_visitId-1=2E1=2DN + - investigation: Investigation_facility-(name-ESNF)_name-12100409=2DST_visitId-1=2E1=2DP + user: User_name-db=2Fnbour diff --git a/doc/examples/init-icat.py b/doc/examples/init-icat.py index 433692c5..4611daa5 100755 --- a/doc/examples/init-icat.py +++ b/doc/examples/init-icat.py @@ -79,6 +79,10 @@ def getUser(client, attrs): "Facility", "FacilityCycle", "Instrument", "InvestigationType", "ParameterType", "PermissibleStringValue", "SampleType", "User", } +if "dataPublicationType" in client.typemap: + pubtables |= { "DataPublicationType" } +if "technique" in client.typemap: + pubtables |= { "Technique" } # Objects that useroffice might need to create. Basically anything # related to a particular investigation as a whole, but not to @@ -89,6 +93,8 @@ def getUser(client, attrs): "InvestigationInstrument", "InvestigationParameter", "InvestigationUser", "Keyword", "Publication", "Shift", "Study", "StudyInvestigation", "User", "UserGroup", } +if "fundingReference" in client.typemap: + uotables |= { "InvestigationFunding", "FundingReference" } # Create a root user for the sake of completeness. No need to grant # any access rights, because with ICAT 4.4 and newer, the root user @@ -119,6 +125,75 @@ def getUser(client, attrs): uogroup = client.createGroup("useroffice", [ useroffice ]) client.createRules("CRUD", uotables, uogroup) +# Setup permissions for the data ingester. They need read permission +# on Investigation and Shift and create and create permission on +# Dataset, Datafile, and the respective Parameter. +ingest = client.createUser("simple/dataingest", fullName="Data Ingester") +ingestgroup = client.createGroup("ingest", [ ingest ]) +client.createRules("R", [ "Investigation", "Shift" ], ingestgroup) +ingest_cru_classes = [ "Dataset", "Datafile", + "DatasetParameter", "DatafileParameter" ] +if "datasetInstrument" in client.typemap: + ingest_cru_classes.append("DatasetInstrument") +if "datasetTechnique" in client.typemap: + ingest_cru_classes.append("DatasetTechnique") +client.createRules("CRU", ingest_cru_classes, ingestgroup) + + +# ------------------------------------------------------------ +# Permissions for DataPublications (if available) +# ------------------------------------------------------------ + +if "dataPublication" in client.typemap: + # Create a dedicated user to generate data publication landing + # pages. Add two groups: publisher and pubreader. The former + # gets the required permissions to create a data publication, the + # latter the permissions to read all objects related to a data + # publications. + pubreader = client.createUser("simple/pubreader", fullName="Pub reader") + publisher_group = client.createGroup("publisher", [ useroffice ]) + pubreader_group = client.createGroup("pubreader", [ pubreader ]) + + # publisher: CRUD permission on Datapublications and related classes + publisher_tables = { "Affiliation", "DataPublication", + "DataPublicationDate", "DataPublicationFunding", + "DataPublicationUser", "FundingReference", + "FundingReference", "RelatedItem" } + client.createRules("CRUD", publisher_tables, publisher_group) + + # read permissions: DataPublication should be publicly readable as + # soon as they are published. But pubreader also needs access to + # not yet published ones. Access permissions to some related + # objects are covered by PublicStep below and don't need included + # here. + dpitems = [ + ("DataPublication", ""), + ("Datafile", "dataCollectionDatafiles.dataCollection.dataPublications"), + ("Datafile", + "dataset.dataCollectionDatasets.dataCollection.dataPublications"), + ("Datafile", + "dataset.investigation.dataCollectionInvestigations.dataCollection." + "dataPublications"), + ("Dataset", "dataCollectionDatasets.dataCollection.dataPublications"), + ("Dataset", + "investigation.dataCollectionInvestigations.dataCollection." + "dataPublications"), + ("Investigation", + "dataCollectionInvestigations.dataCollection.dataPublications"), + ] + all_items = [] + pr_items = [] + for name, a in dpitems: + query = Query(client, name) + if a: + query.addConditions({("%s.id" % a): "IS NOT NULL"}) + pr_items.append(query) + pd_attr = "%s.publicationDate" % a if a else "publicationDate" + query = Query(client, name, conditions={pd_attr: "< CURRENT_TIMESTAMP"}) + all_items.append(query) + client.createRules("R", all_items) + client.createRules("R", pr_items, pubreader_group) + # ------------------------------------------------------------ # Permissions for some special cases @@ -142,15 +217,25 @@ def getUser(client, attrs): # private, so users are only allowed to read, update or delete # DataCollections they created themselves. Similar thing for Job and # RelatedDatafile. -owndccond = "DataCollection [createId=:user]" -owndc = [ s % owndccond for s in - [ "%s", - "DataCollectionDatafile <-> %s", - "DataCollectionDataset <-> %s", - "DataCollectionParameter <-> %s" ] ] -client.createRules("CRUD", owndc) -client.createRules("CRUD", ["Job [createId=:user]"]) -client.createRules("CRUD", ["RelatedDatafile [createId=:user]"]) +# +# *Note*: allowing everybody to create their own DataCollections was a +# nice idea to try out and it even works. But it has some security +# implications that are quite difficult to handle. I leave it in +# here, because some other example scripts need it. But I'd rather +# not recommended to do this on a production server. +dcitems = [ + ( "DataCollection", "" ), + ( "DataCollectionDatafile", "dataCollection." ), + ( "DataCollectionDataset", "dataCollection." ), + ( "DataCollectionParameter", "dataCollection." ), + ( "Job", "" ), + ( "RelatedDatafile", "" ), +] +if "dataCollectionInvestigation" in client.typemap: + dcitems.insert(3, ( "DataCollectionInvestigation", "dataCollection." )) +items = [ Query(client, name, conditions={ (a + "createId"): "= :user" }) + for name, a in dcitems ] +client.createRules("CRUD", items) # ------------------------------------------------------------ @@ -182,6 +267,10 @@ def getUser(client, attrs): ( "DatasetParameter", "dataset.investigation.", "" ), ( "DatafileParameter", "datafile.dataset.investigation.", "" ), ] +if "datasetInstrument" in client.typemap: + invitems.append(( "DatasetInstrument", "dataset.investigation.", "" )) +if "datasetTechnique" in client.typemap: + invitems.append(( "DatasetTechnique", "dataset.investigation.", "" )) # Set write permissions items = [] @@ -294,6 +383,25 @@ def getUser(client, attrs): ("Sample", "parameters"), ("Study", "studyInvestigations"), ] +# Note: to simplify things, we take DataPublication as pars pro toto +# for all the schema extensions in ICAT 5.0 here. +if "dataPublication" in client.typemap: + pubsteps.extend([ + ( "DataCollection", "dataCollectionInvestigations" ), + ( "DataPublication", "content"), + ( "DataPublication", "dates"), + ( "DataPublication", "fundingReferences"), + ( "DataPublication", "relatedItems"), + ( "DataPublication", "users"), + ( "DataPublicationFunding", "funding"), + ( "DataPublicationUser", "affiliations"), + ( "DataPublicationUser", "user"), + ( "Dataset", "datasetInstruments"), + ( "Dataset", "datasetTechniques"), + ( "Investigation", "fundingReferences"), + ( "InvestigationFunding", "funding"), + ]) + pubsteps.sort() objs = [ client.new("publicStep", origin=origin, field=field) for (origin, field) in pubsteps ] client.createMany(objs) @@ -311,6 +419,19 @@ def getUser(client, attrs): facilities[k] = fac +# ------------------------------------------------------------ +# Create techniques (if available) +# ------------------------------------------------------------ + +if "technique" in client.typemap: + techniques = [] + for k in data['techniques'].keys(): + t = client.new("technique") + initobj(t, data['techniques'][k]) + techniques.append(t) + client.createMany(techniques) + + # ------------------------------------------------------------ # Create instruments # ------------------------------------------------------------ @@ -360,6 +481,16 @@ def getUser(client, attrs): fileformats.append(ff) client.createMany(fileformats) +# dataPublicationTypes +if "dataPublicationType" in client.typemap: + data_publication_types = [] + for k in data['data_publication_types'].keys(): + dpt = client.new("dataPublicationType") + initobj(dpt, data['data_publication_types'][k]) + dpt.facility = facilities[data['data_publication_types'][k]['facility']] + data_publication_types.append(dpt) + client.createMany(data_publication_types) + # parameterTypes param_types = [] for k in data['parameter_types'].keys(): diff --git a/doc/icatdata-5.0.xsd b/doc/icatdata-5.0.xsd new file mode 100644 index 00000000..81ef6454 --- /dev/null +++ b/doc/icatdata-5.0.xsd @@ -0,0 +1,1383 @@ + + + + + + Schema definition for an ICAT data file format. + Valid for ICAT 5.0.*. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/src/tutorial-search.rst b/doc/src/tutorial-search.rst index 38278b3c..555a02ff 100644 --- a/doc/src/tutorial-search.rst +++ b/doc/src/tutorial-search.rst @@ -197,7 +197,7 @@ following query:: id = 430 modId = "simple/root" modTime = 2021-10-05 14:09:57+00:00 - doi = "00.0815/inv-00601" + doi = "DOI:00.0815/inv-00601" endDate = 2010-10-12 15:00:00+00:00 name = "10100601-ST" startDate = 2010-09-30 10:27:24+00:00 @@ -209,7 +209,7 @@ following query:: id = 431 modId = "simple/root" modTime = 2021-10-05 14:09:58+00:00 - doi = "00.0815/inv-00409" + doi = "DOI:00.0815/inv-00409" endDate = 2012-08-06 01:10:08+00:00 name = "12100409-ST" startDate = 2012-07-26 15:44:24+00:00 diff --git a/icat/dump_queries.py b/icat/dump_queries.py index c417b934..3a31200c 100644 --- a/icat/dump_queries.py +++ b/icat/dump_queries.py @@ -13,11 +13,15 @@ 2. All static content in one chunk, e.g. all objects not related to individual investigations and that need to be present, before we can add investigations. -3. The investigation data. All content related to individual +3. FundingReferences. +4. The investigation data. All content related to individual investigations. Each investigation with all its data in one single chunk on its own. -4. One last chunk with all remaining stuff (RelatedDatafile, - DataCollection, Job). +5. DataCollections. +6. DataPublications. All content related to individual data + publications, each one in one chunk on its own respectively. +7. One last chunk with all remaining stuff (Study, RelatedDatafile, + Job). The functions defined in this module each return a list of queries needed to fetch all objects to be included in one of these chunks. @@ -26,41 +30,65 @@ import icat from icat.query import Query -__all__ = [ 'getAuthQueries', 'getStaticQueries', - 'getInvestigationQueries', 'getOtherQueries' ] +__all__ = [ 'getAuthQueries', 'getStaticQueries', 'getFundingQueries', + 'getInvestigationQueries', 'getDataCollectionQueries', + 'getDataPublicationQueries', 'getOtherQueries' ] def getAuthQueries(client): """Return the queries to fetch all objects related to authorization. """ - return [ Query(client, "User", order=True), - Query(client, "Grouping", order=True, - includes={"userGroups", "userGroups.user"}), - Query(client, "Rule", order=["grouping.name", "what", "id"], - includes={"grouping"}, - join_specs={"grouping": "LEFT JOIN"}), - Query(client, "PublicStep", order=True) ] + return [ + Query(client, "User", order=True), + Query(client, "Grouping", order=True, + includes={"userGroups", "userGroups.user"}), + Query(client, "Rule", order=["grouping.name", "what", "id"], + includes={"grouping"}, join_specs={"grouping": "LEFT JOIN"}), + Query(client, "PublicStep", order=True) + ] def getStaticQueries(client): """Return the queries to fetch all static objects. """ - return [ Query(client, "Facility", order=True), - Query(client, "Instrument", order=True, - includes={"facility", "instrumentScientists.user"}), - Query(client, "ParameterType", order=True, - includes={"facility", "permissibleStringValues"}), - Query(client, "InvestigationType", order=True, - includes={"facility"}), - Query(client, "SampleType", order=True, - includes={"facility"}), - Query(client, "DatasetType", order=True, - includes={"facility"}), - Query(client, "DatafileFormat", order=True, - includes={"facility"}), - Query(client, "FacilityCycle", order=True, - includes={"facility"}), - Query(client, "Application", order=True, - includes={"facility"}) ] + # Compatibility between ICAT versions: + # - ICAT 5.0.0 added Technique. + queries = [ + Query(client, "Facility", order=True), + Query(client, "Instrument", order=True, + includes={"facility", "instrumentScientists.user"}), + Query(client, "ParameterType", order=True, + includes={"facility", "permissibleStringValues"}), + Query(client, "InvestigationType", order=True, + includes={"facility"}), + Query(client, "SampleType", order=True, + includes={"facility"}), + Query(client, "DatasetType", order=True, + includes={"facility"}), + Query(client, "DatafileFormat", order=True, + includes={"facility"}), + Query(client, "FacilityCycle", order=True, + includes={"facility"}), + Query(client, "Application", order=True, + includes={"facility"}) + ] + if 'dataPublicationType' in client.typemap: + # ICAT >= 5.0.0 + queries.insert(3, Query(client, "DataPublicationType", order=True, + includes={"facility"}) ) + if 'technique' in client.typemap: + # ICAT >= 5.0.0 + queries.insert(0, Query(client, "Technique", order=True) ) + return queries + +def getFundingQueries(client): + """Return the queries to fetch all FundingReferences. + """ + # Compatibility between ICAT versions: + # - ICAT 5.0.0 added FundingReference. + if 'fundingReference' in client.typemap: + return [ Query(client, "FundingReference", order=True), ] + else: + return [] def getInvestigationQueries(client, invid): """Return the queries to fetch all objects related to an investigation. @@ -68,59 +96,106 @@ def getInvestigationQueries(client, invid): # Compatibility between ICAT versions: # - ICAT 4.4.0 added InvestigationGroups. # - ICAT 4.10.0 added relation between Shift and Instrument. - inv_includes = { "facility", "type.facility", "investigationInstruments", - "investigationInstruments.instrument.facility", "shifts", - "keywords", "publications", "investigationUsers", - "investigationUsers.user", "parameters", - "parameters.type.facility" } + # - ICAT 5.0.0 added InvestigationFunding and InvestigationFacilityCycle. + # - ICAT 5.0.0 added DatasetInstrument and DatasetTechnique. + inv_includes = { + "facility", "type.facility", "investigationInstruments", + "investigationInstruments.instrument.facility", "shifts", "keywords", + "publications", "investigationUsers", "investigationUsers.user", + "parameters", "parameters.type.facility" + } if 'investigationGroup' in client.typemap: # ICAT >= 4.4.0 - inv_includes |= { "investigationGroups", + inv_includes |= { "investigationGroups", "investigationGroups.grouping" } if 'instrument' in client.typemap['shift'].InstRel: # ICAT >= 4.10.0 inv_includes |= { "shifts.instrument.facility" } + if 'investigationFacilityCycle' in client.typemap: + # ICAT >= 5.0.0 + inv_includes |= { "investigationFacilityCycles.facilityCycle.facility" } + if 'investigationFunding' in client.typemap: + # ICAT >= 5.0.0 + inv_includes |= { "fundingReferences.funding" } + ds_includes = { "investigation", "type.facility", "sample", + "parameters.type.facility" } + if 'datasetInstruments' in client.typemap['dataset'].InstMRel: + # ICAT >= 5.0.0 + ds_includes |= { "datasetInstruments.instrument.facility" } + if 'datasetTechniques' in client.typemap['dataset'].InstMRel: + # ICAT >= 5.0.0 + ds_includes |= { "datasetTechniques.technique" } - return [ Query(client, "Investigation", - conditions={"id": "= %d" % invid}, - includes=inv_includes), - Query(client, "Sample", order=["name"], - conditions={"investigation.id": "= %d" % invid}, - includes={"investigation", "type.facility", - "parameters", "parameters.type.facility"}), - Query(client, "Dataset", order=["name"], - conditions={"investigation.id": "= %d" % invid}, - includes={"investigation", "type.facility", - "sample", "parameters.type.facility"}), - Query(client, "Datafile", order=["dataset.name", "name"], - conditions={"dataset.investigation.id": "= %d" % invid}, - includes={"dataset", "datafileFormat.facility", - "parameters.type.facility"}) ] + return [ + Query(client, "Investigation", + conditions={"id": "= %d" % invid}, includes=inv_includes), + Query(client, "Sample", order=["name"], + conditions={"investigation.id": "= %d" % invid}, + includes={"investigation", "type.facility", + "parameters", "parameters.type.facility"}), + Query(client, "Dataset", order=["name"], + conditions={"investigation.id": "= %d" % invid}, + includes=ds_includes), + Query(client, "Datafile", order=["dataset.name", "name"], + conditions={"dataset.investigation.id": "= %d" % invid}, + includes={"dataset", "datafileFormat.facility", + "parameters.type.facility"}) + ] -def getOtherQueries(client): - """Return the queries to fetch all other objects, - e.g. not static and not directly related to an investigation. +def getDataCollectionQueries(client): + """Return the queries to fetch all DataCollections. """ - # Compatibility ICAT 4.3.0 vs. ICAT 4.3.1 and later: name of the - # parameters relation in DataCollection. + # Compatibility between ICAT versions: + # - ICAT 4.3.0 vs. ICAT 4.3.1 and later: name of the parameters + # relation in DataCollection. + # - ICAT 5.0.0 added DatasetInstrument and DatasetTechnique. + dc_includes = { + "dataCollectionDatasets.dataset.investigation.facility", + "dataCollectionDatafiles.datafile.dataset.investigation.facility", + } if 'parameters' in client.typemap['dataCollection'].InstMRel: # ICAT >= 4.3.1 - datacolparamname = 'parameters' + dc_includes |= { "parameters.type.facility" } else: - datacolparamname = 'dataCollectionParameters' + # ICAT == 4.3.0 + dc_includes |= { "dataCollectionParameters.type.facility" } + if 'dataCollectionInvestigation' in client.typemap: + # ICAT >= 5.0.0 + dc_includes |= { "dataCollectionInvestigations.investigation.facility" } + return [ + Query(client, "DataCollection", order=True, + includes=dc_includes), + ] + +def getDataPublicationQueries(client, pubid): + """Return the queries to fetch all objects related to a data publication. + """ + # Compatibility between ICAT versions: + # - ICAT 5.0.0 added DataPublication and related classes. + # This is not tested here, we assume the caller to check this. + # Otherwise the pubid argument would make no sense. + return [ + Query(client, "DataPublication", order=True, + conditions={"id": "= %d" % pubid}, + includes={"facility", "content", "type.facility", "dates", + "fundingReferences.funding", "relatedItems"}), + Query(client, "DataPublicationUser", order=True, + conditions={"publication.id": "= %d" % pubid}, + includes={"publication", "user", "affiliations"}), + ] - return [ Query(client, "Study", order=True, - includes={"user", "studyInvestigations", - "studyInvestigations.investigation.facility"}), - Query(client, "RelatedDatafile", order=True, - includes={"sourceDatafile.dataset.investigation.facility", - "destDatafile.dataset.investigation.facility"}), - Query(client, "DataCollection", order=True, - includes={("dataCollectionDatasets.dataset." - "investigation.facility"), - ("dataCollectionDatafiles.datafile.dataset." - "investigation.facility"), - "%s.type.facility" % datacolparamname}), - Query(client, "Job", order=True, - includes={"application.facility", - "inputDataCollection", "outputDataCollection"}) ] +def getOtherQueries(client): + """Return the queries to fetch all other objects, + e.g. not static and not directly related to an investigation. + """ + return [ + Query(client, "Study", order=True, + includes={"user", "studyInvestigations", + "studyInvestigations.investigation.facility"}), + Query(client, "RelatedDatafile", order=True, + includes={"sourceDatafile.dataset.investigation.facility", + "destDatafile.dataset.investigation.facility"}), + Query(client, "Job", order=True, + includes={"application.facility", + "inputDataCollection", "outputDataCollection"}) + ] diff --git a/icat/dumpfile.py b/icat/dumpfile.py index 1d9dc7ac..42012db9 100644 --- a/icat/dumpfile.py +++ b/icat/dumpfile.py @@ -47,12 +47,34 @@ file. The related object must have its own list entry. """ +from collections import ChainMap import os import sys import icat from icat.query import Query +def _get_retain_entities(client): + """Get a list of object types to retain in the index. + + Some objects can't be queried based on their attributes. They + should thus not be discarded from the index. A particular + relevant example is DataCollection. The list of object types to + retain depends on the ICAT schema version and thus on the server + we talk to. That is why we compile that list at runtime. + + The criterion is: we need to retain all object types having any + one-to-many relationship and not having a uniqueness constraint. + """ + retain_set = set() + for cls in client.typemap.values(): + if not cls.BeanName: + continue + if cls.InstMRel and 'id' in cls.Constraint: + retain_set.add(cls.BeanName) + return frozenset(retain_set) + + # ------------------------------------------------------------ # DumpFileReader # ------------------------------------------------------------ @@ -91,6 +113,8 @@ def __init__(self, client, infile): self._closefile = True else: self.infile = infile + self._retain_entities = _get_retain_entities(client) + self.objindex = {} def _file_open(self, infile): if hasattr(infile, 'open'): @@ -143,12 +167,15 @@ def getobjs(self, objindex=None): for data in self.getdata(): self.client.autoRefresh() if resetindex: - objindex = {} + objindex = ChainMap(dict(), self.objindex) for key, obj in self.getobjs_from_data(data, objindex): yield obj obj.truncateRelations() if key: - objindex[key] = obj + if obj.BeanName in self._retain_entities: + self.objindex[key] = obj + else: + objindex[key] = obj # ------------------------------------------------------------ @@ -187,6 +214,8 @@ def __init__(self, client, outfile): else: self.outfile = outfile self.idcounter = {} + self._retain_entities = _get_retain_entities(client) + self.keyindex = {} def _file_open(self, outfile): if hasattr(outfile, 'open'): @@ -276,7 +305,10 @@ def writeobjs(self, objs, keyindex, chunksize=100): self.idcounter[t] = 0 self.idcounter[t] += 1 k = "%s_%08d" % (t, self.idcounter[t]) - keyindex[(obj.BeanName, obj.id)] = k + if obj.BeanName in self._retain_entities: + self.keyindex[(obj.BeanName, obj.id)] = k + else: + keyindex[(obj.BeanName, obj.id)] = k else: k = obj.getUniqueKey(keyindex=keyindex) self.writeobj(k, obj, keyindex) @@ -299,7 +331,7 @@ def writedata(self, objs, keyindex=None, chunksize=100): """ self.client.autoRefresh() if keyindex is None: - keyindex = {} + keyindex = ChainMap(dict(), self.keyindex) self.startdata() for o in objs: self.writeobjs(o, keyindex, chunksize=chunksize) diff --git a/icat/dumpfile_yaml.py b/icat/dumpfile_yaml.py index 3076e31f..ce5a638f 100644 --- a/icat/dumpfile_yaml.py +++ b/icat/dumpfile_yaml.py @@ -28,17 +28,21 @@ 'instrumentScientist', 'parameterType', 'permissibleStringValue', + 'dataPublicationType', 'investigationType', 'sampleType', 'datasetType', 'datafileFormat', + 'technique', 'facilityCycle', 'application', + 'fundingReference', 'investigation', 'investigationParameter', 'keyword', 'publication', 'shift', + 'investigationFunding', 'investigationGroup', 'investigationInstrument', 'investigationUser', @@ -46,15 +50,23 @@ 'sampleParameter', 'dataset', 'datasetParameter', + 'datasetInstrument', + 'datasetTechnique', 'datafile', 'datafileParameter', - 'study', - 'studyInvestigation', - 'relatedDatafile', 'dataCollection', 'dataCollectionParameter', 'dataCollectionDataset', 'dataCollectionDatafile', + 'dataPublication', + 'dataPublicationDate', + 'dataPublicationFunding', + 'dataPublicationUser', + 'affiliation', + 'relatedItem', + 'study', + 'studyInvestigation', + 'relatedDatafile', 'job', ] diff --git a/icat/entities.py b/icat/entities.py index 72f9f1dc..54918b2c 100644 --- a/icat/entities.py +++ b/icat/entities.py @@ -153,6 +153,16 @@ def addInvestigationGroup(self, group, role=None): 'SortAttrs': ('dataset',), }), ], + 'DataPublicationDate': [ + (None, { + 'SortAttrs': ('publication', 'date', 'dateType'), + }), + ], + 'DataPublicationUser': [ + (None, { + 'SortAttrs': ('publication', 'contributorType', 'orderKey', 'user'), + }), + ], 'Grouping': [ (None, { 'Mixin': GroupingMixin, diff --git a/icat/ids.py b/icat/ids.py index 8a8a92df..1d715a67 100644 --- a/icat/ids.py +++ b/icat/ids.py @@ -161,6 +161,11 @@ def extend(self, objs): for dcdf in o.dataCollectionDatafiles: if dcdf.datafile: self.dfIds.add(dcdf.datafile.id) + if 'dataCollectionInvestigations' in o.InstMRel: + # icat.server >= 5.0 + for dcinv in o.dataCollectionInvestigations: + if dcinv.investigation: + self.invIds.add(dcinv.investigation.id) else: raise ValueError("invalid object '%s'." % o.BeanName) else: diff --git a/icatdump.py b/icatdump.py index a4ce8cf4..daec986a 100755 --- a/icatdump.py +++ b/icatdump.py @@ -49,6 +49,7 @@ def getPath(f): with open_dumpfile(client, conf.file, conf.format, 'w') as dumpfile: dumpfile.writedata(getAuthQueries(client)) dumpfile.writedata(getStaticQueries(client)) + dumpfile.writedata(getFundingQueries(client)) # Dump the investigations each in their own chunk investsearch = Query(client, "Investigation", attributes="id", order=["facility.name", "name", "visitId"]) @@ -58,4 +59,10 @@ def getPath(f): # of Datasets fetched at once. Set a very small chunksize to # avoid hitting the limit. dumpfile.writedata(getInvestigationQueries(client, i), chunksize=5) + dumpfile.writedata(getDataCollectionQueries(client)) + if 'dataPublication' in client.typemap: + pubsearch = Query(client, "DataPublication", attributes="id", + order=["facility.name", "pid"]) + for i in client.searchChunked(pubsearch): + dumpfile.writedata(getDataPublicationQueries(client, i)) dumpfile.writedata(getOtherQueries(client)) diff --git a/setup.py b/setup.py index bad470e1..be3d01a6 100755 --- a/setup.py +++ b/setup.py @@ -120,7 +120,7 @@ def copy_test_data(self): destdir = os.path.join("tests", "data") self.mkpath(destdir) refdumpfiles = ["icatdump-%s.%s" % (ver, ext) - for ver in ("4.4", "4.7", "4.10") + for ver in ("4.4", "4.7", "4.10", "5.0") for ext in ("xml", "yaml")] files = ["example_data.yaml", "ingest-datafiles.xml", "ingest-ds-params.xml"] + refdumpfiles diff --git a/tests/conftest.py b/tests/conftest.py index 34fed30e..ae2b6325 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -151,11 +151,25 @@ def get_reference_dumpfile(ext = "yaml"): fname = "icatdump-4.4.%s" % ext elif icat_version < "4.10": fname = "icatdump-4.7.%s" % ext - else: + elif icat_version < "5.0": fname = "icatdump-4.10.%s" % ext + else: + fname = "icatdump-5.0.%s" % ext return gettestdata(fname) +def get_reference_summary(): + if icat_version < "5.0": + version_suffix = "4" + else: + version_suffix = "5" + users = [ "acord", "ahau", "jbotu", "jdoe", "nbour", "rbeck" ] + refsummary = { "root": gettestdata("summary-%s" % version_suffix) } + for u in users: + refsummary[u] = gettestdata("summary-%s.%s" % (version_suffix, u)) + return refsummary + + def callscript(scriptname, args, stdin=None, stdout=None, stderr=None): script = testdir / "scripts" / scriptname cmd = [sys.executable, str(script)] + args diff --git a/tests/data/summary b/tests/data/summary-4 similarity index 80% rename from tests/data/summary rename to tests/data/summary-4 index fd39df2c..7f7108f2 100644 --- a/tests/data/summary +++ b/tests/data/summary-4 @@ -3,19 +3,19 @@ User: simple/root Entity count -------------------------------- Application : 1 -DataCollection : 2 -DataCollectionDatafile : 2 -DataCollectionDataset : 2 +DataCollection : 3 +DataCollectionDatafile : 3 +DataCollectionDataset : 4 DataCollectionParameter : 1 Datafile : 10 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 10 Dataset : 8 DatasetParameter : 6 DatasetType : 3 Facility : 1 FacilityCycle : 20 -Grouping : 12 +Grouping : 13 Instrument : 3 InstrumentScientist : 3 Investigation : 3 @@ -31,13 +31,13 @@ PermissibleStringValue : 6 PublicStep : 24 Publication : 1 RelatedDatafile : 1 -Rule : 104 +Rule : 110 Sample : 3 SampleParameter : 2 SampleType : 3 Shift : 4 Study : 1 StudyInvestigation : 2 -User : 9 -UserGroup : 16 +User : 10 +UserGroup : 17 diff --git a/tests/data/summary.acord b/tests/data/summary-4.acord similarity index 95% rename from tests/data/summary.acord rename to tests/data/summary-4.acord index d9077127..c715399f 100644 --- a/tests/data/summary.acord +++ b/tests/data/summary-4.acord @@ -8,7 +8,7 @@ DataCollectionDatafile : 0 DataCollectionDataset : 0 DataCollectionParameter : 0 Datafile : 10 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 10 Dataset : 8 DatasetParameter : 6 @@ -38,6 +38,6 @@ SampleType : 3 Shift : 4 Study : 0 StudyInvestigation : 0 -User : 9 +User : 10 UserGroup : 0 diff --git a/tests/data/summary.ahau b/tests/data/summary-4.ahau similarity index 95% rename from tests/data/summary.ahau rename to tests/data/summary-4.ahau index b5d85b70..a08df226 100644 --- a/tests/data/summary.ahau +++ b/tests/data/summary-4.ahau @@ -8,7 +8,7 @@ DataCollectionDatafile : 0 DataCollectionDataset : 0 DataCollectionParameter : 0 Datafile : 4 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 4 Dataset : 3 DatasetParameter : 4 @@ -38,6 +38,6 @@ SampleType : 3 Shift : 2 Study : 0 StudyInvestigation : 0 -User : 9 +User : 10 UserGroup : 4 diff --git a/tests/data/summary.jbotu b/tests/data/summary-4.jbotu similarity index 87% rename from tests/data/summary.jbotu rename to tests/data/summary-4.jbotu index 896921e6..d4436ee5 100644 --- a/tests/data/summary.jbotu +++ b/tests/data/summary-4.jbotu @@ -3,12 +3,12 @@ User: db/jbotu Entity count -------------------------------- Application : 1 -DataCollection : 0 -DataCollectionDatafile : 0 -DataCollectionDataset : 0 +DataCollection : 1 +DataCollectionDatafile : 1 +DataCollectionDataset : 2 DataCollectionParameter : 0 Datafile : 5 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 5 Dataset : 5 DatasetParameter : 4 @@ -38,6 +38,6 @@ SampleType : 3 Shift : 3 Study : 0 StudyInvestigation : 0 -User : 9 +User : 10 UserGroup : 4 diff --git a/tests/data/summary.jdoe b/tests/data/summary-4.jdoe similarity index 95% rename from tests/data/summary.jdoe rename to tests/data/summary-4.jdoe index f971a9be..2d1e6f84 100644 --- a/tests/data/summary.jdoe +++ b/tests/data/summary-4.jdoe @@ -8,7 +8,7 @@ DataCollectionDatafile : 0 DataCollectionDataset : 0 DataCollectionParameter : 0 Datafile : 5 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 5 Dataset : 5 DatasetParameter : 4 @@ -38,6 +38,6 @@ SampleType : 3 Shift : 3 Study : 0 StudyInvestigation : 0 -User : 9 +User : 10 UserGroup : 0 diff --git a/tests/data/summary.nbour b/tests/data/summary-4.nbour similarity index 95% rename from tests/data/summary.nbour rename to tests/data/summary-4.nbour index 549bd351..671c75c3 100644 --- a/tests/data/summary.nbour +++ b/tests/data/summary-4.nbour @@ -8,7 +8,7 @@ DataCollectionDatafile : 2 DataCollectionDataset : 2 DataCollectionParameter : 1 Datafile : 10 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 10 Dataset : 8 DatasetParameter : 6 @@ -38,6 +38,6 @@ SampleType : 3 Shift : 4 Study : 1 StudyInvestigation : 0 -User : 9 +User : 10 UserGroup : 2 diff --git a/tests/data/summary.rbeck b/tests/data/summary-4.rbeck similarity index 95% rename from tests/data/summary.rbeck rename to tests/data/summary-4.rbeck index 7290dc82..3190e660 100644 --- a/tests/data/summary.rbeck +++ b/tests/data/summary-4.rbeck @@ -8,7 +8,7 @@ DataCollectionDatafile : 0 DataCollectionDataset : 0 DataCollectionParameter : 0 Datafile : 6 -DatafileFormat : 5 +DatafileFormat : 6 DatafileParameter : 6 Dataset : 5 DatasetParameter : 2 @@ -38,6 +38,6 @@ SampleType : 3 Shift : 2 Study : 0 StudyInvestigation : 0 -User : 9 +User : 10 UserGroup : 0 diff --git a/tests/data/summary-5 b/tests/data/summary-5 new file mode 100644 index 00000000..2c469095 --- /dev/null +++ b/tests/data/summary-5 @@ -0,0 +1,57 @@ +User: simple/root + +Entity count +-------------------------------- +Affiliation : 2 +Application : 1 +DataCollection : 5 +DataCollectionDatafile : 4 +DataCollectionDataset : 6 +DataCollectionInvestigation : 1 +DataCollectionParameter : 1 +DataPublication : 1 +DataPublicationDate : 2 +DataPublicationFunding : 1 +DataPublicationType : 2 +DataPublicationUser : 1 +Datafile : 11 +DatafileFormat : 6 +DatafileParameter : 10 +Dataset : 9 +DatasetInstrument : 7 +DatasetParameter : 6 +DatasetTechnique : 5 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 1 +Grouping : 15 +Instrument : 3 +InstrumentScientist : 3 +Investigation : 3 +InvestigationFacilityCycle : 3 +InvestigationFunding : 1 +InvestigationGroup : 9 +InvestigationInstrument : 3 +InvestigationParameter : 3 +InvestigationType : 5 +InvestigationUser : 5 +Job : 1 +Keyword : 9 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 37 +Publication : 1 +RelatedDatafile : 1 +RelatedItem : 1 +Rule : 158 +Sample : 3 +SampleParameter : 2 +SampleType : 3 +Shift : 4 +Study : 1 +StudyInvestigation : 2 +Technique : 4 +User : 11 +UserGroup : 19 + diff --git a/tests/data/summary-5.acord b/tests/data/summary-5.acord new file mode 100644 index 00000000..594d6876 --- /dev/null +++ b/tests/data/summary-5.acord @@ -0,0 +1,57 @@ +User: db/acord + +Entity count +-------------------------------- +Affiliation : 0 +Application : 1 +DataCollection : 0 +DataCollectionDatafile : 0 +DataCollectionDataset : 0 +DataCollectionInvestigation : 0 +DataCollectionParameter : 0 +DataPublication : 1 +DataPublicationDate : 0 +DataPublicationFunding : 0 +DataPublicationType : 2 +DataPublicationUser : 0 +Datafile : 11 +DatafileFormat : 6 +DatafileParameter : 10 +Dataset : 9 +DatasetInstrument : 7 +DatasetParameter : 6 +DatasetTechnique : 5 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 0 +Grouping : 1 +Instrument : 3 +InstrumentScientist : 0 +Investigation : 3 +InvestigationFacilityCycle : 0 +InvestigationFunding : 0 +InvestigationGroup : 0 +InvestigationInstrument : 0 +InvestigationParameter : 3 +InvestigationType : 5 +InvestigationUser : 0 +Job : 0 +Keyword : 9 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 0 +Publication : 1 +RelatedDatafile : 0 +RelatedItem : 0 +Rule : 0 +Sample : 3 +SampleParameter : 2 +SampleType : 3 +Shift : 4 +Study : 0 +StudyInvestigation : 0 +Technique : 4 +User : 11 +UserGroup : 0 + diff --git a/tests/data/summary-5.ahau b/tests/data/summary-5.ahau new file mode 100644 index 00000000..350a9510 --- /dev/null +++ b/tests/data/summary-5.ahau @@ -0,0 +1,57 @@ +User: db/ahau + +Entity count +-------------------------------- +Affiliation : 0 +Application : 1 +DataCollection : 0 +DataCollectionDatafile : 0 +DataCollectionDataset : 0 +DataCollectionInvestigation : 0 +DataCollectionParameter : 0 +DataPublication : 1 +DataPublicationDate : 0 +DataPublicationFunding : 0 +DataPublicationType : 2 +DataPublicationUser : 0 +Datafile : 5 +DatafileFormat : 6 +DatafileParameter : 4 +Dataset : 4 +DatasetInstrument : 3 +DatasetParameter : 4 +DatasetTechnique : 3 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 0 +Grouping : 3 +Instrument : 3 +InstrumentScientist : 0 +Investigation : 1 +InvestigationFacilityCycle : 0 +InvestigationFunding : 0 +InvestigationGroup : 0 +InvestigationInstrument : 0 +InvestigationParameter : 1 +InvestigationType : 5 +InvestigationUser : 0 +Job : 0 +Keyword : 4 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 0 +Publication : 1 +RelatedDatafile : 0 +RelatedItem : 0 +Rule : 0 +Sample : 1 +SampleParameter : 1 +SampleType : 3 +Shift : 2 +Study : 0 +StudyInvestigation : 0 +Technique : 4 +User : 11 +UserGroup : 4 + diff --git a/tests/data/summary-5.jbotu b/tests/data/summary-5.jbotu new file mode 100644 index 00000000..b283b18b --- /dev/null +++ b/tests/data/summary-5.jbotu @@ -0,0 +1,57 @@ +User: db/jbotu + +Entity count +-------------------------------- +Affiliation : 0 +Application : 1 +DataCollection : 1 +DataCollectionDatafile : 1 +DataCollectionDataset : 2 +DataCollectionInvestigation : 0 +DataCollectionParameter : 0 +DataPublication : 1 +DataPublicationDate : 0 +DataPublicationFunding : 0 +DataPublicationType : 2 +DataPublicationUser : 0 +Datafile : 6 +DatafileFormat : 6 +DatafileParameter : 5 +Dataset : 6 +DatasetInstrument : 5 +DatasetParameter : 4 +DatasetTechnique : 5 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 0 +Grouping : 4 +Instrument : 3 +InstrumentScientist : 0 +Investigation : 2 +InvestigationFacilityCycle : 0 +InvestigationFunding : 0 +InvestigationGroup : 0 +InvestigationInstrument : 0 +InvestigationParameter : 2 +InvestigationType : 5 +InvestigationUser : 0 +Job : 0 +Keyword : 5 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 0 +Publication : 1 +RelatedDatafile : 0 +RelatedItem : 0 +Rule : 0 +Sample : 2 +SampleParameter : 1 +SampleType : 3 +Shift : 3 +Study : 0 +StudyInvestigation : 0 +Technique : 4 +User : 11 +UserGroup : 4 + diff --git a/tests/data/summary-5.jdoe b/tests/data/summary-5.jdoe new file mode 100644 index 00000000..7eed0277 --- /dev/null +++ b/tests/data/summary-5.jdoe @@ -0,0 +1,57 @@ +User: db/jdoe + +Entity count +-------------------------------- +Affiliation : 0 +Application : 1 +DataCollection : 0 +DataCollectionDatafile : 0 +DataCollectionDataset : 0 +DataCollectionInvestigation : 0 +DataCollectionParameter : 0 +DataPublication : 1 +DataPublicationDate : 0 +DataPublicationFunding : 0 +DataPublicationType : 2 +DataPublicationUser : 0 +Datafile : 6 +DatafileFormat : 6 +DatafileParameter : 5 +Dataset : 6 +DatasetInstrument : 5 +DatasetParameter : 4 +DatasetTechnique : 5 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 0 +Grouping : 2 +Instrument : 3 +InstrumentScientist : 0 +Investigation : 2 +InvestigationFacilityCycle : 0 +InvestigationFunding : 0 +InvestigationGroup : 0 +InvestigationInstrument : 0 +InvestigationParameter : 2 +InvestigationType : 5 +InvestigationUser : 0 +Job : 0 +Keyword : 5 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 0 +Publication : 1 +RelatedDatafile : 0 +RelatedItem : 0 +Rule : 0 +Sample : 2 +SampleParameter : 1 +SampleType : 3 +Shift : 3 +Study : 0 +StudyInvestigation : 0 +Technique : 4 +User : 11 +UserGroup : 0 + diff --git a/tests/data/summary-5.nbour b/tests/data/summary-5.nbour new file mode 100644 index 00000000..7301ed8a --- /dev/null +++ b/tests/data/summary-5.nbour @@ -0,0 +1,57 @@ +User: db/nbour + +Entity count +-------------------------------- +Affiliation : 0 +Application : 1 +DataCollection : 2 +DataCollectionDatafile : 2 +DataCollectionDataset : 2 +DataCollectionInvestigation : 0 +DataCollectionParameter : 1 +DataPublication : 1 +DataPublicationDate : 0 +DataPublicationFunding : 0 +DataPublicationType : 2 +DataPublicationUser : 0 +Datafile : 11 +DatafileFormat : 6 +DatafileParameter : 10 +Dataset : 9 +DatasetInstrument : 7 +DatasetParameter : 6 +DatasetTechnique : 5 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 0 +Grouping : 5 +Instrument : 3 +InstrumentScientist : 0 +Investigation : 3 +InvestigationFacilityCycle : 0 +InvestigationFunding : 0 +InvestigationGroup : 0 +InvestigationInstrument : 0 +InvestigationParameter : 3 +InvestigationType : 5 +InvestigationUser : 0 +Job : 1 +Keyword : 9 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 0 +Publication : 1 +RelatedDatafile : 1 +RelatedItem : 0 +Rule : 0 +Sample : 3 +SampleParameter : 2 +SampleType : 3 +Shift : 4 +Study : 1 +StudyInvestigation : 0 +Technique : 4 +User : 11 +UserGroup : 2 + diff --git a/tests/data/summary-5.rbeck b/tests/data/summary-5.rbeck new file mode 100644 index 00000000..cde8c7fd --- /dev/null +++ b/tests/data/summary-5.rbeck @@ -0,0 +1,57 @@ +User: db/rbeck + +Entity count +-------------------------------- +Affiliation : 0 +Application : 1 +DataCollection : 1 +DataCollectionDatafile : 1 +DataCollectionDataset : 1 +DataCollectionInvestigation : 1 +DataCollectionParameter : 0 +DataPublication : 1 +DataPublicationDate : 0 +DataPublicationFunding : 0 +DataPublicationType : 2 +DataPublicationUser : 0 +Datafile : 7 +DatafileFormat : 6 +DatafileParameter : 6 +Dataset : 6 +DatasetInstrument : 4 +DatasetParameter : 2 +DatasetTechnique : 2 +DatasetType : 3 +Facility : 1 +FacilityCycle : 20 +FundingReference : 0 +Grouping : 2 +Instrument : 3 +InstrumentScientist : 0 +Investigation : 2 +InvestigationFacilityCycle : 0 +InvestigationFunding : 0 +InvestigationGroup : 0 +InvestigationInstrument : 0 +InvestigationParameter : 2 +InvestigationType : 5 +InvestigationUser : 0 +Job : 0 +Keyword : 5 +ParameterType : 9 +PermissibleStringValue : 6 +PublicStep : 0 +Publication : 0 +RelatedDatafile : 0 +RelatedItem : 0 +Rule : 0 +Sample : 2 +SampleParameter : 1 +SampleType : 3 +Shift : 2 +Study : 0 +StudyInvestigation : 0 +Technique : 4 +User : 11 +UserGroup : 0 + diff --git a/tests/test_05_dump.py b/tests/test_05_dump.py index 499058a9..53c3b21d 100644 --- a/tests/test_05_dump.py +++ b/tests/test_05_dump.py @@ -11,9 +11,9 @@ def depends(request, other_tests): pass import icat import icat.config -from conftest import (getConfig, icat_version, - gettestdata, get_reference_dumpfile, callscript, - filter_file, yaml_filter, xml_filter) +from conftest import (getConfig, icat_version, gettestdata, + get_reference_dumpfile, get_reference_summary, + callscript, filter_file, yaml_filter, xml_filter) backends = { @@ -29,9 +29,7 @@ def depends(request, other_tests): }, } users = [ "acord", "ahau", "jbotu", "jdoe", "nbour", "rbeck" ] -refsummary = { "root": gettestdata("summary") } -for u in users: - refsummary[u] = gettestdata("summary.%s" % u) +refsummary = get_reference_summary() # The following cases are tuples of a backend and a file type (regular # file, stdin/stdout, in-memory stream). They are used for both, @@ -60,16 +58,15 @@ def depends(request, other_tests): r"\1 : 0") else: summary_root_filter = None - summary_user_filter = (re.compile(r"^((?:DataCollection(?:Datafile|Dataset|Parameter)?|Job|RelatedDatafile)\s*) : \d+$"), + summary_user_filter = (re.compile(r"^((?:DataCollection(?:Datafile|Dataset|Investigation|Parameter)?|Job|RelatedDatafile)\s*) : \d+$"), r"\1 : 0") # Test queries and results for test_check_queries(). This is mostly # to verify that object relations are kept intact after an icatdump / # icatingest cycle. queries = [ - ("Datafile.name <-> Dataset <-> Investigation [name='12100409-ST']", - ['e208341.nxs', 'e208945-2.nxs', 'e208945.dat', 'e208945.nxs', - 'e208947.nxs']), + ("Datafile.name <-> Dataset <-> Investigation [name='10100601-ST']", + ['e208339.dat', 'e208339.nxs', 'e208341.dat', 'e208341.nxs']), ("SELECT p.numericValue FROM DatasetParameter p " "JOIN p.dataset AS ds JOIN ds.investigation AS i JOIN p.type AS t " "WHERE i.name = '10100601-ST' AND ds.name = 'e208339' " @@ -85,6 +82,10 @@ def depends(request, other_tests): "JOIN dcdf.dataCollection AS dc JOIN dc.jobsAsInput AS j " "WHERE j.id IS NOT NULL", ["e208945.nxs"]), + ("SELECT COUNT(dc) FROM DataCollection dc " + "JOIN dc.dataCollectionDatasets AS dcds JOIN dcds.dataset AS ds " + "WHERE ds.name = 'e201215'", + [1]), ] @pytest.fixture(scope="module") diff --git a/tests/test_05_dumpfile.py b/tests/test_05_dumpfile.py index 0b6ff2b0..a77f1ad9 100644 --- a/tests/test_05_dumpfile.py +++ b/tests/test_05_dumpfile.py @@ -54,9 +54,8 @@ def depends(request, other_tests): # to verify that object relations are kept intact after an icatdump / # icatingest cycle. queries = [ - ("Datafile.name <-> Dataset <-> Investigation [name='12100409-ST']", - ['e208341.nxs', 'e208945-2.nxs', 'e208945.dat', 'e208945.nxs', - 'e208947.nxs']), + ("Datafile.name <-> Dataset <-> Investigation [name='10100601-ST']", + ['e208339.dat', 'e208339.nxs', 'e208341.dat', 'e208341.nxs']), ("SELECT p.numericValue FROM DatasetParameter p " "JOIN p.dataset AS ds JOIN ds.investigation AS i JOIN p.type AS t " "WHERE i.name = '10100601-ST' AND ds.name = 'e208339' " @@ -72,6 +71,10 @@ def depends(request, other_tests): "JOIN dcdf.dataCollection AS dc JOIN dc.jobsAsInput AS j " "WHERE j.id IS NOT NULL", ["e208945.nxs"]), + ("SELECT COUNT(dc) FROM DataCollection dc " + "JOIN dc.dataCollectionDatasets AS dcds JOIN dcds.dataset AS ds " + "WHERE ds.name = 'e201215'", + [1]), ] # ======== function equivalents to icatdump and icatingest =========== @@ -85,10 +88,17 @@ def icatdump(client, f, backend): with open_dumpfile(client, f, backend, 'w') as dumpfile: dumpfile.writedata(getAuthQueries(client)) dumpfile.writedata(getStaticQueries(client)) + dumpfile.writedata(getFundingQueries(client)) investsearch = Query(client, "Investigation", attributes="id", order=["facility.name", "name", "visitId"]) for i in client.searchChunked(investsearch): dumpfile.writedata(getInvestigationQueries(client, i), chunksize=5) + dumpfile.writedata(getDataCollectionQueries(client)) + if 'dataPublication' in client.typemap: + pubsearch = Query(client, "DataPublication", attributes="id", + order=["facility.name", "pid"]) + for i in client.searchChunked(pubsearch): + dumpfile.writedata(getDataPublicationQueries(client, i)) dumpfile.writedata(getOtherQueries(client)) # ============================ fixtures ============================== diff --git a/tests/test_05_setup.py b/tests/test_05_setup.py index ef75e811..83b09e7e 100644 --- a/tests/test_05_setup.py +++ b/tests/test_05_setup.py @@ -14,9 +14,9 @@ import icat import icat.config from icat.query import Query -from conftest import (getConfig, icat_version, - gettestdata, get_reference_dumpfile, callscript, - filter_file, yaml_filter) +from conftest import (getConfig, icat_version, gettestdata, + get_reference_dumpfile, get_reference_summary, + callscript, filter_file, yaml_filter) # Study is broken in icat.server older then 4.6.0, see @@ -25,23 +25,25 @@ # then 4.7. skip_study = icat_version < "4.7.0" +have_data_publication = icat_version >= "5.0.0" + testinput = gettestdata("example_data.yaml") -refdump = get_reference_dumpfile("yaml") users = [ "acord", "ahau", "jbotu", "jdoe", "nbour", "rbeck" ] -refsummary = { "root": gettestdata("summary") } -for u in users: - refsummary[u] = gettestdata("summary.%s" % u) +refdump = get_reference_dumpfile("yaml") +refsummary = get_reference_summary() # Labels used in test dependencies. if not skip_study: alldata = ["init", "sample_durol", "sample_nimnga", "sample_nio", "inv_081", "inv_101", "inv_121", "invdata_081", "invdata_101", "invdata_121", - "job1", "rdf1", "study1", "pub1"] + "job1", "rdf1", "study1", "pub1", "data_collect1"] else: alldata = ["init", "sample_durol", "sample_nimnga", "sample_nio", "inv_081", "inv_101", "inv_121", "invdata_081", "invdata_101", "invdata_121", - "job1", "rdf1", "pub1"] + "job1", "rdf1", "pub1", "data_collect1"] +if have_data_publication: + alldata.extend(["data_pub1", "data_collect2"]) summary_study_filter = (re.compile(r"^((?:Study(?:Investigation)?)\s*) : \d+$"), r"\1 : 0") @@ -94,6 +96,39 @@ def create_datafile(client, data, df): datafile.create() return datafile +def fix_file_size(inv_name): + client, conf = getConfig() + if 'fileSize' not in client.typemap['investigation'].InstAttr: + # ICAT < 5.0: there are no fileSize and fileCount attributes + # to fix in Investigation and Dataset. Nothing to do. + return + client.login(conf.auth, conf.credentials) + inv_query = Query(client, "Investigation", conditions={ + "name":"= '%s'" % inv_name + }, includes="1") + inv = client.assertedSearch(inv_query)[0] + inv.fileCount = 0 + inv.fileSize = 0 + ds_query = Query(client, "Dataset", conditions={ + "investigation.id": "= %d" % inv.id + }, includes="1") + for ds in client.search(ds_query): + fileCount_query = Query(client, "Datafile", conditions={ + "dataset.id": "= %d" % ds.id + }, aggregate="COUNT") + ds.fileCount = int(client.assertedSearch(fileCount_query)[0]) + if not ds.fileCount: + ds.fileSize = 0 + else: + fileSize_query = Query(client, "Datafile", conditions={ + "dataset.id": "= %d" % ds.id + }, attributes="fileSize", aggregate="SUM") + ds.fileSize = int(client.assertedSearch(fileSize_query)[0]) + ds.update() + inv.fileCount += ds.fileCount + inv.fileSize += ds.fileSize + inv.update() + @pytest.mark.dependency(name="init") def test_init(standardCmdArgs): @@ -148,6 +183,7 @@ def test_addinvdata(user, invname): _, conf = getConfig(confSection=user) args = conf.cmdargs + [str(testinput), invname] callscript("add-investigation-data.py", args) + fix_file_size(invname) @pytest.mark.parametrize(("user", "jobname"), [ pytest.param("nbour", "job1", @@ -173,6 +209,7 @@ def test_add_relateddatafile(data, user, rdfname): rdf.sourceDatafile = get_datafile(client, rdfdata['source']) rdf.destDatafile = create_datafile(client, data, rdfdata['dest']) rdf.create() + fix_file_size(rdfdata['dest']['investigation']) @pytest.mark.parametrize(("user", "studyname"), [ pytest.param("useroffice", "study1", @@ -210,6 +247,141 @@ def test_add_publication(data, user, pubname): publication.investigation = client.assertedSearch(query)[0] publication.create() +@pytest.mark.parametrize("pubname", [ + pytest.param("data_pub1", + marks=pytest.mark.dependency(name="data_pub1", + depends=["inv_121"])), +]) +@pytest.mark.skipif(not have_data_publication, + reason=("need ICAT server version 5.0.0 or newer: " + "need DataPublication")) +def test_add_data_publication(data, pubname): + pubdata = data['data_publications'][pubname] + client, conf = getConfig(confSection="ingest") + client.login(conf.auth, conf.credentials) + content = client.new("dataCollection") + ds = pubdata['dataset'] + query = Query(client, "Investigation", conditions={ + "name":"= '%s'" % ds['investigation'] + }) + investigation = client.assertedSearch(query)[0] + query = Query(client, "DatasetType", conditions={ + "name":"= '%s'" % data['dataset_types'][ds['type']]['name'] + }) + dataset_type = client.assertedSearch(query)[0] + dataset = client.new("dataset") + initobj(dataset, ds) + dataset.investigation = investigation + dataset.type = dataset_type + for df in ds['datafiles']: + dff = data['datafile_formats'][df['format']] + query = Query(client, "DatafileFormat", conditions={ + "name":"= '%s'" % dff['name'], + "version":"= '%s'" % dff['version'], + }) + datafile_format = client.assertedSearch(query)[0] + datafile = client.new("datafile") + initobj(datafile, df) + datafile.datafileFormat = datafile_format + dataset.datafiles.append(datafile) + dataset.complete = False + dataset.create() + if ds['complete']: + del dataset.datafiles + dataset.complete = True + dataset.update() + dcs = client.new("dataCollectionDataset", dataset=dataset) + content.dataCollectionDatasets.append(dcs) + content.create() + content.truncateRelations() + fix_file_size(ds['investigation']) + client, conf = getConfig(confSection="useroffice") + client.login(conf.auth, conf.credentials) + data_publication = client.new("dataPublication") + initobj(data_publication, pubdata) + query = Query(client, "Facility", conditions={ + "name": "= '%s'" % data['facilities'][pubdata['facility']]['name'] + }) + data_publication.facility = client.assertedSearch(query)[0] + data_publication.content = content + if pubdata['type']: + t = data['data_publication_types'][pubdata['type']] + query = Query(client, "DataPublicationType", conditions={ + "name": "= '%s'" % t['name'] + }) + data_publication.type = client.assertedSearch(query)[0] + for d in pubdata['dates']: + data_publication.dates.append(client.new("dataPublicationDate", **d)) + for ri in pubdata['relatedItems']: + data_publication.relatedItems.append(client.new("relatedItem", **ri)) + for u in pubdata['users']: + pub_user = client.new("dataPublicationUser") + initobj(pub_user, u) + query = Query(client, "User", conditions={ + "name": "= '%s'" % data['users'][u['user']]['name'] + }) + pub_user.user = client.assertedSearch(query)[0] + for a in u['affiliations']: + pub_user.affiliations.append(client.new("affiliation", **a)) + data_publication.users.append(pub_user) + for fr in pubdata['fundingReferences']: + funding_ref = client.new('fundingReference') + initobj(funding_ref, data['fundings'][fr]) + try: + funding_ref.create() + except icat.ICATObjectExistsError: + funding_ref = client.searchMatching(funding_ref) + dp_fund = client.new('dataPublicationFunding', funding=funding_ref) + data_publication.fundingReferences.append(dp_fund) + data_publication.create() + +@pytest.mark.parametrize(("user", "objects"), [ + pytest.param( + "jbotu", + [ + 'Dataset_investigation-(name-08100122=2DEF)_name-e201215', + 'Dataset_investigation-(name-08100122=2DEF)_name-e201216', + 'Datafile_dataset-(investigation-(name-10100601=2DST)' + '_name-e208339)_name-e208339=2Enxs', + ], + marks=pytest.mark.dependency(name="data_collect1", + depends=["invdata_081", "invdata_101"]) + ), + pytest.param( + "rbeck", + [ + 'Investigation_name-12100409=2DST', + 'Datafile_dataset-(investigation-(name-12100409=2DST)' + '_name-e208945)_name-e208945=2Enxs', + 'Dataset_investigation-(name-08100122=2DEF)_name-e201216', + ], + marks=pytest.mark.dependency(name="data_collect2", + depends=["invdata_081", "invdata_121"]) + ), +]) +def test_add_datacollections(data, user, objects): + """Create some arbitrary DataCollections + """ + client, conf = getConfig(confSection=user) + client.login(conf.auth, conf.credentials) + collection = client.new("dataCollection") + for key in objects: + obj = client.searchUniqueKey(key) + if obj.BeanName == 'Investigation': + if 'dataCollectionInvestigation' not in client.typemap: + pytest.skip("need DataCollectionInvestigation") + dcinv = client.new('dataCollectionInvestigation', investigation=obj) + collection.dataCollectionInvestigations.append(dcinv) + elif obj.BeanName == 'Dataset': + dcds = client.new('dataCollectionDataset', dataset=obj) + collection.dataCollectionDatasets.append(dcds) + elif obj.BeanName == 'Datafile': + dcdf = client.new('dataCollectionDatafile', datafile=obj) + collection.dataCollectionDatafiles.append(dcdf) + else: + raise AssertionError("invalid object type %s" % obj.BeanName) + collection.create() + @pytest.mark.dependency(depends=alldata) def test_check_content(standardCmdArgs, tmpdirsec): """Dump the resulting content and compare with a reference dump. diff --git a/tests/test_06_query.py b/tests/test_06_query.py index 42861ee6..2679b4de 100644 --- a/tests/test_06_query.py +++ b/tests/test_06_query.py @@ -8,7 +8,7 @@ import icat import icat.config from icat.query import Query -from conftest import getConfig, require_icat_version, UtcTimezone +from conftest import getConfig, icat_version, require_icat_version, UtcTimezone @pytest.fixture(scope="module") @@ -21,7 +21,8 @@ def client(setupicat): # Note: the number of objects returned in the queries and their # attributes obviously depend on the content of the ICAT and need to # be kept in sync with the reference input used in the setupicat -# fixture. +# fixture. This content also depends on the version of ICAT server we +# are talking to and the ICAT schema this server provides. # # Note: the exact query string is considered an implementation detail # that is deliberately not tested here. We limit the tests to check @@ -31,6 +32,12 @@ def client(setupicat): investigation = None tzinfo = UtcTimezone() if UtcTimezone else None +# The the actual number of rules in the test data differs with the +# ICAT version. +have_icat_5 = 0 if icat_version < "5.0" else 1 +all_rules = 110 + 48*have_icat_5 +grp_rules = 50 + 30*have_icat_5 + @pytest.mark.dependency(name='get_investigation') def test_query_simple(client): """A simple query for an investigation by name. @@ -188,7 +195,7 @@ def test_query_datacollection(client): assert query.include_clause is None assert query.limit_clause is None res = client.search(query) - assert len(res) == 2 + assert len(res) == 3 + 2*have_icat_5 def test_query_datafiles_datafileformat(client, recwarn): """Datafiles ordered by format. @@ -208,7 +215,7 @@ def test_query_datafiles_datafileformat(client, recwarn): assert query.include_clause is None assert query.limit_clause is None res = client.search(query) - assert len(res) == 10 + assert len(res) == 10 + have_icat_5 @pytest.mark.dependency(depends=['get_investigation']) def test_query_order_direction(client): @@ -288,7 +295,7 @@ def test_query_condition_greaterthen(client): assert query.join_clause is None assert "datafileCreateTime" in query.where_clause res = client.search(query) - assert len(res) == 4 + assert len(res) == 4 + have_icat_5 condition = {"datafileCreateTime": "< '2012-01-01'"} query = Query(client, "Datafile", conditions=condition) print(str(query)) @@ -306,7 +313,7 @@ def test_query_condition_list(client): assert "datafileCreateTime" in query.where_clause qstr = str(query) res = client.search(query) - assert len(res) == 3 + assert len(res) == 3 + have_icat_5 # The last example also works by adding the conditions separately. query = Query(client, "Datafile") @@ -315,7 +322,7 @@ def test_query_condition_list(client): print(str(query)) assert str(query) == qstr res = client.search(query) - assert len(res) == 3 + assert len(res) == 3 + have_icat_5 @pytest.mark.dependency(depends=['get_investigation']) def test_query_in_operator(client): @@ -343,7 +350,7 @@ def test_query_condition_obj(client): print(str(query)) assert "Rule" in query.select_clause res = client.search(query) - assert len(res) == 60 + assert len(res) == all_rules - grp_rules def test_query_condition_jpql_function(client): """Functions may be applied to field names of conditions. @@ -368,7 +375,8 @@ def test_query_condition_jpql_function_namelen(client): of the JPQL function in the condition is easier to verify in the result. """ - conditions = { "LENGTH(fullName)": "> 11" } + conditions = { "name": "LIKE 'db/%'", + "LENGTH(fullName)": "> 11" } query = Query(client, "User", conditions=conditions) print(str(query)) assert "User" in query.select_clause @@ -382,7 +390,8 @@ def test_query_condition_jpql_function_mixed(client): This test case failed for an early implementation of JPQL functions, see discussion in #89. """ - conditions = { "LENGTH(fullName)": "> 11", "fullName": "> 'C'" } + conditions = { "name": "LIKE 'db/%'", + "LENGTH(fullName)": "> 11", "fullName": "> 'C'" } query = Query(client, "User", conditions=conditions) print(str(query)) assert "User" in query.select_clause @@ -398,12 +407,11 @@ def test_query_order_jpql_function(client): fullName. (In the example data, the longest and second longest fullName is somewhat ambiguous due to character encoding issues.) """ - query = Query(client, "User", + query = Query(client, "User", conditions={ "name": "LIKE 'db/%'" }, order=[("LENGTH(fullName)", "DESC")], limit=(2,1)) print(str(query)) assert "User" in query.select_clause assert query.join_clause is None - assert query.where_clause is None assert "LENGTH" in query.order_clause assert query.limit_clause is not None res = client.search(query) @@ -420,7 +428,7 @@ def test_query_rule_order(client): assert query.where_clause is None assert "id" in query.order_clause res = client.search(query) - assert len(res) == 104 + assert len(res) == all_rules def test_query_rule_order_group(client, recwarn): """Ordering rule on grouping implicitely adds a "grouping IS NOT NULL" @@ -439,7 +447,7 @@ def test_query_rule_order_group(client, recwarn): assert query.where_clause is None assert "what" in query.order_clause res = client.search(query) - assert len(res) == 44 + assert len(res) == grp_rules def test_query_rule_order_group_suppress_warn_cond(client, recwarn): """The warning can be suppressed by making the condition explicit. @@ -454,7 +462,7 @@ def test_query_rule_order_group_suppress_warn_cond(client, recwarn): assert "grouping" in query.where_clause assert "what" in query.order_clause res = client.search(query) - assert len(res) == 44 + assert len(res) == grp_rules def test_query_rule_order_group_suppress_warn_join(client, recwarn): """Another option to suppress the warning is to override the JOIN spec. @@ -471,7 +479,7 @@ def test_query_rule_order_group_suppress_warn_join(client, recwarn): assert query.where_clause is None assert "what" in query.order_clause res = client.search(query) - assert len(res) == 44 + assert len(res) == grp_rules def test_query_rule_order_group_left_join(client, recwarn): """Another option to suppress the warning is to override the JOIN spec. @@ -487,7 +495,7 @@ def test_query_rule_order_group_left_join(client, recwarn): assert query.where_clause is None assert "what" in query.order_clause res = client.search(query) - assert len(res) == 104 + assert len(res) == all_rules def test_query_order_one_to_many(client, recwarn): """Sort on a related object in a one to many relation. @@ -619,18 +627,19 @@ def test_query_limit_placeholder(client): query = Query(client, "Rule", order=['grouping', 'what', 'id'], conditions={"grouping":"IS NOT NULL"}) query.setLimit( ("%d","%d") ) + chunksize = 45 print(str(query)) - print(str(query) % (0,30)) + print(str(query) % (0,chunksize)) assert "Rule" in query.select_clause assert "grouping" in query.join_clause assert "grouping" in query.where_clause assert "what" in query.order_clause assert query.limit_clause is not None - res = client.search(str(query) % (0,30)) - assert len(res) == 30 - print(str(query) % (30,30)) - res = client.search(str(query) % (30,30)) - assert len(res) == 14 + res = client.search(str(query) % (0,chunksize)) + assert len(res) == chunksize + print(str(query) % (chunksize,chunksize)) + res = client.search(str(query) % (chunksize,chunksize)) + assert len(res) == grp_rules - chunksize def test_query_non_ascii(client): """Test if query strings with non-ascii characters work.