Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleColumnMetadata


            List<ColumnMetadata> columnsMetadata = new ArrayList<ColumnMetadata>();
            for(int i=0;i<columnNames.size();i++) {
              ColumnMetadata column;
              if (values.size() > 0 && values.get(0).size() > 0 && values.get(0).get(i) instanceof String)
              {
                  column = new SimpleColumnMetadata(columnNames.get(i), TupleTypes._STRING, 0, 0, 0);           
              }
              else
              {
                  column = new SimpleColumnMetadata(columnNames.get(i), TupleTypes._DOUBLE, 0, 0, 0);
              }
              columnsMetadata.add(column);
            }
            TupleMetadata outMetadata = new SimpleTupleMetadata(columnsMetadata);
           
View Full Code Here


          int prevNumber = min;
         
          mInsertExpressionOutput.write("INSERT INTO " + tableName + " VALUES(?)");
          mNumbersOutput.write(ControlBlock.LIST_BEGIN);
          List<ColumnMetadata> columnsMetadata = new ArrayList<ColumnMetadata>();
            columnsMetadata.add(new SimpleColumnMetadata("ID", TupleTypes._INT, 0, 0, 0));
            TupleMetadata outMetadata = new SimpleTupleMetadata(columnsMetadata);
            mNumbersOutput.write(new MetadataWrapper(outMetadata));
          while(newNumber < max){
         
            newNumber = prevNumber + random.nextInt(maxStep) + 1;
View Full Code Here

                  while(tokenizer.hasMoreTokens())
              {
                data.add(tokenizer.nextToken());
              }

          ColumnMetadata columnMetaData = new SimpleColumnMetadata("BOGUS_COLUMN_NAME", 1, 1, 1, 1);
          List listColumnMetadata = new ArrayList();
          for (int i=0; i<data.size(); i++)
          {
            listColumnMetadata.add(columnMetaData);
          }
View Full Code Here

            Iterator it1 = resultvars.listIterator();
            List listColumnMetadata = new ArrayList();
            while(it1.hasNext())
        {
              String var = (String) it1.next();
              listColumnMetadata.add(new SimpleColumnMetadata(var, 1, 1, 1, 1));
        }

      output.write(new MetadataWrapper(new SimpleTupleMetadata(listColumnMetadata)));
           
      QueryResultsParser qrp = new QueryResultsParser();
View Full Code Here

            Iterator<String> it1 = resultvars.listIterator();
            List<ColumnMetadata> listColumnMetadata = new ArrayList<ColumnMetadata>();
            while (it1.hasNext())
            {
                String var = (String) it1.next();
                listColumnMetadata.add(new SimpleColumnMetadata(var,
                        TupleTypes._STRING, 100,
                        ColumnMetadata.COLUMN_NULLABLE, 10000));
            }

            System.out.println();
View Full Code Here

    {
      ClassifyActivity activity = new ClassifyActivity();
       
        Object data = new double[]{0.0, 1.1, 2.2, 3.3};

        ColumnMetadata columnMetadata = new SimpleColumnMetadata
            ("extracted", TupleTypes._OBJECT, 0, ColumnMetadata.COLUMN_NO_NULLS, 0);
        TupleMetadata tupleMetadata =
          new SimpleTupleMetadata(Collections.singletonList(columnMetadata));
        MetadataWrapper metadataWrapper = new MetadataWrapper(tupleMetadata);
   
View Full Code Here

        TupleListIterator tuples = (TupleListIterator)iterationData[1];
        Open(tuples);
        try
        {
            List columns = new ArrayList();
            ColumnMetadata col = new SimpleColumnMetadata("groupID", TupleTypes._STRING, 0, 0, 0);
            columns.add(col);
            col = new SimpleColumnMetadata("groupID", TupleTypes._DOUBLE, 0, 0, 0);
            columns.add(col);
            TupleMetadata metadata = new SimpleTupleMetadata(columns);
            MetadataWrapper wrapper = new MetadataWrapper(metadata);
           
            mOutput.write(ControlBlock.LIST_BEGIN);
View Full Code Here

            mOutputAssociator.write(ControlBlock.LIST_END);
            if(mOutputRules != null && ((AssociationRulesProducer)tupleAssociator.getAssociator()).getAssociationRules().getRules().size() > 0 ) {
              mOutputRules.write(ControlBlock.LIST_BEGIN);
             
              ArrayList<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
              columns.add(new SimpleColumnMetadata("Rule", TupleTypes._STRING,
                      0,
                      ColumnMetadata.COLUMN_NO_NULLS,
                      0));
                     
              String[] metrics = ((AssociationRulesProducer)tupleAssociator.getAssociator()).getAssociationRules().getRules().get(0).getMetricNamesForRule();       
              for(int i = 0 ; i<metrics.length; i++) {
                SimpleColumnMetadata md = new SimpleColumnMetadata(metrics[i], TupleTypes._DOUBLE,
                        0,
                        ColumnMetadata.COLUMN_NO_NULLS,
                        0);
                columns.add(md);
               
View Full Code Here

        Tuple tuple;
        try
        {
            mOutput.write(ControlBlock.LIST_BEGIN);
            List columns = new ArrayList();
            ColumnMetadata col0 = new SimpleColumnMetadata("groupID", TupleTypes._STRING, 0, 0, 0);
            columns.add(col0);
            ColumnMetadata col1 = new SimpleColumnMetadata("groupID", TupleTypes._OBJECT, 0, 0, 0);
            columns.add(col1);
            TupleMetadata metadata = new SimpleTupleMetadata(columns);
            MetadataWrapper wrapper = new MetadataWrapper(metadata);
            mOutput.write(wrapper);
            while ((tuple = Next(tuples)) != null)
View Full Code Here

       
        Tuple tuple;
        try
        {
            List columns = new ArrayList();
            ColumnMetadata col = new SimpleColumnMetadata("groupID", TupleTypes._STRING, 0, 0, 0);
            columns.add(col);
            TupleMetadata metadata = new SimpleTupleMetadata(columns);
            MetadataWrapper wrapper = new MetadataWrapper(metadata);
           
            mOutput.write(ControlBlock.LIST_BEGIN);
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.tuple.SimpleColumnMetadata

Copyright © 2018 www.massapicom. 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.