|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.prodevelop.gvsig.mobile.project.ProjectDeserializer
This class instantiates a full project from a XML file.
Project
,
ProjectSerializer
Constructor Summary | |
ProjectDeserializer()
|
Method Summary | |
static java.awt.geom.Rectangle2D |
deSerializeBounds(org.kxml2.io.KXmlParser parser,
Project prj)
Gets the new available data from the parser as a Rectangle2D |
static FLayer |
deSerializeLayer(org.kxml2.io.KXmlParser parser,
Project prj)
Deserializes (instantiates) a single layer from a project file. |
static java.util.ArrayList |
deSerializeLayers(org.kxml2.io.KXmlParser parser,
Project prj)
Extracts the data from the parser to instantiate the layers contained in it. |
static void |
deSerializeLineSymbol(org.kxml2.io.KXmlParser parser,
FSymbol simb)
Updates a symbol with the data deserialized from a project file. |
static void |
deSerializePointSymbol(org.kxml2.io.KXmlParser parser,
FSymbol simb)
Updates a symbol with the data deserialized from a project file. |
static void |
deSerializePolygonSymbol(org.kxml2.io.KXmlParser parser,
FSymbol simb)
Updates a symbol with the data deserialized from a project file. |
static Project |
deSerializeProject(java.io.File f,
java.awt.Dimension d)
This method instantiates a project from a given XML file and a canvas size |
static Project |
deSerializeProject(org.kxml2.io.KXmlParser parser,
java.awt.Dimension d,
Project prj)
Updates teh provided project with the given canvas size and the data found by the provided parser. |
static FSymbol |
deSerializeSymbol(org.kxml2.io.KXmlParser parser)
Gets the new available data from the parser as a FSymbol |
static boolean |
getbool(org.kxml2.io.KXmlParser parser)
Gets the new available data from the parser as a boolean |
static java.awt.Color |
getcolor(org.kxml2.io.KXmlParser parser)
Gets the new available data from the parser as a Color |
static java.util.Date |
getDate(org.kxml2.io.KXmlParser parser)
Gets the new available data from the parser as a Date |
static double |
getdbl(org.kxml2.io.KXmlParser parser)
Gets the new available data from the parser as a double |
static java.io.File |
getFile(java.io.File projectFile,
java.lang.String filePath)
gets the full path name of a file. |
static int |
getint(org.kxml2.io.KXmlParser parser)
Gets the new available data from the parser as a int |
static boolean |
isPathRelative(java.lang.String path)
Returns true if the indicated path is relative and false if it is absolute |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProjectDeserializer()
Method Detail |
public static Project deSerializeProject(java.io.File f, java.awt.Dimension d)
f
- XML file where the project is storedd
- canvas size where the project will be opened
public static Project deSerializeProject(org.kxml2.io.KXmlParser parser, java.awt.Dimension d, Project prj) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the parser that will search for more project datad
- the size of the canvas where the project has to be openedprj
- the project taht is being updated
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static java.util.ArrayList deSerializeLayers(org.kxml2.io.KXmlParser parser, Project prj) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the parser that is reading the project fileprj
- the project that is in the process of being deserialized.
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static double getdbl(org.kxml2.io.KXmlParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
double
parser
- the parser where the data comes from
double
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static int getint(org.kxml2.io.KXmlParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
int
parser
- the parser where the data comes from
int
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static boolean getbool(org.kxml2.io.KXmlParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
boolean
parser
- the parser where the data comes from
boolean
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static java.util.Date getDate(org.kxml2.io.KXmlParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException, java.text.ParseException
Date
parser
- the parser where the data comes from
Date
java.io.IOException
org.xmlpull.v1.XmlPullParserException
java.text.ParseException
public static java.awt.Color getcolor(org.kxml2.io.KXmlParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
Color
parser
- the parser where the data comes from
Color
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static java.awt.geom.Rectangle2D deSerializeBounds(org.kxml2.io.KXmlParser parser, Project prj) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
Rectangle2D
parser
- the parser where the data comes fromprj
- the project that is in the process of being deserialized
Rectangle2D
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static FSymbol deSerializeSymbol(org.kxml2.io.KXmlParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
FSymbol
parser
- the parser where the data comes from
FSymbol
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static void deSerializePolygonSymbol(org.kxml2.io.KXmlParser parser, FSymbol simb) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the parser where the data comes fromsimb
- the symbol that is being updated
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static void deSerializeLineSymbol(org.kxml2.io.KXmlParser parser, FSymbol simb) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the parser where the data comes fromsimb
- the symbol that is being updated
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static void deSerializePointSymbol(org.kxml2.io.KXmlParser parser, FSymbol simb) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the parser where the data comes fromsimb
- the symbol that is being updated
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static FLayer deSerializeLayer(org.kxml2.io.KXmlParser parser, Project prj) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the parser where the data comes fromprj
- the project that is in the process of being deserialized
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static java.io.File getFile(java.io.File projectFile, java.lang.String filePath)
projectFile
- the project file where the file path is citedfilePath
- the possibly relative file path
public static boolean isPathRelative(java.lang.String path)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |