ilog.cpl.project
Class IlpTGOProject

java.lang.Object
  extended by ilog.cpl.project.IlpProject
      extended by ilog.cpl.project.IlpTGOProject

public class IlpTGOProject
extends IlpProject

This class represents a project file which encapsulates information about datasource and style sheets to be used in the graphic components.

The project file which can be parsed have the following syntax:

<tgo style="file1.css,file2.css,..."> [<datasource javaClass="class name" fileName="contents"/>] </tgo>

Note: This project class is able to handle data sources which are either IlpDefaultDataSource or one of its subclasses. If you are interested in using other data source implementations, refer to methods IlpProject.readCustomDataSource(org.w3c.dom.Element, ilog.cpl.datasource.IlpDataSource) and IlpProject.writeCustomDataSource(org.w3c.dom.Element, ilog.cpl.datasource.IlpDataSource).

The XML schema that defines a project file can be found in (data/ilog/cpl/schema/project.xsd).

Since:
JViews 7.5

Field Summary
 
Fields inherited from class ilog.cpl.project.IlpProject
longDescription, shortDescription
 
Constructor Summary
IlpTGOProject()
          Creates an empty project with the default application context.
IlpTGOProject(IlpContext cxt)
          Creates an empty project.
IlpTGOProject(IlpContext cxt, URL url)
          Reads a project from an XML file.
IlpTGOProject(IlpContext cxt, URL url, boolean validate)
          Reads a project from an XML file.
 
Method Summary
protected  String getProjectSuffix()
          Returns the suffix used for project files, in this case, "*.itpr".
protected  String getProjectTag()
          Returns the project tag in the XML description.
 
Methods inherited from class ilog.cpl.project.IlpProject
addPropertyChangeListener, addPropertyChangeListener, addStyleSheet, getDataSource, getProjectURL, getProperty, getProperty, getStyleSheet, getStyleSheets, read, readCustomDataSource, removePropertyChangeListener, removePropertyChangeListener, removeStyleSheet, setDataSource, setStyleSheet, setStyleSheets, write, writeCustomDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpTGOProject

public IlpTGOProject()
Creates an empty project with the default application context.


IlpTGOProject

public IlpTGOProject(IlpContext cxt)
Creates an empty project.


IlpTGOProject

public IlpTGOProject(IlpContext cxt,
                     URL url)
              throws IOException
Reads a project from an XML file.

Parameters:
cxt - Application context
url - The URL of the file containing the XML description of the project.
Throws:
IOException - If an exception occurred while reading the project file.

IlpTGOProject

public IlpTGOProject(IlpContext cxt,
                     URL url,
                     boolean validate)
              throws IOException
Reads a project from an XML file.

Parameters:
cxt - Application context
url - The URL of the file containing the XML description of the project.
validate - Validates the XML document.
Throws:
IOException - If an exception occurred while reading the project file.
Since:
JViews 8.0
Method Detail

getProjectTag

protected String getProjectTag()
Returns the project tag in the XML description.

Specified by:
getProjectTag in class IlpProject
Returns:
Project tag

getProjectSuffix

protected String getProjectSuffix()
Returns the suffix used for project files, in this case, "*.itpr".

Specified by:
getProjectSuffix in class IlpProject
Returns:
Project suffix


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.