public class DwgFile
extends java.lang.Object
| Constructor and Description |
|---|
DwgFile(java.lang.String fileName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDwgClass(DwgClass dwgClass)
Add a DWG class to the dwgClasses vector
|
void |
addDwgClass(DwgClass2004 dwgClass)
Add a DWG class to the dwgClasses vector
|
protected void |
addDwgLayer(DwgLayer dwgLayer) |
void |
addDwgObject(DwgObject dwgObject)
Add a DWG object to the dwgObject vector
|
void |
addDwgObjectOffset(int handle,
int offset)
Add a DWG object offset to the dwgObjectOffsets vector
|
void |
addDwgSectionOffset(java.lang.String key,
int seek,
int size)
Add a DWG section offset to the dwgSectionOffsets vector
|
void |
blockManagement2()
Configure the geometry of the polylines in a DWG file from the vertex list in
this DWG file.
|
void |
calculateGisModelDwgPolylines()
Configure the geometry of the polylines in a DWG file from the vertex list in
this DWG file.
|
int |
getColorByLayer(DwgObject entity)
Returns the color of the layer of a DWG object
|
java.util.List |
getDwgClasses() |
DwgLayer |
getDwgLayer(DwgObject entity) |
DwgObject |
getDwgObject(int index)
Returns dwgObjects from its insertion order (position
in the dwg file)
|
DwgObject |
getDwgObjectFromHandle(int handle) |
java.util.ArrayList |
getDwgObjectOffsets() |
java.util.List |
getDwgObjects() |
int |
getDwgSectionOffset(java.lang.String key)
Returns the offset of DWG section given by its key
|
DwgObject |
getDwgSuperEntity(DwgObject entity) |
java.lang.String |
getDwgVersion() |
java.lang.String |
getFileName() |
java.lang.Object |
getHeader(java.lang.String key) |
int |
getIndexOf(DwgObject dwgObject) |
java.lang.String |
getLayerName(DwgObject entity) |
boolean |
isDwg3DFile() |
void |
manageInsert2(java.awt.geom.Point2D insPoint,
double[] scale,
double rot,
int bHandle,
java.util.List dwgObjectsWithoutBlocks,
java.util.Map handleObjectsWithoutBlocks) |
void |
printClasses() |
void |
read()
Reads a DWG file and put its objects in the dwgObjects Vector
This method is version independent
|
void |
setDwg3DFile(boolean dwg3DFile) |
void |
setHeader(java.lang.String key,
java.lang.Object value) |
public DwgFile(java.lang.String fileName)
fileName - an absolute path to the DWG filepublic java.lang.String getDwgVersion()
public void read()
throws java.io.IOException,
DwgVersionNotSupportedException
java.io.IOException - If the file location is wrongDwgVersionNotSupportedExceptionpublic void setHeader(java.lang.String key,
java.lang.Object value)
public java.lang.Object getHeader(java.lang.String key)
protected void addDwgLayer(DwgLayer dwgLayer)
public java.lang.String getLayerName(DwgObject entity)
public int getColorByLayer(DwgObject entity)
entity - DWG object which we want to know its layer colorpublic void calculateGisModelDwgPolylines()
public void blockManagement2()
public void manageInsert2(java.awt.geom.Point2D insPoint,
double[] scale,
double rot,
int bHandle,
java.util.List dwgObjectsWithoutBlocks,
java.util.Map handleObjectsWithoutBlocks)
public int getIndexOf(DwgObject dwgObject)
public void addDwgSectionOffset(java.lang.String key,
int seek,
int size)
key - Define the DWG sectionseek - Offset of the sectionsize - Size of the sectionpublic int getDwgSectionOffset(java.lang.String key)
key - Define the DWG sectionpublic void addDwgObjectOffset(int handle,
int offset)
handle - Object handleoffset - Offset of the object data in the DWG filepublic void addDwgObject(DwgObject dwgObject)
dwgObject - DWG objectpublic DwgObject getDwgObject(int index)
index - order in the dwg filepublic DwgObject getDwgObjectFromHandle(int handle)
public void addDwgClass(DwgClass dwgClass)
dwgClass - DWG classpublic void addDwgClass(DwgClass2004 dwgClass)
dwgClass - DWG classpublic void printClasses()
public java.util.List getDwgClasses()
public java.util.ArrayList getDwgObjectOffsets()
public java.util.List getDwgObjects()
public java.lang.String getFileName()
public boolean isDwg3DFile()
public void setDwg3DFile(boolean dwg3DFile)
dwg3DFile - The dwg3DFile to set.