From: <zep...@us...> - 2006-12-15 23:10:12
|
Revision: 225 http://svn.sourceforge.net/pzfilereader/?rev=225&view=rev Author: zepernick Date: 2006-12-15 15:10:09 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Modified Paths: -------------- trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderDelimPZParser.java trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderPZParseFactory.java Modified: trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderDelimPZParser.java =================================================================== --- trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderDelimPZParser.java 2006-12-15 23:09:46 UTC (rev 224) +++ trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderDelimPZParser.java 2006-12-15 23:10:09 UTC (rev 225) @@ -1,3 +1,35 @@ +/* + * ObjectLab, http://www.objectlab.co.uk/open is supporting PZFileReader. + * + * Based in London, we are world leaders in the design and development + * of bespoke applications for the securities financing markets. + * + * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> + * ___ _ _ _ _ _ + * / _ \| |__ (_) ___ ___| |_| | __ _| |__ + * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ + * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | + * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ + * |__/ + * + * www.ObjectLab.co.uk + * + * $Id: ColorProvider.java 74 2006-10-24 22:19:05Z benoitx $ + * + * Copyright 2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package net.sf.pzfilereader.brparse; import java.io.BufferedReader; @@ -44,7 +76,7 @@ public DataSet doParse() { - final DataSet ds = new BuffReaderDelimPZDataSet(getColumnMD(), this); + final DataSet ds = new BuffReaderPZDataSet(getColumnMD(), this); try { //gather the conversion properties ds.setPZConvertProps(ParserUtils.loadConvertProperties()); Modified: trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderPZParseFactory.java =================================================================== --- trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderPZParseFactory.java 2006-12-15 23:09:46 UTC (rev 224) +++ trunk/PZFileReader/src/main/java/net/sf/pzfilereader/brparse/BuffReaderPZParseFactory.java 2006-12-15 23:10:09 UTC (rev 225) @@ -1,3 +1,35 @@ +/* + * ObjectLab, http://www.objectlab.co.uk/open is supporting PZFileReader. + * + * Based in London, we are world leaders in the design and development + * of bespoke applications for the securities financing markets. + * + * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> + * ___ _ _ _ _ _ + * / _ \| |__ (_) ___ ___| |_| | __ _| |__ + * | | | | '_ \| |/ _ \/ __| __| | / _` | '_ \ + * | |_| | |_) | | __/ (__| |_| |__| (_| | |_) | + * \___/|_.__// |\___|\___|\__|_____\__,_|_.__/ + * |__/ + * + * www.ObjectLab.co.uk + * + * $Id: ColorProvider.java 74 2006-10-24 22:19:05Z benoitx $ + * + * Copyright 2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ package net.sf.pzfilereader.brparse; import java.io.File; @@ -12,6 +44,12 @@ * a BufferedReader as an alternative to reading the * entire file into memory. * + * Database column mappings are not supported by this factory + * at the present time. This class is meant to mimic the LargeDataSet + * class of pre 3.0 versions, which did not support database mappings + * either. A RuntimeExcpetion will be thrown if trying to obtain a parser + * for a database map. + * * @author Paul Zepernick */ public class BuffReaderPZParseFactory implements PZParserFactory{ @@ -21,26 +59,18 @@ return INSTANCE; } - /* - * (non-Javadoc) - * - * @see net.sf.pzfilereader.PZParserFactory#newFixedWidthParser(java.sql.Connection, - * java.io.File, java.lang.String) + /** + * Not supported at this time. */ public PZParser newFixedLengthParser(final Connection con, final File dataSource, final String dataDefinition) { - //return new DBFixedLengthPZParser(con, dataSource, dataDefinition); - return null; + throw new RuntimeException("Not supported..."); } - /* - * (non-Javadoc) - * - * @see net.sf.pzfilereader.PZParserFactory#newFixedWidthParser(java.sql.Connection, - * java.io.InputStream, java.lang.String) + /** + * Not supported at this time. */ public PZParser newFixedLengthParser(final Connection con, final InputStream dataSourceStream, final String dataDefinition) { - //return new DBFixedLengthPZParser(con, dataSourceStream, dataDefinition); - return null; + throw new RuntimeException("Not supported..."); } /* @@ -50,8 +80,7 @@ * java.io.File) */ public PZParser newFixedLengthParser(final File pzmapXML, final File dataSource) { - // return new FixedLengthPZParser(pzmapXML, dataSource); - return null; + return new BuffReaderFixedPZParser(pzmapXML, dataSource); } /* @@ -61,20 +90,15 @@ * java.io.InputStream) */ public PZParser newFixedLengthParser(final InputStream pzmapXMLStream, final InputStream dataSourceStream) { - // return new FixedLengthPZParser(pzmapXMLStream, dataSourceStream); - return null; + return new BuffReaderFixedPZParser(pzmapXMLStream, dataSourceStream); } - /* - * (non-Javadoc) - * - * @see net.sf.pzfilereader.PZParserFactory#newParser(java.sql.Connection, - * java.io.InputStream, java.lang.String, char, char, boolean) + /** + * Not supported at this time. */ public PZParser newDelimitedParser(final Connection con, final InputStream dataSourceStream, final String dataDefinition, final char delimiter, final char qualifier, final boolean ignoreFirstRecord) { - //return new BuffReaderDelimPZParser(con, dataSourceStream, dataDefinition, delimiter, qualifier, ignoreFirstRecord); - return null; + throw new RuntimeException("Not supported..."); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |