Examples of nextNodeType()


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

    public void testIsMixin() throws RepositoryException {

        NodeTypeIterator primaryTypes = manager.getPrimaryNodeTypes();
        assertFalse("testIsMixin() must return false if applied on a " +
                "primary node type",
                primaryTypes.nextNodeType().isMixin());

        // if a mixin node type exist, test if isMixin() returns true
        NodeTypeIterator mixinTypes = manager.getMixinNodeTypes();
        if (getSize(mixinTypes) > 0) {
            // need to re-aquire iterator {@link #getSize} may consume iterator
View Full Code Here

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

        if (getSize(mixinTypes) > 0) {
            // need to re-aquire iterator {@link #getSize} may consume iterator
            mixinTypes = manager.getMixinNodeTypes();
            assertTrue("testIsMixin() must return true if applied on a " +
                    "mixin node type",
                    mixinTypes.nextNodeType().isMixin());
        }
        // else skip the test for mixin node types
    }

    /**
 
View Full Code Here

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

        // find a primary node type but not "nt:base"
        NodeTypeIterator types = manager.getPrimaryNodeTypes();
        NodeType type = null;
        while (types.hasNext()) {
            type = types.nextNodeType();
            if (!type.getName().equals(ntBase)) {
                break;
            }
        }
View Full Code Here

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

    public void testGetDeclaredSupertypes()
            throws RepositoryException {

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

            NodeType declaredSupertypes[] = type.getDeclaredSupertypes();
            NodeType supertypes[] = type.getSupertypes();

            try {
View Full Code Here

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

            throws RepositoryException {

        // find a primary node type but not "nt:base"
        NodeTypeIterator types = manager.getPrimaryNodeTypes();
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            assertTrue("isNodeType(String nodeTypeName) must return true if " +
                    "NodeType is nodeTypeName",
                    type.isNodeType(type.getName()));
            if (type.isMixin()) {
                assertFalse("isNodeType(String nodeTypeName) must return " +
View Full Code Here

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

    public void testGetDeclaredPropertyDefs()
            throws RepositoryException {

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

            PropertyDefinition declaredDefs[] = type.getDeclaredPropertyDefinitions();
            PropertyDefinition defs[] = type.getPropertyDefinitions();

            try {
View Full Code Here

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

            throws NotExecutableException, RepositoryException {

        // find a primary node type but not "nt:base"
        NodeTypeIterator types = manager.getPrimaryNodeTypes();
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            PropertyDefinition defs[] = type.getPropertyDefinitions();
            boolean hasJCRPrimaryType = false;
            for (int i = 0; i < defs.length; i++) {
                if (defs[i].getName().equals(jcrPrimaryType)) {
                    hasJCRPrimaryType = true;
View Full Code Here

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

    public void testGetDeclaredChildNodeDefs()
            throws RepositoryException {

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

            NodeDefinition declaredDefs[] = type.getDeclaredChildNodeDefinitions();
            NodeDefinition defs[] = type.getChildNodeDefinitions();

            try {
View Full Code Here

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

    public void testGetDeclaringNodeType() throws RepositoryException {

        NodeTypeIterator types = manager.getAllNodeTypes();
        // loop all node types
        while (types.hasNext()) {
            NodeType currentType = types.nextNodeType();
            PropertyDefinition defsOfCurrentType[] =
                    currentType.getPropertyDefinitions();

            // loop all property defs of each node type
            for (int i = 0; i < defsOfCurrentType.length; i++) {
View Full Code Here

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

    public void testIsAutoCreate() throws RepositoryException {

        NodeTypeIterator types = manager.getAllNodeTypes();
        // loop all node types
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            PropertyDefinition defs[] = type.getPropertyDefinitions();
            for (int i = 0; i < defs.length; i++) {
                if (defs[i].isAutoCreated()) {
                    assertFalse("An auto create property must not be a " +
                            "residual set definition.",
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.