Package com.hp.hpl.jena.sparql.engine.binding

Examples of com.hp.hpl.jena.sparql.engine.binding.BindingComparator


            unsorted.add(randomBinding(vars));
        }
       
        List<SortCondition> conditions = new ArrayList<SortCondition>();
        conditions.add(new SortCondition(new ExprVar("8"), Query.ORDER_ASCENDING));
        comparator = new BindingComparator(conditions);
       
        iterator = new CallbackIterator(unsorted.iterator(), 25, null);
        iterator.setCallback(new Callback() {
            @Override
            public void call() { throw new QueryCancelledException() ; }
View Full Code Here


       
        List<SortCondition> conditions = new ArrayList<SortCondition>();
        conditions.add(new SortCondition(new ExprVar("8"), Query.ORDER_ASCENDING));
        conditions.add(new SortCondition(new ExprVar("1"), Query.ORDER_ASCENDING));
        conditions.add(new SortCondition(new ExprVar("0"), Query.ORDER_DESCENDING));
        BindingComparator comparator = new BindingComparator(conditions);

        List<Binding> sorted = new ArrayList<Binding>();
       
        SortedDataBag<Binding> db = new SortedDataBag<Binding>(
                new ThresholdPolicyCount<Binding>(threshold),
View Full Code Here

    {
        List<Binding> unsorted = randomBindings(500);
       
        List<SortCondition> conditions = new ArrayList<SortCondition>();
        conditions.add(new SortCondition(new ExprVar("8"), Query.ORDER_ASCENDING));
        BindingComparator comparator = new BindingComparator(conditions);
       
        SortedDataBag<Binding> db = new SortedDataBag<Binding>(
                new ThresholdPolicyCount<Binding>(10),
                SerializationFactoryFinder.bindingSerializationFactory(),
                comparator);
View Full Code Here

       
       
        DistinctDataNet<Binding> db = new DistinctDataNet<Binding>(
                new ThresholdPolicyCount<Binding>(2),
                SerializationFactoryFinder.bindingSerializationFactory(),
                new BindingComparator(new ArrayList<SortCondition>()));
        try
        {
            db.addAll(undistinct);
           
            Iterator<Binding> iter = db.iterator();
View Full Code Here

       
       
        DistinctDataNet<Binding> db = new DistinctDataNet<Binding>(
                new ThresholdPolicyCount<Binding>(2),
                SerializationFactoryFinder.bindingSerializationFactory(),
                new BindingComparator(new ArrayList<SortCondition>()));
        try
        {
            for (Binding b : undistinct)
            {
                if (db.netAdd(b))
View Full Code Here

        }
       
        DistinctDataNet<Binding> db = new DistinctDataNet<Binding>(
                new ThresholdPolicyCount<Binding>(10),
                SerializationFactoryFinder.bindingSerializationFactory(),
                new BindingComparator(new ArrayList<SortCondition>()));
       
        List<File> spillFiles = new ArrayList<File>();
        try
        {
            db.addAll(undistinct);
View Full Code Here

       
       
        DistinctDataBag<Binding> db = new DistinctDataBag<Binding>(
                new ThresholdPolicyCount<Binding>(2),
                SerializationFactoryFinder.bindingSerializationFactory(),
                new BindingComparator(new ArrayList<SortCondition>()));
        try
        {
            db.addAll(undistinct);
           
            Iterator<Binding> iter = db.iterator();
View Full Code Here

        }
       
        DistinctDataBag<Binding> db = new DistinctDataBag<Binding>(
                new ThresholdPolicyCount<Binding>(10),
                SerializationFactoryFinder.bindingSerializationFactory(),
                new BindingComparator(new ArrayList<SortCondition>()));
       
        List<File> spillFiles = new ArrayList<File>();
        try
        {
            db.addAll(undistinct);
View Full Code Here

            unsorted.add(randomBinding(vars));
        }
       
        List<SortCondition> conditions = new ArrayList<SortCondition>();
        conditions.add(new SortCondition(new ExprVar("8"), Query.ORDER_ASCENDING));
        comparator = new BindingComparator(conditions);
       
        iterator = new CallbackIterator(unsorted.iterator(), 25, null);
        iterator.setCallback(new Callback() {
            @Override
            public void call() { throw new QueryCancelledException() ; }
View Full Code Here

    sortedRows = new ArrayList<Binding>();       
        while( results.hasNext() ) {
          sortedRows.add( results.nextBinding() );
        }
       
    BindingComparator cmp = new BindingComparator( sortConditions );
        Collections.sort( sortedRows, cmp );
       
    iterator = sortedRows.iterator();
    row = 0;
  }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.engine.binding.BindingComparator

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.