This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating dc:subject examples to use literals instead of URIs as values
- Loading branch information
Showing
1 changed file
with
3 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ | |
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.net.URLEncoder; | ||
import java.util.List; | ||
|
||
import javax.inject.Inject; | ||
|
@@ -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.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
escowles
Author
Contributor
|
||
+ "dc:subject \"goats\" ;" | ||
+ "rdf:type <http://fedora.info/definitions/v4/indexing#indexable> ;" | ||
+ "indexing:hasIndexingTransformation \"default\"."; | ||
|
||
|
@@ -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\"."; | ||
|
@@ -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(); | ||
|
@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)?