• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DataColumnSpecCreator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.knime.core.data.DataColumnSpecCreator的典型用法代码示例。如果您正苦于以下问题:Java DataColumnSpecCreator类的具体用法?Java DataColumnSpecCreator怎么用?Java DataColumnSpecCreator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataColumnSpecCreator类属于org.knime.core.data包,在下文中一共展示了DataColumnSpecCreator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createCellFactory

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
/**
 * Creates a CellFactory for the class column.
 *
 * @param colName
 *            the name of the class column
 * @return CellFactory for the class column.
 */
private CellFactory createCellFactory(final String colName) {
    return new CellFactory() {

        @Override
        public void setProgress(final int curRowNr, final int rowCount,
                final RowKey lastKey, final ExecutionMonitor exec) {
            exec.setProgress((double) curRowNr / rowCount);
        }

        @Override
        public DataColumnSpec[] getColumnSpecs() {
            return new DataColumnSpec[] {
                    new DataColumnSpecCreator(colName, StringCell.TYPE)
                            .createSpec() };
        }

        @Override
        public DataCell[] getCells(final DataRow row) {
            throw new IllegalStateException(
                    new IllegalAccessException("This shouldn't be called"));
        }
    };
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:31,代码来源:ActiveLearnLoopStartNodeModel.java


示例2: createResRearranger

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
/**
 * {@inheritDoc} Variance based score.
 */
@Override
protected ColumnRearranger createResRearranger(final DataTableSpec inSpec)
        throws InvalidSettingsException {
    final ColumnRearranger rearranger = new ColumnRearranger(inSpec);
    final DataColumnSpec newColSpec =
            new DataColumnSpecCreator("Variance Score", DoubleCell.TYPE)
                    .createSpec();

    // utility object that performs the calculation
    rearranger.append(new SingleCellFactory(newColSpec) {
        final List<Integer> m_selectedIndicies =
                NodeTools.getIndicesFromFilter(inSpec, m_columnFilterModel,
                        DoubleValue.class, VarianceScorerNodeModel.class);

        @Override
        public DataCell getCell(final DataRow row) {
            return new DoubleCell(MathUtils.variance(
                    NodeTools.toDoubleArray(row, m_selectedIndicies)));
        }
    });
    return rearranger;
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:26,代码来源:VarianceScorerNodeModel.java


示例3: createResRearranger

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private ColumnRearranger createResRearranger(final DataTableSpec inSpec) {
    final ColumnRearranger rearranger = new ColumnRearranger(inSpec);
    rearranger.append(new CellFactory() {

        @Override
        public void setProgress(final int curRowNr, final int rowCount,
                final RowKey lastKey, final ExecutionMonitor exec) {
            exec.setProgress((double) curRowNr / rowCount);

        }

        @Override
        public DataColumnSpec[] getColumnSpecs() {
            return new DataColumnSpec[] {
                    new DataColumnSpecCreator("Graph Density Score",
                            DoubleCell.TYPE).createSpec() };
        }

        @Override
        public DataCell[] getCells(final DataRow row) {
            return new DataCell[] { new DoubleCell(
                    m_dataPoints.get(row.getKey()).getDensity()) };
        }
    });
    return rearranger;
}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:27,代码来源:GraphDensityScorerNodeModel.java


示例4: execute

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
		final ExecutionContext exec) throws Exception {

	// create output table
	BufferedDataContainer container = exec
			.createDataContainer(new DataTableSpec(
					new DataColumnSpec[] { new DataColumnSpecCreator(
							"Column 0", LongCell.TYPE).createSpec() }));

	// add row with count
	container.addRowToTable(new DefaultRow(new RowKey("Row 0"),
			new LongCell[] { new LongCell(TableCellUtils.getRDD(inData[0])
					.count()) }));
	container.close();

	BufferedDataTable out = container.getTable();

	// update viewer
	rddViewer = new RddViewer(out, exec);

	return new BufferedDataTable[] { out };
}
 
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:27,代码来源:CountNodeModel.java


示例5: createSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createSpec(DataTableSpec in)
{
return new DataTableSpec(in,
		new DataTableSpec(new DataColumnSpec[]{
			new DataColumnSpecCreator("label.das.features",StringCell.TYPE).createSpec(),
			new DataColumnSpecCreator("linkUri.das.features",StringCell.TYPE).createSpec(),
			new DataColumnSpecCreator("link.das.features",StringCell.TYPE).createSpec(),
			new DataColumnSpecCreator("start.features",IntCell.TYPE).createSpec(),
			new DataColumnSpecCreator("end.features",IntCell.TYPE).createSpec(),
			new DataColumnSpecCreator("strand.das.features",StringCell.TYPE).createSpec(),
			new DataColumnSpecCreator("type.das.features",StringCell.TYPE).createSpec(),
			new DataColumnSpecCreator("id.das.features",StringCell.TYPE).createSpec()
			}
			)

	);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:18,代码来源:DasFeaturesNodeModel.java


示例6: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createDataTableSpec(boolean isBed) throws InvalidSettingsException
  	{
  	DataColumnSpec cols[];
  	if(isBed)
   	{
   	cols=new DataColumnSpec[]{
   		new DataColumnSpecCreator(this.m_newColName.getStringValue()+".start",IntCell.TYPE).createSpec(),
   		new DataColumnSpecCreator(this.m_newColName.getStringValue()+".end",IntCell.TYPE).createSpec(),
   		new DataColumnSpecCreator(this.m_newColName.getStringValue()+".rest",StringCell.TYPE).createSpec()
   		};
   	}
else
	{
	cols=new DataColumnSpec[]{
   		new DataColumnSpecCreator(this.m_newColName.getStringValue()+".start",IntCell.TYPE).createSpec(),
   		new DataColumnSpecCreator(this.m_newColName.getStringValue()+".end",IntCell.TYPE).createSpec(),
   		new DataColumnSpecCreator(this.m_newColName.getStringValue()+".value",DoubleCell.TYPE).createSpec()
   		};
	}
  	return new DataTableSpec(cols);
  	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:22,代码来源:BigBedFileNodeModel.java


示例7: createDataSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createDataSpec()
{
String prefix=this.m_prefix.getStringValue()+".";
return new DataTableSpec(
	new DataColumnSpec[]{	
		new DataColumnSpecCreator(prefix+"chrom", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"chromStart", IntCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"chromEnd", IntCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"InOut", BooleanCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"Count", IntCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"Min", DoubleCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"Max", DoubleCell.TYPE).createSpec(),
		new DataColumnSpecCreator(prefix+"Mean", DoubleCell.TYPE).createSpec()
		}
	);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:AggregationNodeModel.java


示例8: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
protected DataTableSpec createDataTableSpec()
{
DataColumnSpec cols[]=new DataColumnSpec[]{
		new DataColumnSpecCreator("DB", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("ID", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Splice", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Symbol", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Taxon", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Qualifier", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("GO ID", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("GO Name", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Reference", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Evidence", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("With", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Aspect", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Date", StringCell.TYPE).createSpec(),
		new DataColumnSpecCreator("Source", StringCell.TYPE).createSpec()
		};
return new DataTableSpec(cols);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:21,代码来源:GoNodeModel.java


示例9: createVcfDataColumnSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createVcfDataColumnSpec()
{
DataColumnSpec[] allColSpecs = new DataColumnSpec[11];

   allColSpecs[0] =  new DataColumnSpecCreator("CHROM", StringCell.TYPE).createSpec();
   allColSpecs[1] =  new DataColumnSpecCreator("POS", IntCell.TYPE).createSpec();
   allColSpecs[2] =  new DataColumnSpecCreator("ID", StringCell.TYPE).createSpec();
   allColSpecs[3] =  new DataColumnSpecCreator("REF", StringCell.TYPE).createSpec();
   allColSpecs[4] =  new DataColumnSpecCreator("ALT", StringCell.TYPE).createSpec();
   allColSpecs[5] =  new DataColumnSpecCreator("QUAL", DoubleCell.TYPE).createSpec();
   allColSpecs[6] =  new DataColumnSpecCreator("FILTER", StringCell.TYPE).createSpec();
   allColSpecs[7] =  new DataColumnSpecCreator("INFO", StringCell.TYPE).createSpec();
   allColSpecs[8] =  new DataColumnSpecCreator("FORMAT", StringCell.TYPE).createSpec();
   allColSpecs[9] = new DataColumnSpecCreator("CALL", StringCell.TYPE).createSpec();
allColSpecs[10] =  new DataColumnSpecCreator("SAMPLE", StringCell.TYPE).createSpec();
   return new DataTableSpec( allColSpecs);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:18,代码来源:ReadOneVCFNodeModel.java


示例10: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
protected DataTableSpec createDataTableSpec()
 	{
 	List<DataColumnSpec> specs=new ArrayList<DataColumnSpec>();
 	specs.add( new DataColumnSpecCreator("kg.name", StringCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("kg.txStart0", IntCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("kg.txEnd0", IntCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("mutation.types", StringCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("segment.name", StringCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("position.in.cdna0", IntCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("position.in.protein1", IntCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("wild.codon", StringCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("mut.codon", StringCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("wild.AA", StringCell.TYPE).createSpec());
 	specs.add( new DataColumnSpecCreator("mut.AA", StringCell.TYPE).createSpec());
 	if(m_showRNASequence.getBooleanValue())
 		{
 		specs.add( new DataColumnSpecCreator("wild.cDNA", StringCell.TYPE).createSpec());
     	specs.add( new DataColumnSpecCreator("mut.cDNA", StringCell.TYPE).createSpec());
 		}
 	if(m_showProteinSequence.getBooleanValue())
{
specs.add( new DataColumnSpecCreator("wild.prot", StringCell.TYPE).createSpec());
  	specs.add( new DataColumnSpecCreator("mut.prot", StringCell.TYPE).createSpec());
}
 	return new DataTableSpec(specs.toArray(new DataColumnSpec[specs.size()]));
 	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:27,代码来源:LocalUcscPredictionNodeModel.java


示例11: createVcfDataColumnSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataColumnSpec[] createVcfDataColumnSpec()
{
DataColumnSpec[] allColSpecs = new DataColumnSpec[11];
allColSpecs[0] =  new DataColumnSpecCreator("SAMPLE", StringCell.TYPE).createSpec();
   allColSpecs[1] =  new DataColumnSpecCreator("CHROM", StringCell.TYPE).createSpec();
   allColSpecs[2] =  new DataColumnSpecCreator("POS", IntCell.TYPE).createSpec();
   allColSpecs[3] =  new DataColumnSpecCreator("ID", StringCell.TYPE).createSpec();
   allColSpecs[4] =  new DataColumnSpecCreator("REF", StringCell.TYPE).createSpec();
   allColSpecs[5] =  new DataColumnSpecCreator("ALT", StringCell.TYPE).createSpec();
   allColSpecs[6] =  new DataColumnSpecCreator("QUAL", DoubleCell.TYPE).createSpec();
   allColSpecs[7] =  new DataColumnSpecCreator("FILTER", StringCell.TYPE).createSpec();
   allColSpecs[8] =  new DataColumnSpecCreator("INFO", StringCell.TYPE).createSpec();
   allColSpecs[9] =  new DataColumnSpecCreator("FORMAT", StringCell.TYPE).createSpec();
   allColSpecs[10] = new DataColumnSpecCreator("CALL", StringCell.TYPE).createSpec();
   return allColSpecs;
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:VCFLoaderNodeModel.java


示例12: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createDataTableSpec() throws InvalidSettingsException
{
List<String> tags=extractFields();
if(tags.isEmpty()) throw new InvalidSettingsException("No tag was defined");
DataColumnSpec cols[]=new DataColumnSpec[tags.size()*this.m_callColumns.getIncludeList().size()];
DataType t=getDataType();
int n=0;
for(String call:this.m_callColumns.getIncludeList())
	{
	for(int i=0;i< tags.size();++i)
		{
		cols[n++]=new DataColumnSpecCreator(call+":"+tags.get(i),t).createSpec();
		}
	}
return new DataTableSpec(cols);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:ExtractFormatMultiNodeModel.java


示例13: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createDataTableSpec()
 	{
 	List<DataColumnSpec> specs=new ArrayList<DataColumnSpec>();
if(m_show_chrom.getBooleanValue())
	{
	specs.add(new DataColumnSpecCreator("hg19Snp130.chrom",StringCell.TYPE).createSpec());
	}
if(m_show_chromStart.getBooleanValue())
	{
	specs.add(new DataColumnSpecCreator("hg19Snp130.chromStart",IntCell.TYPE).createSpec());
	}
if(m_show_chromEnd.getBooleanValue())
	{
	specs.add(new DataColumnSpecCreator("hg19Snp130.chromEnd",IntCell.TYPE).createSpec());
	}
if(m_show_name.getBooleanValue())
	{
	specs.add(new DataColumnSpecCreator("hg19Snp130.name",StringCell.TYPE).createSpec());
	}
 	return new DataTableSpec(specs.toArray(new DataColumnSpec[specs.size()]));
 	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:22,代码来源:Hg19Snp130NodeModel.java


示例14: configure

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
@Override
  protected DataTableSpec[] configure(DataTableSpec[] inSpecs)
  		throws InvalidSettingsException {
  	if(inSpecs==null || inSpecs.length!=1)
  		{
  		throw new InvalidSettingsException("Expected one table");
  		}
  	
  	DataTableSpec in=inSpecs[0];
  	int chromCol= in.findColumnIndex(m_chromCol.getColumnName());
if(chromCol==-1) throw new InvalidSettingsException("Cannot find column for chrom");
if(!(in.getColumnSpec(chromCol).getType().equals(IntCell.TYPE) ||
		in.getColumnSpec(chromCol).getType().equals(StringCell.TYPE)
   ))
	{
	throw new InvalidSettingsException("Bad type for chrom:"+in.getColumnSpec(chromCol).getType());
	}
DataTableSpec spec2= ReplacedColumnsTable.createTableSpec(in,
		new DataColumnSpecCreator(in.getColumnSpec(chromCol).getName(),StringCell.TYPE).createSpec(),
		chromCol);
  	
  	return new DataTableSpec[]{spec2};
  	}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:24,代码来源:NormalizeChromNodeModel.java


示例15: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createDataTableSpec(DataTableSpec inSpecs)
{
List<Sample> samples=getSamples(inSpecs);
System.err.println(samples);
DataColumnSpec colSpecs[]=new DataColumnSpec[samples.size()+8];
colSpecs[0]= new DataColumnSpecCreator("CHROM",StringCell.TYPE).createSpec();
colSpecs[1]= new DataColumnSpecCreator(UcscTranscriptNodeModel.KG_START,IntCell.TYPE).createSpec();
colSpecs[2]= new DataColumnSpecCreator(UcscTranscriptNodeModel.KG_END,IntCell.TYPE).createSpec();
colSpecs[3]= new DataColumnSpecCreator(UcscTranscriptNodeModel.KG_NAME,StringCell.TYPE).createSpec();
colSpecs[4]= new DataColumnSpecCreator(UcscTranscriptNodeModel.KG_SYMBOL,StringCell.TYPE).createSpec();
colSpecs[5]= new DataColumnSpecCreator(UcscTranscriptNodeModel.KG_DESC,StringCell.TYPE).createSpec();
colSpecs[6]= new DataColumnSpecCreator("Count(affected)",IntCell.TYPE).createSpec();
colSpecs[7]= new DataColumnSpecCreator("Count(SNP)",IntCell.TYPE).createSpec();
for(int i=0;i< samples.size();++i)
	{
	colSpecs[8+i]= new DataColumnSpecCreator(SAMPLE_PREFIX+samples.get(i).name,IntCell.TYPE).createSpec();
	}
DataTableSpec out=new DataTableSpec(colSpecs);
return out;
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:21,代码来源:WinnerLoserNodeModel.java


示例16: createVcfDataColumnSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createVcfDataColumnSpec()
{
DataColumnSpec[] allColSpecs = new DataColumnSpec[11];

   allColSpecs[0] =  new DataColumnSpecCreator("CHROM", StringCell.TYPE).createSpec();
   allColSpecs[1] =  new DataColumnSpecCreator("POS", IntCell.TYPE).createSpec();
   allColSpecs[2] =  new DataColumnSpecCreator("ID", StringCell.TYPE).createSpec();
   allColSpecs[3] =  new DataColumnSpecCreator("REF", StringCell.TYPE).createSpec();
   allColSpecs[4] =  new DataColumnSpecCreator("ALT", StringCell.TYPE).createSpec();
   allColSpecs[5] =  new DataColumnSpecCreator("QUAL", DoubleCell.TYPE).createSpec();
   allColSpecs[6] =  new DataColumnSpecCreator("FILTER", StringCell.TYPE).createSpec();
   allColSpecs[7] =  new DataColumnSpecCreator("INFO", StringCell.TYPE).createSpec();
   allColSpecs[8] =  new DataColumnSpecCreator("FORMAT", StringCell.TYPE).createSpec();
   allColSpecs[9] = new DataColumnSpecCreator("CALL", StringCell.TYPE).createSpec();
   allColSpecs[10] =  new DataColumnSpecCreator("SAMPLE", StringCell.TYPE).createSpec();
   return new DataTableSpec( allColSpecs);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:18,代码来源:ReadVCFNodeModel.java


示例17: createVcfDataColumnSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createVcfDataColumnSpec(String header[])
{
DataColumnSpec[] allColSpecs = new DataColumnSpec[header.length+1];

   allColSpecs[0] =  new DataColumnSpecCreator("CHROM", StringCell.TYPE).createSpec();
   allColSpecs[1] =  new DataColumnSpecCreator("POS", IntCell.TYPE).createSpec();
   allColSpecs[2] =  new DataColumnSpecCreator("ID", StringCell.TYPE).createSpec();
   allColSpecs[3] =  new DataColumnSpecCreator("REF", StringCell.TYPE).createSpec();
   allColSpecs[4] =  new DataColumnSpecCreator("ALT", StringCell.TYPE).createSpec();
   allColSpecs[5] =  new DataColumnSpecCreator("QUAL", DoubleCell.TYPE).createSpec();
   allColSpecs[6] =  new DataColumnSpecCreator("FILTER", StringCell.TYPE).createSpec();
   allColSpecs[7] =  new DataColumnSpecCreator("INFO", StringCell.TYPE).createSpec();
   allColSpecs[8] =  new DataColumnSpecCreator("FORMAT", StringCell.TYPE).createSpec();		
   for(int i=9;i< header.length;++i)
   	{
    allColSpecs[i] =  new DataColumnSpecCreator(header[i], StringCell.TYPE).createSpec();		
   	}
   
   allColSpecs[header.length] =  new DataColumnSpecCreator("samples.per.snp", IntCell.TYPE).createSpec();
   
   
   return new DataTableSpec( allColSpecs);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:24,代码来源:ReadMultiVCFNodeModel.java


示例18: createDataTableSpec

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
private DataTableSpec createDataTableSpec()
{
DataColumnSpec array[]=new DataColumnSpec[14];
array[0]=new DataColumnSpecCreator("DB", StringCell.TYPE).createSpec();
array[1]=new DataColumnSpecCreator("ID", StringCell.TYPE).createSpec();
array[2]=new DataColumnSpecCreator("Splice", StringCell.TYPE).createSpec();
array[3]=new DataColumnSpecCreator("Symbol", StringCell.TYPE).createSpec();
array[4]=new DataColumnSpecCreator("Taxon", StringCell.TYPE).createSpec();
array[5]=new DataColumnSpecCreator("Qualifier", StringCell.TYPE).createSpec();
array[6]=new DataColumnSpecCreator("GO ID", StringCell.TYPE).createSpec();
array[7]=new DataColumnSpecCreator("GO Name", StringCell.TYPE).createSpec();
array[8]=new DataColumnSpecCreator("Reference", StringCell.TYPE).createSpec();
array[9]=new DataColumnSpecCreator("Evidence", StringCell.TYPE).createSpec();
array[10]=new DataColumnSpecCreator("With", StringCell.TYPE).createSpec();
array[11]=new DataColumnSpecCreator("Aspect", StringCell.TYPE).createSpec();
array[12]=new DataColumnSpecCreator("Date", StringCell.TYPE).createSpec();
array[13]=new DataColumnSpecCreator("Source", StringCell.TYPE).createSpec();

return new DataTableSpec(array);
}
 
开发者ID:lindenb,项目名称:knime4bio,代码行数:21,代码来源:GoAnnotationNodeModel.java


示例19: execute

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
                                      final ExecutionContext exec) throws Exception {
	// Create data cells.
    final DataTableSpec outSpecs = configure(new DataTableSpec[]{null})[0];
	int numCols = outSpecs.getNumColumns();
	DataCell[][] stringCells = new DataCell[1][numCols];
	// Build a table of string values.
	DataColumnSpec[] stringColSpecs = new DataColumnSpec[numCols];
	for (int i=0; i<numCols; i++) {
		StringCell sCell = new StringCell(this.colValues.get(i));
		stringCells[0][i] = sCell;
		stringColSpecs[i] = new DataColumnSpecCreator(colNames.get(i), StringCell.TYPE).createSpec();
	}
	DataRow row = new DefaultRow(new RowKey("0"), stringCells[0]);
	BufferedDataContainer cnt = exec.createDataContainer(new DataTableSpec(stringColSpecs));
	cnt.addRowToTable(row);
	cnt.close();
	BufferedDataTable bufTbl = exec.createBufferedDataTable(cnt.getTable(), exec);
	// Now, convert to the proper column types as configured by the input columns.
	BufferedDataTable out = exec.createSpecReplacerTable(bufTbl, outSpecs);
	return new BufferedDataTable[]{out};
}
 
开发者ID:helixyte,项目名称:knime_atc,代码行数:24,代码来源:ATCNodeModel.java


示例20: configure

import org.knime.core.data.DataColumnSpecCreator; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs) throws InvalidSettingsException {
	List<DataColumnSpec> columns = new ArrayList<>();

	for (DataColumnSpec c : inSpecs[0]) {
		if (GEOCODING_COLUMNS.contains(c.getName())) {
			throw new InvalidSettingsException("Column name \"" + c.getName() + "\" not allowed in input table");
		}

		columns.add(c);
	}

	columns.add(new DataColumnSpecCreator(URL_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(STREET_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(CITY_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(DISTRICT_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(STATE_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(COUNTRY_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(POSTAL_CODE_COLUMN, StringCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(LATITUDE_COLUMN, DoubleCell.TYPE).createSpec());
	columns.add(new DataColumnSpecCreator(LONGITUDE_COLUMN, DoubleCell.TYPE).createSpec());

	return new DataTableSpec[] { new DataTableSpec(columns.toArray(new DataColumnSpec[0])) };
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:28,代码来源:GeocodingNodeModel.java



注:本文中的org.knime.core.data.DataColumnSpecCreator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ResourceDefinition类代码示例发布时间:2022-05-23
下一篇:
Java CountryCodeService类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap