Skip to content

Instantly share code, notes, and snippets.

@cjcolvar
Created October 18, 2023 16:40
Show Gist options
  • Save cjcolvar/39f1290323373499bb86de0981ba6f27 to your computer and use it in GitHub Desktop.
Save cjcolvar/39f1290323373499bb86de0981ba6f27 to your computer and use it in GitHub Desktop.
Changes to fcrepo upgrader for Avalon
diff --git a/pom.xml b/pom.xml
index c5cfaa0..1c9ac10 100644
--- a/pom.xml
+++ b/pom.xml
@@ -226,6 +226,9 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <release>21</release>
+ </configuration>
</plugin>
<!-- verify that source files contain the correct license headers $
diff --git a/src/main/java/org/fcrepo/upgrade/utils/F47ToF5UpgradeManager.java b/src/main/java/org/fcrepo/upgrade/utils/F47ToF5UpgradeManager.java
index 3baa82f..7febd94 100644
--- a/src/main/java/org/fcrepo/upgrade/utils/F47ToF5UpgradeManager.java
+++ b/src/main/java/org/fcrepo/upgrade/utils/F47ToF5UpgradeManager.java
@@ -182,10 +182,10 @@ class F47ToF5UpgradeManager extends UpgradeManagerBase implements UpgradeManager
//skip if ACL or Authorization: these files are upgraded through a separate code path
// see convertAcl() below.
- if (rdfTypes.contains(ACL) || rdfTypes.contains(AUTHORIZATION)) {
- newLocation.toFile().delete();
- return;
- }
+ //if (rdfTypes.contains(ACL) || rdfTypes.contains(AUTHORIZATION)) {
+ // newLocation.toFile().delete();
+ // return;
+ //}
rdfTypes.retainAll(LDP_CONTAINER_TYPES);
final var isConcreteContainerDefined = !rdfTypes.isEmpty();
@@ -251,17 +251,17 @@ class F47ToF5UpgradeManager extends UpgradeManagerBase implements UpgradeManager
}
}
binaryHeaders.put(CONTENT_TYPE_HEADER, Collections.singletonList(mimetype));
- } else if (statement.getPredicate().equals(ACCESS_CONTROL)) {
+ //} else if (statement.getPredicate().equals(ACCESS_CONTROL)) {
//remove the current statement across both past versions and latest version
- model.remove(currentStatement);
- rewriteModel.set(true);
+ //model.remove(currentStatement);
+ //rewriteModel.set(true);
//on the latest version
- if(versionTimestamp == null) {
- //convert the acl
- convertAcl(newLocation, currentStatement.getSubject().getURI(),
- currentStatement.getObject().asResource().getURI());
- }
+ //if(versionTimestamp == null) {
+ // //convert the acl
+ // convertAcl(newLocation, currentStatement.getSubject().getURI(),
+ // currentStatement.getObject().asResource().getURI());
+ //}
}
});
diff --git a/src/main/java/org/fcrepo/upgrade/utils/RdfConstants.java b/src/main/java/org/fcrepo/upgrade/utils/RdfConstants.java
index 41071b3..ba2ba28 100644
--- a/src/main/java/org/fcrepo/upgrade/utils/RdfConstants.java
+++ b/src/main/java/org/fcrepo/upgrade/utils/RdfConstants.java
@@ -96,7 +96,8 @@ public class RdfConstants {
private static final Set<Property> serverManagedProperties;
static {
final ImmutableSet.Builder<Property> b = ImmutableSet.builder();
- b.addAll(fixityProperties).addAll(ldpManagedProperties).addAll(binaryProperties);
+ //b.addAll(fixityProperties).addAll(ldpManagedProperties).addAll(binaryProperties);
+ b.addAll(fixityProperties).addAll(ldpManagedProperties);
serverManagedProperties = b.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment