Package com.ontology2.bakemono.joins

Examples of com.ontology2.bakemono.joins.GeneralJoinMapper


                new LongWritable(944L),
                new Text("<http://rdf.basekb.com/ns/m.06fm3lj>\t<http://rdf.basekb.com/ns/book.written_work.author>\t<http://rdf.basekb.com/ns/m.03qp7yf>."),
                mockContext);

        verify(pse3mapper.accepted).write(
                new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.06fm3lj")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/book.written_work.author")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/m.03qp7yf")
                 )
                ,new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.06fm3lj")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/book.written_work.author")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/m.03qp7yf")
                )
                ,mockContext);
View Full Code Here


                new LongWritable(944L),
                new Text("<http://rdf.basekb.com/ns/m.0tc7> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>\t<http://rdf.basekb.com/ns/film.actor>."),
                mockContext);
       
        verify(pse3mapper.accepted).write(
                new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.0tc7")
                        ,Node_URI.createURI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/film.actor")
                 )
                ,new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.0tc7")
                        ,Node_URI.createURI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/film.actor")
                )
                ,mockContext);
View Full Code Here

                new LongWritable(944L),
                new Text("<http://rdf.basekb.com/ns/m.06fm3lj> <http://rdf.basekb.com/ns/book.written_work.author> <http://rdf.basekb.com/ns/m.03qp7yf>."),
                mockContext);

        verify(pse3mapper.accepted).write(
                new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.06fm3lj")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/book.written_work.author")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/m.03qp7yf")
                )
                ,new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.06fm3lj")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/book.written_work.author")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/m.03qp7yf")
                )
                ,mockContext);
View Full Code Here

                new LongWritable(944L),
                new Text("<http://rdf.basekb.com/ns/m.0tc7> <http://rdf.basekb.com/ns/common.topic.topic_equivalent_webpage> <http://www.ranker.com/review/arnold-schwarzenegger$002F493404> ."),
                mockContext);

        verify(pse3mapper.accepted).write(
                new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.0tc7")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/common.topic.topic_equivalent_webpage")
                        ,Node_URI.createURI("http://www.ranker.com/review/arnold-schwarzenegger/493404")
                )
                ,new WritableTriple(
                        Node_URI.createURI("http://rdf.basekb.com/ns/m.0tc7")
                        ,Node_URI.createURI("http://rdf.basekb.com/ns/common.topic.topic_equivalent_webpage")
                        ,Node_URI.createURI("http://www.ranker.com/review/arnold-schwarzenegger/493404")
                )
                ,mockContext);
View Full Code Here

            assertTrue(outputs.get(i).equals(outputs.get(i)));
        }
       
        // the triple that disappears in the full system appears in the output
       
        WritableTriple croatianKey=new WritableTriple(new Triple(
                Node_URI.createURI("http://rdf.basekb.com/ns/m.0tc7")
                ,Node_URI.createURI("http://rdf.basekb.com/ns/type.object.key")
                ,Node.createLiteral("/wikipedia/hr_title/Arnold_Schwarzenegger")
        ));
       
View Full Code Here

    @Override
    protected void reduce(WritableTriple key, Iterable<WritableTriple> value,
                          Context context)
            throws IOException, InterruptedException {

        WritableTriple last=null;
        for(WritableTriple v:value) {
            incrementCounter(context, UniqCounters.TOTAL_VALUES, 1);
            if(last==v)
                continue;
View Full Code Here

            Node_URI subject=(Node_URI) nodeParser.get(rawSubject);
            Node_URI predicate=(Node_URI) nodeParser.get(rawPredicate);
            Node object=nodeParser.get(rawObject);
           
            Triple realTriple=new Triple(subject,predicate,object);
            writableTriple = new WritableTriple(realTriple);
        } catch(Throwable e) {
            String factString=row3.getSubject()+"\t"+row3.getPredicate()+"\t"+row3.getSubject()+"\t.";
            logger.warn("Caught exception while parsing fact ["+factString+"]",e);
            reject(c, row3);
            return;
View Full Code Here

                VIntWritable.class,
                DiffFactReducer.TWO
         );

        that.reduce(
            new TaggedTextItem("anderson",10)
            , iterable
            , context
        );

        verify(context).write(new Text("A"),new Text("anderson"));
View Full Code Here

                VIntWritable.class,
                DiffFactReducer.ONE
        );

        that.reduce(
                new TaggedTextItem("cooper",10)
                , iterable
                , context
        );

        verify(context).write(new Text("D"),new Text("cooper"));
View Full Code Here

                DiffFactReducer.ONE,
                DiffFactReducer.TWO
        );

        that.reduce(
                new TaggedTextItem("rather",10)
                , Lists.newArrayList(DiffFactReducer.ONE,DiffFactReducer.TWO)
                , context
        );

        verifyNoMoreInteractions(context);
View Full Code Here

TOP

Related Classes of com.ontology2.bakemono.joins.GeneralJoinMapper

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.