Thursday, November 6, 2014

Publishing an Offer from the (Web Commerce 1.0 Spec) - rev. 1

With the http://json-ld.org/playground/index.html here is some updated syntax:
(Input)

{
  "@context": "https://w3id.org/payswarm/v1",
  "id": "http://example.org/articles/#offer",
  "type": "Offer",
  "payee": [{
    "id": "http://example.org/outsiders/foaf.rdf#me",
    "type": "Payee",
    "currency": "USD",
    "destination": "http://bshambaugh.org/foaf.rdf#me",
    "com:rate": "120.00",
    "com:rateType": "FlatAmount",
    "comment": "Payment for Wheel of Car through Ripple Network."
  }],
  "payeeRule": [{
    "type": "PayeeRule",
    "com:destinationOwnerType": "payment processor",
    "com:maximumRate": "10",
    "com:rateType": "com:InclusivePercentage"
  }],
  "asset": "http://www.example.org/car_partOf.owl#Wheel_Of_Car",
  "assetHash": "urn:sha256:02817609f8ffb72502e002defe7a426f8d433802f866ac88fc93c318b9130840",
  "license": "http://www.tapr.org/TAPR_Open_Hardware_License_v1.0.txt",
  "licenseHash": "0d8866836917f8ef58af44accb6efab9a10610ad",
  "validFrom": "2014-02-02T03:51:08Z",
  "signature": {
    "type": "GraphSignature2012",
    "created": "2014-02-02T03:51:08Z",
    "creator": "https://dev.payswarm.com/i/brentshambaugh/keys/1",
    "signatureValue": "fYb/QH0Ot3NALFtCsRxZR0rCAu76FUKjFwfWzD+PXYj/QtjC8Bcf+0eSlpo/89w/eZbuCqQ5O5SgTHyrhwGUgLFRlwsZYWwG7dgqXBlSh/zIAOf3PQ2IXyvGEQypIwggaJoBUmvRRoE1pJcBdVGXnINu3hTevUJisomPEDV37fi77EV+yihT+FRoQ9si/gXG7PQxD/8PnJ6a+N6Ix9jknRgF1q4xRf9mlBERW8fdP2GbPa2sHcrev4QD1fEUPjBonN+UxM0FEMM9rc7+PkiFribNStrV6F3s66MBF6m7zjkvRqXDuAdL3P2gQpOat9/P5iVmK6loHIHgZPePFoFf/A=="
 
  }
}

(Output - Normalized)

<http://example.org/articles/#offer> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://json-ld.org/playground/Offer> .
<http://example.org/articles/#offer> <https://w3id.org/commerce#payee> <http://example.org/outsiders/foaf.rdf#me> .
<http://example.org/articles/#offer> <https://w3id.org/commerce#payeeRule> _:c14n0 .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#asset> <http://www.example.org/car_partOf.owl#Wheel_Of_Car> .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#assetHash> "urn:sha256:02817609f8ffb72502e002defe7a426f8d433802f866ac88fc93c318b9130840" .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#license> <http://www.tapr.org/TAPR_Open_Hardware_License_v1.0.txt> .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#licenseHash> "0d8866836917f8ef58af44accb6efab9a10610ad" .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#validFrom> "2014-02-02T03:51:08Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.org/articles/#offer> <https://w3id.org/security#signature> _:c14n1 .
<http://example.org/outsiders/foaf.rdf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/commerce#Payee> .
<http://example.org/outsiders/foaf.rdf#me> <http://www.w3.org/2000/01/rdf-schema#comment> "Payment for Wheel of Car through Ripple Network." .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#currency> <https://w3id.org/currencies/USD> .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#destination> <http://bshambaugh.org/foaf.rdf#me> .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#rate> "120.00" .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#rateType> "FlatAmount" .
_:c14n0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/commerce#PayeeRule> .
_:c14n0 <https://w3id.org/commerce#destinationOwnerType> "payment processor" .
_:c14n0 <https://w3id.org/commerce#maximumRate> "10" .
_:c14n0 <https://w3id.org/commerce#rateType> "com:InclusivePercentage" .
_:c14n1 <http://purl.org/dc/terms/created> "2014-02-02T03:51:08Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:c14n1 <http://purl.org/dc/terms/creator> <https://dev.payswarm.com/i/brentshambaugh/keys/1> .
_:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/security#GraphSignature2012> .
_:c14n1 <https://w3id.org/security#signatureValue> "fYb/QH0Ot3NALFtCsRxZR0rCAu76FUKjFwfWzD+PXYj/QtjC8Bcf+0eSlpo/89w/eZbuCqQ5O5SgTHyrhwGUgLFRlwsZYWwG7dgqXBlSh/zIAOf3PQ2IXyvGEQypIwggaJoBUmvRRoE1pJcBdVGXnINu3hTevUJisomPEDV37fi77EV+yihT+FRoQ9si/gXG7PQxD/8PnJ6a+N6Ix9jknRgF1q4xRf9mlBERW8fdP2GbPa2sHcrev4QD1fEUPjBonN+UxM0FEMM9rc7+PkiFribNStrV6F3s66MBF6m7zjkvRqXDuAdL3P2gQpOat9/P5iVmK6loHIHgZPePFoFf/A==" .

(Output- N Quads)

<http://example.org/articles/#offer> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://json-ld.org/playground/Offer> .
<http://example.org/articles/#offer> <https://w3id.org/commerce#payee> <http://example.org/outsiders/foaf.rdf#me> .
<http://example.org/articles/#offer> <https://w3id.org/commerce#payeeRule> _:b0 .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#asset> <http://www.example.org/car_partOf.owl#Wheel_Of_Car> .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#assetHash> "urn:sha256:02817609f8ffb72502e002defe7a426f8d433802f866ac88fc93c318b9130840" .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#license> <http://www.tapr.org/TAPR_Open_Hardware_License_v1.0.txt> .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#licenseHash> "0d8866836917f8ef58af44accb6efab9a10610ad" .
<http://example.org/articles/#offer> <https://w3id.org/payswarm#validFrom> "2014-02-02T03:51:08Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.org/articles/#offer> <https://w3id.org/security#signature> _:b1 .
<http://example.org/outsiders/foaf.rdf#me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/commerce#Payee> .
<http://example.org/outsiders/foaf.rdf#me> <http://www.w3.org/2000/01/rdf-schema#comment> "Payment for Wheel of Car through Ripple Network." .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#currency> <https://w3id.org/currencies/USD> .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#destination> <http://bshambaugh.org/foaf.rdf#me> .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#rate> "120.00" .
<http://example.org/outsiders/foaf.rdf#me> <https://w3id.org/commerce#rateType> "FlatAmount" .
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/commerce#PayeeRule> .
_:b0 <https://w3id.org/commerce#destinationOwnerType> "payment processor" .
_:b0 <https://w3id.org/commerce#maximumRate> "10" .
_:b0 <https://w3id.org/commerce#rateType> "com:InclusivePercentage" .
_:b1 <http://purl.org/dc/terms/created> "2014-02-02T03:51:08Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
_:b1 <http://purl.org/dc/terms/creator> <https://dev.payswarm.com/i/brentshambaugh/keys/1> .
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://w3id.org/security#GraphSignature2012> .
_:b1 <https://w3id.org/security#signatureValue> "fYb/QH0Ot3NALFtCsRxZR0rCAu76FUKjFwfWzD+PXYj/QtjC8Bcf+0eSlpo/89w/eZbuCqQ5O5SgTHyrhwGUgLFRlwsZYWwG7dgqXBlSh/zIAOf3PQ2IXyvGEQypIwggaJoBUmvRRoE1pJcBdVGXnINu3hTevUJisomPEDV37fi77EV+yihT+FRoQ9si/gXG7PQxD/8PnJ6a+N6Ix9jknRgF1q4xRf9mlBERW8fdP2GbPa2sHcrev4QD1fEUPjBonN+UxM0FEMM9rc7+PkiFribNStrV6F3s66MBF6m7zjkvRqXDuAdL3P2gQpOat9/P5iVmK6loHIHgZPePFoFf/A==" .

No comments:

Post a Comment