#782: Administration / add old GAST sync option
---------------------+------------------------------------------------------
Reporter: fxp | Owner: geonetwork-devel@…
Type: task | Status: new
Priority: major | Milestone: v2.7.0
Component: General | Version:
Keywords: |
---------------------+------------------------------------------------------
Related to r8643:
{{{
public void sync(Dbms dbms) throws Exception
{
SettingManager sm = new SettingManager(dbms, new
ProviderManager());
Element settings = Xml.transform(sm.get("system", -1),
Config.getConfig().getWebapp()+ "/" + Geonet.Path.STYLESHEETS+
"/xml/config.xsl");
try
{
List list = dbms.select("SELECT * FROM Metadata
WHERE isTemplate='n' and isHarvested='n'").getChildren();
dbms.commit();
String siteURL = Lib.site.getSiteURL(dbms);
for(int i=0; i<list.size(); i++)
{
Element record = (Element) list.get(i);
String id = record.getChildText("id");
String schema =
record.getChildText("schemaid");
String data =
record.getChildText("data");
String uuid =
record.getChildText("uuid");
String date =
record.getChildText("createdate");
Element md = updateFixedInfo(id,
Xml.loadString(data, false),
uuid, date, schema, siteURL, settings, sm);
_xmlSerializer.update(dbms, id, md, date,
true, _session);
dbms.commit();
}
}
catch(Exception e)
{
dbms.abort();
throw e;
}
}
}}}
--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/782>
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/>
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.