com.partnersoft.formats.dxf
Class DxfConfigurableStructure

java.lang.Object
  extended by com.partnersoft.formats.dxf.DxfConfigurableStructure
All Implemented Interfaces:
DxfStructure

public class DxfConfigurableStructure
extends java.lang.Object
implements DxfStructure

A configurable DxfStructure implementation. This allows you to represent DxfStructure types that are not reified with their own classes, or to analyze a DXF file independently of those class implementations.

Instead of having concrete properties that are parsed from groups, the only property this pulls from the groups provided is the structure type name. The groups themselves are simply stored.

Copyright 2006 Partner Software, Inc.

Version:
$Id: DxfConfigurableStructure.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis

Constructor Summary
DxfConfigurableStructure()
           
DxfConfigurableStructure(java.util.List<DxfGroup> groups)
           
 
Method Summary
 DxfGroup findGroup(int code)
           
 java.util.List<DxfGroup> getGroups(DxfVersion version)
          Get the internal state as DXFGroups.
 java.lang.String getType()
          The type name of this structure.
 void setGroups(java.util.List<DxfGroup> groups)
          Set the internal state based on the given groups.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DxfConfigurableStructure

public DxfConfigurableStructure()

DxfConfigurableStructure

public DxfConfigurableStructure(java.util.List<DxfGroup> groups)
Method Detail

getType

public java.lang.String getType()
Description copied from interface: DxfStructure
The type name of this structure. Generally this will be the same for all instances of the same implementing Java class, so a typical example might be:
 \/**
  * Type name of this structure. Always returns "POINT".
  * \@return "POINT"
  *\/
 public String getType() {
     return "POINT";
 }
 

Specified by:
getType in interface DxfStructure
Returns:
type name of structure as defined in AutoCAD DXF specification

setGroups

public void setGroups(java.util.List<DxfGroup> groups)
Description copied from interface: DxfStructure
Set the internal state based on the given groups.

Specified by:
setGroups in interface DxfStructure
Parameters:
groups - list of groups containing data for this structure

getGroups

public java.util.List<DxfGroup> getGroups(DxfVersion version)
Description copied from interface: DxfStructure
Get the internal state as DXFGroups.

Specified by:
getGroups in interface DxfStructure
Returns:
list of groups containing the state data for this structure

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

findGroup

public DxfGroup findGroup(int code)