Package org.jboss.dna.graph.property

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


                            if (mimeType == null) mimeType = DEFAULT_MIME_TYPE;
                            addProperty(properties, factory, JcrLexicon.MIMETYPE, mimeType);

                            if (os.toByteArray().length > 0) {
                                // Now put the file's content into the "jcr:data" property ...
                                BinaryFactory binaryFactory = getExecutionContext().getValueFactories().getBinaryFactory();
                                addProperty(properties, factory, JcrLexicon.DATA, binaryFactory.create(os.toByteArray()));
                            }
                        }
                    } else {
                        // Determine the corresponding file path for this object ...
                        String filePath = getPathAsString(requestedPath);
View Full Code Here


                    // Read the length of the content ...
                    long length = stream.readLong();
                    if (skip) {
                        skippedLargeValues.read(valueFactories, hash, length);
                    } else {
                        BinaryFactory factory = valueFactories.getBinaryFactory();
                        // Look for an already-loaded Binary value with the same hash ...
                        value = factory.find(hash);
                        if (value == null) {
                            // Didn't find an existing large value, so we have to read the large value ...
                            value = largeValues.read(valueFactories, hash, length);
                        }
                    }
View Full Code Here

            try {
                switch (this.type) {
                    case PropertyType.STRING:
                        return this.getString().equals(that.getString());
                    case PropertyType.BINARY:
                        BinaryFactory binaryFactory = valueFactories.getBinaryFactory();
                        Binary thisValue = binaryFactory.create(this.value);
                        Binary thatValue = binaryFactory.create(that.value);
                        return thisValue.equals(thatValue);
                    case PropertyType.BOOLEAN:
                        return this.getBoolean() == that.getBoolean();
                    case PropertyType.DOUBLE:
                        return this.getDouble() == that.getDouble();
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.property.BinaryFactory

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.