Package com.jsevy.jdxf
Class DXFXrecord
- java.lang.Object
-
- com.jsevy.jdxf.DXFDatabaseObject
-
- com.jsevy.jdxf.DXFXrecord
-
- All Implemented Interfaces:
DXFObject
public class DXFXrecord extends DXFDatabaseObject
Class representing Xrecord for use in OBJECTS table. Xrecords contain arbitrary strings not tied to geometric objects for things like document title, author, etc. Each string is assigned to a user-selected group code from 1 - 369 (except 5 and 105).- Author:
- jsevy
-
-
Field Summary
-
Fields inherited from class com.jsevy.jdxf.DXFDatabaseObject
LINEWEIGHT_BYBLOCK, LINEWEIGHT_BYLAYER
-
-
Constructor Summary
Constructors Constructor Description DXFXrecord()
Create an Xrecord object with no associated attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAttribute(int groupCode)
Get the String associated with the supplied group code, or null if no string is associated.void
setAttribute(int groupCode, java.lang.String attributeValue)
Associate the String with the supplied group code in this Xrecord, replacing any that may already be there.java.lang.String
toDXFString()
Implementation of DXFObject interface method; creates DXF text representing the object.-
Methods inherited from class com.jsevy.jdxf.DXFDatabaseObject
getDXFLineWeight, getHandle, getHandleCount
-
-
-
-
Method Detail
-
getAttribute
public java.lang.String getAttribute(int groupCode)
Get the String associated with the supplied group code, or null if no string is associated.- Parameters:
groupCode
- Group code value for desired attribute.- Returns:
- String associated with supplied group code, or null if none associated
-
setAttribute
public void setAttribute(int groupCode, java.lang.String attributeValue)
Associate the String with the supplied group code in this Xrecord, replacing any that may already be there. From the DXF standard, any value from 1 - 369 may be used, except 5 and 105; note that no error is issued if one of these restricted values is supplied, but the resulting DXF file will not be compliant with the standard and may cause issues when opened with a standard-compliant viewer.- Parameters:
groupCode
- Group code value to be associated with supplied string, from 1 to 369 excepting 5 and 105attributeValue
- String to associate with supplied group code
-
toDXFString
public java.lang.String toDXFString()
Implementation of DXFObject interface method; creates DXF text representing the object.- Specified by:
toDXFString
in interfaceDXFObject
- Overrides:
toDXFString
in classDXFDatabaseObject
-
-