Package javax.jcr.nodetype

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


            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++) {
                switch (defs[i].getRequiredType()) {
                    case PropertyType.STRING:
                    case PropertyType.BINARY:
View Full Code Here


    public void testGetValueConstraints() 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++) {
                PropertyDefinition def = defs[i];

                String constraints[] = def.getValueConstraints();
View Full Code Here

            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++) {
                PropertyDefinition def = defs[i];

                Value values[] = def.getDefaultValues();
View Full Code Here

            throws RepositoryException {

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

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

            throws RepositoryException {

        NodeTypeIterator types = manager.getAllNodeTypes();
        // loop all node types
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            NodeDefinition defs[] = type.getChildNodeDefinitions();
            for (int i = 0; i < defs.length; i++) {
                if (defs[i].isAutoCreated()) {
                    assertFalse("An auto create node must not be a " +
                            "residual set definition.",
View Full Code Here

            throws RepositoryException {

        NodeTypeIterator types = manager.getAllNodeTypes();
        // loop all node types
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            NodeDefinition defs[] = type.getChildNodeDefinitions();

            for (int i = 0; i < defs.length; i++) {
                assertTrue("getRequiredPrimaryTypes() must never return an " +
                        "empty array.",
View Full Code Here

            throws RepositoryException {

        NodeTypeIterator types = manager.getAllNodeTypes();
        // loop all node types
        while (types.hasNext()) {
            NodeType type = types.nextNodeType();
            NodeDefinition defs[] = type.getChildNodeDefinitions();

            for (int i = 0; i < defs.length; i++) {

                NodeDefinition def = defs[i];
View Full Code Here

        NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
        NodeTypeIterator mixins = manager.getMixinNodeTypes();

        while (mixins.hasNext()) {
            String name = mixins.nextNodeType().getName();
            if (node.canAddMixin(name)) {
                return name;
            }
        }
        return null;
View Full Code Here

        NodeTypeManager manager = session.getWorkspace().getNodeTypeManager();
        NodeTypeIterator mixins = manager.getMixinNodeTypes();
        StringBuffer s = new StringBuffer("X");
        while (mixins.hasNext()) {
            s.append(mixins.nextNodeType().getName());
        }
        return s.toString().replaceAll(":", "");
    }

View Full Code Here

        StringBuffer notExistingName = new StringBuffer("X");
        NodeTypeIterator types = manager.getAllNodeTypes();
        while (types.hasNext()) {
            // build a name which is for sure not existing
            // (":" of namespace prefix will be replaced later on)
            notExistingName.append(types.nextNodeType().getName());
        }
        try {
            manager.getNodeType(notExistingName.toString().replaceAll(":", ""));
            fail("getNodeType(String nodeTypeName) must throw a " +
                    "NoSuchNodeTypeException if no according NodeType " +
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.