This repository was archived by the owner on Jan 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
src/main/java/org/w3/ldp/testsuite/test Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -233,19 +233,19 @@ protected Model getDefaultModel() {
233
233
return model ;
234
234
}
235
235
236
+ /**
237
+ * Given the location (URI), locate the appropriate "primary" resource within
238
+ * the model. Often models will have many triples with various subjects, which
239
+ * don't always match the request-URI. This attempts to resolve to the appropriate
240
+ * resource for the request-URI. This method is used to determine which subject
241
+ * URI should be used to assign new triples to for tests such as PUT.
242
+ *
243
+ * @param model
244
+ * @param location
245
+ * @return
246
+ */
236
247
protected Resource getPrimaryTopic (Model model , String location ) {
237
248
Resource loc = model .getResource (location );
238
- Property insertedContentRelation = model .getProperty (LDP .insertedContentRelation .stringValue ());
239
- NodeIterator relations = model .listObjectsOfProperty (loc , insertedContentRelation );
240
- if (relations .hasNext ()) {
241
- String relation = relations .next ().toString ();
242
- if (LDP .MemberSubject .stringValue ().equals (relation )) {
243
- return loc ;
244
- } else {
245
- Property primaryTopic = model .getProperty (relation );
246
- return model .listObjectsOfProperty (loc , primaryTopic ).next ().asResource ();
247
- }
248
- }
249
249
ResIterator bugs = model .listSubjectsWithProperty (RDF .type , model .createResource (DEFAULT_MODEL_TYPE ));
250
250
if (bugs .hasNext ()) {
251
251
return bugs .nextResource ();
You can’t perform that action at this time.
0 commit comments