Imeji migration
Revision as of 09:04, 25 July 2013 by Kleinfercher (talk | contribs)
|
Utility[edit]
imeji implements a migration utility. This is based on SPARQL update (specifications). The SPARQL query should be written in a file called "migration.txt". This file should be stored in the jena tdb home directory (see Imeji_properties, property "imeji.tdb.path"). The content of this file is reported on this page for each migration.
From 1.0.0.0 to 1.1.0.1[edit]
- Note: The migration utility is not available for 1.1.0.0. Therefore you need to use 1.1.0.1 to upgrade from 1.0.0.0.
- migration.txt:
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> WITH <http://imeji.org/user> DELETE {?s <http://imeji.org/terms/grantType> <http://imeji.org/terms/grantType#PRIVILEGED_VIEWER>} INSERT {?s <http://imeji.org/terms/grantType> <http://imeji.org/terms/grantType#VIEWER>} USING <http://imeji.org/user> WHERE {?s <http://imeji.org/terms/grantType> <http://imeji.org/terms/grantType#PRIVILEGED_VIEWER>}; WITH <http://imeji.org/metadataProfile> DELETE {?s <http://imeji.org/terms/statement> ?statement . ?statement ?p ?o} INSERT {?s <http://imeji.org/terms/statement> ?uri . ?uri ?p ?o} USING <http://imeji.org/metadataProfile> WHERE {?s <http://imeji.org/terms/statement> ?statement . ?statement ?p ?o . let(?uri := uri(afn:strjoin('/','http://imeji.org/terms/statement',afn:localname(?statement))))}; WITH <http://imeji.org/item> DELETE {?s <http://imeji.org/terms/statement> ?statement} INSERT {?s <http://imeji.org/terms/statement> ?uri} USING <http://imeji.org/item> USING <http://imeji.org/metadataProfile> WHERE {?mds <http://imeji.org/terms/metadata> ?s. ?s <http://imeji.org/terms/statement> ?statement . let(?uri := uri(afn:strjoin('/','http://imeji.org/terms/statement',afn:localname(?statement))))}; WITH <http://imeji.org/item> DELETE {?s <http://imeji.org/terms/escidocId> ?id} INSERT {?s <http://imeji.org/terms/storageId> ?id} WHERE {?s <http://imeji.org/terms/escidocId> ?id . filter(?id != '')};
- Description:
- Change the Grant "privileged viewer" with a new value "VIEWER"
- Change all uri of the statements