Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Collapse #rest-api namespace into #repository
Browse files Browse the repository at this point in the history
- Remove #rels-ext namespace

Partial resolution of: https://www.pivotaltracker.com/story/show/82075356
  • Loading branch information
Andrew Woods committed Nov 8, 2014
1 parent d11c52d commit 638a47a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Expand Up @@ -62,7 +62,6 @@
import static org.fcrepo.kernel.RdfLexicon.CONTAINS;
import static org.fcrepo.kernel.RdfLexicon.HAS_PARENT;
import static org.fcrepo.kernel.RdfLexicon.REPOSITORY_NAMESPACE;
import static org.fcrepo.kernel.RdfLexicon.RESTAPI_NAMESPACE;
import static org.slf4j.LoggerFactory.getLogger;

/**
Expand Down Expand Up @@ -139,7 +138,7 @@ public class IndexerGroup implements MessageListener {
/**
* Indicates that a resource is a datastream.
**/
static final Resource DATASTREAM_TYPE = createResource(RESTAPI_NAMESPACE + "datastream");
static final Resource DATASTREAM_TYPE = createResource(REPOSITORY_NAMESPACE + "NonRdfSourceDescription");

private static final Reader EMPTY_CONTENT = null;

Expand Down
Expand Up @@ -201,16 +201,16 @@ private void mockContent(final String identifier,

private String getIndexableTriples(final String id, final boolean indexable, final String indexerName) {
return "\n" +
"<" + repoUrl + id + "> a <http://fedora.info/definitions/v4/rest-api#resource> , " +
"<http://fedora.info/definitions/v4/rest-api#object> ;\n" +
"<" + repoUrl + id + "> a <http://fedora.info/definitions/v4/repository#Resource> , " +
"<http://fedora.info/definitions/v4/repository#Container> ;\n" +
"\t<http://fedora.info/definitions/v4/repository#primaryType> \"nt:folder\"^^<http://www.w3" +
".org/2001/XMLSchema#string> ;\n" +
(indexerName != null ? "\t<http://fedora.info/definitions/v4/indexing#hasIndexingTransformation> \""
+ indexerName + "\"^^<http://www.w3.org/2001/XMLSchema#string> ;\n" : "") +
"\t<http://fedora.info/definitions/v4/repository#uuid> " +
"\"b1bfd6b8-b821-48c5-8eb9-05ef47e1b6e6\"^^<http://www.w3.org/2001/XMLSchema#string> ;\n" +
"\ta " + (indexable ? "<http://fedora.info/definitions/v4/indexing#indexable> , " +
"" : "") + "<http://fedora.info/definitions/v4/rest-api#resource> , " +
"<http://fedora.info/definitions/v4/rest-api#object> .\n";
"" : "") + "<http://fedora.info/definitions/v4/repository#Resource> , " +
"<http://fedora.info/definitions/v4/repository#Container> .\n";
}
}
Expand Up @@ -53,12 +53,11 @@ public class SparqlIndexerIT {
private SparqlIndexer sparqlIndexer;

private static final String fooRDF =
"@prefix fcrepo: <http://fedora.info/definitions/v4/repository#> .\n" +
"@prefix fedora: <http://fedora.info/definitions/v4/repository/rest-api#> .\n" +
"@prefix fedora: <http://fedora.info/definitions/v4/repository#> .\n" +
"<" + uri + ">\n" +
" fcrepo:hasChild <" + uri + "/barDS> ;\n" +
" fcrepo:hasParent <" + uri + "> ;\n" +
" fcrepo:uuid \"feb99ff2-455e-4e16-93a0-c0ae8d21b9ae\" .";
" fedora:hasChild <" + uri + "/barDS> ;\n" +
" fedora:hasParent <" + uri + "> ;\n" +
" fedora:uuid \"feb99ff2-455e-4e16-93a0-c0ae8d21b9ae\" .";

@Test
public void indexerTest() throws Exception {
Expand All @@ -73,10 +72,10 @@ public void indexerTest() throws Exception {

// SPARQL search should work
final String sparqlQuery =
"PREFIX fcrepo: <http://fedora.info/definitions/v4/repository#> \n" +
"PREFIX fedora: <http://fedora.info/definitions/v4/repository#> \n" +
"SELECT ?p \n" +
"WHERE \n" +
"{ ?p fcrepo:hasParent ?c }";
"{ ?p fedora:hasParent ?c }";
assertTrue("Triple should return from search!", countQueryTriples(sparqlQuery) > 0 );

// remove object
Expand Down

0 comments on commit 638a47a

Please sign in to comment.