com.partnersoft.formats.dxf
Interface DxfApplicationDefinedStructure

All Known Implementing Classes:
DxfConfigurableApplicationDefinedStructure

public interface DxfApplicationDefinedStructure

Application-defined data structure embedded inside another DxfStructure.

These were added in later specifications of the DXF format to allow association of reactors, XDICTIONARIES, and other such things with entities and other "normal" structures.

They don't behave like regular DXFStructures in some ways. For one thing, they are bounded by DXFGroups with 102 codes rather than by DXFGroups with zero codes. Otherwise, however, they have similarities, and still store their entire state as DXFGroups within those bounds.

Rather than reify all different types as classes (which is impossible to do fully since the whole point of an application-defined structure is that third-party apps can define their own), you can use the DxfConfigurableApplicationDefinedStructure implementation to represent structures that are unknown or that don't require reification. Copyright 2007 Partner Software, Inc.

Version:
$Id: DxfApplicationDefinedStructure.java 2328 2010-01-06 15:38:22Z paul $
Author:
Paul Reavis

Method Summary
 java.lang.String getApplicationName()
          The application name of this structure.
 java.util.List<DxfGroup> getGroups()
          Get the internal state as DXFGroups.
 void setGroups(java.util.List<DxfGroup> groups)
          Set the internal state based on the given groups.
 

Method Detail

getApplicationName

java.lang.String getApplicationName()
The application name of this structure. For reified standard types, it this will be the same for all instances of the same implementing Java class, so a typical example might be:
 \/**
  * Application name of this structure. Always returns "ACAD_REACTORS".
  * \@return "ACAD_REACTORS"
  *\/
 public String getApplicationName() {
     return "ACAD_REACTORS";
 }
 

Run-time discovered application structures may simply store the application name for reporting, however.

Returns:
application name of this application-defined structure

setGroups

void setGroups(java.util.List<DxfGroup> groups)
Set the internal state based on the given groups. These must begin with the 102 starting group and end with the 102 ending group. The state is copied (in some manner) so you may re-use or discard the list as you wish.

Parameters:
groups - list of groups containing data for this structure
Throws:
java.lang.IllegalArgumentException - if the starting and ending groups aren't of code 102

getGroups

java.util.List<DxfGroup> getGroups()
Get the internal state as DXFGroups. These will begin with the 102 starting group and end with the 102 ending group. This is a fresh copy of the state that you may do with as you wish.

Returns:
list of groups containing the state data for this structure