es.prodevelop.gvsig.mobile.project
Class Project

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.project.Project
All Implemented Interfaces:
Persistible

public class Project
extends java.lang.Object
implements Persistible

This class keeps keeps the data associated with the project (name, creation date, file path, SRS, etc.) It owns the MapContext

Author:
jcarras
See Also:
MapContext, ViewPort

Field Summary
static java.lang.String extension
           
 
Constructor Summary
Project()
          Constructor.
 
Method Summary
 java.awt.Color getBgColor()
           
 java.util.Date getCreationDate()
           
 java.awt.geom.Rectangle2D getCreatorExtension()
           
 java.lang.String getCreatorMachine()
           
 java.lang.String getDefaultPerspective()
           
 java.lang.String getDescription()
           
 java.util.Date getLastModified()
           
 MapContext getMapContext()
          Gets the MapContext object.
 java.lang.String getName()
           
 java.lang.String getPath()
           
 IProjection getProjection()
           
 boolean isModified()
           
 boolean isNew()
           
 void setBgColor(java.awt.Color bgColor, boolean modif)
          Sets the bg color.
 void setCreationDate(java.util.Date creationDate)
           
 void setCreatorExtension(java.awt.geom.Rectangle2D creatorExtension)
           
 void setCreatorMachine(java.lang.String creatorMachine)
           
 void setDefaultPerspective(java.lang.String defaultPerspective)
           
 void setDescription(java.lang.String description, boolean modif)
           
 void setLastModified(java.util.Date lastModified, boolean modif)
           
 void setMapContext(MapContext mapContext)
          Sets the MapContext object.
 void setModified(boolean m)
          Sets whether this project has been modified.
 void setName(java.lang.String name)
           
 void setNew(boolean is_new)
          Sets whether this is a new project
 void setPath(java.lang.String path)
          Sets the project file path
 void setProjection(IProjection p)
          Sets the projection in this project
 java.lang.StringBuffer toXML(java.lang.String n)
          Gets the XML item that describes this project.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extension

public static final java.lang.String extension
See Also:
Constant Field Values
Constructor Detail

Project

public Project()
Constructor. Initializes the MapContext object.

Method Detail

getMapContext

public MapContext getMapContext()
Gets the MapContext object.

Returns:
the MapContext object.

setMapContext

public void setMapContext(MapContext mapContext)
Sets the MapContext object.

Parameters:
mapContext - the new MapContext object.

getBgColor

public java.awt.Color getBgColor()

setBgColor

public void setBgColor(java.awt.Color bgColor,
                       boolean modif)
Sets the bg color.

Parameters:
bgColor -
modif - Whether the project object has to be set to modified.

getCreationDate

public java.util.Date getCreationDate()

setCreationDate

public void setCreationDate(java.util.Date creationDate)

getCreatorExtension

public java.awt.geom.Rectangle2D getCreatorExtension()

setCreatorExtension

public void setCreatorExtension(java.awt.geom.Rectangle2D creatorExtension)

getCreatorMachine

public java.lang.String getCreatorMachine()

setCreatorMachine

public void setCreatorMachine(java.lang.String creatorMachine)

getDefaultPerspective

public java.lang.String getDefaultPerspective()

setDefaultPerspective

public void setDefaultPerspective(java.lang.String defaultPerspective)

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description,
                           boolean modif)
Parameters:
description -
modif - Whether the project object has to be set to modified.

getLastModified

public java.util.Date getLastModified()
Returns:
date of the last modification

setLastModified

public void setLastModified(java.util.Date lastModified,
                            boolean modif)
Parameters:
lastModified -
modif - Whether the project object has to be set to modified.

getName

public java.lang.String getName()
Returns:
gets the project name

setName

public void setName(java.lang.String name)
Parameters:
name - the new project name

getPath

public java.lang.String getPath()
Returns:
the project file path

setPath

public void setPath(java.lang.String path)
Sets the project file path

Parameters:
path -

toXML

public java.lang.StringBuffer toXML(java.lang.String n)
Gets the XML item that describes this project.

Specified by:
toXML in interface Persistible
Parameters:
n - name of the main element
Returns:
a description of this object as a XML string

isNew

public boolean isNew()
Returns:
whether it is a new project

setNew

public void setNew(boolean is_new)
Sets whether this is a new project

Parameters:
is_new -

setModified

public void setModified(boolean m)
Sets whether this project has been modified.

Parameters:
m - whether this project has been modified.

isModified

public boolean isModified()
Returns:
whether this project has been modified.

getProjection

public IProjection getProjection()
Returns:
the projection used by this project

setProjection

public void setProjection(IProjection p)
Sets the projection in this project

Parameters:
p - the new projection in this project