Package geomss.geom.reader.iges
Class GlobalSection
- java.lang.Object
-
- geomss.geom.reader.iges.GlobalSection
-
public class GlobalSection extends java.lang.Object
The GlobalSection class encapsulates the IGES Global Section. This holds the "global variables" for the file. This class handles initialization, reading, access, and dumping of the values.Modified by: Joseph A. Huwaldt
- Version:
- April 7, 2016
- Author:
- JDN, Version 1.0
-
-
Constructor Summary
Constructors Constructor Description GlobalSection()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthor()
Return the name of the person who created this exchange file.java.lang.String
getDateTime()
Return the date and time of IGES file generation.char
getDelim()
Return parameter delimiter character.java.lang.String
getFileName()
Return the IGES file name record which contains the name of the exchange file.double
getGrain()
Return Minimum User-Intended Resolution Granularity value.Parameter<javax.measure.quantity.Length>
getGrainParameter()
Return Minimum User-Intended Resolution Granularity value.int
getLineWeights()
Return number of line weights.double
getLineWidth()
Return maximum line width.java.lang.String
getModDateTime()
Return the date and time of the last modification of the model in this exchange file.java.lang.String
getOrganization()
Return the name of the organization or group with whom the author is associated.java.lang.String
getPreprocesorVersion()
Return the IGES file preprocessor version.java.lang.String
getProductName()
Return the IGES product identification from the sending system for this Part.int
getSpecVersion()
Return the version of the IGES Specification to which the data in this file complies.java.lang.String
getSystemID()
Return the Native System ID which identifies the native system software which created the native format file used to generate this exchange file.char
getTerm()
Return parameter terminator character.javax.measure.unit.Unit<javax.measure.quantity.Length>
getUnit()
Return the model length unit's used in the IGES file.void
read(java.io.RandomAccessFile in)
Read the Global Section from the input file.void
setAuthor(java.lang.String author)
Set the name of the person who created this exchange file.void
setFileName(java.lang.String fileName)
Set the file name of the exchange file.void
setGrain(double value)
Set the Minimum User-Intended Resolution or Granularity value.void
setModDateTime(java.lang.String modDate)
Set the date and time of the last modification of the model in this exchange file.void
setOrganization(java.lang.String organization)
Set the name of the organization or group with whom the author is associated.void
setPreprocessorVersion(java.lang.String version)
Set the preprocessor version.void
setProductName(java.lang.String productName)
Set the IGES product identification from the sending system for this Part.void
setSystemID(java.lang.String sysID)
Set the Native System ID which identifies the native system software which created the native format file used to generate this exchange file.void
setUnit(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
Set the model length unit's used in the IGES file.java.lang.String
toString()
Dump to String.int
write(java.io.PrintWriter writer)
Write the Global Section to the specified writer.
-
-
-
Constructor Detail
-
GlobalSection
public GlobalSection()
Default constructor.
-
-
Method Detail
-
getDelim
public char getDelim()
Return parameter delimiter character. This indicates which character is used to separate parameter values in the Global and Parameter Data sections. The default value is “comma.”- Returns:
- parameter delimiter character
-
getTerm
public char getTerm()
Return parameter terminator character. This indicates which character denotes the end of parameters in the Global Section and in each Parameter Data Section entry. The default value is “semicolon.”- Returns:
- parameter terminator character
-
getProductName
public java.lang.String getProductName()
Return the IGES product identification from the sending system for this Part. This contains the name or identifier which is used by the sender reference this product.- Returns:
- The IGES product identification of the sending system.
-
setProductName
public void setProductName(java.lang.String productName)
Set the IGES product identification from the sending system for this Part. This contains the name or identifier which is used by the sender reference this product.- Parameters:
productName
- The name the sender uses to reference this product (Part).
-
getFileName
public java.lang.String getFileName()
Return the IGES file name record which contains the name of the exchange file.- Returns:
- The IGES file name
-
setFileName
public void setFileName(java.lang.String fileName)
Set the file name of the exchange file.- Parameters:
fileName
- The file name for the exchange file.
-
getSystemID
public java.lang.String getSystemID()
Return the Native System ID which identifies the native system software which created the native format file used to generate this exchange file.- Returns:
- The Native System ID
-
setSystemID
public void setSystemID(java.lang.String sysID)
Set the Native System ID which identifies the native system software which created the native format file used to generate this exchange file.- Parameters:
sysID
- The Native System ID to set.
-
getPreprocesorVersion
public java.lang.String getPreprocesorVersion()
Return the IGES file preprocessor version. This uniquely identifies the version or release date of the preprocessor which created this file.- Returns:
- The IGES file preprocessor version
-
setPreprocessorVersion
public void setPreprocessorVersion(java.lang.String version)
Set the preprocessor version. This uniquely identifies the version or release date of the preprocessor which created this file.- Parameters:
version
- The IGES file preprocessor version to set.
-
getUnit
public javax.measure.unit.Unit<javax.measure.quantity.Length> getUnit()
Return the model length unit's used in the IGES file.- Returns:
- The length units used in this transfer.
-
setUnit
public void setUnit(javax.measure.unit.Unit<javax.measure.quantity.Length> unit)
Set the model length unit's used in the IGES file.- Parameters:
unit
- The model length unit to save the data in.
-
getLineWeights
public int getLineWeights()
Return number of line weights.- Returns:
- number of line weights
-
getLineWidth
public double getLineWidth()
Return maximum line width.- Returns:
- maximum line width
-
getDateTime
public java.lang.String getDateTime()
Return the date and time of IGES file generation.- Returns:
- The date and time of IGES file generation
-
getGrain
public double getGrain()
Return Minimum User-Intended Resolution Granularity value. This specifies the smallest distance between coordinates, in model-space units, that the receiving system shall consider as discernible.- Returns:
- the granularity value
-
getGrainParameter
public Parameter<javax.measure.quantity.Length> getGrainParameter()
Return Minimum User-Intended Resolution Granularity value. This specifies the smallest distance between coordinates, in model-space units, that the receiving system shall consider as discernible.- Returns:
- the granularity value as a Parameter object.
-
setGrain
public void setGrain(double value)
Set the Minimum User-Intended Resolution or Granularity value. This specifies the smallest distance between coordinates, in model-space units, that the receiving system shall consider as discernible.- Parameters:
value
- The granularity value
-
getModDateTime
public java.lang.String getModDateTime()
Return the date and time of the last modification of the model in this exchange file.- Returns:
- The date and time of the last modification
-
setModDateTime
public void setModDateTime(java.lang.String modDate)
Set the date and time of the last modification of the model in this exchange file.- Parameters:
modDate
- The date and time of the last modification as a String.
-
getAuthor
public java.lang.String getAuthor()
Return the name of the person who created this exchange file.- Returns:
- the author identification
-
setAuthor
public void setAuthor(java.lang.String author)
Set the name of the person who created this exchange file.- Parameters:
author
- The name of the author of the file.
-
getOrganization
public java.lang.String getOrganization()
Return the name of the organization or group with whom the author is associated.- Returns:
- the author's organization identification
-
setOrganization
public void setOrganization(java.lang.String organization)
Set the name of the organization or group with whom the author is associated.- Parameters:
organization
- The name of the organization the author is associated with.
-
getSpecVersion
public int getSpecVersion()
Return the version of the IGES Specification to which the data in this file complies.- Returns:
- The version of the IGES Specification to which the file complies.
-
read
public void read(java.io.RandomAccessFile in) throws java.io.IOException
Read the Global Section from the input file. This method can handle missing or incorrect fields.- Parameters:
in
- input file- Throws:
java.io.IOException
- if there is any problem reading the IGES file.
-
write
public int write(java.io.PrintWriter writer) throws java.io.IOException
Write the Global Section to the specified writer.- Parameters:
writer
- The PrintWriter to write the Global Section to.- Returns:
- The number of lines written out to the global section.
- Throws:
java.io.IOException
- if there is any problem writing the section.
-
toString
public java.lang.String toString()
Dump to String.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String containing the resulting text.
-
-