Skip to content

Commit

Permalink
Modified the code based on Matthew's suggestion.
Browse files Browse the repository at this point in the history
  • Loading branch information
taojing2002 committed Apr 17, 2023
1 parent f10fa4f commit 69089cc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ New features and bugs fixed in this release:
* Sampling citation not showing up in view service
* Mis-Formatting of Data Package Contents
* Unhelpful error message when trying to create as a denied submitter
* Data objects miss after a package was published
* Data objects missing after a package was published
* Multiple updates on a single DOI happen when users use the metacat admin page to update DOIs
* Metacat updated the DOI metadata (datacite) when the system metadata of an obsoleted object was updated if the obsolescent chain has a DOI Sid
* getPackage fails to include system metadata
Expand Down
4 changes: 2 additions & 2 deletions metacat-index/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,7 @@ private void removeDataPackage(String pid) throws Exception {
try {
List<SolrDoc> docsToUpdate = getUpdatedSolrDocsByRemovingResourceMap(pid);
if (docsToUpdate != null && !docsToUpdate.isEmpty()) {
//SolrElementAdd addCommand = new SolrElementAdd(docsToUpdate);
//httpService.sendUpdate(solrIndexUri, addCommand);
for(SolrDoc doc : docsToUpdate) {
//removeFromIndex(doc.getIdentifier());
insertToIndex(doc);
}
}
Expand Down Expand Up @@ -1058,7 +1055,6 @@ private void removeFromDataPackage(String pid) throws Exception {
SolrDoc solrDoc = ResourceMapSubprocessor.getSolrDoc(documentsValue);
if (solrDoc != null) {
solrDoc.removeFieldsWithValue(SolrElementField.FIELD_ISDOCUMENTEDBY, pid);
//removeFromIndex(documentsValue);
insertToIndex(solrDoc);
}
break;
Expand All @@ -1083,8 +1079,6 @@ private void removeFromDataPackage(String pid) throws Exception {
SolrDoc solrDoc = ResourceMapSubprocessor.getSolrDoc(documentedByValue);
if (solrDoc != null) {
solrDoc.removeFieldsWithValue(SolrElementField.FIELD_DOCUMENTS, pid);
//docsToUpdate.add(solrDoc);
//removeFromIndex(documentedByValue);
insertToIndex(solrDoc);
}
break;
Expand Down
1 change: 0 additions & 1 deletion src/scripts/bash/checksum-data-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ prefix="$directory/"
rm data-checksum.txt
for file in "$directory"/*; do
if [[ "$file" =~ ^$directory/auto ]]; then
#checksum=$(md5sum "$file" | awk '{print $1}')
checksum=$(md5 "$file" | awk '{print $4}')

# Extract the "foo.2" and "1" parts of the filename
Expand Down
1 change: 0 additions & 1 deletion src/scripts/bash/checksum-document-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ prefix="$directory/"

rm document-checksum.txt
for file in "$directory"/*; do
#checksum=$(md5sum "$file" | awk '{print $1}')
checksum=$(md5 "$file" | awk '{print $4}')

# Extract the "foo.2" and "1" parts of the filename
Expand Down

0 comments on commit 69089cc

Please sign in to comment.