001/*
002 *   Entity000_Null  -- A Null Entity that may be created as a result of editing a file.
003 *
004 *   Copyright (C) 2010-2016, Joseph A. Huwaldt.
005 *   All rights reserved.
006 *   
007 *   This library is free software; you can redistribute it and/or
008 *   modify it under the terms of the GNU Lesser General Public
009 *   License as published by the Free Software Foundation; either
010 *   version 2.1 of the License, or (at your option) any later version.
011 *   
012 *   This library is distributed in the hope that it will be useful,
013 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
014 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015 *   Lesser General Public License for more details.
016 *
017 *   You should have received a copy of the GNU Lesser General Public License
018 *   along with this program; if not, write to the Free Software
019 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
020 *   Or visit:  http://www.gnu.org/licenses/lgpl.html
021 *
022 *   Based on, but heavily modified from, IGESView ( http://ts.nist.gov/Standards/IGES/igesTools.cfm )
023 */
024package geomss.geom.reader.iges;
025
026import java.io.IOException;
027import java.io.RandomAccessFile;
028
029/**
030 * <b><i>NULL ENTITY</i></b> - An entity that may be created as a result of editing a file
031 * to delete an "undesired" entity.
032 *
033 * <p>
034 * This entity type is ignored when reading in an IGES file and can not be written out to
035 * an IGES file.
036 * </p>
037 *
038 * <p> Modified by: Joseph A. Huwaldt </p>
039 * 
040 * @author JDN, Version 1.0
041 * @version September 13, 2016
042 */
043public class Entity000_Null extends Entity {
044
045    /**
046     * Default constructor.
047     *
048     * @param p  part to which this entity is contained
049     * @param de Directory Entry for this entity
050     */
051    public Entity000_Null(Part p, DirEntry de) {
052        super(p, de);
053
054        if (Constants.DEBUG) {
055            System.out.println("Entity000 constructor called");
056        }
057    }
058
059    /**
060     * Checks to see if the entity is correct. This implementation does nothing.
061     */
062    @Override
063    public void check() { }
064
065    /**
066     * Read the Parameter Data from the String read in by the superclass. Nothing is
067     * parsed for the Null entity.
068     *
069     * @param in input file
070     * @throws java.io.IOException
071     */
072    @Override
073    public void read(RandomAccessFile in) throws IOException {
074        if (Constants.DEBUG) {
075            System.out.println("Entity000.read() called");
076        }
077
078        super.read(in);
079
080        if (Constants.DEBUG) {
081            System.out.println("PD String = \"" + getPDString() + "\"");
082        }
083    }
084
085    /**
086     * Returns a short String describing this Entity object's type.
087     *
088     * @return A short String describing this Entity object's type.
089     */
090    @Override
091    public String getTypeString() {
092        return "Entity000 - Null";
093    }
094
095}