Project

General

Profile

« Previous | Next » 

Revision 7611

Added by Jing Tao over 11 years ago

Use the Identifier object rather than String as the key to get the system metadata and object path.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SystemMetadataEventListener.java
160 160
    public SystemMetadata getSystemMetadata(String id) {
161 161
        SystemMetadata metadata = null;
162 162
        if(systemMetadataMap != null && id != null) {
163
            metadata = systemMetadataMap.get(id);
163
            Identifier identifier = new Identifier();
164
            identifier.setValue(id);
165
            metadata = systemMetadataMap.get(identifier);
164 166
        }
165 167
        return metadata;
166 168
    }
......
196 198
     * @throws FileNotFoundException
197 199
     */
198 200
    public InputStream getDataObject(String pid) throws FileNotFoundException {
199
        String objectPath = objectPathMap.get(pid);
201
        Identifier identifier = new Identifier();
202
        identifier.setValue(pid);
203
        String objectPath = objectPathMap.get(identifier);
200 204
        InputStream data = null;
201 205
        data = new FileInputStream(objectPath);
202 206
        return data;

Also available in: Unified diff