fr.ifremer.isisfish.datastore.update
Class ImportFromV2

java.lang.Object
  extended by fr.ifremer.isisfish.datastore.update.ImportFromV2

public class ImportFromV2
extends Object

ImportFromV2.

Author:
poussin

Constructor Summary
ImportFromV2(boolean manual)
           
 
Method Summary
protected  void convert(File sourceFile, File destFile, URL stylesheetURL)
          Converti un fichier XML en lui applicant un fichier XSL
protected  String getVersionEnd(URL xslurl)
           
protected  URL[] getXSLFile(String versionStart, String versionEnd)
          Retourne les fichiers xsl qu'il faut appliquer dans l'ordre qu'il faut.
 void importXML(File xml)
          Converti un fichier XML version 2 en un zip importable en v3
static void main(String[] args)
           
protected  List<org.dom4j.Element> selectElements(org.dom4j.Node node, String path)
           
protected  List<org.dom4j.Node> selectNodes(org.dom4j.Node node, String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportFromV2

public ImportFromV2(boolean manual)
Method Detail

getXSLFile

protected URL[] getXSLFile(String versionStart,
                           String versionEnd)
Retourne les fichiers xsl qu'il faut appliquer dans l'ordre qu'il faut.

Parameters:
versionStart - la version de départ du fichier
versionEnd - la version auquel doit arriver le fichier
Returns:
la liste des URLs des fichiers XSL a appliquer, ou null s'il est impossible de trouver les fichiers necessaire.

getVersionEnd

protected String getVersionEnd(URL xslurl)

convert

protected void convert(File sourceFile,
                       File destFile,
                       URL stylesheetURL)
                throws Exception
Converti un fichier XML en lui applicant un fichier XSL

Parameters:
sourceFile - le fichier source XML
destFile - le fichier résultat de l'opération
stylesheetURL - l'url de la feuille de style a appliquer
Throws:
Exception

selectNodes

protected List<org.dom4j.Node> selectNodes(org.dom4j.Node node,
                                           String path)

selectElements

protected List<org.dom4j.Element> selectElements(org.dom4j.Node node,
                                                 String path)

importXML

public void importXML(File xml)
               throws Exception
Converti un fichier XML version 2 en un zip importable en v3

Parameters:
xml -
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 1999-2012 CodeLutin. All Rights Reserved.