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

Commit

Permalink
Updating dc:subject examples to use literals instead of URIs as values
Browse files Browse the repository at this point in the history
  • Loading branch information
escowles committed Oct 13, 2014
1 parent d59439b commit b59507d
Showing 1 changed file with 3 additions and 8 deletions.
Expand Up @@ -28,7 +28,6 @@

import java.io.File;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;

import javax.inject.Inject;
Expand Down Expand Up @@ -87,7 +86,7 @@ public void testOneResource() throws ClientProtocolException, IOException,
+ "@prefix indexing:<http://fedora.info/definitions/v4/indexing#>."
+ "<" + uri + "> dc:title \"500 Easy Microwave Meals\" ; "
+ "dc:creator \"Yubulac Xorhorisa\" ; "
+ "dc:subject <http://id.loc.gov/authorities/subjects/sh2012004374> ;"

This comment has been minimized.

Copy link
@awoods

awoods Oct 17, 2014

@escowles, was the issue with the URI in this test that f4 was thinking "http" was a namespace? If so, is there a deeper issue here that should be resolved instead of averted (by changing the subject to a literal)?

This comment has been minimized.

Copy link
@escowles

escowles Oct 17, 2014

Author Contributor

@awoods no -- the issue is that now that we're using jena instead of sesame, it was enforcing the requirement that the object of dc:subject is a string instead of a URI.

This comment has been minimized.

Copy link
@awoods

awoods Oct 17, 2014

Interesting. Is that due to the domain/range definition of dc:subject?

+ "dc:subject \"goats\" ;"
+ "rdf:type <http://fedora.info/definitions/v4/indexing#indexable> ;"
+ "indexing:hasIndexingTransformation \"default\".";

Expand Down Expand Up @@ -178,7 +177,7 @@ public void testOneResourceCustomMapping() throws ClientProtocolException, IOExc
+ "@prefix indexing:<http://fedora.info/definitions/v4/indexing#>."
+ "<" + uri + "> dc:title \"500 Easy Microwave Meals\" ; "
+ "dc:creator \"Yubulac Xorhorisa\" ; "
+ "dc:subject <http://id.loc.gov/authorities/subjects/sh2012004374> ;"
+ "dc:subject \"goats\" ;"
+ "rdf:type <http://fedora.info/definitions/v4/indexing#indexable> ;"
+ "rdf:type <http://fedora.info/definitions/v4/indexingtest#book> ;"
+ "indexing:hasIndexingTransformation \"dc\".";
Expand All @@ -191,11 +190,7 @@ public void testOneResourceCustomMapping() throws ClientProtocolException, IOExc
.getStatusLine().getStatusCode());

LOGGER.debug("Waiting for our resource to be indexed...");
final String q =
"subject:"
+ URLEncoder
.encode("http://id.loc.gov/authorities/subjects/sh2012004374",
"UTF-8");
final String q = "subject:goats";
LOGGER.debug("Checking for our record with query: {}", q);
final SolrQuery query = new SolrQuery(q);
List<SolrDocument> results = indexServer.query(query).getResults();
Expand Down

0 comments on commit b59507d

Please sign in to comment.