public class XFTTool extends Object
Constructor and Description |
---|
XFTTool() |
Modifier and Type | Method and Description |
---|---|
static XFTTable |
BrowseAllGrand(String elementName)
Performs a select on the database for all rows in the given element's table.
|
static XFTTable |
BrowseAllSimple(String elementName)
Performs a select on the database for all rows in the given element's table.
|
static void |
GenerateSQL(String outputFile)
Generate CREATE, ALTER, VIEW, and INSERT statements for each element in the
defined schemas.
|
static ArrayList |
GetPossibleElements()
Returns the names of all available schema elements known to XFT.
|
static String |
GetSettingsLocation() |
static String |
GetValidElementName(String elementName)
Checks if this elementName is known to XFT.
|
static XFTTable |
Search(String elementName,
CriteriaCollection values)
Returns a table with the results of an SQL select based on the elements which
match the SearchCriteria in the supplied ArrayList.
|
static void |
StoreXMLFileToDB(File location,
UserI user,
Boolean quarantine,
boolean allowItemRemoval) |
static void |
StoreXMLFileToDB(String location,
UserI user,
Boolean quarantine,
boolean allowItemRemoval)
Accesses the supplied XML File, and saves the included item and all of its children (refs)
to the database, and returns the updated xml.
|
static Document |
StoreXMLToDB(File f,
UserI user,
Boolean quarantine,
boolean allowItemRemoval)
Saves this item and all of its children (refs) to the database, and returns the updated xml.
|
static boolean |
ValidateElementName(String elementName)
Checks if this elementName is known to XFT.
|
public static void GenerateSQL(String outputFile) throws Exception
outputFile
- (location to save generated sql)Exception
public static XFTTable BrowseAllSimple(String elementName) throws XFTInitException, DBPoolException, SQLException, ElementNotFoundException, Exception
elementName
- (XML name of the element whose data will be returned)XFTInitException
DBPoolException
SQLException
ElementNotFoundException
Exception
public static XFTTable BrowseAllGrand(String elementName) throws XFTInitException, DBPoolException, SQLException, ElementNotFoundException, Exception
elementName
- XFTInitException
DBPoolException
SQLException
ElementNotFoundException
Exception
public static XFTTable Search(String elementName, CriteriaCollection values) throws XFTInitException, ElementNotFoundException, SQLException, DBPoolException, FieldNotFoundException, Exception
element
- values
- (ArrayList of SearchCriteria)XFTInitException
ElementNotFoundException
SQLException
DBPoolException
FieldNotFoundException
Exception
public static ArrayList GetPossibleElements() throws XFTInitException
XFTInitException
public static boolean ValidateElementName(String elementName) throws XFTInitException
XFTInitException
public static String GetValidElementName(String elementName) throws XFTInitException
XFTInitException
public static Document StoreXMLToDB(File f, UserI user, Boolean quarantine, boolean allowItemRemoval) throws XFTInitException, ElementNotFoundException, FieldNotFoundException, Exception
doc
- XFTInitException
ElementNotFoundException
FieldNotFoundException
Exception
public static void StoreXMLFileToDB(String location, UserI user, Boolean quarantine, boolean allowItemRemoval) throws XFTInitException, ElementNotFoundException, FieldNotFoundException, ValidationException, Exception
doc
- XFTInitException
ElementNotFoundException
FieldNotFoundException
ValidationException
Exception
public static void StoreXMLFileToDB(File location, UserI user, Boolean quarantine, boolean allowItemRemoval) throws XFTInitException, ElementNotFoundException, FieldNotFoundException, ValidationException, Exception
public static String GetSettingsLocation() throws XFTInitException
XFTInitException
Copyright © 2015 Neuroinformatics Research Group. All rights reserved.