Examples of PrimitiveTriple


Examples of com.ontology2.bakemono.primitiveTriples.PrimitiveTriple

    @Override
    public void reduce(TaggedTextItem key, Iterable<TaggedTextItem> values, Context context) throws IOException, InterruptedException {
        String newSubject=null;
        for(TaggedTextItem value:values) {
            int tag=value.getTag().get();
            PrimitiveTriple t=ptc.decode(value.getKey().toString());
            switch(tag) {
                case 1:
                    if(t.getPredicate().equals("<http://www.w3.org/2002/07/owl#sameAs>"))
                        newSubject=t.getObject();
                break;
                default:
                    if(newSubject!=null)
                        context.write(
                                new Text(newSubject),
                                new Text(t.getPredicate()+"\t"+t.getObject()+"\t.")
                        );
            }
        }
    }
View Full Code Here

Examples of com.ontology2.bakemono.primitiveTriples.PrimitiveTriple

    public Map.Entry<Text, Text> splitValue(Writable value, VIntWritable tag) {
        switch(tag.get()) {
            case 1:
                return Maps.immutableEntry((Text) value, EMPTY);
            case 2:
                PrimitiveTriple triple=ptc.decode(value.toString());
                return Maps.immutableEntry(new Text(triple.getObject()),(Text) value);
        }

        return Maps.immutableEntry((Text) value, (Text) value);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.