XNAT

Data Management

Loading Data

XDAT is setup to load data from two entry points, online & command prompt.

Online:  The XDAT engine will generate entry forms for each of your root level data types.  These entry forms are placed in the PROJECT_NAME/src/xdat-templates directory.  They are accessible through the website and allow for the easy creation and editing of stored data.

Command Prompt:  The XDAT engine allows data to be loaded from the command prompt via xml.  Using the StoreXML tool provided in the web services client tools, a user can store an xml document directly into the database. 

  • Validation: Data will be passed through three levels of validation before it is stored.  First, it will pass through XERCES validation.  (All stored XML must be valid XML.)  Next, the document will pass through XDAT security validation.  The submitted username and password will be used to decide whether or not the user has permission to store the submitted data.  Finally, the data will be passed through XDAT DB validation which will guarantee that unique, unique composites, foreign keys, and primary key fields are specified correctly.  If all three of these layers of validation are passed, then the document will be stored to the database.
  • Options:  The StoreXML class allows for several different options:

                  -project: The name of the project which you are using (corresponds to the xdat.project.name variable used to setup the project).
                  -l (location): The location (file path) of the file to be stored.
                  -dir: Directory of files to be stored (all xml documents in the directory will be stored.
                  -r (recursive): Used with –dir tag to allow sub folders in the directory to be stored.
                  -u (username): Username of the XDAT user who is requesting the storage.
                  -p (password): Password of the XDAT user who is requesting the storage.
                  -activate: Will force activation of stored data (overwrites default data type settings).
                  -quarantine:  Will force quarantine of the stored data (overwrites default data type settings).
                  -quiet:  Will limit the amount of system output.
                 -allowDataDeletion (overwrite): Specifies whether pre-existing data should be overwritten.

Modifying Data

Data can be modified via the same methods as ‘A. Loading data’. The same online pages & command prompt tools can store pre-existing data.

Retrieving Data

Data can be retrieved through both online and command prompt tools.

Online:  Data can be viewed through listings and reports.  The listings are available through browsing pages and search pages.  The reports are available from the listing pages.

Command Prompt:  Data can be accessed from the command prompt via the web service client tools.  This is a package of tools which use web services to retrieve xml files, image files, and summary files. You can find these tools here.