Project

General

Profile

« Previous | Next » 

Revision 6909

do NOT generate ORE maps or download data when we do the initial System Metadata generation -- this is deferred until D1 registration.

View differences:

src/edu/ucsb/nceas/metacat/admin/upgrade/GenerateSystemMetadata.java
44 44
import edu.emory.mathcs.backport.java.util.Collections;
45 45
import edu.ucsb.nceas.metacat.AccessionNumberException;
46 46
import edu.ucsb.nceas.metacat.DBUtil;
47
import edu.ucsb.nceas.metacat.DocumentImpl;
48 47
import edu.ucsb.nceas.metacat.IdentifierManager;
49 48
import edu.ucsb.nceas.metacat.McdbDocNotFoundException;
50 49
import edu.ucsb.nceas.metacat.admin.AdminException;
51 50
import edu.ucsb.nceas.metacat.dataone.SystemMetadataFactory;
52 51
import edu.ucsb.nceas.metacat.properties.PropertyService;
53
import edu.ucsb.nceas.metacat.util.DocumentUtil;
54 52
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
55 53
import edu.ucsb.nceas.utilities.SortedProperties;
56 54

  
......
61 59
    public boolean upgrade() throws AdminException {
62 60
        boolean success = true;
63 61
        // include ORE?
64
        boolean includeOre = true;
65
        boolean downloadData = true;
62
        boolean includeOre = false;
63
        boolean downloadData = false;
66 64

  
67 65
        try {
68 66
        	//get the list of ids with no SM
......
85 83
     * Generate SystemMetadata for any object in the object store that does
86 84
     * not already have it.  SystemMetadata documents themselves, are, of course,
87 85
     * exempt.  This is a utility method for migration of existing object 
88
     * stores to DataONE where SystemMetadata is required for all objects.  See 
89
     * https://trac.dataone.org/ticket/591
90
     * @param includeOre 
91
     * 
92
     * @param token an authtoken with appropriate permissions to read all 
93
     * documents in the object store.  To work correctly, this should probably
94
     * be an adminstrative credential.
95
     * @throws SQLException 
96
     * @throws AccessionNumberException 
97
     * @throws NoSuchAlgorithmException 
98
     * @throws InvalidRequest 
99
     * @throws NotImplemented 
100
     * @throws NotFound 
101
     * @throws NotAuthorized 
102
     * @throws InvalidToken 
103
     * @throws PropertyNotFoundException 
104
     * @throws McdbDocNotFoundException 
105
     * @throws ServiceFailure 
86
     * stores to DataONE where SystemMetadata is required for all objects.
87
     * @param idList
88
     * @param includeOre
89
     * @param downloadData
90
     * @throws ServiceFailure
91
     * @throws McdbDocNotFoundException
92
     * @throws PropertyNotFoundException
93
     * @throws InvalidToken
94
     * @throws NotAuthorized
95
     * @throws NotFound
96
     * @throws NotImplemented
97
     * @throws InvalidRequest
98
     * @throws NoSuchAlgorithmException
99
     * @throws AccessionNumberException
100
     * @throws SQLException
106 101
     */
107 102
    public void generateSystemMetadata(List<String> idList, boolean includeOre, boolean downloadData) 
108 103
    throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized, 
......
121 116
        log.info("done generating system metadata");
122 117
    }
123 118
    
119

  
124 120
    /**
125 121
     * Generate SystemMetadata for a particular object with identifier localId.
126 122
     * This is a utility method for migration of existing objects 
127 123
     * to DataONE where SystemMetadata is required for all objects.
128
     * 
129
     * @param token an authtoken with appropriate permissions to read all 
130
     *        documents in the object store.  To work correctly, this should
131
     *        be an adminstrative credential.
132
     * @param localId the identifier of the object to be processed
133
     * @param includeOre 
134
     * @throws ServiceFailure 
135
     * @throws SQLException 
136
     * @throws AccessionNumberException 
137
     * @throws NoSuchAlgorithmException 
138
     * @throws InvalidRequest 
139
     * @throws NotImplemented 
140
     * @throws NotFound 
141
     * @throws NotAuthorized 
142
     * @throws InvalidToken 
143
     * @throws PropertyNotFoundException 
144
     * @throws McdbDocNotFoundException 
145
     * @throws InvalidSystemMetadata 
124
     * @param localId
125
     * @param includeOre
126
     * @param downloadData
127
     * @throws ServiceFailure
128
     * @throws McdbDocNotFoundException
129
     * @throws PropertyNotFoundException
130
     * @throws InvalidToken
131
     * @throws NotAuthorized
132
     * @throws NotFound
133
     * @throws NotImplemented
134
     * @throws InvalidRequest
135
     * @throws NoSuchAlgorithmException
136
     * @throws AccessionNumberException
137
     * @throws SQLException
138
     * @throws InvalidSystemMetadata
146 139
     */
147
    public void generateSystemMetadata(String localId, boolean includeOre, boolean downloadData) 
140
    protected void generateSystemMetadata(String localId, boolean includeOre, boolean downloadData) 
148 141
    throws ServiceFailure, McdbDocNotFoundException, PropertyNotFoundException, InvalidToken, NotAuthorized,
149 142
    NotFound, NotImplemented, InvalidRequest, NoSuchAlgorithmException, AccessionNumberException, SQLException, InvalidSystemMetadata 
150 143
    {

Also available in: Unified diff