Package org.modeshape.jcr.value.basic

Examples of org.modeshape.jcr.value.basic.BasicName


        childNodesByRef = new HashMap<ChildReference, AbstractJcrNode>();
        for (int i = 0; i != 10; ++i) {
            // Create a child reference ...
            String name = "node" + (i + 1);
            NodeKey key = keyTemplate.withId(name);
            ChildReference ref = new ChildReference(key, new BasicName("http://foo", name), 1);
            refs.add(ref);
            // Create a mock child node ...
            AbstractJcrNode childJcrNode = mock(AbstractJcrNode.class);
            children.add(childJcrNode);
            childNodesByRef.put(ref, childJcrNode);
View Full Code Here


    public void shouldFindPublicChildNodeDefinitionsWhenBothPublicAndProtectedAreDefined() throws Exception {
        InputStream cndStream = getClass().getResourceAsStream("/cnd/protectedDefinitions.cnd");
        assertThat(cndStream, is(notNullValue()));
        nodeTypeManager().registerNodeTypes(cndStream, true);

        Name parking = new BasicName(null, "parking");
        Name level = new BasicName(null, "level");
        Set<Name> garage = Collections.<Name>singleton(new BasicName(null, "garage"));

        JcrNodeDefinition def = repoTypeManager.getNodeTypes().findChildNodeDefinitions(parking, garage)
                                               .findBestDefinitionForChild(level, level, true, SiblingCounter.noSiblings());

        assertNotNull(def);
        Name car = new BasicName(null, "car");
        def = repoTypeManager.getNodeTypes().findChildNodeDefinitions(parking, garage)
                             .findBestDefinitionForChild(car, car, true, SiblingCounter.noSiblings());
        assertNotNull(def);
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.value.basic.BasicName

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.