es.prodevelop.gvsig.mobile.project
Class ProjectSerializer

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.project.ProjectSerializer

public abstract class ProjectSerializer
extends java.lang.Object

This class stores a project object into a XML text file.

Author:
jcarras
See Also:
Project, ProjectDeserializer

Constructor Summary
ProjectSerializer()
           
 
Method Summary
static void boundSerializer(XmlBuilder xml, java.awt.geom.Rectangle2D bounds)
          This method serializes the given rectangle into an existing XMl builder object.
static void layerSerialize(XmlBuilder xml, FLayer lyr, java.lang.String projPath)
          Writes the state of a layer lyr in the xml document
static void projectSerialize(XmlBuilder xml, Project prj)
          Serializes the given project into the existing xml builder.
static void storeProject(Project prj)
          Stores the project in the file indiceted by the project irself
static void styleSerialize(XmlBuilder xml, FLayer lyr)
          This method serializes the layer properties into the existing XML builder.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectSerializer

public ProjectSerializer()
Method Detail

storeProject

public static void storeProject(Project prj)
Stores the project in the file indiceted by the project irself

Parameters:
prj - the project to be stored.

projectSerialize

public static void projectSerialize(XmlBuilder xml,
                                    Project prj)
Serializes the given project into the existing xml builder.

Parameters:
xml - an existing XML builder where the project has to be serialized.
prj - the project to be serialized.

styleSerialize

public static void styleSerialize(XmlBuilder xml,
                                  FLayer lyr)
This method serializes the layer properties into the existing XML builder.

Parameters:
xml - an existing XML builder where the layer properties have to be serialized.
lyr - the layer whose properties have to be serialized.

boundSerializer

public static void boundSerializer(XmlBuilder xml,
                                   java.awt.geom.Rectangle2D bounds)
This method serializes the given rectangle into an existing XMl builder object.

Parameters:
xml - an existing XML builder object where the rectangle has to be serialized
bounds - the rectangle to be serialized

layerSerialize

public static void layerSerialize(XmlBuilder xml,
                                  FLayer lyr,
                                  java.lang.String projPath)
Writes the state of a layer lyr in the xml document

Parameters:
xml - an existing XML builder where the layer has to be serialized
lyr - the layer which has to be serialized
projPath - the project path