Examples of Column


Examples of com.socrata.model.importer.Column

                    "}}";
   
    @Test
    public void testSerializationCompleteColumn() throws Exception
    {
        Column col =  mapper.readValue(JSON_COMPLETE, Column.class);
        TestCase.assertNotNull(col);
        TestCase.assertEquals(col.getId(), (Integer) 1414729);
        TestCase.assertEquals(col.getPosition(), 1);
        TestCase.assertEquals(col.getWidth(), (Integer) 100);
        TestCase.assertEquals(col.getName(), "col1");
        TestCase.assertEquals(col.getFieldName(), "col1");
        TestCase.assertEquals(col.getDataTypeName(), "number");
        TestCase.assertEquals(col.getRenderTypeName(), "number");
        TestCase.assertEquals(col.getFormat().get("mask"), "##-##-##");
        TestCase.assertEquals(col.getFormat().get("precisionStyle"), "standard");
        TestCase.assertEquals(col.getFormat().get("align"), "left");
        TestCase.assertEquals(col.getFormat().get("noCommas"), "true");

        String roundTripJson = mapper.writeValueAsString(col);
        TestCase.assertEquals(roundTripJson, JSON_COMPLETE);
    }
View Full Code Here

Examples of com.stratio.cassandra.index.schema.Column

                if (o2 == null)
                {
                    return -1;
                }

                Column column1 = o1.getCell(field);
                Column column2 = o2.getCell(field);

                if (column1 == null)
                {
                    return column2 == null ? 0 : 1;
                }
                if (column2 == null)
                {
                    return -1;
                }

                AbstractType<?> type = column1.getType();
                ByteBuffer value1 = column1.getRawValue();
                ByteBuffer value2 = column2.getRawValue();
                return reverse ? type.compare(value2, value1) : type.compare(value1, value2);
            }
        };
    }
View Full Code Here

Examples of com.tll.client.listing.Column

   * @param colProp
   * @return the column index
   */
  private int resolveColumnIndex(String colProp) {
    for(int i = 0; i < columns.length; i++) {
      final Column c = columns[i];
      if(c.getPropertyName() != null && c.getPropertyName().equals(colProp)) {
        return i;
      }
    }
    throw new IllegalArgumentException("Unresolveable column property: " + colProp);
  }
View Full Code Here

Examples of com.volantis.mcs.layouts.Column

        for (int c = 0; c < columns; c += 1) {
            if (!requiredColumns[c]) {
                continue;
            }

            Column column = grid.getColumn(c);
            columnStyles[c] = formatStylingEngine.startStyleable(
                    column, column.getStyleClass());
            formatStylingEngine.endStyleable(column);
        }

        return columnStyles;
    }
View Full Code Here

Examples of com.woorea.openstack.console.utils.Column

    Table t = new Table(new TableModel<Tenant>(Arrays.asList(tenant)) {

      @Override
      public Column[] getHeaders() {
        return new Column[]{
          new Column("id", 32, Column.ALIGN_LEFT),
          new Column("name", 10, Column.ALIGN_LEFT),
          new Column("description", 32, Column.ALIGN_LEFT),
          new Column("enabled", 7, Column.ALIGN_LEFT)
        };
      }

      @Override
      public String[] getRow(Tenant tenant) {
View Full Code Here

Examples of core.Column

//        System.out.println(expectedResult.toString(caf));
//        System.out.println("real");
//        System.out.println(resultFormulas.toString(caf));
        assertEquals(expectedResult, resultFormulas);
        resRelation = standOper.getResultRelation();
        assertEquals(new Column('D'), resRelation.getFirstCol());
        assertEquals(1, resRelation.getCardinality());

        caf = new CellAddressFactory(1);
        input = caf.getSpaceForNewRelation(2);//(a,b)
        standOper = new StandarizationOperator(caf, input);
        resultFormulas = standOper.getFormulas();
        expectedResult = new Formulas();
        expectedResult.put(new Cell('C',1), "IF(ISNA($A1),0,1)");
        expectedResult.put(new Cell('D',1), "MATCH(ROW(),$C:$C,0)");
        expectedResult.put(new Cell('E',1), "INDEX(A:A,$D1)");
        expectedResult.put(new Cell('F',1), "INDEX(B:B,$D1)");
        expectedResult.put(new Cell('C',2), "IF(ISNA($A2),C1,C1+1)");
        expectedResult.put(new Cell('D',2), "MATCH(ROW(),$C:$C,0)");
        expectedResult.put(new Cell('E',2), "INDEX(A:A,$D2)");
        expectedResult.put(new Cell('F',2), "INDEX(B:B,$D2)");
//        System.out.println("expected:");
//        System.out.println(expectedResult.toString(caf));
//        System.out.println("real");
//        System.out.println(resultFormulas.toString(caf));
        assertEquals(expectedResult, resultFormulas);
        resRelation = standOper.getResultRelation();
        assertEquals(new Column('E'), resRelation.getFirstCol());
        assertEquals(2, resRelation.getCardinality());

        caf = new CellAddressFactory(2);//zaczynamy od B
        input = caf.getSpaceForNewRelation(3);//(b,c,d)
        standOper = new StandarizationOperator(caf, input);
        resultFormulas = standOper.getFormulas();
        expectedResult = new Formulas();
        expectedResult.put(new Cell('E',1), "IF(ISNA($B1),0,1)");
        expectedResult.put(new Cell('F',1), "MATCH(ROW(),$E:$E,0)");
        expectedResult.put(new Cell('G',1), "INDEX(B:B,$F1)");
        expectedResult.put(new Cell('H',1), "INDEX(C:C,$F1)");
        expectedResult.put(new Cell('I',1), "INDEX(D:D,$F1)");
        expectedResult.put(new Cell('E',2), "IF(ISNA($B2),E1,E1+1)");
        expectedResult.put(new Cell('F',2), "MATCH(ROW(),$E:$E,0)");
        expectedResult.put(new Cell('G',2), "INDEX(B:B,$F2)");
        expectedResult.put(new Cell('H',2), "INDEX(C:C,$F2)");
        expectedResult.put(new Cell('I',2), "INDEX(D:D,$F2)");
//        System.out.println("expected:");
//        System.out.println(expectedResult.toString(caf));
//        System.out.println("real");
//        System.out.println(resultFormulas.toString(caf));
        assertEquals(expectedResult, resultFormulas);
        resRelation = standOper.getResultRelation();
        assertEquals(new Column('G'), resRelation.getFirstCol());
        assertEquals(3, resRelation.getCardinality());
    }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.values.Column

        new FixedNodeMaker(FOAF.knows.asNode(), false),
        new TypedNodeMaker(TypedNodeMaker.URI,
            new Pattern("http://test/person@@employees.manager@@"), true));
    this.withURIColumnSubject = new TripleRelation(base,
        new TypedNodeMaker(TypedNodeMaker.URI,
            new Column(new Attribute(null, "employees", "homepage")), false),
        new FixedNodeMaker(RDF.type.asNode(), false),
        new FixedNodeMaker(FOAF.Document.asNode(), false));
    this.withURIPatternSubjectAndURIColumnObject = new TripleRelation(base,
        new TypedNodeMaker(TypedNodeMaker.URI,
            new Pattern("http://test/person@@employees.ID@@"), true),
        new FixedNodeMaker(FOAF.homepage.asNode(), false),
        new TypedNodeMaker(TypedNodeMaker.URI,
            new Column(new Attribute(null, "employees", "homepage")), false));
    this.employeeChecker = new URIMakerRule().createRuleChecker(
        Node.createURI("http://test/person1"));
    this.foobarChecker = new URIMakerRule().createRuleChecker(
        Node.createURI("http://test/foobar"));
  }
View Full Code Here

Examples of de.willuhn.jameica.gui.parts.Column

          continue; // ignorieren
        double d = k.getSaldoAvailable();
        if (!Double.isNaN(d))
        {
          // Wir haben tatsaechlich eines, wo was drin steht
          Column col = new Column("saldo_available",i18n.tr("Verf�gbar"),new CurrencyFormatter(k.getWaehrung(),HBCI.DECIMALFORMAT),false,Column.ALIGN_RIGHT);
          addColumn(col);
          return;
        }
      }
    }
View Full Code Here

Examples of de.willuhn.jameica.hbci.io.csv.Column

        // Spalten noch zuordnen
        List<Column> columns = new ArrayList<Column>();
        for (int i=0;i<selects.size();++i)
        {
          SelectInput input = selects.get(i);
          Column c = (Column) input.getValue();
          if (c == null)
            continue; // Spalte nicht zugeordnet
         
          // Spalten konnen mehrfach zugeordnet werden.
          // Daher verwenden wir einen Clone. Andernfalls wuerden
          // wir nur die letzte Zuordnung speichern
          try
          {
            c = (Column) c.clone();
          }
          catch (CloneNotSupportedException e) {/*dann halt nicht */}
         
          // Spaltennummer speichern
          c.setColumn(i);
          columns.add(c);
        }
        p.setColumns(columns);
       
        storeProfile(p);
        close();
      }
    },null,false,"ok.png");
    b.addButton(i18n.tr("Datei neu laden"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        Profile p = getProfile();
        p.setFileEncoding((String)getFileEncoding().getValue());
        p.setQuotingChar((String)getQuoteChar().getValue());
        p.setSeparatorChar((String)getSeparatorChar().getValue());
        p.setSkipLines(((Integer)getSkipLines().getValue()).intValue());
        reload();
      }
    },null,false,"view-refresh.png");
    b.addButton(i18n.tr("Abbrechen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        throw new OperationCanceledException();
      }
    },null,false,"process-stop.png");
   
    c.addButtonArea(b);
  }
View Full Code Here

Examples of henplus.sqlmodel.Column

            final Map<String, ColumnFkInfo> fks = getForeignKeys(meta, tableName);
            // what about the following duplicate?
            // rset = meta.getColumns(catalog, null, tableName, null);
            while (!_interrupted && rset.next()) {
                final String colname = rset.getString(COLUMN_NAME);
                final Column column = new Column(colname);
                column.setType(rset.getString(TYPE_NAME));
                column.setSize(rset.getInt(COLUMN_SIZE));
                final boolean nullable = rset.getInt(NULLABLE) == DatabaseMetaData.columnNullable ? true : false;
                column.setNullable(nullable);
                final String defaultVal = rset.getString(COLUMN_DEF);
                column.setDefault(defaultVal != null ? defaultVal.trim() : null);
                column.setPosition(rset.getInt(ORDINAL_POSITION));
                column.setPkInfo(pk.getColumnPkInfo(colname));
                column.setFkInfo(fks.get(colname));

                table.addColumn(column);
            }
            rset.close();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.