Package geomss.geom.reader.iges
Class Entity
- java.lang.Object
-
- geomss.geom.reader.iges.Entity
-
- Direct Known Subclasses:
Entity000_Null,Entity106_XX_Unsupported,Entity108_XX_Unsupported,Entity118_XX_Unsupported,Entity124_TransformationMatrix,Entity402_XX_Unsupported,Entity404_Drawing,Entity410_View,EntityXXX_Unsupported,GeomSSEntity
public abstract class Entity extends java.lang.Object
The Entity class is meant to be a superclass for the individual entity type/ form classes. This class also contains some utility functions to make reading of the entity easier. When the entity is read in, it will be assumed that the first read call will return the first Parameter Data line for that entity.Modified by: Joseph A. Huwaldt
- Version:
- September 13, 2016
- Author:
- JDN, AED, Version 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intblankedStatus()Return blank status.booleancanWrite()Returnstrueif the Entity can be written to an exchange file.abstract voidcheck()Checks to see if the entity has any errors or warnings.intgetDENum()Return Directory Entry number.java.util.List<java.lang.String>getErrors()Get a list of error and warning messages issued by this Entity.java.lang.StringgetHeader()Dumps a simple header.GTransformgetMatrix(GTransform m)Get matrix representing entity's matrix appended to supplied matrix.intgetPDNum()Return Parameter Data number.intgetType()Return Entity type.abstract java.lang.StringgetTypeString()Returns a short String describing this Entity object's type.intgetView()Return View.inthierStatus()Return hierarchy status.voidread(java.io.RandomAccessFile in)Reads the entity from the input file "in".voidread_additional()Reads in the "additional pointers" after the regular Parameter Data.intsubordStatus()Return subordinate status.java.lang.StringtoString()Dump to String.intuseStatus()Return usage status.intwrite(java.io.PrintWriter writer, int PDNum)Write this entities parameter data to the specified PrintWriter.
-
-
-
Constructor Detail
-
Entity
public Entity(Part p, DirEntry de)
Default constructor for the Entity superclass. Sets a pointer back to the main Part and sets anything else to their defaults.- Parameters:
p- part in which this entity is containedde- Directory Entry for this entity- See Also:
DirEntry.read(java.io.RandomAccessFile)
-
-
Method Detail
-
read
public void read(java.io.RandomAccessFile in) throws java.io.IOException
Reads the entity from the input file "in". It is assumed that the first myReadLine() call will return the first Parameter Data line for this entity. The PD data will be read into StringBuffer "PDstring", which will then be parsed by the Entity???.read() method.- Parameters:
in- input file, which is of class RandomAccessFile- Throws:
java.io.IOException- if there is any problem reading the entity from the IGES file.
-
read_additional
public void read_additional()
Reads in the "additional pointers" after the regular Parameter Data. These are pointers to associativities and properties.
-
canWrite
public boolean canWrite()
Returnstrueif the Entity can be written to an exchange file. The default implementation returnsfalseindicating that this Entity can not be written to a file.- Returns:
- true if the Entity can be written to an exchange file.
-
write
public int write(java.io.PrintWriter writer, int PDNum) throws java.io.IOException
Write this entities parameter data to the specified PrintWriter. The default implementation always throws an exception.- Parameters:
writer- The PrintWriter to write the parameter data for this entity to.PDNum- The starting Parameter Data row index number.- Returns:
- The Parameter Data row index number for the next row.
- Throws:
java.io.IOException- This implementation always throws this exception.
-
check
public abstract void check()
Checks to see if the entity has any errors or warnings.
-
getErrors
public java.util.List<java.lang.String> getErrors()
Get a list of error and warning messages issued by this Entity. If there are no messages, an empty list is returned.- Returns:
- List of error strings
-
getTypeString
public abstract java.lang.String getTypeString()
Returns a short String describing this Entity object's type.- Returns:
- A short String describing this Entity object's type.
-
getHeader
public java.lang.String getHeader()
Dumps a simple header. Just the DE Number and type.- Returns:
- String containing the resulting text.
-
toString
public java.lang.String toString()
Dump to String.- Overrides:
toStringin classjava.lang.Object- Returns:
- String containing the resulting text.
-
blankedStatus
public int blankedStatus()
Return blank status. Returns 0 if the entity is visible, 1 if it is blanked.- Returns:
- blank status
-
subordStatus
public int subordStatus()
Return subordinate status. Returns 0 if the entity is independent, 1 if it is physically dependent to its parent, 2 if it is logically dependent to its parent, and 3 if it is both physically and logically dependent to its parent.- Returns:
- subordinate status
-
useStatus
public int useStatus()
Return usage status. Returns 0 if the entity is geometry, 1 if it is annotation, 2 if it is definition, 3 if it is something else, 4 if it is logical/positional, 5 if it is 2D parametric, and 6 if it is construction geometry.- Returns:
- entity usage status
-
hierStatus
public int hierStatus()
Return hierarchy status. Returns 0 if the entity has global top down hierarchy, 1 if global defer, or 2 if a hierarchy property is to be used.- Returns:
- hierarchy status
-
getMatrix
public GTransform getMatrix(GTransform m)
Get matrix representing entity's matrix appended to supplied matrix.- Parameters:
m- matrix to which to append this entities matrix.- Returns:
- combined matrix: m * m(entity)
-
getDENum
public int getDENum()
Return Directory Entry number.- Returns:
- DE number for this entity
-
getType
public int getType()
Return Entity type.- Returns:
- type
-
getPDNum
public int getPDNum()
Return Parameter Data number.- Returns:
- PD number for this entity
-
getView
public int getView()
Return View.- Returns:
- View for this entity
-
-