com.ptc.wvs.server.util
Class Structure

java.lang.Object
  extended bycom.ptc.wvs.server.util.Structure

public class Structure
extends Object


Nested Class Summary
static class Structure.LengthOutputStream
           
 
Field Summary
static String ADD_IBA_DATA
           
static String BBOX
           
static String CAD_NAME
           
static String COMPONENT_BRANCH_LINK
           
static String CONTAINER_NAME
           
static String DEFAULT_LOCATION
           
private static String defaultCharset
           
static String DESCRIPTION
           
static String DISPLAY_ICON_ID
           
static String DISPLAY_INSTANCE_NAME
           
static String DOC_HTMLDOC
           
static String DOC_ITERATION
           
static String DOC_OBJECT_ID
           
static String DOC_PREFIX
           
static String DOCUMENT
           
static String DOCUMENT_REFERENCE
           
static String DRAWING
           
static String ECAD
           
private static String ED_C
           
private static String ED_CHARSET
           
private static char ED_CHARSET_CHAR
           
private static String ED_I
           
private static String ED_L
           
private static String ED_N
           
private static String ED_NULL
           
private static String ED_ONE
           
private static String ED_P
           
private static String ED_SPACE
           
private static String ED_T
           
private static String ED_V
           
private static String ED_ZERO
           
private static String ED_ZERO_ZERO
           
static String EDFILE_CHARSET
           
static String EDFILE_COMPONENT_ID
           
static String EPM_HTMLDOC
           
static String EPMDOC_ITERATION
           
static String EPMDOC_OBJECT_ID
           
static String EPMDOC_PREFIX
           
static String EPMDOCLINK_OBJECT_ID
           
static String EPMDOCLINK_PREFIX
           
static String FALSE
           
static String FILE
           
static String FILENAME_IS_ENCODED
           
static String FORMAT_NAME
           
static String HTMLDOC
           
static String IDSHAPESOURCE
           
static String IGNORE_ON_MERGE
           
static String IMAGE
           
static String ITERATION
           
static String LENGTH_UNIT
           
static String LOCATION
           
static String NAME
           
static String NO_BRANCH_REP
           
static String NUMBER
           
static String OBJECT_HTMLDOC
           
static String OBJECT_ID
           
static String OLEDOC
           
static String ORGANIZATION_NAME
           
static String OUTOFDATE_REPRESENTATION
           
static String PART_HTMLDOC
           
static String PART_ITERATION
           
static String PART_OBJECT_ID
           
static String PART_PREFIX
           
static String PARTLINK_OBJECT_ID
           
static String PARTLINK_PREFIX
           
static String PARTMASTER_HTMLDOC
           
static String POSITIONING_ASSEMBLY
           
static String POSITIONING_ASSEMBLY_BRANCH
           
static String PRODUCTCONFIGURATION_HTMLDOC
           
static String PRODUCTINSTANCE_HTMLDOC
           
static String PROPERTY_COUNT
           
static String PROPERTY_GROUP_LOOKUP
           
static String PV_BAD_COMP_ICON
           
static String PV_DOC_ICON
           
static String PV_EPMDOC_ICON
           
static String PV_EPMDOC_MASTER_ICON
           
static String PV_MARKUP_ICON
           
static String PV_PART_ICON
           
static String PV_PART_MASTER_ICON
           
static String PV_PRODUCT_ICON
           
static String PV_PRODUCT_MASTER_ICON
           
static String PV_SNPART_ICON
           
static String PV_SNPART_MASTER_ICON
           
static String PV_SOURCE_FILENAME
           
static String PV_SOURCE_FILEPATH
           
static String PV_SOURCE_FORMNAME
           
static String PV_SOURCE_PARTNAME
           
static String PV_SOURCE_WORKSPACE
           
static String REFERENCE_STRUCTURE
           
static String SHAPESOURCE
           
static String SIMULATION
           
static String TEXTURE_LOOKUP
           
static String TITLE
           
static String TRUE
           
static String UNIT_M
           
static String VIEW_NAME
           
static String WRITE_SKIP_PREFIX
           
static String X_COMP_COPY_ID
           
static String X_COMP_PARENT_ID
           
static String XREF_LOOKUP
           
 
Constructor Summary
private Structure()
           
 
Method Summary
static void addPropertyValue(DefaultMutableTreeNode n, String name, String value)
          add the property name/value on the tree node, allows milti-value properties

Supported API: false
static void addPropertyValue(DefaultMutableTreeNode n, String name, String value, String group)
          add the property name/value on the tree node, allows milti-value properties, with group

Supported API: false
static void addPropertyValue(Hashtable h, String name, String value)
          add the property name/value on the hashtable, allows milti-value properties

Supported API: false
static void addPropertyValue(Hashtable h, String name, String value, String group)
          add the property name/value on the hashtable, allows milti-value properties, with group

Supported API: false
static DefaultMutableTreeNode copyStructure(DefaultMutableTreeNode n)
          preforms a deep copy of the structure.
static boolean doesEDFileHavePropertyName(InputStream is, String propName)
           
static boolean doesEDFileHavePropertyName(InputStream is, String propName, String charset)
           
static boolean doesEDFileHavePropertyValue(InputStream is, String propValue)
           
static boolean doesEDFileHavePropertyValue(InputStream is, String propValue, String charset)
           
static String getEDFileCharset(File edFile)
           
static String getFirstPropertyValue(DefaultMutableTreeNode n, String name)
          get the fist property value from a posibly multi-valued property

Supported API: false
static String getFirstPropertyValue(Hashtable h, String name)
          get the fist property value from a posibly multi-valued property

Supported API: false
static String getLocationValue(Hashtable h)
          try to get the value of the location property, for the case when there are multiple values, ie.
static String[] getPropertyValues(DefaultMutableTreeNode n, String name)
          get all property values from a posibly multi-valued property

Supported API: false
static String[] getPropertyValues(Hashtable h, String name)
          get all property values from a posibly multi-valued property

Supported API: false
static boolean isComponentMergable(DefaultMutableTreeNode n)
           
static boolean isComponentMergable(Hashtable h)
           
static int lengthEDStructure(DefaultMutableTreeNode root)
          conputes the lenth of the file that would be created if the node was written to a file

Supported API: false
static boolean mergeStructure(DefaultMutableTreeNode n, DefaultMutableTreeNode subRoot)
          merge the specified structure into the other node the merged nodes will be removed from the subRoot node as they can only have a single parent All the children of subRoot will be merged

Supported API: false
static boolean mergeStructure(DefaultMutableTreeNode n, DefaultMutableTreeNode subRoot, boolean allChildren)
          merge the specified structure into the other node the merged nodes will be removed from the subRoot node as they can only have a single parent allChildren specifies if all children of subRoot or only those that do not have a Windchill object id will be merged, allows a representation for an assembly to to be merged, picking only the components that belong to the subRoot component

Supported API: false
static boolean mergeStructure(DefaultMutableTreeNode n, DefaultMutableTreeNode subRoot, boolean allChildren, boolean allProperties)
           
static void putPropertyValue(DefaultMutableTreeNode n, String name, String value)
          set the property name/value on the tree node

Supported API: false
static void putPropertyValue(DefaultMutableTreeNode n, String name, String value, String group)
          set the property name/value on the tree node, specifying a group

Supported API: false
static void putPropertyValue(Hashtable h, String name, String value)
          set the property name/value on the hashtable

Supported API: false
static void putPropertyValue(Hashtable h, String name, String value, String group)
          set the property name/value on the hashtable, specifying a group

Supported API: false
static DefaultMutableTreeNode readEDStructure(File edTemp)
          read an ED file from a file

Supported API: false
static DefaultMutableTreeNode readEDStructure(File edTemp, String skipGroupName)
          read an ED file from a file, skipping properties in the specified group name

Supported API: false
static DefaultMutableTreeNode readEDStructure(File edTemp, String skipGroupName, String charset)
          read an ED file from a file, skipping properties in the specified group name and specifying a character set to read with.
static DefaultMutableTreeNode readEDStructure(InputStream is)
          read an ED file from an InputStream

Supported API: false
static DefaultMutableTreeNode readEDStructure(InputStream is, String skipGroupName)
          read an ED file from an InputStream, skipping properties in the specified group name

Supported API: false
static DefaultMutableTreeNode readEDStructure(InputStream is, String skipGroupName, String charset)
          read an ED file from an InputStream, skipping properties in the specified group name and specifying a character set to read with.
static DefaultMutableTreeNode readEDStructure(Reader reader)
          read an ED file from a Reader

Supported API: false
static DefaultMutableTreeNode readEDStructure(Reader reader, String skipGroupName)
          read an ED file from a Reader, skipping properties in the specified group name

Supported API: false
static void removeProperty(DefaultMutableTreeNode n, String name)
          removes the property name from the tree node

Supported API: false
static void removeProperty(Hashtable h, String name)
          removes the property name from the hashtable

Supported API: false
private static String scaleLocation(String in, double scaleFactor)
           
private static int writeEDIBAData(int id_count, PrintWriter out, String my_id, String[] iba_strings, Hashtable groupNames)
           
private static int writeEDProperty(int id_count, PrintWriter out, String my_id, String pname, Object pvalue, Object groupName, Hashtable groupNames)
           
static void writeEDStructure(DefaultMutableTreeNode root, File edTemp)
          write the structure from the specified node to a file

Supported API: false
static void writeEDStructure(DefaultMutableTreeNode root, File edTemp, String charset)
          write the structure from the specified node to a file with specified character set

Supported API: false
static void writeEDStructure(DefaultMutableTreeNode root, OutputStream os)
          write the structure from the specified node to an output stream

Supported API: false
static void writeEDStructure(DefaultMutableTreeNode root, OutputStream os, String charset)
          write the structure from the specified node to a file with specified character set

Supported API: false
static void writeEDStructure(DefaultMutableTreeNode root, Writer writer)
          write the structure from the specified node to a Writer

Supported API: false
private static int writeEDStructureInternal(int id_count, PrintWriter out, String parent_id, Hashtable groupNames, DefaultMutableTreeNode n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE_SKIP_PREFIX

public static final String WRITE_SKIP_PREFIX
See Also:
Constant Field Values

DISPLAY_ICON_ID

public static final String DISPLAY_ICON_ID
See Also:
Constant Field Values

DISPLAY_INSTANCE_NAME

public static final String DISPLAY_INSTANCE_NAME
See Also:
Constant Field Values

COMPONENT_BRANCH_LINK

public static final String COMPONENT_BRANCH_LINK
See Also:
Constant Field Values

PROPERTY_GROUP_LOOKUP

public static final String PROPERTY_GROUP_LOOKUP
See Also:
Constant Field Values

PROPERTY_COUNT

public static final String PROPERTY_COUNT
See Also:
Constant Field Values

IGNORE_ON_MERGE

public static final String IGNORE_ON_MERGE
See Also:
Constant Field Values

REFERENCE_STRUCTURE

public static final String REFERENCE_STRUCTURE
See Also:
Constant Field Values

DOCUMENT_REFERENCE

public static final String DOCUMENT_REFERENCE
See Also:
Constant Field Values

OUTOFDATE_REPRESENTATION

public static final String OUTOFDATE_REPRESENTATION
See Also:
Constant Field Values

POSITIONING_ASSEMBLY

public static final String POSITIONING_ASSEMBLY
See Also:
Constant Field Values

POSITIONING_ASSEMBLY_BRANCH

public static final String POSITIONING_ASSEMBLY_BRANCH
See Also:
Constant Field Values

NO_BRANCH_REP

public static final String NO_BRANCH_REP
See Also:
Constant Field Values

ADD_IBA_DATA

public static final String ADD_IBA_DATA
See Also:
Constant Field Values

EDFILE_COMPONENT_ID

public static final String EDFILE_COMPONENT_ID
See Also:
Constant Field Values

EDFILE_CHARSET

public static final String EDFILE_CHARSET
See Also:
Constant Field Values

FILENAME_IS_ENCODED

public static final String FILENAME_IS_ENCODED
See Also:
Constant Field Values

X_COMP_PARENT_ID

public static final String X_COMP_PARENT_ID
See Also:
Constant Field Values

X_COMP_COPY_ID

public static final String X_COMP_COPY_ID
See Also:
Constant Field Values

DOC_PREFIX

public static final String DOC_PREFIX
See Also:
Constant Field Values

PART_PREFIX

public static final String PART_PREFIX
See Also:
Constant Field Values

PARTLINK_PREFIX

public static final String PARTLINK_PREFIX
See Also:
Constant Field Values

EPMDOC_PREFIX

public static final String EPMDOC_PREFIX
See Also:
Constant Field Values

EPMDOCLINK_PREFIX

public static final String EPMDOCLINK_PREFIX
See Also:
Constant Field Values

OBJECT_ID

public static final String OBJECT_ID
See Also:
Constant Field Values

DOC_OBJECT_ID

public static final String DOC_OBJECT_ID
See Also:
Constant Field Values

PART_OBJECT_ID

public static final String PART_OBJECT_ID
See Also:
Constant Field Values

PARTLINK_OBJECT_ID

public static final String PARTLINK_OBJECT_ID
See Also:
Constant Field Values

EPMDOC_OBJECT_ID

public static final String EPMDOC_OBJECT_ID
See Also:
Constant Field Values

EPMDOCLINK_OBJECT_ID

public static final String EPMDOCLINK_OBJECT_ID
See Also:
Constant Field Values

ITERATION

public static final String ITERATION
See Also:
Constant Field Values

DOC_ITERATION

public static final String DOC_ITERATION
See Also:
Constant Field Values

PART_ITERATION

public static final String PART_ITERATION
See Also:
Constant Field Values

EPMDOC_ITERATION

public static final String EPMDOC_ITERATION
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

NUMBER

public static final String NUMBER
See Also:
Constant Field Values

CONTAINER_NAME

public static final String CONTAINER_NAME
See Also:
Constant Field Values

ORGANIZATION_NAME

public static final String ORGANIZATION_NAME
See Also:
Constant Field Values

VIEW_NAME

public static final String VIEW_NAME
See Also:
Constant Field Values

CAD_NAME

public static final String CAD_NAME
See Also:
Constant Field Values

FORMAT_NAME

public static final String FORMAT_NAME
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

TITLE

public static final String TITLE
See Also:
Constant Field Values

PV_MARKUP_ICON

public static final String PV_MARKUP_ICON
See Also:
Constant Field Values

PV_BAD_COMP_ICON

public static final String PV_BAD_COMP_ICON
See Also:
Constant Field Values

PV_DOC_ICON

public static final String PV_DOC_ICON
See Also:
Constant Field Values

PV_PART_ICON

public static final String PV_PART_ICON
See Also:
Constant Field Values

PV_EPMDOC_ICON

public static final String PV_EPMDOC_ICON
See Also:
Constant Field Values

PV_PART_MASTER_ICON

public static final String PV_PART_MASTER_ICON
See Also:
Constant Field Values

PV_EPMDOC_MASTER_ICON

public static final String PV_EPMDOC_MASTER_ICON
See Also:
Constant Field Values

PV_PRODUCT_ICON

public static final String PV_PRODUCT_ICON
See Also:
Constant Field Values

PV_PRODUCT_MASTER_ICON

public static final String PV_PRODUCT_MASTER_ICON
See Also:
Constant Field Values

PV_SNPART_ICON

public static final String PV_SNPART_ICON
See Also:
Constant Field Values

PV_SNPART_MASTER_ICON

public static final String PV_SNPART_MASTER_ICON
See Also:
Constant Field Values

LENGTH_UNIT

public static final String LENGTH_UNIT
See Also:
Constant Field Values

UNIT_M

public static final String UNIT_M
See Also:
Constant Field Values

LOCATION

public static final String LOCATION
See Also:
Constant Field Values

DEFAULT_LOCATION

public static final String DEFAULT_LOCATION
See Also:
Constant Field Values

HTMLDOC

public static final String HTMLDOC
See Also:
Constant Field Values

EPM_HTMLDOC

public static final String EPM_HTMLDOC
See Also:
Constant Field Values

PART_HTMLDOC

public static final String PART_HTMLDOC
See Also:
Constant Field Values

PARTMASTER_HTMLDOC

public static final String PARTMASTER_HTMLDOC
See Also:
Constant Field Values

DOC_HTMLDOC

public static final String DOC_HTMLDOC
See Also:
Constant Field Values

OBJECT_HTMLDOC

public static final String OBJECT_HTMLDOC
See Also:
Constant Field Values

PRODUCTINSTANCE_HTMLDOC

public static final String PRODUCTINSTANCE_HTMLDOC
See Also:
Constant Field Values

PRODUCTCONFIGURATION_HTMLDOC

public static final String PRODUCTCONFIGURATION_HTMLDOC
See Also:
Constant Field Values

TRUE

public static final String TRUE
See Also:
Constant Field Values

FALSE

public static final String FALSE
See Also:
Constant Field Values

IDSHAPESOURCE

public static final String IDSHAPESOURCE
See Also:
Constant Field Values

BBOX

public static final String BBOX
See Also:
Constant Field Values

SHAPESOURCE

public static final String SHAPESOURCE
See Also:
Constant Field Values

DRAWING

public static final String DRAWING
See Also:
Constant Field Values

DOCUMENT

public static final String DOCUMENT
See Also:
Constant Field Values

IMAGE

public static final String IMAGE
See Also:
Constant Field Values

FILE

public static final String FILE
See Also:
Constant Field Values

ECAD

public static final String ECAD
See Also:
Constant Field Values

SIMULATION

public static final String SIMULATION
See Also:
Constant Field Values

OLEDOC

public static final String OLEDOC
See Also:
Constant Field Values

TEXTURE_LOOKUP

public static final String TEXTURE_LOOKUP
See Also:
Constant Field Values

XREF_LOOKUP

public static final String XREF_LOOKUP
See Also:
Constant Field Values

PV_SOURCE_FILENAME

public static final String PV_SOURCE_FILENAME
See Also:
Constant Field Values

PV_SOURCE_PARTNAME

public static final String PV_SOURCE_PARTNAME
See Also:
Constant Field Values

PV_SOURCE_FORMNAME

public static final String PV_SOURCE_FORMNAME
See Also:
Constant Field Values

PV_SOURCE_FILEPATH

public static final String PV_SOURCE_FILEPATH
See Also:
Constant Field Values

PV_SOURCE_WORKSPACE

public static final String PV_SOURCE_WORKSPACE
See Also:
Constant Field Values

ED_ZERO

private static final String ED_ZERO
See Also:
Constant Field Values

ED_ZERO_ZERO

private static final String ED_ZERO_ZERO
See Also:
Constant Field Values

ED_ONE

private static final String ED_ONE
See Also:
Constant Field Values

ED_SPACE

private static final String ED_SPACE
See Also:
Constant Field Values

ED_NULL

private static final String ED_NULL
See Also:
Constant Field Values

ED_T

private static final String ED_T
See Also:
Constant Field Values

ED_C

private static final String ED_C
See Also:
Constant Field Values

ED_I

private static final String ED_I
See Also:
Constant Field Values

ED_L

private static final String ED_L
See Also:
Constant Field Values

ED_P

private static final String ED_P
See Also:
Constant Field Values

ED_N

private static final String ED_N
See Also:
Constant Field Values

ED_V

private static final String ED_V
See Also:
Constant Field Values

ED_CHARSET

private static final String ED_CHARSET
See Also:
Constant Field Values

ED_CHARSET_CHAR

private static final char ED_CHARSET_CHAR
See Also:
Constant Field Values

defaultCharset

private static String defaultCharset
Constructor Detail

Structure

private Structure()
Method Detail

readEDStructure

public static DefaultMutableTreeNode readEDStructure(File edTemp)
                                              throws Exception
read an ED file from a file

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(File edTemp,
                                                     String skipGroupName)
                                              throws Exception
read an ED file from a file, skipping properties in the specified group name

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(File edTemp,
                                                     String skipGroupName,
                                                     String charset)
                                              throws Exception
read an ED file from a file, skipping properties in the specified group name and specifying a character set to read with.

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(InputStream is)
                                              throws Exception
read an ED file from an InputStream

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(InputStream is,
                                                     String skipGroupName)
                                              throws Exception
read an ED file from an InputStream, skipping properties in the specified group name

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(InputStream is,
                                                     String skipGroupName,
                                                     String charset)
                                              throws Exception
read an ED file from an InputStream, skipping properties in the specified group name and specifying a character set to read with.

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(Reader reader)
                                              throws Exception
read an ED file from a Reader

Supported API: false

Returns:
root node of ed file
Throws:
Exception

readEDStructure

public static DefaultMutableTreeNode readEDStructure(Reader reader,
                                                     String skipGroupName)
                                              throws Exception
read an ED file from a Reader, skipping properties in the specified group name

Supported API: false

Returns:
root node of ed file
Throws:
Exception

putPropertyValue

public static void putPropertyValue(DefaultMutableTreeNode n,
                                    String name,
                                    String value)
set the property name/value on the tree node

Supported API: false


putPropertyValue

public static void putPropertyValue(Hashtable h,
                                    String name,
                                    String value)
set the property name/value on the hashtable

Supported API: false


putPropertyValue

public static void putPropertyValue(DefaultMutableTreeNode n,
                                    String name,
                                    String value,
                                    String group)
set the property name/value on the tree node, specifying a group

Supported API: false


putPropertyValue

public static void putPropertyValue(Hashtable h,
                                    String name,
                                    String value,
                                    String group)
set the property name/value on the hashtable, specifying a group

Supported API: false


addPropertyValue

public static void addPropertyValue(DefaultMutableTreeNode n,
                                    String name,
                                    String value)
add the property name/value on the tree node, allows milti-value properties

Supported API: false


addPropertyValue

public static void addPropertyValue(Hashtable h,
                                    String name,
                                    String value)
add the property name/value on the hashtable, allows milti-value properties

Supported API: false


addPropertyValue

public static void addPropertyValue(DefaultMutableTreeNode n,
                                    String name,
                                    String value,
                                    String group)
add the property name/value on the tree node, allows milti-value properties, with group

Supported API: false


addPropertyValue

public static void addPropertyValue(Hashtable h,
                                    String name,
                                    String value,
                                    String group)
add the property name/value on the hashtable, allows milti-value properties, with group

Supported API: false


removeProperty

public static void removeProperty(Hashtable h,
                                  String name)
removes the property name from the hashtable

Supported API: false


removeProperty

public static void removeProperty(DefaultMutableTreeNode n,
                                  String name)
removes the property name from the tree node

Supported API: false


getFirstPropertyValue

public static String getFirstPropertyValue(DefaultMutableTreeNode n,
                                           String name)
get the fist property value from a posibly multi-valued property

Supported API: false

Returns:
property value

getFirstPropertyValue

public static String getFirstPropertyValue(Hashtable h,
                                           String name)
get the fist property value from a posibly multi-valued property

Supported API: false

Returns:
property value

getPropertyValues

public static String[] getPropertyValues(DefaultMutableTreeNode n,
                                         String name)
get all property values from a posibly multi-valued property

Supported API: false

Returns:
property values

getPropertyValues

public static String[] getPropertyValues(Hashtable h,
                                         String name)
get all property values from a posibly multi-valued property

Supported API: false

Returns:
property values

getLocationValue

public static String getLocationValue(Hashtable h)
try to get the value of the location property, for the case when there are multiple values, ie. a customer attribute called location is messing things up.

Supported API: false

Returns:
location value

copyStructure

public static DefaultMutableTreeNode copyStructure(DefaultMutableTreeNode n)
preforms a deep copy of the structure. The user object and non String values in the user object are copied. Returns the root node of the new copy

Supported API: false

Returns:
new root node

mergeStructure

public static boolean mergeStructure(DefaultMutableTreeNode n,
                                     DefaultMutableTreeNode subRoot)
merge the specified structure into the other node the merged nodes will be removed from the subRoot node as they can only have a single parent All the children of subRoot will be merged

Supported API: false

Returns:
success flag

mergeStructure

public static boolean mergeStructure(DefaultMutableTreeNode n,
                                     DefaultMutableTreeNode subRoot,
                                     boolean allChildren)
merge the specified structure into the other node the merged nodes will be removed from the subRoot node as they can only have a single parent allChildren specifies if all children of subRoot or only those that do not have a Windchill object id will be merged, allows a representation for an assembly to to be merged, picking only the components that belong to the subRoot component

Supported API: false

Returns:
success flag

mergeStructure

public static boolean mergeStructure(DefaultMutableTreeNode n,
                                     DefaultMutableTreeNode subRoot,
                                     boolean allChildren,
                                     boolean allProperties)

isComponentMergable

public static boolean isComponentMergable(DefaultMutableTreeNode n)

isComponentMergable

public static boolean isComponentMergable(Hashtable h)

scaleLocation

private static String scaleLocation(String in,
                                    double scaleFactor)

lengthEDStructure

public static int lengthEDStructure(DefaultMutableTreeNode root)
                             throws Exception
conputes the lenth of the file that would be created if the node was written to a file

Supported API: false

Throws:
Exception

writeEDStructure

public static void writeEDStructure(DefaultMutableTreeNode root,
                                    File edTemp)
                             throws Exception
write the structure from the specified node to a file

Supported API: false

Throws:
Exception

writeEDStructure

public static void writeEDStructure(DefaultMutableTreeNode root,
                                    File edTemp,
                                    String charset)
                             throws Exception
write the structure from the specified node to a file with specified character set

Supported API: false

Throws:
Exception

writeEDStructure

public static void writeEDStructure(DefaultMutableTreeNode root,
                                    OutputStream os)
                             throws Exception
write the structure from the specified node to an output stream

Supported API: false

Throws:
Exception

writeEDStructure

public static void writeEDStructure(DefaultMutableTreeNode root,
                                    OutputStream os,
                                    String charset)
                             throws Exception
write the structure from the specified node to a file with specified character set

Supported API: false

Throws:
Exception

writeEDStructure

public static void writeEDStructure(DefaultMutableTreeNode root,
                                    Writer writer)
                             throws Exception
write the structure from the specified node to a Writer

Supported API: false

Throws:
Exception

writeEDStructureInternal

private static int writeEDStructureInternal(int id_count,
                                            PrintWriter out,
                                            String parent_id,
                                            Hashtable groupNames,
                                            DefaultMutableTreeNode n)
                                     throws Exception
Throws:
Exception

writeEDIBAData

private static int writeEDIBAData(int id_count,
                                  PrintWriter out,
                                  String my_id,
                                  String[] iba_strings,
                                  Hashtable groupNames)

writeEDProperty

private static int writeEDProperty(int id_count,
                                   PrintWriter out,
                                   String my_id,
                                   String pname,
                                   Object pvalue,
                                   Object groupName,
                                   Hashtable groupNames)

doesEDFileHavePropertyValue

public static boolean doesEDFileHavePropertyValue(InputStream is,
                                                  String propValue)
                                           throws Exception
Throws:
Exception

doesEDFileHavePropertyValue

public static boolean doesEDFileHavePropertyValue(InputStream is,
                                                  String propValue,
                                                  String charset)
                                           throws Exception
Throws:
Exception

doesEDFileHavePropertyName

public static boolean doesEDFileHavePropertyName(InputStream is,
                                                 String propName)
                                          throws Exception
Throws:
Exception

doesEDFileHavePropertyName

public static boolean doesEDFileHavePropertyName(InputStream is,
                                                 String propName,
                                                 String charset)
                                          throws Exception
Throws:
Exception

getEDFileCharset

public static String getEDFileCharset(File edFile)
                               throws Exception
Throws:
Exception