maito.browsing.fileexport
Class FileExporterImpl

java.lang.Object
  extended by maito.browsing.fileexport.FileExporterImpl
All Implemented Interfaces:
FileExporter

public class FileExporterImpl
extends java.lang.Object
implements FileExporter

Implementation of the FileExporter spec - handles the exporting of resource & relation data to different file formats

Author:
Väinö Ala-Härkönen

Constructor Summary
FileExporterImpl()
           
 
Method Summary
 java.lang.String[] getFormats()
          Returns a list of file export formats that are supported by the software.
 boolean writeFile(java.lang.String filename, java.lang.String format, Resource[] resources, ResourceRelation[] relations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileExporterImpl

public FileExporterImpl()
Method Detail

writeFile

public boolean writeFile(java.lang.String filename,
                         java.lang.String format,
                         Resource[] resources,
                         ResourceRelation[] relations)
Specified by:
writeFile in interface FileExporter
Parameters:
filename - Name of the file to be written
format - Format of the file to be written - use getFormats() to find out which ones it supports
resources - Resources to be saved to the file
relations - Relations to be saved to the file
Returns:
true if save succeeded, false if there was an error

getFormats

public java.lang.String[] getFormats()
Returns a list of file export formats that are supported by the software.

Specified by:
getFormats in interface FileExporter
Returns:
Identifiers of export formats that the software currently supports.