@Override public Map<String, Object> getPreCalculatedFields() { Map<String, Object> preCalculatedFields = new HashMap<>(); // indexing AIP inherited info preCalculatedFields.put(RodaConstants.INDEX_STATE, SolrUtils.formatEnum(aip.getState())); preCalculatedFields.put(RodaConstants.INGEST_SIP_IDS, aip.getIngestSIPIds()); preCalculatedFields.put(RodaConstants.INGEST_JOB_ID, aip.getIngestJobId()); preCalculatedFields.put(RodaConstants.INGEST_UPDATE_JOB_IDS, aip.getIngestUpdateJobIds()); preCalculatedFields.put(RodaConstants.FILE_ANCESTORS, ancestors); preCalculatedFields.putAll(SolrUtils.getPermissionsAsPreCalculatedFields(aip.getPermissions())); return preCalculatedFields; }
@Override public Map<String, Object> getPreCalculatedFields() { Map<String, Object> preCalculatedFields = new HashMap<>(); // indexing file size and number preCalculatedFields.put(RodaConstants.REPRESENTATION_SIZE_IN_BYTES, sizeInBytes); preCalculatedFields.put(RodaConstants.REPRESENTATION_NUMBER_OF_DATA_FILES, numberOfDataFiles); preCalculatedFields.put(RodaConstants.REPRESENTATION_NUMBER_OF_DATA_FOLDERS, numberOfDataFolders); // indexing active state and permissions preCalculatedFields.put(RodaConstants.INDEX_STATE, SolrUtils.formatEnum(aip.getState())); preCalculatedFields.put(RodaConstants.INGEST_SIP_IDS, aip.getIngestSIPIds()); preCalculatedFields.put(RodaConstants.INGEST_JOB_ID, aip.getIngestJobId()); preCalculatedFields.put(RodaConstants.INGEST_UPDATE_JOB_IDS, aip.getIngestUpdateJobIds()); preCalculatedFields.put(RodaConstants.AIP_ANCESTORS, ancestors); preCalculatedFields.putAll(SolrUtils.getPermissionsAsPreCalculatedFields(aip.getPermissions())); return preCalculatedFields; }
for (String fieldName : fields) { if (fieldName.equalsIgnoreCase(InventoryReportPlugin.CSV_FIELD_SIP_ID)) { fileInfo.add(FSUtils.asString(aip.getIngestSIPIds())); } else if (fieldName.equalsIgnoreCase(InventoryReportPlugin.CSV_FIELD_AIP_ID)) { fileInfo.add(dm.getAipId());
fileInfo.add(FSUtils.asString(aip.getIngestSIPIds())); } else if (fieldName.equalsIgnoreCase(InventoryReportPlugin.CSV_FIELD_AIP_ID)) { fileInfo.add(file.getAipId());
for (String fieldName : fields) { if (fieldName.equalsIgnoreCase(InventoryReportPlugin.CSV_FIELD_SIP_ID)) { fileInfo.add(FSUtils.asString(aip.getIngestSIPIds())); } else if (fieldName.equalsIgnoreCase(InventoryReportPlugin.CSV_FIELD_AIP_ID)) { fileInfo.add(otherMetadata.getAipId());
public static AIP earkSIPToAIPUpdate(SIP sip, IndexedAIP indexedAIP, ModelService model, String username, Optional<String> searchScope, String ingestJobId, Report reportItem, Plugin<?> plugin) throws RequestNotValidException, NotFoundException, GenericException, AlreadyExistsException, AuthorizationDeniedException, ValidationException, LockingException { boolean notify = false; AIP aip; PluginHelper.acquireObjectLock(indexedAIP, plugin); // process IP information processIPInformation(model, sip, indexedAIP.getId(), notify, true); // process IPRepresentation information for (IPRepresentation representation : sip.getRepresentations()) { processIPRepresentationInformation(model, representation, indexedAIP.getId(), notify, true, username, reportItem); } aip = model.retrieveAIP(indexedAIP.getId()); aip.setGhost(false); if (searchScope.isPresent()) { aip.setParentId(searchScope.get()); } aip.addIngestUpdateJobId(ingestJobId); for (String id : sip.getIds()) { if (!aip.getIngestSIPIds().contains(id)) { aip.getIngestSIPIds().add(id); } } return model.updateAIP(aip, username); }
doc.addField(RodaConstants.AIP_UPDATED_BY, aip.getUpdatedBy()); doc.addField(RodaConstants.INGEST_SIP_IDS, aip.getIngestSIPIds()); doc.addField(RodaConstants.INGEST_JOB_ID, aip.getIngestJobId()); doc.addField(RodaConstants.INGEST_UPDATE_JOB_IDS, aip.getIngestUpdateJobIds());