Package org.jboss.dna.graph.property

Examples of org.jboss.dna.graph.property.Name


        MapNode node = getTargetNode(workspace, request, request.from());
        if (node == null) return;

        // Look up the new parent, which must exist ...
        Path newParentPath = request.into().getPath();
        Name desiredName = request.desiredName();
        MapNode newParent = newWorkspace.getNode(newParentPath);
        MapNode newNode = workspace.copyNode(getExecutionContext(), node, newWorkspace, newParent, desiredName, true);
        Path newPath = getExecutionContext().getValueFactories().getPathFactory().create(newParentPath, newNode.getName());
        Location oldLocation = getActualLocation(request.from(), node);
        Location newLocation = Location.create(newPath, newNode.getUuid());
View Full Code Here


            Property property = propertyEntry.getValue();
            if (property == null) {
                node.removeProperty(propertyEntry.getKey());
                continue;
            }
            Name propName = property.getName();
            if (!propName.equals(DnaLexicon.UUID)) {
                if (node.getProperties().get(propName) == null) {
                    // It is a new property ...
                    request.setNewProperty(propName);
                }
                node.setProperty(property);
View Full Code Here

     */
    public MapNode setProperty( ExecutionContext context,
                                String name,
                                Object... values ) {
        PropertyFactory propertyFactory = context.getPropertyFactory();
        Name propertyName = context.getValueFactories().getNameFactory().create(name);
        return setProperty(propertyFactory.create(propertyName, values));
    }
View Full Code Here

     * @param name the name of the property to return
     * @return the property for the given name
     */
    public Property getProperty( ExecutionContext context,
                                 String name ) {
        Name propertyName = context.getValueFactories().getNameFactory().create(name);
        return getProperty(propertyName);
    }
View Full Code Here

     * @return an object that may be used to start another request
     */
    public CreateAt<Graph> createAt( final Path at ) {
        CheckArg.isNotNull(at, "at");
        final Path parent = at.getParent();
        final Name childName = at.getLastSegment().getName();
        final String workspaceName = getCurrentWorkspaceName();
        return new CreateAt<Graph>() {
            private final List<Property> properties = new LinkedList<Property>();

            public CreateAt<Graph> and( UUID uuid ) {
View Full Code Here

     *         node where the node is to be created
     */
    public final Create<Graph> create( Path at ) {
        CheckArg.isNotNull(at, "at");
        Path parent = at.getParent();
        Name name = at.getLastSegment().getName();
        return create(Location.create(parent), name);
    }
View Full Code Here

        final NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
        CheckArg.isNotNull(parent, "parent");
        return new CreateNode<Conjunction<Graph>>() {
            public Conjunction<Graph> node( String name,
                                            Property... properties ) {
                Name child = nameFactory.create(name);
                requests.createNode(parent, getCurrentWorkspaceName(), child, properties);
                return nextGraph;
            }

            public Conjunction<Graph> node( String name,
                                            Iterator<Property> properties ) {
                Name child = nameFactory.create(name);
                requests.createNode(parent, getCurrentWorkspaceName(), child, properties);
                return nextGraph;
            }

            public Conjunction<Graph> node( String name,
                                            Iterable<Property> properties ) {
                Name child = nameFactory.create(name);
                requests.createNode(parent, getCurrentWorkspaceName(), child, properties.iterator());
                return nextGraph;
            }
        };
    }
View Full Code Here

     *
     * @param propertyName the property name
     * @return the interface used to specify the values
     */
    public SetValues<Conjunction<Graph>> set( String propertyName ) {
        Name name = getContext().getValueFactories().getNameFactory().create(propertyName);
        return set(name);
    }
View Full Code Here

     *
     * @param name the name of the property that is to be read
     * @return the object that is used to specified the node whose property is to be read, and which will return the property
     */
    public On<Property> getProperty( final String name ) {
        Name nameObj = context.getValueFactories().getNameFactory().create(name);
        return getProperty(nameObj);
    }
View Full Code Here

     * @throws ParsingException if there is a problem parsing the content
     */
    protected void parseNodeTypeDefinition( TokenStream tokens,
                                            Path path ) {
        // Parse the name, and create the path and a property for the name ...
        Name name = parseNodeTypeName(tokens);
        Path nodeTypePath = pathFactory.create(path, name);
        List<Property> properties = new ArrayList<Property>();
        properties.add(propertyFactory.create(JcrLexicon.NODE_TYPE_NAME, name));

        // Read the (optional) supertypes ...
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.property.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.