Package uk.org.ogsadai.tuple

Examples of uk.org.ogsadai.tuple.SimpleTupleMetadata


         
          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;
            prevNumber = newNumber;
View Full Code Here


            listColumnMetadata.add(columnMetaData);
          }
         
          output.write(ControlBlock.LIST_BEGIN);
         
          output.write(new MetadataWrapper(new SimpleTupleMetadata(listColumnMetadata)));

          for(int i=0;i<numberTuples;i++){
                    // Create the tuple tuple consisting of the above data
                    // and the metadata.
                    Tuple tuple = new SimpleTuple(data);
View Full Code Here

        {
              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();
      List<QueryResults> queryResults = new ArrayList<QueryResults>();
      queryResults = qrp.parseDocument(results);
      Iterator it = queryResults.iterator();
View Full Code Here

                        TupleTypes._STRING, 100,
                        ColumnMetadata.COLUMN_NULLABLE, 10000));
            }

            System.out.println();
            System.out.println(new MetadataWrapper(new SimpleTupleMetadata(
                    listColumnMetadata)));

            for (; rs.hasNext();)
            {
                QuerySolution qs = rs.next();
View Full Code Here

        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);
   
        List elements = new ArrayList();
        elements.add(data);
        Tuple tuple = new SimpleTuple(elements);
View Full Code Here

            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);
            mOutput.write(wrapper);
View Full Code Here

                        0);
                columns.add(md);
               
              }
             // columns.addAll(Arrays.asList(((AssociationRulesProducer)tupleAssociator.getAssociator()).getAssociationRules().getRules().get(0).getMetricNamesForRule()));
              TupleMetadata rulesMetadata = new SimpleTupleMetadata(columns);
              mOutputRules.write(new MetadataWrapper(rulesMetadata));
              for(AssociationRule rule:((AssociationRulesProducer)tupleAssociator.getAssociator()).getAssociationRules().getRules()) {
                List<Object> elements = new ArrayList<Object>();
                elements.add(rule.toString());
                for(int i=1; i<columns.size();i++) {
View Full Code Here

            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)
            {
                mOutput.write(tuple);
View Full Code Here

        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);
            mOutput.write(wrapper);
            Open(tuples);
View Full Code Here

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

TOP

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

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.