pl.edu.agh.cast.backward.resources.xml
Class XMLImporter

java.lang.Object
  extended by pl.edu.agh.cast.backward.resources.xml.XMLImporter
All Implemented Interfaces:
IImporter

public class XMLImporter
extends Object
implements IImporter

Imports a project from XML file.

Author:
AGH CAST Team
See Also:
XMLExporter

Constructor Summary
XMLImporter()
          Default constructor.
XMLImporter(Class<?>[] classesWithAnnotations)
          Constructor.
 
Method Summary
 IDiagram importDiagram(File file)
          Imports a diagram from specified file.
 IDiagramSettings importDiagramSettings(File file)
          Imports diagram settings from specified file.
 IProjectContainer importProject(File file)
          Imports project (list of IDiagram objects) from specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLImporter

public XMLImporter()
Default constructor. Same as XMLImporter(null).


XMLImporter

public XMLImporter(Class<?>[] classesWithAnnotations)
Constructor.

Parameters:
classesWithAnnotations - see XStreamInitializer.createXStreamInstance(Class[])
Method Detail

importProject

public IProjectContainer importProject(File file)
                                throws IOException
Imports project (list of IDiagram objects) from specified file.

Specified by:
importProject in interface IImporter
Parameters:
file - file the project is read from
Returns:
IProjectContainer - embedded project
Throws:
IOException
See Also:
IImporter.importProject(java.io.File)

importDiagramSettings

public IDiagramSettings importDiagramSettings(File file)
                                       throws IOException
Imports diagram settings from specified file. Must not read the whole diagram from file for performance reasons.

Specified by:
importDiagramSettings in interface IImporter
Parameters:
file - file to read diagram settings from
Returns:
diagram settings read from the file
Throws:
IOException
See Also:
IImporter.importDiagramSettings(java.io.File)

importDiagram

public IDiagram importDiagram(File file)
                       throws IOException
Imports a diagram from specified file.

Specified by:
importDiagram in interface IImporter
Parameters:
file - file to read diagram from
Returns:
diagram read from the file
Throws:
IOException
See Also:
IImporter.importDiagram(java.io.File)


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.