/** For debugging purposes only. (Stopped updating after myCollection_Table) */ public void printCreateTables() { System.out.println(mySample_Table.toCreateString()); System.out.println(myOwner_Table.toCreateString()); System.out.println(myCross_Reference_Table.toCreateString()); System.out.println(mySubmitter_Table.toCreateString()); System.out.println(myCollection_Table.toCreateString()); }
/** Pulls items out of the XML document. */ private void parseBioSampleDebug() { // get the root element if (myDocument != null) { Element lRootElement = myDocument.getDocumentElement(); NodeList lNodeList = lRootElement.getElementsByTagName("BioSample"); StringBuffer lBuffer = new StringBuffer(); if (lNodeList != null && lNodeList.getLength() > 0) { for (int i = 0, n = lNodeList.getLength(); i < n; i++) { Element lBiosampleElement = (Element) lNodeList.item(i); lBuffer.append(mySample_Table.parseBioSampleXML(lBiosampleElement)); lBuffer.append(myHuman_Host_Table.parseBioSampleXML(lBiosampleElement)); lBuffer.append(myNon_Human_Host_Table.parseBioSampleXML(lBiosampleElement)); StringBuffer lCollectionTableBuffer = myCollection_Table.parseBioSampleXML(lBiosampleElement); lBuffer.append(lCollectionTableBuffer); lBuffer.append(mySubmitter_Table.parseBioSampleXML(lBiosampleElement)); lBuffer.append( myOwner_Table.parseBioSampleXML( lBiosampleElement, mySubmitter_Table, myCollection_Owner_Table, lCollectionTableBuffer)); lBuffer.append(myCross_Reference_Table.parseBioSampleXML(lBiosampleElement)); lBuffer.append(myStudy_Method_Table.parseBioSampleXML(lBiosampleElement)); try { myStatement.execute(lBuffer.toString()); } catch (SQLException sqle) { sqle.printStackTrace(System.out); } lBuffer.setLength(0); } } } }