Examples of NamedNode


Examples of org.wymiwyg.rdf.graphs.NamedNode

  /**
   * @param fgNode
   * @return
   */
  NamedNode getGroundedIn(FunctionallyGroundedNode fgNode) {
    NamedNode result = groundedInMap.get(fgNode);
    if (result != null) {
      return result;
    } else {
      throw new RuntimeException("reference to fgNode which was not present in diff "+fgNode);
    }
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.NamedNode

   */
  private void writeFgNodes(Set<? extends FunctionallyGroundedNode> fgNodes,
      ReferencingNaturalizer naturalizer, ZipOutputStream zipOut)
      throws IOException {
    for (FunctionallyGroundedNode fgNode : fgNodes) {
      NamedNode describingModel = naturalizer.getGroundedIn(fgNode);
      writeFgNode(fgNode, describingModel, naturalizer, zipOut);
    }
  }
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.NamedNode

  /**
   *
   */
  private void addOwlSameAs() {
    for (NamedNodeAlternatives alternatives : multiNodeAlternatives) {
      NamedNode canonical = alternatives.getCanonical();
      for (NamedNode other : alternatives.allSorted) {
        if (other == canonical) {
          continue;
        }
        triples.add(new TripleImpl(canonical, sameAsProp, other));
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.NamedNode

   */
  private Set<Triple> prepareMappingTable(Graph base) {
    Set<Triple> result = new HashSet<Triple>();
    for (Triple triple : base) {
      if (triple.getPredicate().equals(nameProp)) {
        NamedNode namedNode = new NamedNodeImpl(((TypedLiteralNode)triple.getObject()).getLexicalForm());
        Node subject = triple.getSubject();
        NamedNodeAlternatives namedNodeAlternatives = replaceMap.get(subject);
        if (namedNodeAlternatives == null) {
          namedNodeAlternatives = new NamedNodeAlternatives(namedNode);
          replaceMap.put(subject, namedNodeAlternatives);
View Full Code Here

Examples of spark.api.rdf.NamedNode

    List<Map<String,RDFNode>> sl = new ArrayList<Map<String,RDFNode>>();
    for (int i = 0; i < 10; i++) {
      sl.add(new HashMap<String,RDFNode>());
    }
   
    NamedNode uriRef = new NamedNodeImpl(URI.create("http://example.org/test"));
    BlankNode bn = new BlankNodeImpl("1");
    Literal lit = new PlainLiteralImpl("foo");
   
    sl.get(0).put(var, uriRef);
    sl.get(1).put(var, bn);
    sl.get(2).put(var, lit);
    sl.get(3).put(var, new PlainLiteralImpl(A_DATE_TIME));
    sl.get(4).put(var, new PlainLiteralImpl("198765415975423167465132498465"));
    sl.get(5).put(var, new PlainLiteralImpl("true"));
    sl.get(6).put(var, new PlainLiteralImpl("3.14"));
    sl.get(7).put(var, new PlainLiteralImpl("98.6"));
    sl.get(8).put(var, new PlainLiteralImpl("42"));
   
    SolutionSet s = new SolutionSet(null, Arrays.asList("x"), sl);
    TestCursor.assertCursor(s, BEFORE_FIRST);
   
    assertTrue(s.next());
    TestCursor.assertCursor(s, FIRST);
    assertEquals(uriRef, s.getNamedNode(var));   
    assertEquals(uriRef.getURI(), s.getURI(var));   
   
    assertTrue(s.next());
    TestCursor.assertCursor(s, NONE);
    assertEquals(bn, s.getBlankNode(var));   
   
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.