@@ -267,7 +267,12 @@ export default class IndexController extends Controller {
267267 matches . prefixes = this . model . addIfNotIncluded (
268268 matches . prefixes ,
269269 'pol' ,
270- 'https://www.example.org/ns/policy#' ,
270+ 'https://w3id.org/DFDP/policy#' ,
271+ ) ;
272+ matches . prefixes = this . model . addIfNotIncluded (
273+ matches . prefixes ,
274+ 'http' ,
275+ 'http://www.w3.org/2011/http#' ,
271276 ) ;
272277
273278 // Re-add the N3 rules to the resource.
@@ -325,7 +330,7 @@ export default class IndexController extends Controller {
325330 }
326331 valid &= ! policy . urlError ;
327332
328- if ( policy . executionTarget === 'http://example. org/httpRequest ' ) {
333+ if ( policy . executionTarget === 'http://www.w3. org/2011/http#Request ' ) {
329334 if (
330335 ! [ 'GET' , 'POST' , 'PUT' , 'DELETE' , 'PATCH' ] . includes ( policy . method )
331336 ) {
@@ -565,15 +570,16 @@ export default class IndexController extends Controller {
565570 if ( type && type . startsWith ( 'policy-' ) ) {
566571 let policy = { uuid : uuid ( ) , url : '' } ;
567572 if ( type === 'policy-redirect' ) {
568- policy . executionTarget = 'http ://example .org/redirect ' ;
573+ policy . executionTarget = 'https ://w3id .org/DFDP/policy#Redirect ' ;
569574 } else if ( type === 'policy-n3-patch' ) {
570- policy . executionTarget = 'http://example.org/n3Patch' ;
575+ policy . executionTarget =
576+ 'http://www.w3.org/ns/solid/terms#InsertDeletePatch' ;
571577 } else if ( type === 'policy-http-request' ) {
572578 policy = {
573579 ...policy ,
574580 method : 'POST' ,
575581 contentType : '' ,
576- executionTarget : 'http://example. org/httpRequest ' ,
582+ executionTarget : 'http://www.w3. org/2011/http#Request ' ,
577583 } ;
578584 }
579585 this . model . policies = [ ...this . model . policies , policy ] ;
@@ -883,18 +889,20 @@ export default class IndexController extends Controller {
883889 // Add basic properties and N3 rule syntax equal for all policy types.
884890 let data = `
885891{
886- <${ this . model . loadedFormUri } > ex :event ex :Submit.
892+ <${ this . model . loadedFormUri } > pol :event pol :Submit.
887893} => {
888894 ex:HttpPolicy pol:policy [
889895 a fno:Execution ;
890896 fno:executes <${ policy . executionTarget } > ;
891- ex:url <${ policy . url } >` ;
897+ http:requestURI <${ policy . url } >` ;
892898
893899 // If the policy is a HTTP request, add the method and content type.
894- if ( policy . executionTarget === 'http://example. org/httpRequest ' ) {
900+ if ( policy . executionTarget === 'http://www.w3. org/2011/http#Request ' ) {
895901 data += ` ;
896- ex:method "${ policy . method } " ;
897- ex:contentType "${ policy . contentType } "` ;
902+ http:methodName "${ policy . method } " ;
903+ http:headers (
904+ [ http:fieldName "Content-Type" ; http:fieldValue "${ policy . contentType } " ]
905+ )` ;
898906 }
899907
900908 // Finish the policy syntax.
0 commit comments