Commits

John Paulett  committed d53b396

Migrate to maven 2 project structure.

Try to use the same versions of JARs that are in the lib folder.

  • Participants
  • Parent commits 46b09e2

Comments (0)

Files changed (962)

 syntax: glob
-*.class
-classes/*
+target/
 .classpath
 .project
+mvn install:install-file -Dfile=lib/xnatsrb-1.jar -DgroupId=org.nrg.xnat -DartifactId=xnatsrb -Dversion=1 -Dpackaging=jar

File lib/PlexiViewer-1.3.jar

Binary file removed.

File lib/activation-1.0.2.jar

Binary file removed.

File lib/ant-1.6.1.jar

Binary file removed.

File lib/avalon-framework-4.1.4.jar

Binary file removed.

File lib/axis-1_3.jar

Binary file removed.

File lib/commons-beanutils-1.6.1.jar

Binary file removed.

File lib/commons-codec-1.1.jar

Binary file removed.

File lib/commons-collections-3.0.jar

Binary file removed.

File lib/commons-configuration-1.0-dev.jar

Binary file removed.

File lib/commons-configuration-1.0.jar

Binary file removed.

File lib/commons-dbcp-1.2.1.jar

Binary file removed.

File lib/commons-digester-1.5.jar

Binary file removed.

File lib/commons-discovery-0.2.jar

Binary file removed.

File lib/commons-email-1.2.jar

Binary file removed.

File lib/commons-fileupload-1.2.1.jar

Binary file removed.

File lib/commons-lang-2.0.jar

Binary file removed.

File lib/commons-logging-1.0.4.jar

Binary file removed.

File lib/commons-pool-1.0.jar

Binary file removed.

File lib/commons-pool-1.2.jar

Binary file removed.

File lib/cryptix-3.2.0.jar

Binary file removed.

File lib/dom4j-1.4.jar

Binary file removed.

File lib/ecs-1.4.2.jar

Binary file removed.

File lib/excalibur-component-1.1.jar

Binary file removed.

File lib/excalibur-instrument-1.0.jar

Binary file removed.

File lib/excalibur-logger-1.0.1.jar

Binary file removed.

File lib/excalibur-pool-1.2.jar

Binary file removed.

File lib/fop.jar

Binary file removed.

File lib/iText.jar

Binary file removed.

File lib/iTextXML.jar

Binary file removed.

File lib/ij-1.39b.jar

Binary file removed.

File lib/jakarta-regexp-1.2.jar

Binary file removed.

File lib/jargon-1.4.25.jar

Binary file removed.

File lib/javamail-1.3.2.jar

Binary file removed.

File lib/jaxrpc-1.jar

Binary file removed.

File lib/jcs-20030822.182132.jar

Binary file removed.

File lib/jdbc-2.0.jar

Binary file removed.

File lib/jndi-1.2.1.jar

Binary file removed.

File lib/jul-to-slf4j-1.5.8.jar

Binary file removed.

File lib/junit-3.8.1.jar

Binary file removed.

File lib/jython-2.1.jar

Binary file removed.

File lib/log4j-1.2.15.jar

Binary file removed.

File lib/logkit-1.0.1.jar

Binary file removed.

File lib/mysql-connector-java-2.0.14-bin.jar

Binary file removed.

File lib/oro-2.0.7.jar

Binary file removed.

File lib/parser.jar

Binary file removed.

File lib/pg74.214.jdbc2.jar

Binary file removed.

File lib/postgresql-7.4.214.jdbc2.jar

Binary file removed.

File lib/saaj-1.jar

Binary file removed.

File lib/servlet-api.jar

Binary file removed.

File lib/slf4j-api-1.5.8.jar

Binary file removed.

File lib/slf4j-log4j12-1.5.8.jar

Binary file removed.

File lib/stratum-1.0-b5.jar

Binary file removed.

File lib/torque-3.1.1.jar

Binary file removed.

File lib/turbine-2.3.1.jar

Binary file removed.

File lib/velocity-1.3.1.jar

Binary file removed.

File lib/village-2.0-dev-20030825.jar

Binary file removed.

File lib/xalan-2.5.1.jar

Binary file removed.

File lib/xerces-J_1.4.0.jar

Binary file removed.

File lib/xercesImpl-2.4.0.jar

Binary file removed.

File lib/xml-apis-1.0.b2.jar

Binary file removed.

File lib/xmlrpc-1.2-b1.jar

Binary file removed.

File org/nrg/xdat/XDAT.java

-//Copyright 2005 Harvard University / Howard Hughes Medical Institute (HHMI) All Rights Reserved
-/* 
- * XDAT � Extensible Data Archive Toolkit
- * Copyright (C) 2005 Washington University
- */
-/*
- * Created on Jan 3, 2005
- *
- */
-package org.nrg.xdat;
-
-import java.io.File;
-import java.util.Iterator;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.apache.stratum.lifecycle.Configurable;
-import org.apache.stratum.lifecycle.Initializable;
-import org.apache.torque.TorqueException;
-import org.nrg.xdat.display.DisplayManager;
-import org.nrg.xdat.security.ElementSecurity;
-import org.nrg.xft.XFT;
-import org.nrg.xft.db.ViewManager;
-import org.nrg.xft.exception.ElementNotFoundException;
-import org.nrg.xft.exception.XFTInitException;
-import org.nrg.xft.generators.SQLCreateGenerator;
-import org.nrg.xft.generators.SQLUpdateGenerator;
-import org.nrg.xft.schema.Wrappers.GenericWrapper.GenericWrapperElement;
-import org.nrg.xft.utils.FileUtils;
-/**
- * @author Tim
- *
- */
-public class XDAT implements Initializable,Configurable{
-	static org.apache.log4j.Logger logger = Logger.getLogger(XDAT.class);
-	private String instanceSettingsLocation = null;
-	/**
-	 * configure torque
-	 *
-	 * @param conf Configuration
-	 * @see org.apache.stratum.lifecycle.Configurable
-	 * @throws TorqueException Any exceptions caught during processing will be
-	 *         rethrown wrapped into a TorqueException.
-	 */
-	public void configure(Configuration conf)
-	{
-		instanceSettingsLocation = conf.getString("instance_settings_directory");
-	}
-
-	/**
-	 * initialize Torque
-	 *
-	 * @see org.apache.stratum.lifecycle.Initializable
-	 * @throws TorqueException Any exceptions caught during processing will be
-	 *         rethrown wrapped into a TorqueException.
-	 */
-	public void initialize()
-	{
-		try {
-			logger.info("Starting Service XDAT");
-			init(instanceSettingsLocation);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static void init(String location) throws Exception
-	{
-		XDAT.init(location,true,true);
-	}
-	
-	public static void RefreshDisplay()
-	{
-		DisplayManager.clean();
-		DisplayManager.GetInstance();
-	}
-	
-	public static void init(String location,boolean allowDBAccess) throws Exception
-	{
-		init(location,allowDBAccess,true);
-	}
-	
-	public static void init(String location,boolean allowDBAccess, boolean initLog4j) throws Exception
-	{
-		DisplayManager.clean();
-		if (initLog4j)
-		{
-			location = FileUtils.AppendSlash(location);
-			PropertyConfigurator.configure(location + "log4j.properties");
-			initLog4j= false;
-		}
-		XFT.init(location,allowDBAccess,initLog4j);
-		//XFT.LogCurrentTime("XDAT INIT: 1","ERROR");
-		if (allowDBAccess)
-		{
-			try {
-	            Iterator quarantineElements = ElementSecurity.GetQuarantinedElements().iterator();
-	            while (quarantineElements.hasNext())
-	            {
-	                ElementSecurity es = (ElementSecurity)quarantineElements.next();
-	                GenericWrapperElement.GetElement(es.getElementName()).setQuarantineSetting(es.getBooleanProperty("quarantine",false));
-	            }
-	            
-	            Iterator preloadElements = ElementSecurity.GetPreLoadElements().iterator();
-	            while (preloadElements.hasNext())
-	            {
-	                ElementSecurity es = (ElementSecurity)preloadElements.next();
-	                GenericWrapperElement.GetElement(es.getElementName()).setPreLoad(es.getBooleanProperty("pre_load",false));
-	            }
-	        } catch (Exception e) {
-	            logger.error("",e);
-	        }
-		}
-
-		//XFT.LogCurrentTime("XDAT INIT: 2","ERROR");
-		logger.info("Initializing Display Manager");
-		DisplayManager.GetInstance();
-		//XFT.LogCurrentTime("XDAT INIT: 3","ERROR");
-	}
-	
-	public static void GenerateUpdateSQL(String file) throws XFTInitException,ElementNotFoundException, Exception
-	{
-	    StringBuffer sb =new StringBuffer();
-	    sb.append("-- Generated SQL File for updating an existing XNAT database.\n");
-	    sb.append("-- This script is created by the update XNAT feature, which reviews an existing database and only specifies create statements for missing TABLES and COLUMNS.  It will also drop and recreate any necessary functions or views.\n");
-	    
-	    sb.append("-- If you are running from pgAdmin, remove the following line to stop on errors (pgAdmin does not recognize the statement)");
-	    sb.append("\n\\set ON_ERROR_STOP 1;");
-	    
-	    Iterator iter = SQLUpdateGenerator.GetSQLCreate().iterator();
-	    while (iter.hasNext())
-	    {
-	        sb.append(iter.next() +"\n--BR\n");
-	    }
-		sb.append("\n\n-- REMOVE OLD VIEWS FOR DISPLAY DOCS\n\n");
-		sb.append("\n\nSELECT removeViews();\n--BR\n");
-		sb.append("\n\n-- ADDED VIEWS FOR DISPLAY DOCS\n\n");
-		iter = DisplayManager.GetCreateViewsSQL(true).iterator();
-	    while (iter.hasNext())
-	    {
-	        sb.append(iter.next() +"\n--BR\n");
-	    }
-		FileUtils.OutputToFile(sb.toString(),file);
-		
-		logger.info("File Created: " + file);
-	}
-	
-	public static void GenerateCreateSQL(String file) throws XFTInitException,ElementNotFoundException, Exception
-	{
-	    StringBuffer sb =new StringBuffer();
-	    sb.append("-- Generated SQL File for creating an XNAT database from scratch.\n");
-	    
-	    sb.append("-- If you are running from pgAdmin, remove the following line to stop on errors (pgAdmin does not recognize the statement)");
-	    sb.append("\n\\set ON_ERROR_STOP 1;");
-	    
-	    Iterator iter = SQLCreateGenerator.GetSQLCreate().iterator();
-	    while (iter.hasNext())
-	    {
-	        sb.append(iter.next() +"\n--BR\n");
-	    }
-		sb.append("\n\n-- ADDED VIEWS FOR DISPLAY DOCS\n\n");
-		iter = DisplayManager.GetCreateViewsSQL(false).iterator();
-	    while (iter.hasNext())
-	    {
-	        sb.append(iter.next() +"\n--BR\n");
-	    }
-		FileUtils.OutputToFile(sb.toString(),file);
-		
-		ViewManager.OutputFieldNames();
-		logger.info("File Created: " + file);
-	}
-}

File org/nrg/xdat/XDATItem.java

-//Copyright 2005 Harvard University / Howard Hughes Medical Institute (HHMI) All Rights Reserved
-/* 
- * XDAT � Extensible Data Archive Toolkit
- * Copyright (C) 2005 Washington University
- */
-/*
- * Created on Jan 13, 2005
- *
- */
-package org.nrg.xdat;
-
-
-/**
- * @author Tim
- *
- */
-public class XDATItem {
-	
-}
-

File org/nrg/xdat/XDATTool.java

-//Copyright 2005 Harvard University / Howard Hughes Medical Institute (HHMI) All Rights Reserved
-/*
- * Created on Jun 23, 2005
- *
- */
-package org.nrg.xdat;
-
-import java.io.File;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.apache.log4j.Logger;
-import org.nrg.xdat.base.BaseElement;
-import org.nrg.xdat.presentation.CSVPresenter;
-import org.nrg.xdat.presentation.HTMLPresenter;
-import org.nrg.xdat.schema.SchemaElement;
-import org.nrg.xdat.schema.SchemaField;
-import org.nrg.xdat.search.DisplaySearch;
-import org.nrg.xdat.security.Authenticator;
-import org.nrg.xdat.security.XDATUser;
-import org.nrg.xdat.security.XDATUser.FailedLoginException;
-import org.nrg.xft.ItemI;
-import org.nrg.xft.XFT;
-import org.nrg.xft.XFTItem;
-import org.nrg.xft.XFTTable;
-import org.nrg.xft.XFTTableI;
-import org.nrg.xft.collections.ItemCollection;
-import org.nrg.xft.exception.DBPoolException;
-import org.nrg.xft.exception.ElementNotFoundException;
-import org.nrg.xft.exception.FieldNotFoundException;
-import org.nrg.xft.exception.ValidationException;
-import org.nrg.xft.exception.XFTInitException;
-import org.nrg.xft.generators.SQLCreateGenerator;
-import org.nrg.xft.references.XFTReferenceManager;
-import org.nrg.xft.schema.XFTManager; 
-import org.nrg.xft.schema.Wrappers.XMLWrapper.SAXReader;
-import org.nrg.xft.schema.Wrappers.XMLWrapper.XMLWriter;
-import org.nrg.xft.search.ItemSearch;
-import org.nrg.xft.search.TableSearch;
-import org.nrg.xft.utils.FileUtils;
-import org.nrg.xft.utils.SaveItemHelper;
-import org.nrg.xft.utils.StringUtils;
-import org.nrg.xft.utils.XMLValidator;
-import org.nrg.xft.utils.ValidationUtils.ValidationResults;
-import org.nrg.xft.utils.ValidationUtils.XFTValidator;
-
-/**
- * @author Tim
- *
- */
-public class XDATTool {
-	static org.apache.log4j.Logger logger = Logger.getLogger(XDATTool.class);
-    private String location = null;
-    private XDATUser user = null;
-    private boolean ignoreSecurity = false;
-    public XDATTool() throws XFTInitException
-    {
-        location = XFTManager.GetInstance().getSourceDir();
-    }
-    /**
-     *
-     */
-    public XDATTool(String instanceLocation) throws Exception {
-    	instanceLocation = FileUtils.AppendSlash(instanceLocation);
-        location= instanceLocation;
-        XDAT.init(location,false);
-    }
-    /**
-     *
-     */
-    public XDATTool(String instanceLocation,XDATUser u) throws Exception {
-    	instanceLocation = FileUtils.AppendSlash(instanceLocation);
-        user=u;
-        location= instanceLocation;
-        XDAT.init(location,false);
-    }
-
-    public XDATTool(String instanceLocation,String username, String password) throws DBPoolException,SQLException,FailedLoginException,Exception
-    {
-    	instanceLocation = FileUtils.AppendSlash(instanceLocation);
-        location= instanceLocation;
-        XDAT.init(location,true);
-        login(username,password);
-    }
-
-    private void login(String username, String password) throws DBPoolException,SQLException,FailedLoginException,Exception
-    {
-        try {
-            user = Authenticator.Authenticate(new Authenticator.Credentials(username,password));
-        } catch (XFTInitException e) {
-            logger.error("",e);
-        } catch (ElementNotFoundException e) {
-            logger.error("",e);
-        } catch (FieldNotFoundException e) {
-            logger.error("",e);
-        }
-    }
-
-    /**
-	 * Generate CREATE, ALTER, VIEW, and INSERT statements for each element in the
-	 * defined schemas.
-	 * @param outputFile (location to save generated sql)
-	 */
-	public void generateSQL() throws Exception
-	{
-		SQLCreateGenerator.generateDoc(getWorkDirectory() + "xdat.sql");
-	}
-
-    /**
-	 * Generate CREATE, ALTER, VIEW, and INSERT statements for each element in the
-	 * defined schemas.
-	 * @param outputFile (location to save generated sql)
-	 */
-	public void generateSQL(String s) throws Exception
-	{
-	    XDAT.GenerateCreateSQL(s);
-	}
-
-	public void storeXML(String fileLocation,Boolean quarantine, boolean allowItemRemoval) throws Exception
-	{
-	    storeXML(new File(fileLocation),quarantine,allowItemRemoval);
-	}
-
-
-    /**
-     * @return Returns the ignoreSecurity.
-     */
-    public boolean isIgnoreSecurity() {
-        return ignoreSecurity;
-    }
-    /**
-     * @param ignoreSecurity The ignoreSecurity to set.
-     */
-    public void setIgnoreSecurity(boolean ignoreSecurity) {
-        this.ignoreSecurity = ignoreSecurity;
-    }
-
-	public void storeXML(File fileLocation,Boolean quarantine, boolean allowItemRemoval) throws Exception
-	{
-	    boolean overrideSecurity = false;
-	    if (user == null && (!ignoreSecurity))
-	    {
-	        if(!fileLocation.getAbsolutePath().endsWith("security.xml"))
-	        {
-	            throw new Exception("Error: No username and password.");
-	        }else{
-	            overrideSecurity=true;
-	        }
-	    }
-	    if (! fileLocation.exists())
-	    {
-	        throw new Exception("File Not Found: " + fileLocation.getPath());
-	    }
-
-	    //Document doc = XMLUtils.GetDOM(fileLocation);
-	    if (XFT.VERBOSE)
-	        System.out.println("Found Document:" + fileLocation);
-	    logger.info("Found Document:" + fileLocation);
-
-	    XMLValidator validator = new XMLValidator();
-	    validator.validateSchema(fileLocation.getAbsolutePath());
-
-		//XFTItem item = XMLReader.TranslateDomToItem(doc,this.user);
-	   SAXReader reader = new SAXReader(user);
-	   XFTItem item = reader.parse(fileLocation);
-		if (XFT.VERBOSE)
-	        System.out.println("Loaded XML Item:" + item.getProperName());
-	    logger.info("Loaded XML Item:" + item.getProperName());
-
-		ValidationResults vr = XFTValidator.Validate(item);
-		if (vr.isValid())
-		{
-		    if (XFT.VERBOSE)
-		        System.out.println("Validation: PASSED");
-		    logger.info("Validation: PASSED");
-
-			boolean q;
-			boolean override;
-			if (quarantine!=null)
-			{
-			    q = quarantine.booleanValue();
-			    override = true;
-			}else{
-			    q = item.getGenericSchemaElement().isQuarantine();
-			    override = false;
-			}
-        	SaveItemHelper.Save(item,user,overrideSecurity,q,override,allowItemRemoval);
-			if(XFT.VERBOSE)System.out.println("Item Successfully Stored.");
-		    logger.info("Item Successfully Stored.");
-		}else
-		{
-			throw new ValidationException(vr);
-		}
-	}
-
-	public void XMLSearch(String elementName, boolean isBackup, String dir,boolean limited,boolean pp) throws Exception
-	{
-	    if (user == null && (!ignoreSecurity))
-	    {
-	        throw new Exception("Error: No username and password.");
-	    }
-
-	    SchemaElement se = SchemaElement.GetElement(elementName);
-
-	    String query = "SELECT ";
-	    ArrayList pks = se.getAllPrimaryKeys();
-
-        String proper =  XFTReferenceManager.GetProperName(se.getFullXMLName());
-		if (proper == null || proper.equalsIgnoreCase(""))
-		{
-			proper = se.getSQLName();
-		}
-
-	    int counter = 0;
-	    Iterator iter = pks.iterator();
-	    while (iter.hasNext())
-	    {
-	        SchemaField sf = (SchemaField)iter.next();
-	        if (counter==0)
-	            query += sf.getSQLName();
-	        else
-	            query += ", " + sf.getSQLName();
-	    }
-
-	    query += " FROM " + se.getSQLName() + ";";
-
-	    String login="";
-	    if(user != null)
-	    {
-	        login = user.getLogin();
-	    }
-
-	    XFTTable table = TableSearch.Execute(query,se.getDbName(),login);
-
-	    table.resetRowCursor();
-	    while (table.hasMoreRows())
-	    {
-	        Hashtable row = table.nextRowHash();
-
-	        ItemSearch search = ItemSearch.GetItemSearch(elementName,user);
-
-	        String fileName = proper;
-
-			    iter = pks.iterator();
-			    while (iter.hasNext())
-			    {
-			        SchemaField sf = (SchemaField)iter.next();
-			        Object pk = row.get(sf.getSQLName().toLowerCase());
-			        search.addCriteria(sf.getGenericXFTField().getXMLPathString(se.getFullXMLName()),pk);
-
-			        fileName += "_" + pk;
-			    }
-
-			    fileName += ".xml";
-
-
-		    File f = new File(dir + fileName);
-		    if ((!f.exists()) || (!isBackup))
-		    {
-			    ItemCollection items= search.exec();
-			    XMLWriter.StoreXFTItemListToXMLFile(items.items(),dir,limited,pp);
-		    }else{
-		        if (XFT.VERBOSE)
-			        System.out.println(f.getAbsolutePath() + " already exists.");
-		    }
-	    }
-	}
-
-	public void XMLSearch(String elementName,String xmlPath, Object value, String dir, boolean limited,boolean pp) throws Exception
-	{
-	    if (user == null && (!ignoreSecurity))
-	    {
-	        throw new Exception("Error: No username and password.");
-	    }
-	    ItemCollection items= ItemSearch.GetItems(xmlPath,value,user,false);
-	    XMLWriter.StoreXFTItemListToXMLFile(items.items(),dir,limited,pp);
-	}
-
-	public int XMLSearch(String elementName,String xmlPath, String comparisonType, Object value, String dir,boolean limited,boolean pp) throws Exception
-	{
-	    if (user == null && (!ignoreSecurity))
-	    {
-	        throw new Exception("Error: No username and password.");
-	    }
-
-	    xmlPath = StringUtils.StandardizeXMLPath(xmlPath);
-	    ItemSearch search = ItemSearch.GetItemSearch(elementName,user);
-	    search.setAllowMultiples(false);
-	    search.addCriteria(xmlPath,value,comparisonType);
-
-	    ItemCollection items= search.exec(false);
-
-	    if (items.size()>0)
-	    {
-		    return XMLWriter.StoreXFTItemListToXMLFile(items.items(),dir,limited,pp);
-	    }else{
-	    	if(XFT.VERBOSE) System.out.println("No Matches Found.");
-	        return 1;
-	    }
-	}
-
-	public void HTMLSearch(String xmlPath, String comparisonType, Object value) throws Exception
-	{
-	    if (user == null && (!ignoreSecurity))
-	    {
-	        throw new Exception("Error: No username and password.");
-	    }
-	    String rootElement = StringUtils.GetRootElementName(xmlPath);
-	    DisplaySearch ds = user.getSearch(rootElement,"listing");