Add @Overrides so we get warned about API changes

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1565 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2010-10-15 13:26:25 +00:00
parent b963fc2fc7
commit bbebb4d2dc
3 changed files with 18 additions and 38 deletions

View File

@ -1,7 +1,6 @@
package com.google.refine.exporters; package com.google.refine.exporters;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer; import java.io.Writer;
import java.util.Properties; import java.util.Properties;
@ -15,25 +14,19 @@ import com.google.refine.model.Project;
import com.google.refine.model.Row; import com.google.refine.model.Row;
public class HtmlTableExporter implements WriterExporter { public class HtmlTableExporter implements WriterExporter {
@Override
public String getContentType() { public String getContentType() {
return "text/html"; return "text/html";
} }
public boolean takeWriter() { @Override
return true;
}
public void export(Project project, Properties options, Engine engine,
OutputStream outputStream) throws IOException {
throw new RuntimeException("Not implemented");
}
public void export(Project project, Properties options, Engine engine, Writer writer) throws IOException { public void export(Project project, Properties options, Engine engine, Writer writer) throws IOException {
writer.write("<html>\n"); writer.write("<html>\n");
writer.write("<head><title>"); writer.write("<head><title>");
writer.write(ProjectManager.singleton.getProjectMetadata(project.id).getName()); writer.write(ProjectManager.singleton.getProjectMetadata(project.id).getName());
writer.write("</title></head>\n"); writer.write("</title></head>\n");
writer.write("<body>\n"); writer.write("<body>\n");
writer.write("<table>\n"); writer.write("<table>\n");

View File

@ -1,7 +1,6 @@
package com.google.refine.exporters; package com.google.refine.exporters;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter; import java.io.StringWriter;
import java.io.Writer; import java.io.Writer;
import java.util.Properties; import java.util.Properties;
@ -11,11 +10,11 @@ import org.json.JSONObject;
import org.json.JSONWriter; import org.json.JSONWriter;
import com.google.refine.browsing.Engine; import com.google.refine.browsing.Engine;
import com.google.refine.browsing.Engine.Mode;
import com.google.refine.browsing.FilteredRecords; import com.google.refine.browsing.FilteredRecords;
import com.google.refine.browsing.FilteredRows; import com.google.refine.browsing.FilteredRows;
import com.google.refine.browsing.RecordVisitor; import com.google.refine.browsing.RecordVisitor;
import com.google.refine.browsing.RowVisitor; import com.google.refine.browsing.RowVisitor;
import com.google.refine.browsing.Engine.Mode;
import com.google.refine.expr.ParsingException; import com.google.refine.expr.ParsingException;
import com.google.refine.model.Project; import com.google.refine.model.Project;
import com.google.refine.sorting.SortingRecordVisitor; import com.google.refine.sorting.SortingRecordVisitor;
@ -25,19 +24,13 @@ import com.google.refine.templating.Template;
import com.google.refine.util.ParsingUtilities; import com.google.refine.util.ParsingUtilities;
public class TemplatingExporter implements WriterExporter { public class TemplatingExporter implements WriterExporter {
@Override
public String getContentType() { public String getContentType() {
return "application/x-unknown"; return "application/x-unknown";
} }
public boolean takeWriter() { @Override
return true;
}
public void export(Project project, Properties options, Engine engine,
OutputStream outputStream) throws IOException {
throw new RuntimeException("Not implemented");
}
public void export(Project project, Properties options, Engine engine, Writer writer) throws IOException { public void export(Project project, Properties options, Engine engine, Writer writer) throws IOException {
String limitString = options.getProperty("limit"); String limitString = options.getProperty("limit");
int limit = limitString != null ? Integer.parseInt(limitString) : -1; int limit = limitString != null ? Integer.parseInt(limitString) : -1;

View File

@ -2,7 +2,6 @@ package com.google.refine.exporters;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.Writer;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Properties; import java.util.Properties;
@ -22,21 +21,16 @@ import com.google.refine.model.Project;
import com.google.refine.model.Row; import com.google.refine.model.Row;
public class XlsExporter implements StreamExporter { public class XlsExporter implements StreamExporter {
@Override
public String getContentType() { public String getContentType() {
return "application/xls"; return "application/xls";
} }
public boolean takeWriter() { @Override
return false;
}
public void export(Project project, Properties options, Engine engine, Writer writer) throws IOException {
throw new RuntimeException("Not implemented");
}
public void export(Project project, Properties options, Engine engine, public void export(Project project, Properties options, Engine engine,
OutputStream outputStream) throws IOException { OutputStream outputStream) throws IOException {
Workbook wb = new HSSFWorkbook(); Workbook wb = new HSSFWorkbook();
Sheet s = wb.createSheet(); Sheet s = wb.createSheet();
wb.setSheetName(0, ProjectManager.singleton.getProjectMetadata(project.id).getName()); wb.setSheetName(0, ProjectManager.singleton.getProjectMetadata(project.id).getName());