Changeset 5249
- Timestamp:
- Feb 17, 2010, 1:38:58 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java
r5177 r5249 185 185 "protocolColumnMapping", 186 186 "Protocol", 187 "Mapping that picks the name orID of a protocol from the data columns. The plug-in will first " +188 "try to find a protocol with the given name . If none is found and the value is numeric it will " +187 "Mapping that picks the name, external or internal ID of a protocol from the data columns. The plug-in will first " + 188 "try to find a protocol with the given name or external id. If none is found and the value is numeric it will " + 189 189 "try to load by internal ID. " + 190 190 "Example: \\Protocol\\", -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ArrayBatchImporter.java
r4551 r5249 201 201 String nameOrId = protocolMapper.getValue(data); 202 202 ProtocolType type = ProtocolType.getById(dc, SystemItems.getId(ProtocolType.PRINTING)); 203 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);203 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 204 204 if (nameOrId == null || protocol != null) batch.setProtocol(protocol); 205 205 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ExtractImporter.java
r4844 r5249 214 214 ProtocolType type = ProtocolType.getById(dc, 215 215 SystemItems.getId(extract.isPooled() ? ProtocolType.POOLING : ProtocolType.EXTRACTION)); 216 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);216 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 217 217 if (nameOrId == null || protocol != null) creationEvent.setProtocol(protocol); 218 218 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/HybridizationImporter.java
r4891 r5249 264 264 String nameOrId = protocolMapper.getValue(data); 265 265 ProtocolType type = ProtocolType.getById(dc, SystemItems.getId(ProtocolType.HYBRIDIZATION)); 266 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);266 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 267 267 if (nameOrId == null || protocol != null) creationEvent.setProtocol(protocol); 268 268 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/LabeledExtractImporter.java
r4844 r5249 243 243 ProtocolType type = ProtocolType.getById(dc, 244 244 SystemItems.getId(extract.isPooled() ? ProtocolType.POOLING : ProtocolType.LABELING)); 245 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);245 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 246 246 if (nameOrId == null || protocol != null) creationEvent.setProtocol(protocol); 247 247 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/RawBioAssayImporter.java
r5177 r5249 432 432 String nameOrId = protocolMapper.getValue(data); 433 433 ProtocolType type = ProtocolType.getById(dc, SystemItems.getId(ProtocolType.FEATURE_EXTRACTION)); 434 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);434 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 435 435 if (nameOrId == null || protocol != null) rba.setProtocol(protocol); 436 436 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/SampleImporter.java
r4888 r5249 319 319 ProtocolType type = ProtocolType.getById(dc, 320 320 SystemItems.getId(sample.isPooled() ? ProtocolType.POOLING : ProtocolType.SAMPLING)); 321 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);321 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 322 322 if (nameOrId == null || protocol != null) creationEvent.setProtocol(protocol); 323 323 } -
trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/ScanImporter.java
r4922 r5249 300 300 String nameOrId = protocolMapper.getValue(data); 301 301 ProtocolType type = ProtocolType.getById(dc, SystemItems.getId(ProtocolType.SCANNING)); 302 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_ ID, nameOrId, type);302 Protocol protocol = findProtocol(dc, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, nameOrId, type); 303 303 if (nameOrId == null || protocol != null) scan.setProtocol(protocol); 304 304 } -
trunk/src/test/TestProtocol.java
r5248 r5249 85 85 p.setExternalId("External protocol id"); 86 86 } 87 if (name != null) p.setName(name); 87 if (name != null) 88 { 89 p.setName(name); 90 p.setExternalId(name + ".id"); 91 } 88 92 dc.saveItem(p); 89 93 dc.commit(); -
trunk/src/test/data/test.batchimport.samples.txt
r4366 r5249 1 1 Name Description External ID Pooled Parent Used quantity Created Original quantity Protocol 2 Sample 1.1 First sample from bs.1 smp.1.1 Biosource 1 2008-01-01 200 Sampling 2 Sample 1.1 First sample from bs.1 smp.1.1 Biosource 1 2008-01-01 200 Sampling.id 3 3 Sample 2.1 Second sample from bs.1 smp.2.1 Biosource 2 2008-01-01 350 Sampling 4 4 Sample X A sample with no parent or other info -
trunk/www/admin/protocols/edit_protocol.jsp
r4938 r5249 292 292 </tr> 293 293 <tr> 294 <td class="prompt">External ID</td> 295 <td><input <%=clazz%> type="text" name="external_id" 296 value="<%=HTML.encodeTags(protocol == null ? Values.getString(cc.getPropertyValue("externalId"), "") : protocol.getExternalId())%>" 297 size="40" maxlength="<%=Protocol.MAX_EXTERNAL_ID_LENGTH%>"></td> 298 </tr> 299 <tr> 294 300 <td class="prompt">File</td> 295 301 <td> -
trunk/www/admin/protocols/index.jsp
r5060 r5249 145 145 protocol.setName(Values.getStringOrNull(request.getParameter("name"))); 146 146 protocol.setDescription(Values.getStringOrNull(request.getParameter("description"))); 147 protocol.setExternalId(Values.getStringOrNull(request.getParameter("external_id"))); 147 148 if (protocolTypeId >= 0) // < 0 = denied or unchanged 148 149 { -
trunk/www/admin/protocols/list_protocol.jsp
r5165 r5249 258 258 } 259 259 %> 260 <tbl:columndef 261 id="externalId" 262 property="externalId" 263 datatype="string" 264 title="External id" 265 sortable="true" 266 filterable="true" 267 exportable="true" 268 /> 260 269 <tbl:columndef 261 270 id="protocolType" … … 527 536 enablePropertyLink="<%=mode.hasPropertyLink()%>" 528 537 /></tbl:cell> 538 <tbl:cell column="externalId"><%=HTML.encodeTags(item.getExternalId())%></tbl:cell> 529 539 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 530 540 <% -
trunk/www/admin/protocols/view_protocol.jsp
r5069 r5249 265 265 <td class="prompt">Type</td> 266 266 <td><base:propertyvalue item="<%=protocol%>" property="protocolType" /></td> 267 </tr> 268 <tr> 269 <td class="prompt">External ID</td> 270 <td><%=HTML.encodeTags(protocol.getExternalId())%></td> 267 271 </tr> 268 272 <tr>
Note: See TracChangeset
for help on using the changeset viewer.