Package uk.org.ogsadai.metadata

Examples of uk.org.ogsadai.metadata.MetadataWrapper


            {
                column = new SimpleColumnMetadata("class", TupleTypes._STRING, 0, 0, 0);
            }
           
            TupleMetadata outMetadata = new SimpleTupleMetadata(Collections.singletonList(column));
            mOutput.write(new MetadataWrapper(outMetadata));
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
               
               
View Full Code Here


            else
            {
                column = new SimpleColumnMetadata(resultColumnName, TupleTypes._STRING, 0, 0, 0);
            }
            TupleMetadata outMetadata = new SimpleTupleMetadata(Collections.singletonList(column));
            mOutput.write(new MetadataWrapper(outMetadata));
            Tuple tuple;
            while ((tuple = (Tuple)tuples.nextValue()) != null)
            {
                Object result;
                if (isNumeric)
View Full Code Here

    TupleMetadata metadata = prepareMetadata(items);
    Set<Entry<Integer, String[]>> set = prepareList(customers, metadata, keyIndex, 1);
   
    try {
        mOutput.write(ControlBlock.LIST_BEGIN);
        mOutput.write(new MetadataWrapper(metadata));
        for (Entry<Integer, String[]> entry:set)
        {
            List<Object> elements = new ArrayList<Object>();
            for(int i=0;i<entry.getValue().length;i++)
              elements.add(entry.getValue()[i]);
View Full Code Here

        }
        TupleMetadata metadata = new SimpleTupleMetadata(columns);
        try
        {
            mOutput.write(ControlBlock.LIST_BEGIN);
            mOutput.write(new MetadataWrapper(metadata));
            for (Object key : confusionMatrix.keySet())
            {
                List<Object> elements = new ArrayList<Object>();
                elements.add(key.toString());
                Map<Object, Long> counts = confusionMatrix.get(key);
View Full Code Here

            }
            TupleMetadata outMetadata = new SimpleTupleMetadata(columnsMetadata);
           
           
           
            mResultOutput.write(new MetadataWrapper(outMetadata));
            for(List<Object> v:values) {
              Tuple t = new SimpleTuple(v);
              mResultOutput.write(t);
            }
            mResultOutput.write(ControlBlock.LIST_END);
View Full Code Here

          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;
              List<Object> values = new ArrayList<Object>();
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

        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

TOP

Related Classes of uk.org.ogsadai.metadata.MetadataWrapper

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.