Examples of importXmlFrom()


Examples of org.jboss.dna.graph.Graph.importXmlFrom()

    public void shouldReturnFalseFromIsSameIfTheRepositoryInstanceIsDifferent() throws Exception {
        // Set up the store ...
        InMemoryRepositorySource source2 = new InMemoryRepositorySource();
        source2.setName("store");
        Graph store2 = Graph.create(source2, context);
        store2.importXmlFrom(AbstractJcrTest.class.getClassLoader().getResourceAsStream("cars.xml")).into("/");
        JcrSession jcrSession2 = mock(JcrSession.class);
        stub(jcrSession2.nodeTypeManager()).toReturn(nodeTypes);
        SessionCache cache2 = new SessionCache(jcrSession2, store2.getCurrentWorkspaceName(), context, nodeTypes, store2);

        Workspace workspace2 = mock(Workspace.class);
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

    public void shouldReturnFalseFromIsSameIfTheWorkspaceNameIsDifferent() throws Exception {
        // Set up the store ...
        InMemoryRepositorySource source2 = new InMemoryRepositorySource();
        source2.setName("store");
        Graph store2 = Graph.create(source2, context);
        store2.importXmlFrom(AbstractJcrTest.class.getClassLoader().getResourceAsStream("cars.xml")).into("/");
        JcrSession jcrSession2 = mock(JcrSession.class);
        stub(jcrSession2.nodeTypeManager()).toReturn(nodeTypes);
        SessionCache cache2 = new SessionCache(jcrSession2, store2.getCurrentWorkspaceName(), context, nodeTypes, store2);

        Workspace workspace2 = mock(Workspace.class);
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

    public void shouldReturnFalseFromIsSameIfTheNodeUuidIsDifferent() throws Exception {
        // Set up the store ...
        InMemoryRepositorySource source2 = new InMemoryRepositorySource();
        source2.setName("store");
        Graph store2 = Graph.create(source2, context);
        store2.importXmlFrom(AbstractJcrTest.class.getClassLoader().getResourceAsStream("cars.xml")).into("/");
        JcrSession jcrSession2 = mock(JcrSession.class);
        stub(jcrSession2.nodeTypeManager()).toReturn(nodeTypes);
        SessionCache cache2 = new SessionCache(jcrSession2, store2.getCurrentWorkspaceName(), context, nodeTypes, store2);

        Workspace workspace2 = mock(Workspace.class);
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

    public void shouldReturnTrueFromIsSameIfTheNodeUuidAndWorkspaceNameAndRepositoryInstanceAreSame() throws Exception {
        // Set up the store ...
        InMemoryRepositorySource source2 = new InMemoryRepositorySource();
        source2.setName("store");
        Graph store2 = Graph.create(source2, context);
        store2.importXmlFrom(AbstractJcrTest.class.getClassLoader().getResourceAsStream("cars.xml")).into("/");
        JcrSession jcrSession2 = mock(JcrSession.class);
        stub(jcrSession2.nodeTypeManager()).toReturn(nodeTypes);
        SessionCache cache2 = new SessionCache(jcrSession2, store2.getCurrentWorkspaceName(), context, nodeTypes, store2);

        Workspace workspace2 = mock(Workspace.class);
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

        source.setDefaultWorkspaceName(DEFAULT_WORKSPACE_NAME);

        // Import the information into the source ...
        Path pathToParent = path(path != null ? path : DEFAULT_PATH);
        Graph graph = Graph.create(source, context);
        graph.importXmlFrom(configurationFileInputStream).skippingRootElement(true).into(pathToParent);

        // The file was imported successfully, so now create the content information ...
        configurationContent = new ConfigurationDefinition(source, null, pathToParent, context, null);
        return this;
    }
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

        mirrorWorkspaceName = "Mirror Workspace";
        addProjection("fedSpace", "Mirror Projection", mirrorSourceName, mirrorWorkspaceName, "/ => /");

        // Add some data to the source ...
        Graph source = graphFor(mirrorSourceName, mirrorWorkspaceName);
        source.importXmlFrom(getClass().getClassLoader().getResource("cars.xml").toURI()).into("/");
    }

    /**
     * Assert that the node in the federated repository given by the supplied path represents the same node in the underlying
     * mirror source given by the same path.
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

        offsetWorkspaceName = "Offset Workspace";
        addProjection("fedSpace", "Offset Projection", offsetSourceName, offsetWorkspaceName, "/a/b => /");

        // Add some data to the source ...
        Graph source = graphFor(offsetSourceName, offsetWorkspaceName);
        source.importXmlFrom(getClass().getClassLoader().getResource("cars.xml").toURI()).into("/");
    }

    /**
     * Assert that the node in the source repository given by the supplied path represents the equivalent offset node in the
     * federated repository given by a path offset from the supplied path.
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

        branchWorkspaceName = "Branch Workspace";
        addProjection("fedSpace", "Branch Projection", branchSourceName, branchWorkspaceName, "/Aircraft => /Aircraft");

        // Add some data to the mirror source ...
        Graph source = graphFor(mirrorSourceName, mirrorWorkspaceName);
        source.importXmlFrom(getClass().getClassLoader().getResource("cars.xml").toURI()).into("/");

        // Add some data to the mirror source ...
        Graph branch = graphFor(branchSourceName, branchWorkspaceName);
        branch.importXmlFrom(getClass().getClassLoader().getResource("aircraft.xml").toURI()).into("/");
    }
View Full Code Here

Examples of org.jboss.dna.graph.Graph.importXmlFrom()

        Graph source = graphFor(mirrorSourceName, mirrorWorkspaceName);
        source.importXmlFrom(getClass().getClassLoader().getResource("cars.xml").toURI()).into("/");

        // Add some data to the mirror source ...
        Graph branch = graphFor(branchSourceName, branchWorkspaceName);
        branch.importXmlFrom(getClass().getClassLoader().getResource("aircraft.xml").toURI()).into("/");
    }

    /**
     * Assert that the node in the federated repository given by the supplied path represents the same node in the underlying
     * mirror source given by the same path.
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.