Package org.apache.jackrabbit.core.value

Examples of org.apache.jackrabbit.core.value.InternalValue.internalValue()


                        InternalValue val = values[i];
                        if (val != null) {
                            if (type == PropertyType.BINARY) {
                                // special handling required for binary value:
                                // put binary value in BLOB store
                                BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
                                InputStream in = blobVal.getStream();
                                String blobId = blobStore.createId(state.getPropertyId(), i);
                                try {
                                    blobStore.put(blobId, in, blobVal.getLength());
                                } finally {
View Full Code Here


        if (values != null) {
            for (int i = 0; i < values.length; i++) {
                InternalValue val = values[i];
                if (val != null) {
                    if (val.getType() == PropertyType.BINARY) {
                        BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
                        // delete blob file and prune empty parent folders
                        blobVal.delete(true);
                    }
                }
            }
View Full Code Here

            InternalValue val = values[i];
            switch (state.getType()) {
                case PropertyType.BINARY:
                    // special handling required for binary value:
                    // spool binary value to file in blob store
                    BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
                    long size = blobVal.getLength();
                    if (size < 0) {
                        log.warn("Blob has negative size. Potential loss of data. " +
                            "id={} idx={}", state.getId(), String.valueOf(i));
                        out.writeInt(0);
View Full Code Here

                        values[i] = InternalValue.create(data);
                        blobVal.discard();
                    }
                    break;
                case PropertyType.DOUBLE:
                    out.writeDouble(((Double) val.internalValue()).doubleValue());
                    break;
                case PropertyType.LONG:
                    out.writeLong(((Long) val.internalValue()).longValue());
                    break;
                case PropertyType.BOOLEAN:
View Full Code Here

                    break;
                case PropertyType.DOUBLE:
                    out.writeDouble(((Double) val.internalValue()).doubleValue());
                    break;
                case PropertyType.LONG:
                    out.writeLong(((Long) val.internalValue()).longValue());
                    break;
                case PropertyType.BOOLEAN:
                    out.writeBoolean(((Boolean) val.internalValue()).booleanValue());
                    break;
                case PropertyType.NAME:
View Full Code Here

                    break;
                case PropertyType.LONG:
                    out.writeLong(((Long) val.internalValue()).longValue());
                    break;
                case PropertyType.BOOLEAN:
                    out.writeBoolean(((Boolean) val.internalValue()).booleanValue());
                    break;
                case PropertyType.NAME:
                    writeQName(out, (QName) val.internalValue());
                    break;
                case PropertyType.REFERENCE:
View Full Code Here

                    break;
                case PropertyType.BOOLEAN:
                    out.writeBoolean(((Boolean) val.internalValue()).booleanValue());
                    break;
                case PropertyType.NAME:
                    writeQName(out, (QName) val.internalValue());
                    break;
                case PropertyType.REFERENCE:
                    writeUUID(out, (UUID) val.internalValue());
                    break;
                default:
View Full Code Here

                    break;
                case PropertyType.NAME:
                    writeQName(out, (QName) val.internalValue());
                    break;
                case PropertyType.REFERENCE:
                    writeUUID(out, (UUID) val.internalValue());
                    break;
                default:
                    // because writeUTF(String) has a size limit of 64k,
                    // we're using write(byte[]) instead
                    byte[] bytes = val.toString().getBytes("UTF-8");
View Full Code Here

            InternalValue val = values[i];
            switch (state.getType()) {
                case PropertyType.BINARY:
                    // special handling required for binary value:
                    // spool binary value to file in blob store
                    BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
                    long size = blobVal.getLength();
                    if (size < 0) {
                        log.warn("Blob has negative size. Potential loss of data. " +
                            "id={} idx={}", state.getId(), String.valueOf(i));
                        out.writeInt(0);
View Full Code Here

                        values[i] = InternalValue.create(data);
                        blobVal.discard();
                    }
                    break;
                case PropertyType.DOUBLE:
                    out.writeDouble(((Double) val.internalValue()).doubleValue());
                    break;
                case PropertyType.LONG:
                    out.writeLong(((Long) val.internalValue()).longValue());
                    break;
                case PropertyType.BOOLEAN:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.