Package org.modeshape.jcr.value

Examples of org.modeshape.jcr.value.Name


    }

    @Override
    public boolean canRemoveNode( String itemName ) {
        CheckArg.isNotNull(itemName, "itemName");
        Name childName = context.getValueFactories().getNameFactory().create(itemName);
        return nodeTypes().canRemoveAllChildren(this.name, null, childName, true);
    }
View Full Code Here


     * @see javax.jcr.nodetype.NodeType#canRemoveItem(java.lang.String)
     */
    @Override
    public boolean canRemoveItem( String itemName ) {
        CheckArg.isNotNull(itemName, "itemName");
        Name childName = context.getValueFactories().getNameFactory().create(itemName);
        return nodeTypes().canRemoveItem(this.name, null, childName, true);
    }
View Full Code Here

    public boolean canSetProperty( JcrSession session,
                                   String propertyName,
                                   Value value ) {
        CheckArg.isNotNull(propertyName, "propertyName");
        Name name = context.getValueFactories().getNameFactory().create(propertyName);

        // Reuse the logic in RepositoryNodeTypeManager ...
        return nodeTypes().findPropertyDefinition(session, this.name, null, name, value, false, true) != null;
    }
View Full Code Here

        CheckArg.isNotNull(propertyName, "propertyName");
        if (values == null || values.length == 0) {
            return canRemoveProperty(propertyName);
        }

        Name name = context.getValueFactories().getNameFactory().create(propertyName);
        // Reuse the logic in RepositoryNodeTypeManager ...
        return nodeTypes().findPropertyDefinition(session, this.name, null, name, values, true) != null;
    }
View Full Code Here

    }

    @Override
    public boolean canRemoveProperty( String propertyName ) {
        CheckArg.isNotNull(propertyName, "propertyName");
        Name name = context.getValueFactories().getNameFactory().create(propertyName);

        // Reuse the logic in RepositoryNodeTypeManager ...
        return nodeTypes().canRemoveProperty(this.name, null, name, true);
    }
View Full Code Here

    }

    @Override
    public boolean isNodeType( String nodeTypeName ) {
        if (nodeTypeName == null) return false;
        Name name = context.getValueFactories().getNameFactory().create(nodeTypeName);
        return this.thisAndAllSupertypesNames.contains(name);
    }
View Full Code Here

                                 NodeType[] mixinNodeTypes ) {
        Map<PropertyDefinitionId, JcrPropertyDefinition> props = new HashMap<PropertyDefinitionId, JcrPropertyDefinition>();
        /*
         * Need to have the same parent name for all PropertyDefinitionIds and NodeDefinitionIds as we're checking for conflicts on the definition name
         */
        final Name DEFAULT_NAME = this.name;

        for (JcrPropertyDefinition property : propertyDefinitions()) {
            /*
             * I'm trying really hard to reuse existing code, but it's a stretch in this case.  I don't care about the property
             * types or where they were declared... if more than one definition with the given name exists (not counting definitions
View Full Code Here

        } else {
            // Need to get the path of the parent(s) and determine the path ...
            for (String parentId : readDocument(doc).getParentIds()) {
                String parentPath = getDocumentPathById(parentId);
                Document parent = getDocumentById(parentId);
                Name childName = readDocument(parent).getChildrenMap().get(id);
                String childPath = parentPath + "/" + stringFrom(childName);
                documentsByLocation.put(childPath, doc);
            }
        }
    }
View Full Code Here

                                JcrSession session ) {
            assert value instanceof JcrValue;

            JcrValue jcrValue = (JcrValue)value;
            // Need to use the session execution context to handle the remaps
            Name name = valueFactory.create(jcrValue.value());

            for (int i = 0; i < constraints.length; i++) {
                if (constraints[i].equals(name)) {
                    return true;
                }
View Full Code Here

        if (existing == null || existing.isEmpty()) {
            write(id, sidecar, properties);
        } else {
            // Merge the changed properties into the existing ...
            for (Map.Entry<Name, Property> entry : properties.entrySet()) {
                Name name = entry.getKey();
                Property property = entry.getValue();
                if (property == null) {
                    existing.remove(name);
                } else {
                    existing.put(name, property);
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.value.Name

Copyright © 2018 www.massapicom. 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.