/** * A component of a library for * MoSeS. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ package uk.ac.leeds.ccg.andyt.projects.moses.io; import java.io.IOException; /** * A class collection of the following * AbstractCASDataRecords: * * * * @author Andy * Turner * @version 1.0.0, 2007-11-16 * @see CASDataHandler */ public class CASDataRecord_2 extends CASDataRecord { /** * Serializable class version number for swapping * (serialization/deserialization) */ private static final long serialVersionUID = 1L; /** * CASKS006DataRecord */ protected CASKS006DataRecord _CASKS006DataRecord; /** Creates a new CASDataRecord_2 */ public CASDataRecord_2() { _Init(); } /** Creates a new CASDataRecord_2 */ public CASDataRecord_2( CASDataHandler _CASDataHandler, long tRecordID) { init(_CASDataHandler, tRecordID); } /** * Initialises all fields. */ protected void _Init() { super._Init(); this.tCASKS006DataRecord = new CASKS006DataRecord(); } /** * Initialises all fields. */ protected void init(CASDataHandler_2 _CASDataHandler_2, long _RecordID) throws IOException { super.init(_CASDataHandler_2, _RecordID); this._CASKS006DataRecord = (CASKS006DataRecord) _CASDataHandler_2 .getCASKS006DataHandler().getDataRecord(_RecordID); } /** * Returns a string description of this; */ public String toString() { return super.toString() + "CAS006DataRecord " + this._CASKS006DataRecord.toString(); } /** * Returns the size of this CASDataRecord in bytes as a long. This does not * account for serialVersionUID. A boolean is assumed to be the same size as * an int in bytes. */ public long getSizeInBytes() { return super.getSizeInBytes() + this._CASKS006DataRecord.getSizeInBytes(); } /** * Returns this._CASKS006DataRecord */ public CASKS006DataRecord getCASKS006DataRecord() { return this._CASKS006DataRecord; } // /** // * Writes this to aRandomAccessFile at the // current position. // * @param aRandomAccessFile The RandomAccessFile this is // written to. // */ // @Override public void write( RandomAccessFile aRandomAccessFile ) throws // IOException { // super.write( aRandomAccessFile ); // write( aRandomAccessFile, false ); // } // // /** // * Writes this to aRandomAccessFile at the // current position. // * @param aRandomAccessFile The RandomAccessFile this is // written to. // * @param avoidCallToSuper If true super.write() is not called // */ // public void write( // RandomAccessFile aRandomAccessFile, // boolean avoidCallToSuper ) // throws IOException { // if ( avoidCallToSuper ) { // } else { // write( aRandomAccessFile ); // } // } }