Skip to content
Permalink
Browse files

Suppressing built-in jcr:mimeType

  • Loading branch information...
escowles committed Jul 16, 2015
1 parent 3b6464d commit 25d54b0ca1a3f504baa384363af96e426770293b
@@ -643,6 +643,9 @@ public void testPatchBinaryNameAndType() throws Exception {
HAS_MIME_TYPE.asNode(), createLiteral("text/plain")));
assertTrue(graphStore.contains(ANY, createURI(serverAddress + pid + "/x"),
HAS_ORIGINAL_NAME.asNode(), createLiteral("x.txt")));
assertFalse("Should not contain old mime type property",
graphStore.contains(ANY, createURI(serverAddress + pid + "/x"),
createURI(REPOSITORY_NAMESPACE + "mimeType"), ANY));
}

@Test
@@ -115,7 +115,24 @@ public boolean apply(final Property p) {
@Override
public boolean apply(final Property p) {
return JcrPropertyFunctions.isBinaryContentProperty.apply(p)
|| isProtectedAndShouldBeHidden.apply(p);
|| isProtectedAndShouldBeHidden.apply(p)
|| isSuppressedProperty.apply(p);
}
};

/**
* Check if a property is a reference property.
*/
public static Predicate<Property> isSuppressedProperty =
new Predicate<Property>() {

@Override
public boolean apply(final Property p) {
try {
return p.getName().equals("jcr:mimeType");
} catch (final RepositoryException e) {
throw new RepositoryRuntimeException(e);
}
}
};

0 comments on commit 25d54b0

Please sign in to comment.
You can’t perform that action at this time.