core.util
Class XMLTools

java.lang.Object
  extended by core.util.XMLTools

public class XMLTools
extends Object

Common XML Stuff.

  Copyright (c) 2006 Sebastian Erdweg
  Copyright (c) 2006 Dominik Schulz
  Copyright (c) 2006 Florian Lindner
  Copyright (c) 2006 Betim Berjani
  
  This file is part of FlexiCrypt.

  FlexiCrypt is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  FlexiCrypt is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with FlexiCrypt; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  

Author:
Dominik

Field Summary
static String FC_TEMPFILE_EXT
           
 
Constructor Summary
XMLTools()
           
 
Method Summary
static File getFileFromURI(String uriPath)
          Parse an URI-String a return a local File object this method parses an URI/URL an returns a File-Object e.g. if the URI references a local object the path is resolved and converted to an File object or if the URI references a remote object, the object is fetched and an file object is created on the fetched file
static String getTempFilename()
          This mehtod generates a unique filename for temp files.
static Element getXMLNode(List nodes, String name)
          Descend into the XML-Tree and find a node with the given name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FC_TEMPFILE_EXT

public static final String FC_TEMPFILE_EXT
See Also:
Constant Field Values
Constructor Detail

XMLTools

public XMLTools()
Method Detail

getXMLNode

public static Element getXMLNode(List nodes,
                                 String name)
Descend into the XML-Tree and find a node with the given name

Parameters:
nodes -
name -
Returns:
null if nothing found, else the element

getFileFromURI

public static File getFileFromURI(String uriPath)
                           throws URISyntaxException,
                                  IOException
Parse an URI-String a return a local File object this method parses an URI/URL an returns a File-Object e.g. if the URI references a local object the path is resolved and converted to an File object or if the URI references a remote object, the object is fetched and an file object is created on the fetched file

Parameters:
uriPath -
Returns:
the File referenced by the URI
Throws:
URISyntaxException
IOException

getTempFilename

public static String getTempFilename()
This mehtod generates a unique filename for temp files.

Returns:
a unique filename for temp files