public PluginFactoryImpl(Job job) { super(); this.job = job; init(); }
@Override public String getInfo() { doNavigate(); return queryString; }
@Override public List<TapSelectItem> getSelectList() { doNavigate(); return selectList; }
public TableWriter getTableWriter() { final TableWriter ret; String name = TableWriter.class.getName(); String cname = config.getProperty(name); if (cname == null) { ret = new DefaultTableWriter(); } else { try { Class c = Class.forName(cname); ret = (TableWriter) c.newInstance(); } catch (Throwable ex) { throw new RuntimeException("config error: failed to create TableWriter " + cname, ex); } } ret.setJob(job); ret.setFormatFactory(getFormatFactory()); return ret; }
@Override public TapSchemaDAO getTapSchemaDAO() { TapSchemaDAO ret = super.getTapSchemaDAO(); ret.setJob(job); return ret; } }
/** * @param columnDesc * @throws UnsupportedOperationException */ protected Format<Object> getIntervalFormat(TapSelectItem columnDesc) { throw new UnsupportedOperationException("no formatter for column " + columnDesc.getName()); }
@Override public void write(ResultSet rs, OutputStream out) throws IOException { this.write(rs, out, null); }
@Override public void setJob(Job job) { this.job = job; initFormat(); }
/** * Get the DataSource to be used to query the <code>tap_schema</code>. * * Backwards compatibility: by default, this calls getQueryDataSource(). * * @return * @throws Exception */ protected DataSource getTapSchemaDataSource() throws Exception { return getQueryDataSource(); }
protected PluginFactoryImpl getPluginFactory() { return new PluginFactoryImpl(job); }
public TableWriter getErrorWriter() { final TableWriter ret; String name = TableWriter.class.getName(); String cname = config.getProperty(name); if (cname == null) { DefaultTableWriter dtw = new DefaultTableWriter(true); ret = dtw; } else { try { Class c = Class.forName(cname); ret = (TableWriter) c.newInstance(); } catch (Throwable ex) { throw new RuntimeException("config error: failed to create TableWriter " + cname, ex); } } ret.setJob(job); ret.setFormatFactory(getFormatFactory()); return ret; }
/** * @param columnDesc * @throws UnsupportedOperationException */ protected Format<Object> getPositionFormat(TapSelectItem columnDesc) { throw new UnsupportedOperationException("no formatter for column " + columnDesc.getName()); }
@Override public void write(ResultSet rs, Writer out) throws IOException { this.write(rs, out, null); }
@Override public List<TapSelectItem> getSelectList() { doNavigate(); return selectList; }
@Override public String getInfo() { doNavigate(); return queryString; } }
/** * @param columnDesc * @throws UnsupportedOperationException */ protected Format<Object> getRegionFormat(TapSelectItem columnDesc) { throw new UnsupportedOperationException("no formatter for column " + columnDesc.getName()); }
@Override public void write(ResultSet rs, OutputStream out, Long maxrec) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(out, "UTF-8")); this.write(rs, writer, maxrec); }
/** * @param columnDesc * @throws UnsupportedOperationException */ protected Format<Object> getPolygonFormat(TapSelectItem columnDesc) { throw new UnsupportedOperationException("no formatter for column " + columnDesc.getName()); }
/** * @param columnDesc * @throws UnsupportedOperationException */ protected Format<Object> getCircleFormat(TapSelectItem columnDesc) { throw new UnsupportedOperationException("no formatter for column " + columnDesc.getName()); }
/** * @param columnDesc * @throws UnsupportedOperationException */ protected Format<Object> getPointFormat(TapSelectItem columnDesc) { throw new UnsupportedOperationException("no formatter for column " + columnDesc.getName()); }