/** {@inheritDoc} */ public boolean isQueryable() { return type.isQueryable(); }
/** * Create a new {@link NodeTypeTemplate} copy of the 'nodeType', but without <br> * metaData defined as 'childNodeDefinition'. */ private NodeTypeTemplate createNodeTypeWithoutMetaData(NodeTypeManager nodeTypeManager, NodeType nodeType, NodeDefinition metaDataNode) throws RepositoryException { NodeTypeTemplate ntt = nodeTypeManager.createNodeTypeTemplate(); ntt.setDeclaredSuperTypeNames(nodeType.getDeclaredSupertypeNames()); ntt.setMixin(nodeType.isMixin()); ntt.setName(nodeType.getName()); ntt.setOrderableChildNodes(nodeType.hasOrderableChildNodes()); ntt.setPrimaryItemName(nodeType.getPrimaryItemName()); ntt.setQueryable(nodeType.isQueryable()); ntt.getPropertyDefinitionTemplates().addAll(Arrays.asList(nodeType.getDeclaredPropertyDefinitions())); List<NodeDefinition> childNodeDefinition = new ArrayList<NodeDefinition>(); childNodeDefinition.addAll(Arrays.asList(nodeType.getDeclaredChildNodeDefinitions())); childNodeDefinition.remove(metaDataNode); ntt.getNodeDefinitionTemplates().addAll(childNodeDefinition); return ntt; } }
ntDef.setAttribute(ISQUERYABLE_ATTRIBUTE, Boolean.toString(nt.isQueryable()));
/** * Creates a new rest node type. * * @param nodeType the {@code non-null} JCR {@link NodeType}. * @param baseUrl the {@code non-null} root url, which is used to construct urls to the children and properties of the node type */ public RestNodeType( NodeType nodeType, String baseUrl ) { this.name = nodeType.getName(); this.isMixin = nodeType.isMixin(); this.isAbstract = nodeType.isAbstract(); this.isQueryable = nodeType.isQueryable(); this.hasOrderableChildNodes = nodeType.hasOrderableChildNodes(); this.superTypesLinks = new TreeSet<String>(); for (NodeType superType : nodeType.getDeclaredSupertypes()) { String superTypeLink = RestHelper.urlFrom(baseUrl, RestHelper.NODE_TYPES_METHOD_NAME, RestHelper.URL_ENCODER.encode(superType.getName())); this.superTypesLinks.add(superTypeLink); } this.subTypesLinks = new TreeSet<String>(); for (NodeTypeIterator subTypeIterator = nodeType.getDeclaredSubtypes(); subTypeIterator.hasNext(); ) { String subTypeLink = RestHelper.urlFrom(baseUrl, RestHelper.NODE_TYPES_METHOD_NAME, RestHelper.URL_ENCODER.encode(subTypeIterator.nextNodeType().getName())); this.subTypesLinks.add(subTypeLink); } this.propertyTypes = new ArrayList<RestPropertyType>(); for (PropertyDefinition propertyDefinition : nodeType.getDeclaredPropertyDefinitions()) { this.propertyTypes.add(new RestPropertyType(propertyDefinition)); } }
if (!type.isQueryable()) { continue;
if (!type.isQueryable()) { continue;