public class DwgFile extends Object
| 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(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 | 
| 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) | 
| ArrayList | getDwgObjectOffsets() | 
| List | getDwgObjects() | 
| int | getDwgSectionOffset(String key)Returns the offset of DWG section given by its key | 
| DwgObject | getDwgSuperEntity(DwgObject entity) | 
| String | getDwgVersion() | 
| String | getFileName() | 
| Object | getHeader(String key) | 
| int | getIndexOf(DwgObject dwgObject) | 
| String | getLayerName(DwgObject entity) | 
| boolean | isDwg3DFile() | 
| void | manageInsert2(Point2D insPoint,
             double[] scale,
             double rot,
             int bHandle,
             List dwgObjectsWithoutBlocks,
             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(String key,
         Object value) | 
public DwgFile(String fileName)
fileName - an absolute path to the DWG filepublic String getDwgVersion()
public void read()
          throws IOException,
                 DwgVersionNotSupportedException
IOException - If the file location is wrongDwgVersionNotSupportedExceptionprotected void addDwgLayer(DwgLayer dwgLayer)
public int getColorByLayer(DwgObject entity)
entity - DWG object which we want to know its layer colorpublic void calculateGisModelDwgPolylines()
public void blockManagement2()
public void manageInsert2(Point2D insPoint, double[] scale, double rot, int bHandle, List dwgObjectsWithoutBlocks, Map handleObjectsWithoutBlocks)
public int getIndexOf(DwgObject dwgObject)
public void addDwgSectionOffset(String key, int seek, int size)
key - Define the DWG sectionseek - Offset of the sectionsize - Size of the sectionpublic int getDwgSectionOffset(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 List getDwgClasses()
public ArrayList getDwgObjectOffsets()
public List getDwgObjects()
public String getFileName()
public boolean isDwg3DFile()
public void setDwg3DFile(boolean dwg3DFile)
dwg3DFile - The dwg3DFile to set.