Examples of nextNodeType()


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

        session-import
        */
        String referenceableNt = null;
        NodeTypeIterator it = superuser.getWorkspace().getNodeTypeManager().getPrimaryNodeTypes();
        while (it.hasNext() && referenceableNt == null) {
            NodeType nt = it.nextNodeType();
            String ntName = nt.getName();
            if (nt.isNodeType(mixReferenceable) &&
                    !nt.isAbstract() &&
                    // TODO: improve....
                    // ignore are built-in nodetypes (mostly version related)
View Full Code Here

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

                }

                // now search for all node types that are derived from base
                NodeTypeIterator allTypes = ntMgr.getAllNodeTypes();
                while (allTypes.hasNext()) {
                    NodeType nt = allTypes.nextNodeType();
                    NodeType[] superTypes = nt.getSupertypes();
                    if (Arrays.asList(superTypes).contains(base)) {
                        if (nt.isMixin()) {
                            addTypeConstraint(new MixinComparision(nt.getName()));
                        } else {
View Full Code Here

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

            if (ntNames == null) {
                NodeTypeManager ntMgr = session.getWorkspace().getNodeTypeManager();
                ntNames = new HashMap<String, String[]>();
                NodeTypeIterator it = ntMgr.getAllNodeTypes();
                while (it.hasNext()) {
                    String name = it.nextNodeType().getName();
                    String localName = name;
                    int idx = name.indexOf(':');
                    if (idx != -1) {
                        localName = name.substring(idx + 1);
                    }
View Full Code Here

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

        if (propertyNames == null) {
            propertyNames = new HashMap<String, String>();
            NodeTypeManager ntMgr = session.getWorkspace().getNodeTypeManager();
            NodeTypeIterator it = ntMgr.getAllNodeTypes();
            while (it.hasNext()) {
                NodeType nt = it.nextNodeType();
                PropertyDefinition[] defs = nt.getDeclaredPropertyDefinitions();
                for (PropertyDefinition def : defs) {
                    String pn = def.getName();
                    if (!pn.equals("*")) {
                        String localName = pn;
View Full Code Here

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

        if (childNodeNames == null) {
            childNodeNames = new HashMap<String, String>();
            NodeTypeManager ntMgr = session.getWorkspace().getNodeTypeManager();
            NodeTypeIterator it = ntMgr.getAllNodeTypes();
            while (it.hasNext()) {
                NodeType nt = it.nextNodeType();
                NodeDefinition[] defs = nt.getDeclaredChildNodeDefinitions();
                for (NodeDefinition def : defs) {
                    String cnn = def.getName();
                    if (!cnn.equals("*")) {
                        String localName = cnn;
View Full Code Here

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

            }

            // now search for all node types that are derived from base
            NodeTypeIterator allTypes = ntMgr.getAllNodeTypes();
            while (allTypes.hasNext()) {
                NodeType nt = allTypes.nextNodeType();
                NodeType[] superTypes = nt.getSupertypes();
                if (Arrays.asList(superTypes).contains(base)) {
                    String ntName = nsMappings.translatePropertyName(nt.getName(),
                            session.getNamespaceResolver());
                    Term t;
View Full Code Here

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

    @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

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

    @Override
    public NodeTypeIterator getMixinNodeTypes() 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

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

            }

            // now search for all node types that are derived from base
            NodeTypeIterator allTypes = ntMgr.getAllNodeTypes();
            while (allTypes.hasNext()) {
                NodeType nt = allTypes.nextNodeType();
                NodeType[] superTypes = nt.getSupertypes();
                if (Arrays.asList(superTypes).contains(base)) {
                    Name n = session.getQName(nt.getName());
                    String ntName = nsMappings.translateName(n);
                    Term t;
View Full Code Here

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

     */
    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
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.