com.pnp.xfeature.documenttree
Class ProjectXMLTree

java.lang.Object
  extended by com.pnp.xfeature.documenttree.ProjectXMLTree

public class ProjectXMLTree
extends java.lang.Object

This class represents an XML tree of the XFeature project file. It is the data structure behind the project editor. The tree can be updated either by the form page of the project editor or by the XML page of the project editor.

Author:
Ondrej Rohlik

Constructor Summary
ProjectXMLTree(ProjectFormPage projectFormPage)
          The constructor stores the form page.
 
Method Summary
 void addAppDisplayModelGen(java.lang.String path)
          adds new XSL file to the list of application model generators
 void addAppGlobalConstraintsGen(java.lang.String path)
          adds new XSL file to the list of application model generators
 void addAppMetaModelGen(java.lang.String path)
          adds new XSL file to the list of application model generators
 java.lang.String[] getAppDisplayModelGen()
          Returns all files that constitute appliction display model generator.
 java.lang.String[] getAppGlobalConstraintsGen()
          Returns all files that constitute appliction global constraints generator.
 java.lang.String[] getAppMetaModelGen()
          Returns all files that constitute appliction meta-model generator.
 org.jdom.Document getDoc()
          Returns the document.
 java.lang.String getFamilyDisplayModel()
          reads the location of the family display model from the XML file
 java.lang.String getFamilyMetaModel()
          reads the location of the family meta model from the XML file
 java.util.List<java.lang.String> getPathsWithSpaces()
           
 void removeAppDmGenFile(java.lang.String filename)
          Removes an application display model generator file.
 void removeAppGcGenFile(java.lang.String filename)
          Removes an application global constraints generator file.
 void removeAppMmGenFile(java.lang.String filename)
          Removes an application meta model generator file.
 void resetDoc()
          Sets the document to null.
 void setProjectFormPage(ProjectFormPage projectFormPage)
          setter method
 void updateConfigurationFromTextEditor(java.io.StringReader reader)
          Gets the information from the XML page of the project editor and puts it in the XML tree.
 void updateTextEditorFromConfiguration()
          Gets the base folder information from the form page of the project editor and puts it in the XML tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectXMLTree

public ProjectXMLTree(ProjectFormPage projectFormPage)
The constructor stores the form page.

Method Detail

getDoc

public org.jdom.Document getDoc()
Returns the document.

Returns:
JDOM document

resetDoc

public void resetDoc()
Sets the document to null.


updateConfigurationFromTextEditor

public void updateConfigurationFromTextEditor(java.io.StringReader reader)
Gets the information from the XML page of the project editor and puts it in the XML tree.

Parameters:
reader - the String representation of the project editor XML page

updateTextEditorFromConfiguration

public void updateTextEditorFromConfiguration()
Gets the base folder information from the form page of the project editor and puts it in the XML tree.


setProjectFormPage

public void setProjectFormPage(ProjectFormPage projectFormPage)
setter method


getFamilyMetaModel

public java.lang.String getFamilyMetaModel()
reads the location of the family meta model from the XML file

Returns:
location

getFamilyDisplayModel

public java.lang.String getFamilyDisplayModel()
reads the location of the family display model from the XML file

Returns:
location

getAppMetaModelGen

public java.lang.String[] getAppMetaModelGen()
Returns all files that constitute appliction meta-model generator.

Returns:
Array of Strings containing the file names.

getAppDisplayModelGen

public java.lang.String[] getAppDisplayModelGen()
Returns all files that constitute appliction display model generator.

Returns:
Array of Strings containing the file names.

getAppGlobalConstraintsGen

public java.lang.String[] getAppGlobalConstraintsGen()
Returns all files that constitute appliction global constraints generator.

Returns:
Array of Strings containing the file names.

removeAppMmGenFile

public void removeAppMmGenFile(java.lang.String filename)
Removes an application meta model generator file.

Parameters:
filename - name of the file to be femoved

removeAppGcGenFile

public void removeAppGcGenFile(java.lang.String filename)
Removes an application global constraints generator file.

Parameters:
filename - name of the file to be femoved

removeAppDmGenFile

public void removeAppDmGenFile(java.lang.String filename)
Removes an application display model generator file.

Parameters:
filename - name of the file to be femoved

addAppMetaModelGen

public void addAppMetaModelGen(java.lang.String path)
adds new XSL file to the list of application model generators

Parameters:
path - location to the XSL file

addAppDisplayModelGen

public void addAppDisplayModelGen(java.lang.String path)
adds new XSL file to the list of application model generators

Parameters:
path - location to the XSL file

addAppGlobalConstraintsGen

public void addAppGlobalConstraintsGen(java.lang.String path)
adds new XSL file to the list of application model generators

Parameters:
path - location to the XSL file

getPathsWithSpaces

public java.util.List<java.lang.String> getPathsWithSpaces()


Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.