How to import data with XML files

From GhoSST
Jump to: navigation, search

Follow the order described above for the imports.

For the “Fundamental data”

  • Take an empty template [1] or get an already filled one ($)
  • Fill the corresponding template at your best
  • Test it in 'simulation mode': "Producer/Import simulation"
  • Send it to the database manager who will verify the file and import it ("Manager/import").

$ Note: All xml files of already imported data (of any type) can be retrieved by going to the data page and its 'Import history' tab: the link on 'Get the file(s)' of the last correction (or first import if no correction) will give you the original xml file(s) (including data provider comments). You can thus found the closest data to yours and only slightly modify the structure (be care, several unused options or keywords may have been deleted) and then change the data content to get your import file.

For the “Data” (sample, experiment and spectra)

  • Use the GhoSST interface:
    • Menu: Producer/import/ and choose (directly or with 'select') either:
      • “Matters”
      • “Sample”
      • “Experiment and Spectra”
  • Select the corresponding file
  • Keep the 'Simulation mode' checkbox checked
  • 'import' wil parse the metadata
  • You will possibly get bug descriptions (in red)
  • Debug your XML file from the “bug” information provided
  • save it and restart 'import', correct again ... until you get:
    • 1) "Import finished" (in green)
    • 2) or a message ”Data file not joined ‘file name’ - Sample ‘UID’: Error during import of data”
      • in this case zip your xml file with the 'joined file' (spectral data file for “spectra”, sample image for "sample", ...)
  • Uncheck the simulation mode checkbox
  • Import the metadata (or zip)
  • When import is successful it will let you know!
  • Always verify that your data are in the database (and that all values are correct) using GhoSST interface (Producer/Full search for all type of data)
  • Verify that your spectra or bandlist data can be searched using Search/Advanced


  • The xml file parser checks many types of problems:
    • Correctness of xml structure
    • Correctness of data syntax (key-word names, missing or unexpected key-words, …)
    • Correctness of data format
    • If the mandatory key-words are filled
    • If values are within the accepted set of ‘enumerations’ elements
    • If references (UID) to data effectively exist in the database
      • In some cases it can propose you to choose one of the values existing in the database
    • If there are missing 'joined files'
    • ...
Personal tools