Package javax.jcr.nodetype

Examples of javax.jcr.nodetype.NodeTypeIterator.nextNodeType()


    public void testGetPrimaryNodeTypes() throws RepositoryException {
        NodeTypeIterator types = manager.getPrimaryNodeTypes();
        while (types.hasNext()) {
            assertFalse("getPrimaryNodeTypes() must not return mixin " +
                    "node types",
                    types.nextNodeType().isMixin());
        }
    }


    /**
 
View Full Code Here


    public void testGetMixinNodeTypes() throws RepositoryException {
        NodeTypeIterator types = manager.getMixinNodeTypes();
        while (types.hasNext()) {
            assertTrue("getMixinNodeTypes() must return exclusively mixin " +
                    "node types",
                    types.nextNodeType().isMixin());
        }
    }


}
View Full Code Here

     */
    public void testIfPrimaryNodeTypesAreSubtypesOfNTBase()
            throws RepositoryException {
        NodeTypeIterator types = manager.getPrimaryNodeTypes();
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            assertTrue("Primary node type " + type.getName() +
                    " must inherit nt:base",
                    type.isNodeType("nt:base"));
        }
    }
View Full Code Here

        NodeTypeIterator types = manager.getAllNodeTypes();

        boolean overjump = false;

        while (types.hasNext()) {
            NodeType type = types.nextNodeType();

            // node types with more than one residual child node definition
            // will cause trouble in test cases. the implementation
            // might pick another definition than the definition returned by
            // this method, when a child node is set.
View Full Code Here

        NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
        NodeTypeIterator types = manager.getAllNodeTypes();

        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            NodeDefinition nodeDefs[] = type.getDeclaredChildNodeDefinitions();

            for (int i = 0; i < nodeDefs.length; i++) {
                NodeDefinition nodeDef = nodeDefs[i];
View Full Code Here

        NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
        NodeTypeIterator types = manager.getAllNodeTypes();

        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            PropertyDefinition propDefs[] = type.getDeclaredPropertyDefinitions();
            for (int i = 0; i < propDefs.length; i++) {
                PropertyDefinition propDef = propDefs[i];

                if (propertyType != ANY_PROPERTY_TYPE &&
View Full Code Here

        NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
        NodeTypeIterator types = manager.getAllNodeTypes();

        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            PropertyDefinition propDefs[] = type.getDeclaredPropertyDefinitions();
            for (int i = 0; i < propDefs.length; i++) {
                PropertyDefinition propDef = propDefs[i];

                if (propDef.getName().equals("*")) {
View Full Code Here

                                                 String legalType)
            throws RepositoryException {

        NodeTypeIterator types = manager.getAllNodeTypes();
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            if (!type.getName().equals(legalType)) {
                NodeType superTypes[] = type.getSupertypes();
                boolean isSubType = false;
                for (int i = 0; i < superTypes.length; i++) {
                    String name = superTypes[i].getName();
View Full Code Here

        NodeTypeIterator types = manager.getAllNodeTypes();

        // find a NodeType which is not satisfying the constraints
        findNodeTypeNotSatisfied:
            while (types.hasNext()) {
                NodeType type = types.nextNodeType();
                String name = type.getName();
                for (int i = 0; i < constraints.length; i++) {
                    if (name.equals(constraints[i])) {
                        continue findNodeTypeNotSatisfied;
                    }
View Full Code Here

    @Override
    public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException {
        List<NodeType> list = Lists.newArrayList();
        NodeTypeIterator iterator = getAllNodeTypes();
        while (iterator.hasNext()) {
            NodeType type = iterator.nextNodeType();
            if (!type.isMixin()) {
                list.add(type);
            }
        }
        return new NodeTypeIteratorAdapter(list);
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.