Package org.wymiwyg.rdf.graphs.impl

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl


  /**
   * Test method for {@link com.hp.hpl.jena.gvs.impl.SimpleFilterableDecomposition#getFunctionallyGroundedNodes(java.util.Set)}.
   */
  public void testGetFunctionallyGroundedNodesSetOfGroundedNode() {
    Set<GroundedNode> requiredGroundedNodes = new HashSet<GroundedNode>();
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/a#"));
    assertEquals(0, simpleFilterableDecomposition.getFunctionallyGroundedNodes(requiredGroundedNodes).size());
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/a"));
    assertEquals(0, simpleFilterableDecomposition.getFunctionallyGroundedNodes(requiredGroundedNodes).size());
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/b"));
    assertEquals(1, simpleFilterableDecomposition.getFunctionallyGroundedNodes(requiredGroundedNodes).size());
  }
View Full Code Here


  /**
   * Test method for {@link com.hp.hpl.jena.gvs.impl.SimpleFilterableDecomposition#getTerminalMolecules(java.util.Set)}.
   */
  public void testGetTerminalMoleculesSetOfGroundedNode() {
    Set<GroundedNode> requiredGroundedNodes = new HashSet<GroundedNode>();
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/a#"));
    assertEquals(0, simpleFilterableDecomposition.getTerminalMolecules(requiredGroundedNodes).size());
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/b"));
    assertEquals(0, simpleFilterableDecomposition.getTerminalMolecules(requiredGroundedNodes).size());
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/a"));
    assertEquals(1, simpleFilterableDecomposition.getTerminalMolecules(requiredGroundedNodes).size());
  }
View Full Code Here

   * @return
   * @throws IOException
   */
  private CrossGraphFgNode getCgFgNodeFromPathNode(ZipFile zipFile, PathNode currentPath)
      throws IOException {
    NamedNode describingResource = new NamedNodeImpl(
        ReferencingNaturalizer.rootURL + currentPath.getPath());
    CrossGraphFgNode result = new CrossGraphFgNode();
    PathNode nodesIn1Path = currentPath.getSubPath("onlyIn1/");
    deserializeFgNodes(zipFile, nodesIn1Path, result.getNodesIn1());
    PathNode nodesIn2Path = currentPath.getSubPath("onlyIn2/");
View Full Code Here

   * @throws IOException
   */
  private FunctionallyGroundedNode getFgNodeFromPathNode(ZipFile zipFile,
      PathNode pathNode) throws IOException {
   
    NamedNode describingResource = new NamedNodeImpl(
        ReferencingNaturalizer.rootURL + pathNode.getPath());
    FunctionallyGroundedNode existing = descriptionPathToFgNode.get(describingResource);
    if (existing != null) {
      return existing;
    }
View Full Code Here

    relativePath.append(baseURL);
    relativePath.append(categoryLabel);
    relativePath.append('/');
    relativePath.append(Util.createRandomString(8));
    relativePath.append('/');
    return new NamedNodeImpl(relativePath.toString());
  }
View Full Code Here

public class FgNodeMergerTest {

  @Test
  public void simple() {
    SimpleGraph graph = new SimpleGraph();
    Node nanmedNode = new NamedNodeImpl("http://1.example.org/");
    graph.add(new TripleImpl(new NodeImpl(),
        new InverseFunctionalPropertyNodeImpl(
            "http://example.org/functional"), nanmedNode));
    Node fg2 = new NodeImpl();
    graph.add(new TripleImpl(fg2, new InverseFunctionalPropertyNodeImpl(
        "http://example.org/functional"), nanmedNode));
    graph.add(new TripleImpl(fg2, new InverseFunctionalPropertyNodeImpl(
        "http://example.org/f2"), new NamedNodeImpl(
        "http://2.example.org/")));
    ReferenceGroundedDecomposition dec = new ReferenceGroundedDecompositionImpl(
        graph);
    Set<FunctionallyGroundedNode> functionallyGroundedNodes = dec
        .getFunctionallyGroundedNodes();
View Full Code Here

TOP

Related Classes of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

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.