Package org.jboss.dna.graph.property.basic

Examples of org.jboss.dna.graph.property.basic.BasicSingleValueProperty


        Property idProperty = getIdProperties().get(0); // fast
        if (DnaLexicon.UUID.equals(idProperty.getName())) {
            return Location.create(uuid);
        }
        List<Property> newIdProperties = new ArrayList<Property>(getIdProperties().size() + 1);
        newIdProperties.add(new BasicSingleValueProperty(DnaLexicon.UUID, uuid));
        newIdProperties.addAll(getIdProperties());
        return Location.create(newIdProperties);
    }
View Full Code Here


     * @see Location#with(UUID)
     */
    @Override
    public Location with( UUID uuid ) {
        if (uuid == null) return this;
        Property newProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        if (this.hasIdProperties()) {
            Property existing = this.getIdProperty(DnaLexicon.UUID);
            if (existing != null && existing.equals(newProperty)) return this;
        }

View Full Code Here

     * @param path the path
     * @param uuid the UUID
     */
    LocationWithPathAndUuid( Path path,
                             UUID uuid ) {
        super(path, new BasicSingleValueProperty(DnaLexicon.UUID, uuid));
        assert uuid != null;
        this.uuid = uuid;
    }
View Full Code Here

    private final List<Property> properties;

    LocationWithUuid( UUID uuid ) {
        assert uuid != null;
        this.uuid = uuid;
        Property uuidProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        this.properties = Collections.singletonList(uuidProperty);
        this.hashCode = HashCode.compute(null, this.properties);
    }
View Full Code Here

    @Override
    public Location with( UUID uuid ) {
        Property idProperty = getIdProperties().get(0); // fast
        if (uuid == null) return Location.create(getPath());
        assert !DnaLexicon.UUID.equals(idProperty.getName());
        Property newUuidProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        return Location.create(getPath(), idProperty, newUuidProperty);
    }
View Full Code Here

     * @see Location#with(UUID)
     */
    @Override
    public Location with( UUID uuid ) {
        if (uuid == null) return this;
        Property newProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        if (this.hasIdProperties()) {
            Property existing = this.getIdProperty(DnaLexicon.UUID);
            if (existing != null && existing.equals(newProperty)) return this;
        }

View Full Code Here

     */
    public AstNode setProperty( Name name,
                                Object value ) {
        assert name != null;
        assert value != null;
        properties.put(name, new BasicSingleValueProperty(name, value));
        return this;
    }
View Full Code Here

    private final List<Property> properties;

    LocationWithUuid( UUID uuid ) {
        assert uuid != null;
        this.uuid = uuid;
        Property uuidProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        this.properties = Collections.singletonList(uuidProperty);
        this.hashCode = HashCode.compute(null, this.properties);
    }
View Full Code Here

    @Override
    public Location with( UUID uuid ) {
        Property idProperty = idProperties.get(0); // fast
        if (uuid == null) return Location.create(path);
        assert !DnaLexicon.UUID.equals(idProperty.getName());
        Property newUuidProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        return Location.create(path, idProperty, newUuidProperty);
    }
View Full Code Here

     * @see Location#with(UUID)
     */
    @Override
    public Location with( UUID uuid ) {
        if (uuid == null) return this;
        Property newProperty = new BasicSingleValueProperty(DnaLexicon.UUID, uuid);
        if (this.hasIdProperties()) {
            Property existing = this.getIdProperty(DnaLexicon.UUID);
            if (existing != null && existing.equals(newProperty)) return this;
        }

View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.property.basic.BasicSingleValueProperty

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.