Difference between revisions of "Imeji migration"

From MPDLMediaWiki
Jump to navigation Jump to search
m
(Replaced content with "'''Please note:''' Content was moved to http://imeji.org/wordpress/install/migration/")
Line 1: Line 1:
{{Imeji_Tech}}
'''Please note:''' Content was moved to http://imeji.org/wordpress/install/migration/
=Utility=
imeji implements a migration utility. This is based on SPARQL update ([http://www.w3.org/Submission/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 =
*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:
<pre>
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 != '')};
 
</pre>
* Description:
** Change the Grant "privileged viewer" with a new value "VIEWER"
** Change all uri of the statements
 
[[Category:Imeji|Migration]]

Revision as of 11:43, 3 January 2014

Please note: Content was moved to http://imeji.org/wordpress/install/migration/