本文整理汇总了Java中org.knime.core.data.def.StringCell类的典型用法代码示例。如果您正苦于以下问题:Java StringCell类的具体用法?Java StringCell怎么用?Java StringCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringCell类属于org.knime.core.data.def包,在下文中一共展示了StringCell类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeClassMap
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
/**
* Reads the classes from the ground truth table and adds them to the class
* map.
*
* @param inData
* @throws InvalidSettingsException
*/
private void initializeClassMap(final BufferedDataTable[] inData)
throws InvalidSettingsException {
final int classColIdxLabeledTable = NodeUtils.autoColumnSelection(
inData[LABELED_PORT].getDataTableSpec(),
m_groundTruthColumnModel, StringValue.class, this.getClass());
// initialize all classes map
m_allClassesMap = new HashMap<>((int)inData[LABELED_PORT].size());
for (final DataRow row : inData[LABELED_PORT]) {
m_allClassesMap.put(row.getKey(),
((StringCell) row.getCell(classColIdxLabeledTable))
.getStringValue());
}
}
开发者ID:knime,项目名称:knime-activelearning,代码行数:23,代码来源:DBGActiveLearnLoopEndNodeModel.java
示例2: createCellFactory
import org.knime.core.data.def.StringCell; //导入依赖的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
示例3: getTypeOfElement
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
/**
* Find out type of element
*
* @param element
* @return <code>DataType</code> of element
*/
public static DataType getTypeOfElement(Object element) {
if (element instanceof Double) {
return DoubleCell.TYPE;
} else if (element instanceof Float) {
return DoubleCell.TYPE;
} else if (element instanceof String) {
return StringCell.TYPE;
} else if (element instanceof Integer) {
return IntCell.TYPE;
} else if (element instanceof Boolean) {
return BooleanCell.TYPE;
} else if (element instanceof Long) {
return LongCell.TYPE;
} else {
throw new UnsupportedOperationException("Class "
+ element.getClass().getName()
+ " is not supported for this operation");
}
}
开发者ID:pavloff-de,项目名称:spark4knime,代码行数:26,代码来源:TableCellUtils.java
示例4: createDataTableSpec
import org.knime.core.data.def.StringCell; //导入依赖的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
示例5: createVcfDataColumnSpec
import org.knime.core.data.def.StringCell; //导入依赖的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
示例6: DistanceSnpNodeDialog
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
protected DistanceSnpNodeDialog()
{
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName(
DistanceSnpNodeModel.CHROM_COL_PROPERTY, DistanceSnpNodeModel.CHROM_COL_DEFAULT),
"Chrom:",0,new DataTypeColumnFilter(StringCell.TYPE)));
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName(
DistanceSnpNodeModel.POS_COL_PROPERTY, DistanceSnpNodeModel.POS_COL_DEFAULT),
"Pos:",0,new DataTypeColumnFilter(IntCell.TYPE)));
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName(
DistanceSnpNodeModel.SAMPLE_COL_PROPERTY, DistanceSnpNodeModel.SAMPLE_COL_DEFAULT),
"Sample:",0,new DataTypeColumnFilter(StringCell.TYPE)));
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:DistanceSnpNodeDialog.java
示例7: configure
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
@Override
protected DataTableSpec[] configure(DataTableSpec[] inSpecs)
throws InvalidSettingsException {
if(inSpecs==null || inSpecs.length!=1)
{
throw new InvalidSettingsException("Expected one tables");
}
if(m_ucscHandler.getStringValue().isEmpty())
{
throw new InvalidSettingsException("UCSC database was not selected");
}
UcscDatabaseHandler handler=UCSC_HANDLERS.getHandlerById(m_ucscHandler.getStringValue());
if(m_ucscHandler.getStringValue().isEmpty())
{
throw new InvalidSettingsException("undefined handler "+m_ucscHandler.getStringValue());
}
DataTableSpec in=inSpecs[0];
findColumnIndex(in,this.m_chrom1Col,StringCell.TYPE);
findColumnIndex(in, this.m_posCol,IntCell.TYPE);
return new DataTableSpec[]{new DataTableSpec(in,handler.getDataTableSpec())};
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:23,代码来源:GenericUCSCNodeModel.java
示例8: createSpec
import org.knime.core.data.def.StringCell; //导入依赖的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
示例9: ExtractInfoNodeDialog
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
protected ExtractInfoNodeDialog()
{
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName( ExtractInfoNodeModel.INFO_COL_PROPERTY, ExtractInfoNodeModel.DEFAULT_INFO_COL),
"INFO column",
0,
new DataTypeColumnFilter(StringCell.TYPE)
));
addDialogComponent(new DialogComponentString(
new SettingsModelString( ExtractInfoNodeModel.FLAG_PROPERTY, ExtractInfoNodeModel.DEFAULT_FLAG),
"Flag name (multiple separated by a space or a comma)",
true,30
));
addDialogComponent(new DialogComponentStringSelection(
new SettingsModelString( ExtractInfoNodeModel.DATATYPE_PROPERTY, ExtractInfoNodeModel.DEFAULT_DATATYPE),
"DataType",
ExtractInfoNodeModel.DATATYPES
));
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:21,代码来源:ExtractInfoNodeDialog.java
示例10: getDataType
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
public DataType getDataType() throws InvalidSettingsException
{
if(m_dataType.getStringValue().equals("Long"))
{
return LongCell.TYPE;
}
else if(m_dataType.getStringValue().equals("Integer"))
{
return IntCell.TYPE;
}
else if(m_dataType.getStringValue().equals("Double"))
{
return DoubleCell.TYPE;
}
else if(m_dataType.getStringValue().equals("Boolean"))
{
return BooleanCell.TYPE;
}
return StringCell.TYPE;
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:21,代码来源:ExtractInfoNodeModel.java
示例11: createDataTableSpec
import org.knime.core.data.def.StringCell; //导入依赖的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
示例12: BigBedFileNodeDialog
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
protected BigBedFileNodeDialog()
{
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName( BigBedFileNodeModel.CHROM1_COL_PROPERTY, BigBedFileNodeModel.DEFAULT_CHROM1_COL),
"Chromosome",
0,
new DataTypeColumnFilter(StringCell.TYPE)
));
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName( BigBedFileNodeModel.POS1_COL_PROPERTY, BigBedFileNodeModel.DEFAULT_POS1_COL),
"Position",
0,
new DataTypeColumnFilter(IntCell.TYPE)
));
addDialogComponent(new DialogComponentFileChooser(
new SettingsModelString( BigBedFileNodeModel.WIG_URI_PROPERTY, BigBedFileNodeModel.DEFAULT_WIG_URI),
"BigBedWigFile ",JFileChooser.OPEN_DIALOG,".bb",".bw",".bigbed",".bigwig"
));
addDialogComponent(new DialogComponentString(
new SettingsModelString( BigBedFileNodeModel.WIG_COLNAME, BigBedFileNodeModel.WIG_COLNAME_DEF),
"Column name",true,30
));
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:27,代码来源:BigBedFileNodeDialog.java
示例13: createDataSpec
import org.knime.core.data.def.StringCell; //导入依赖的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
示例14: execute
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
private int execute(int outIndex,List<Range> ranges,BufferedDataContainer container)
throws Exception
{
for(int i=0;i<ranges.size();++i)
{
Range prev=(i>0?ranges.get(i-1):null);
Range mid=ranges.get(i);
Range next=(i+1< ranges.size()?ranges.get(i+1):null);
DataCell cells[]=new DataCell[]
{
new StringCell(mid.chrom),
new IntCell(prev==null?mid.chromStart:prev.chromEnd+1),
new IntCell(next==null?mid.chromEnd:next.chromStart-1),
(mid.under?BooleanCell.FALSE:BooleanCell.TRUE),
new IntCell(mid.count),
new DoubleCell(mid.min),
new DoubleCell(mid.max),
new DoubleCell(mid.total/mid.count)
};
container.addRowToTable(new DefaultRow(RowKey.createRowKey(++outIndex),cells));
}
return outIndex;
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:25,代码来源:AggregationNodeModel.java
示例15: configure
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
@Override
protected DataTableSpec[] configure(DataTableSpec[] inSpecs)
throws InvalidSettingsException {
if(inSpecs==null || inSpecs.length!=1)
{
throw new InvalidSettingsException("Expected one tables");
}
if(m_ucscHandler.getStringValue().isEmpty())
{
throw new InvalidSettingsException("UCSC database was not selected");
}
UcscDatabaseMysqlHandler handler=UCSC_HANDLERS.getHandlerById(m_ucscHandler.getStringValue());
if(m_ucscHandler.getStringValue().isEmpty())
{
throw new InvalidSettingsException("undefined handler "+m_ucscHandler.getStringValue());
}
DataTableSpec in=inSpecs[0];
findColumnIndex(in,this.m_chrom1Col,StringCell.TYPE);
findColumnIndex(in, this.m_posCol,IntCell.TYPE);
return new DataTableSpec[]{new DataTableSpec(in,handler.getDataTableSpec())};
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:23,代码来源:MysqlUCSCNodeModel.java
示例16: IGVNodeDialog
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
public IGVNodeDialog()
{
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName(
IGVNodeModel.CHROM_COL_PROPERTY, IGVNodeModel.CHROM_COL_DEFAULT),
"Chrom:",0,new DataTypeColumnFilter(StringCell.TYPE)));
addDialogComponent(new DialogComponentColumnNameSelection(
new SettingsModelColumnName(
IGVNodeModel.POS_COL_PROPERTY, IGVNodeModel.POS_COL_DEFAULT),
"Pos:",0,new DataTypeColumnFilter(IntCell.TYPE)));
addDialogComponent(new DialogComponentString(
new SettingsModelString( IGVNodeModel.IGV_HOST_PROPERTY, IGVNodeModel.IGV_HOST_DEFAULT),
"IGV Host:",true,20));
addDialogComponent(new DialogComponentNumber(
new SettingsModelInteger( IGVNodeModel.IGV_PORT_PROPERTY, IGVNodeModel.IGV_PORT_DEFAULT),
"IGV Port:",10));
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:20,代码来源:IGVNodeDialog.java
示例17: configure
import org.knime.core.data.def.StringCell; //导入依赖的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 index;
if((index=in.findColumnIndex("ID"))==-1)
{
throw new InvalidSettingsException("Node "+this.getNodeName()+" column \"ID\"");
}
if(!in.getColumnSpec(index).getType().equals(StringCell.TYPE))
{
throw new InvalidSettingsException("column \"ID\" is not a string");
}
return new DataTableSpec[]{in,in};
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:22,代码来源:HavingIdNodeModel.java
示例18: readBlob
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
protected DataCell readBlob(ResultSet m_result,int index0) throws SQLException,IOException
{
InputStream is = m_result.getBinaryStream(index0);
if (m_result.wasNull() || is == null) {
return DataType.getMissingCell();
} else {
InputStreamReader reader = new InputStreamReader(is);
StringWriter writer = new StringWriter();
FileUtil.copy(reader, writer);
reader.close();
writer.close();
return new StringCell(writer.toString());
}
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:AbstractSqlNodeModel.java
示例19: createVcfDataColumnSpec
import org.knime.core.data.def.StringCell; //导入依赖的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
示例20: make
import org.knime.core.data.def.StringCell; //导入依赖的package包/类
public Mutation make(DataRow row)
{
DataCell c=row.getCell(chromCol);
if(c.isMissing()) return null;
String chrom=StringCell.class.cast(c).getStringValue();
c=row.getCell(posCol);
if(c.isMissing()) return null;
int pos=IntCell.class.cast(c).getIntValue();
c=row.getCell(refCol);
if(c.isMissing()) return null;
String ref=StringCell.class.cast(c).getStringValue();
c=row.getCell(altCol);
if(c.isMissing()) return null;
String alt=StringCell.class.cast(c).getStringValue();
return new Mutation(new Position(chrom, pos),ref.toUpperCase(),alt.toUpperCase());
}
开发者ID:lindenb,项目名称:knime4bio,代码行数:17,代码来源:MutationKSorter.java
注:本文中的org.knime.core.data.def.StringCell类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论