Examples of DataIdentifier


Examples of org.apache.jackrabbit.core.data.DataIdentifier

            }
            // UPDATE DATASTORE SET DATA=? WHERE ID=?
            conn.executeStmt(updateDataSQL, new Object[]{wrapper, tempId});
            now = System.currentTimeMillis();
            long length = in.getPosition();
            DataIdentifier identifier = new DataIdentifier(digest.digest());
            usesIdentifier(identifier);
            id = identifier.toString();
            // UPDATE DATASTORE SET ID=?, LENGTH=?, LAST_MODIFIED=?
            // WHERE ID=?
            // AND NOT EXISTS(SELECT ID FROM DATASTORE WHERE ID=?)
            PreparedStatement prep = conn.executeStmt(updateSQL, new Object[]{
                    id, new Long(length), new Long(now),
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

            PreparedStatement prep = conn.executeStmt(selectAllSQL, new Object[0]);
            rs = prep.getResultSet();
            while (rs.next()) {
                String id = rs.getString(1);
                if (!id.startsWith(TEMP_PREFIX)) {
                    DataIdentifier identifier = new DataIdentifier(id);
                    list.add(identifier);
                }
            }
            return list.iterator();
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

                InternalValue result;
                if (USE_DATA_STORE) {
                    BLOBFileValue blob = null;
                    if (value instanceof BinaryValueImpl) {
                        BinaryValueImpl bin = (BinaryValueImpl) value;
                        DataIdentifier identifier = bin.getDataIdentifier();
                        if (identifier != null) {
                            // access the record to ensure it is not garbage collected
                            if (store.getRecordIfStored(identifier) != null) {
                                // it exists - so we don't need to stream it again
                                // but we need to create a new object because the original
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

        return PREFIX + identifier;
    }

    static BLOBInDataStore getInstance(DataStore store, String s) {
        String id = s.substring(PREFIX.length());
        DataIdentifier identifier = new DataIdentifier(id);
        return new BLOBInDataStore(store, identifier);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

        return new BLOBInDataStore(store, identifier);
    }

    static BLOBInDataStore getInstance(DataStore store, InputStream in) throws DataStoreException {
        DataRecord rec = store.addRecord(in);
        DataIdentifier identifier = rec.getIdentifier();
        return new BLOBInDataStore(store, identifier);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

        super(blob);
        this.blob = blob;
    }

    public String getContentIdentity() {
        DataIdentifier id = blob.getDataIdentifier();
        return id == null ? null : id.toString();
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

    }

    public Value createValue(Binary binary) {
        try {
            if (binary instanceof BLOBInDataStore) {
                DataIdentifier identifier = ((BLOBInDataStore) binary).getDataIdentifier();
                InternalValue value = InternalValue.getInternalValue(identifier, store);
                if (value != null) {
                    // if the value is already in this data store
                    return new BinaryValueImpl(value.getBLOBFileValue());
                }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

        return PREFIX + identifier;
    }

    static BLOBInDataStore getInstance(DataStore store, String s) {
        String id = s.substring(PREFIX.length());
        DataIdentifier identifier = new DataIdentifier(id);
        return new BLOBInDataStore(store, identifier);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

        return new BLOBInDataStore(store, identifier);
    }

    static BLOBInDataStore getInstance(DataStore store, InputStream in) throws DataStoreException {
        DataRecord rec = store.addRecord(in);
        DataIdentifier identifier = rec.getIdentifier();
        return new BLOBInDataStore(store, identifier);
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.data.DataIdentifier

        switch (value.getType()) {
            case PropertyType.BINARY:
                BLOBFileValue blob = null;
                if (value instanceof BinaryValueImpl) {
                    BinaryValueImpl bin = (BinaryValueImpl) value;
                    DataIdentifier identifier = bin.getDataIdentifier();
                    if (identifier != null) {
                        // access the record to ensure it is not garbage collected
                        if (store.getRecordIfStored(identifier) != null) {
                            // it exists - so we don't need to stream it again
                            // but we need to create a new object because the original
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.