12.07.2015 Views

The Computational Materials Repository

The Computational Materials Repository

The Computational Materials Repository

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

40 Introduction and usage of CMRAAf i n a l . t r a ji n i t i a l . t r a j<strong>The</strong> status can be checked with --status:$ cmr −−s t a t u s .cmr v e r s i o n 0 . 3 . 2 . 5 2 3Ms t a t u s | d b o r i g f n | d b l a s t m o d i f i e d | db keywords | db hashA | i n i t i a l . t r a j | 2011−12−09 2 3 : 1 . . . | NULL | 78169 b4 . . .A | i n i t i a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ f i r s t ’ ] | 8 bf505e . . .A | i n i t i a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ l a s t ’ ] | eeb029a . . .A | f i n a l . t r a j | 2011−12−09 2 3 : 1 . . . | NULL | 5 4 8 2 0 9 . . .A | f i n a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ f i r s t ’ ] | daf1eb2 . . .A | f i n a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ l a s t ’ ] | a2c288e . . .6 columns .<strong>The</strong> “A” in front signals that the files are scheduled to be uploaded. It is nowpossible to edit the files with --modify exactly the same way as previouslyshown:$ cmr −−modify i n i t i a l . t r a jwith the exception that --status is used to see the files. When done --commitis used in order to upload them to the db-file repository:$ cmr −−commit ∗ . t r a jAs soon as the files are available in the database, using --status shows thestatus “DB”s t a t u s | d b o r i g f n | d b l a s t m o d i f i e d | db keywords | db hashDB | i n i t i a l . t r a j | 2011−12−09 2 3 : 1 . . . | NULL | 78169 b4 . . .M DB | i n i t i a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ f i r s t ’ ] | 8 bf505e . . .DB | i n i t i a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ l a s t ’ ] | eeb029a . . .DB | f i n a l . t r a j | 2011−12−09 2 3 : 1 . . . | NULL | 5 4 8 2 0 9 . . .DB | f i n a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ f i r s t ’ ] | daf1eb2 . . .DB | f i n a l . t r a j | 2011−12−09 2 3 : 1 . . . | [ ’ l a s t ’ ] | a2c288e . . .6 columns .unless the file was modified meanwhile in which case it would be “M DB”.<strong>The</strong> CLI has clear advantages when working directly with db-files: the accessis fast and easy, but the drawback is that it is not very flexible: all actions arebased on file names and are not programmable like in the python interface.2.6 Modifying Data in the Database<strong>The</strong>re are a few important details about duplicates, overwriting and removal ofdata from the database. In a file system there can be only one files with a certainname per directory. CMR works in a similar way, but instead of a file name, aunique identifier (UI) is calculated using a hash function over the static partof the included data. <strong>The</strong> static part is mainly the output of the calculator and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!