Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…space correctly
  • Loading branch information
escowles committed Dec 13, 2013
1 parent 44edb61 commit c774530
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
Expand Up @@ -327,7 +327,7 @@ public boolean apply(final Property p) {
@Override
public boolean apply(final Property p) {
return !p.isAnon()
&& p.getNameSpace().equals(REPOSITORY_NAMESPACE);
&& p.getNameSpace().startsWith(REPOSITORY_NAMESPACE);

}
};
Expand Down
40 changes: 40 additions & 0 deletions fcrepo-kernel/src/test/java/org/fcrepo/kernel/RdfLexiconTest.java
@@ -0,0 +1,40 @@
/**
* Copyright 2013 DuraSpace, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.fcrepo.kernel;

import static org.junit.Assert.assertTrue;
import static org.fcrepo.kernel.RdfLexicon.JCR_NAMESPACE;
import static org.fcrepo.kernel.RdfLexicon.PREMIS_NAMESPACE;
import static org.fcrepo.kernel.RdfLexicon.REPOSITORY_NAMESPACE;
import static org.fcrepo.kernel.RdfLexicon.isManagedPredicateURI;

import org.fcrepo.kernel.RdfLexicon;
import org.junit.Test;

public class RdfLexiconTest {

@Test
public void repoPredicatesAreManaged() {
assertTrue( isManagedPredicateURI.apply( PREMIS_NAMESPACE + "hasSize") );
assertTrue( isManagedPredicateURI.apply( REPOSITORY_NAMESPACE + "primaryType") );
assertTrue( isManagedPredicateURI.apply( REPOSITORY_NAMESPACE + "repository/custom.rep.name") );
}
@Test
public void otherPredicatesAreNotManaged() {
assertTrue( !isManagedPredicateURI.apply( "http://purl.org/dc/elements/1.1/title") );
}
}

0 comments on commit c774530

Please sign in to comment.