Examples of Triple


Examples of com.hp.hpl.jena.graph.Triple

           
            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);
View Full Code Here

Examples of com.hp.hpl.jena.graph.Triple

    public WritableTriple() {
        this(null);
    }
    public WritableTriple(Node s, Node p, Node o) {
        innerTriple=new Triple(s,p,o);
    }
View Full Code Here

Examples of com.hp.hpl.jena.graph.Triple

    @Override
    public void readFields(DataInput in) throws IOException {
        WritableNode s=takeNode(in);
        WritableNode p=takeNode(in);
        WritableNode o=takeNode(in);
        innerTriple = new Triple(s.getNode(),p.getNode(),o.getNode());
    }
View Full Code Here

Examples of com.hp.hpl.jena.graph.Triple

        return innerEconomizer.economize(n);
    }

    @Override
    public Triple economize(Triple that) {
        return new Triple(
                e(that.getSubject()),
                e(that.getPredicate()),
                e(that.getObject())
                );
    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.data.Triple

            for(OWLAnnotationAssertionAxiom ax : ontology.getAnnotationAssertionAxioms(entity.getIRI())) {
                RenderingManager rm = getRenderingManager();
                EntityData subjectData = rm.getEntityData(entity);
                PropertyEntityData propData = rm.getPropertyEntityData(ax.getProperty());
                EntityData valueData = rm.getEntityData(ax.getValue());
                Triple triple = new Triple(subjectData, propData, valueData);
                result.add(triple);
            }
        }
        return result;
    }
View Full Code Here

Examples of edu.stanford.nlp.util.Triple

              //allPatternsandWords4Label.incrementCount(sindex, tokenWordOrLemma);
            }
          }
        }
      }
      return new Triple(posWords, negWords, unlabWords);
    }
View Full Code Here

Examples of lupos.datastructures.items.Triple

      final Collection<HyperTriple> result2 = new LinkedList<HyperTriple>();
      final HashMap<HyperNode, List<HyperTriple>> predicatesMap = new HashMap<HyperNode, List<HyperTriple>>();
      for (final HyperTriple ht : this.originalresultlevel0) {
        if (ht.getPos(0).size() == 1 && ht.getPos(1).size() == 1
            && ht.getPos(2).size() == 1) {
          final Triple triple = new Triple(
              (Literal) ht.getPos(0).items.iterator().next(),
              (Literal) ht.getPos(1).items.iterator().next(),
              (Literal) ht.getPos(2).items.iterator().next());
          if (this.subjects.get(triple) != null) {
            result2.add(ht);
          } else {
            if (((triple.getObject() instanceof AnonymousLiteral || triple
                .getObject() instanceof URILiteral) && this.objects
                .get(triple.getObject()).size() > 1)) {
              result2.add(ht);
            } else {
              List<HyperTriple> lht = predicatesMap.get(ht
                  .getPos(1));
              if (lht == null) {
View Full Code Here

Examples of net.fortytwo.twitlogic.model.Triple

            if ((4 == maxRating || 5 == maxRating)
                    && rating >= 0
                    && rating <= maxRating) {
                Resource review = context.anonymousNode();
                try {
                    context.handle(new Triple(context.getSubject(), HASREVIEW, review));
                    context.handle(new Triple(review, TYPE, REVIEW));
                    context.handle(new Triple(review, RATING, new PlainLiteral("" + rating)));
                    context.handle(new Triple(review, MAXRATING, new PlainLiteral("" + maxRating)));
                    context.handle(new Triple(review, MINRATING, new PlainLiteral("" + minRating)));
                    context.handle(new Triple(review, TEXT, new PlainLiteral(context.thisTweet().getText())));
                } catch (HandlerException e) {
                    throw new MatcherException(e);
                }

                // FIXME: restore this.  Currently, it causes a transaction to hang.
View Full Code Here

Examples of org.apache.clerezza.rdf.core.Triple

    public Set<UriRef> getNames(Graph graph) {
        //TODO: this method would require to compare the triples within the graph
        //      because an equals check will not work with BNodes.
        Set<UriRef> graphNames = new HashSet<UriRef>();
        for( Iterator<Triple> iterator = graphNameIndex.getMGraph().iterator(); iterator.hasNext(); ) {
            Triple triple = iterator.next();
            UriRef graphName = new UriRef(triple.getSubject().toString());
            Graph currentGraph = getModelGraph(graphName, false, false).getGraph();
            if(graph.equals(currentGraph)){
                graphNames.add(graphName);
            }
        }
View Full Code Here

Examples of org.apache.vysper.xmpp.delivery.RecordingStanzaRelay.Triple

        Stanza stanza = XMPPCoreStanza.getWrapper(StanzaBuilder.createMessageStanza(FROM, TO, LANG, BODY).build());
       
        strategy.process(stanza, Arrays.asList((DeliveryException)new RemoteServerNotFoundException(ERROR_TEXT)));
       
        Iterator<Triple> triples = relay.iterator();
        Triple triple = triples.next();
        Assert.assertEquals(FROM, triple.getEntity());
        MessageStanza errorStanza = (MessageStanza) XMPPCoreStanza.getWrapper(triple.getStanza());
        Assert.assertEquals("error", errorStanza.getType());
        Assert.assertEquals(FROM, errorStanza.getTo());
        Assert.assertEquals(SERVER, errorStanza.getFrom());
       
        XMLElement errorElm = errorStanza.getSingleInnerElementsNamed("error", NamespaceURIs.JABBER_CLIENT);
        Assert.assertEquals("cancel", errorElm.getAttributeValue("type"));

        Assert.assertNotNull(errorElm.getSingleInnerElementsNamed("remote-server-not-found", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS));

        XMLElement textElm = errorElm.getSingleInnerElementsNamed("text", NamespaceURIs.URN_IETF_PARAMS_XML_NS_XMPP_STANZAS);
        Assert.assertEquals(ERROR_TEXT, textElm.getInnerText().getText());
       
        Assert.assertEquals(IgnoreFailureStrategy.IGNORE_FAILURE_STRATEGY, triple.getDeliveryFailureStrategy());
       
        Assert.assertFalse(triples.hasNext());
    }
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.