org.gcube.data.spd.flora
Class Utils

java.lang.Object
  extended by org.gcube.data.spd.flora.Utils

public class Utils
extends Object


Constructor Summary
Utils()
           
 
Method Summary
protected static boolean checkEndElement(XMLEvent event, String value)
           
protected static boolean checkStartElement(XMLEvent event, String value)
           
static String createCitation()
           
static String createCredits()
           
static String createDate()
           
static boolean createDB()
          Metod called by CreateDBThread
protected static void createOrUpdate(String id_parent, String id, String name, String path, String rank)
           
static ArrayList<ArrayList<String>> discoverPath(String pathUrl, String id_parent, String name_parent, Integer idThread, Boolean flag)
          Parse every path and populate db
static Map<String,String> findTags(String id)
          Find info about a specific id
static String getTagValue(String sTag, Element eElement)
          getTagValue
static long lastupdate()
          get next update date
static String nextUpdateDate(long input)
          Convert long in date
protected static String readCharacters(XMLEventReader eventReader)
           
static boolean SQLTableExists(String tableName)
          Return true if a table exists
static boolean urlExists(String pathUrl)
          Return true if a url exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

urlExists

public static boolean urlExists(String pathUrl)
Return true if a url exists


createDB

public static boolean createDB()
                        throws SQLException,
                               IOException
Metod called by CreateDBThread

Throws:
SQLException
IOException

createDate

public static String createDate()

createCitation

public static String createCitation()

createCredits

public static String createCredits()

getTagValue

public static String getTagValue(String sTag,
                                 Element eElement)
getTagValue


findTags

public static Map<String,String> findTags(String id)
                                   throws SQLException,
                                          ConnectException
Find info about a specific id

Throws:
SQLException
ConnectException

readCharacters

protected static String readCharacters(XMLEventReader eventReader)
                                throws Exception
Throws:
Exception

checkStartElement

protected static boolean checkStartElement(XMLEvent event,
                                           String value)

checkEndElement

protected static boolean checkEndElement(XMLEvent event,
                                         String value)

discoverPath

public static ArrayList<ArrayList<String>> discoverPath(String pathUrl,
                                                        String id_parent,
                                                        String name_parent,
                                                        Integer idThread,
                                                        Boolean flag)
                                                 throws SQLException,
                                                        MalformedURLException,
                                                        IOException
Parse every path and populate db

Throws:
SQLException
MalformedURLException
IOException

createOrUpdate

protected static void createOrUpdate(String id_parent,
                                     String id,
                                     String name,
                                     String path,
                                     String rank)

SQLTableExists

public static boolean SQLTableExists(String tableName)
Return true if a table exists


lastupdate

public static long lastupdate()
get next update date


nextUpdateDate

public static String nextUpdateDate(long input)
Convert long in date



Copyright © 2013. All Rights Reserved.