~keheliya-gallaba/gephi/maven-build

« back to all changes in this revision

Viewing changes to exporter.api/src/main/java/org/gephi/io/exporter/api/ExportController.java

  • Committer: Keheliya Gallaba
  • Date: 2011-07-31 09:31:25 UTC
  • Revision ID: keheliya.gallaba@gmail.com-20110731093125-kc48b8g95r9e3pl2
Adding Export API

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright 2008-2010 Gephi
 
3
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
 
4
Website : http://www.gephi.org
 
5
 
 
6
This file is part of Gephi.
 
7
 
 
8
Gephi is free software: you can redistribute it and/or modify
 
9
it under the terms of the GNU Affero General Public License as
 
10
published by the Free Software Foundation, either version 3 of the
 
11
License, or (at your option) any later version.
 
12
 
 
13
Gephi is distributed in the hope that it will be useful,
 
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
GNU Affero General Public License for more details.
 
17
 
 
18
You should have received a copy of the GNU Affero General Public License
 
19
along with Gephi.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
package org.gephi.io.exporter.api;
 
22
 
 
23
import java.io.File;
 
24
import java.io.IOException;
 
25
import java.io.OutputStream;
 
26
import java.io.Writer;
 
27
import org.gephi.io.exporter.spi.ByteExporter;
 
28
import org.gephi.io.exporter.spi.ExporterUI;
 
29
import org.gephi.io.exporter.spi.Exporter;
 
30
import org.gephi.io.exporter.spi.CharacterExporter;
 
31
import org.gephi.project.api.Workspace;
 
32
 
 
33
/**
 
34
 * Manage exporting tasks.
 
35
 * <p>
 
36
 * This controller is a singleton and can therefore be found in Lookup:
 
37
 * <pre>ExportController ec = Lookup.getDefault().lookup(ExportController.class);</pre>
 
38
 *
 
39
 * @author Mathieu Bastian
 
40
 * @see Exporter
 
41
 */
 
42
public interface ExportController {
 
43
 
 
44
    public void exportFile(File file) throws IOException;
 
45
 
 
46
    public void exportFile(File file, Workspace workspace) throws IOException;
 
47
 
 
48
    public void exportFile(File file, Exporter fileExporter) throws IOException;
 
49
 
 
50
    public void exportWriter(Writer writer, CharacterExporter characterExporter);
 
51
 
 
52
    public void exportStream(OutputStream stream, ByteExporter byteExporter);
 
53
 
 
54
    public Exporter getFileExporter(File file);
 
55
 
 
56
    public Exporter getExporter(String exporterName);
 
57
 
 
58
    public ExporterUI getUI(Exporter exporter);
 
59
}