1 22 23 package org.xquark.extractor.progress; 24 25 26 import java.sql.Connection ; 27 import java.sql.ResultSet ; 28 import java.sql.SQLException ; 29 import java.util.ArrayList ; 30 import java.util.List ; 31 32 import org.xquark.extractor.common.MetaDataException; 33 import org.xquark.extractor.metadata.NamedNode; 34 import org.xquark.extractor.metadata.QNameEncoder; 35 import org.xquark.extractor.metadata.Site; 36 import org.xquark.extractor.runtime.Selection; 37 import org.xquark.jdbc.typing.DBMSInfo; 38 import org.xquark.jdbc.typing.JDBCProperties; 39 40 public class Loader extends org.xquark.extractor.metadata.Loader { 41 42 private static final String RCSRevision = "$Revision: 1.10 $"; 43 private static final String RCSName = "$Name: $"; 44 45 public Loader(Connection connection, DBMSInfo dbmsInfo, QNameEncoder encoder) 46 throws SQLException { 47 super(connection, dbmsInfo, encoder); 48 } 49 50 public Site loadSite(Selection selection, JDBCProperties JDBCprop) throws MetaDataException { 51 53 Site retVal = new Site(null); 54 55 List children = new ArrayList (); 56 List subSelections = new ArrayList (); 57 58 NamedNode catalog = null ; 59 ResultSet resultSet = null ; 60 String name = null ; 61 _nameSpaces.clear(); 62 63 children.add(null); 64 Selection subSelection = selection.includesSubElement(null); 65 subSelections.add(subSelection); 66 67 for (int i = 0; i < children.size(); i++) { 68 String child = (String )children.get(i); 69 subSelection = (Selection)subSelections.get(i); 70 retVal.addChild(loadCatalog(child, subSelection, JDBCprop)); 71 } 72 73 74 return retVal; 76 } 77 } 78 79 | Popular Tags |