Class Entity

    • Constructor Summary

      Constructors 
      Constructor Description
      Entity​(Part p, DirEntry de)
      Default constructor for the Entity superclass.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int blankedStatus()
      Return blank status.
      boolean canWrite()
      Returns true if the Entity can be written to an exchange file.
      abstract void check()
      Checks to see if the entity has any errors or warnings.
      int getDENum()
      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.String getHeader()
      Dumps a simple header.
      GTransform getMatrix​(GTransform m)
      Get matrix representing entity's matrix appended to supplied matrix.
      int getPDNum()
      Return Parameter Data number.
      int getType()
      Return Entity type.
      abstract java.lang.String getTypeString()
      Returns a short String describing this Entity object's type.
      int getView()
      Return View.
      int hierStatus()
      Return hierarchy status.
      void read​(java.io.RandomAccessFile in)
      Reads the entity from the input file "in".
      void read_additional()
      Reads in the "additional pointers" after the regular Parameter Data.
      int subordStatus()
      Return subordinate status.
      java.lang.String toString()
      Dump to String.
      int useStatus()
      Return usage status.
      int write​(java.io.PrintWriter writer, int PDNum)
      Write this entities parameter data to the specified PrintWriter.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 contained
        de - 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()
        Returns true if the Entity can be written to an exchange file. The default implementation returns false indicating 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:
        toString in class java.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