Thursday, November 13, 2014

Uniquely identifying a project (in a distributed way)

I thought about using the description of a project vocabulary . It is for software, so I might need to modify it for hardware.

It is described in the Linked Open Vocabularies site hosted by the Open Knowledge Foundation, and is created by  Edd Dumbill


The particular link is: http://lov.okfn.org/dataset/lov/details/vocabulary_doap.html

I also found the Software Discovery Index which uses unique identifiers for software projects. I might want to check this out more. The particular link is:
http://softwarediscoveryindex.org/



Thursday, November 6, 2014

An offer: N-Quads above and a directed graph (guess) below


<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==" .


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==" .

Tuesday, November 4, 2014

Publishing an Offer from the (Web Commerce 1.0 Spec)

 I went to https://web-payments.org/specs/source/web-commerce/
and looked at Example 4 in section 4.3. I changed @context namespace from http://w3id.org/payments/v1 to  https://w3id.org/payswarm/v1 as the first namespace did not resolve in the browser. By observing the payswarm-v1.jsonld file at https://web-payments.org/contexts/payswarm-v1.jsonld (deduced from https://github.com/perma-id/w3id.org/tree/master/webpayments) and https://web-payments.org/vocabs/commerce I was able to make the following conclusions:

{
  "@context": "https://w3id.org/payswarm/v1",
  "id": "http://www.example.org/car_partOf.owl#",
  "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#",
  "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=="
 
The assetHash, licenseHash, signatureValue, and created are taken from an earlier blog post. I could not get my payswarm client to work as the npm package ursa (or something that I do not know about) was causing trouble.

Monday, November 3, 2014

Publishing a License (from the Web Commerce 1.0 spec)

{
        "@context": "https://w3id.org/payments/v1",
        "id": "license:TAPR_OHL",
        "type":"License",
        "format":"text/html",
        "licenseTemplate" : "http://www.tapr.org   /TAPR_Open_Hardware_License_v1.0.txt",
}


I was trying to get a local URI in my diagram identified by the URI "license:TAPR_OHL" to point to the text for the license template at the URI
"http://www.tapr.org   /TAPR_Open_Hardware_License_v1.0.txt". Later I would like 
"http://www.tapr.org   /TAPR_Open_Hardware_License_v1.0.txt" to be in the format "rdf/xml". I hope this is legal. I will need to check on IRC.








Sunday, November 2, 2014

Publishing an Asset

Looking at:
https://web-payments.org/vocabs/payswarm

and:

https://w3id.org/
https://github.com/perma-id/w3id.org

gives:

{

"@context" : "https://w3id.org/payswarm/v1",
"id": "http://www.example.org/car_partOf.owl#Wheel_of_Car",
"type": ["Asset", "rea:Resource"],
"creator":
   {
      "fullName": "Brent Shambaugh",
   }
   "assetContent": "http://www.example.org/car_partOf.owl#Wheel_of_Car",
   "assetProvider": "http://bshambaugh.org/foaf.rdf#me",
   "validFrom": "2010-11-27T01:44:52Z",
   "signature":
   {
       "type": "GraphSignature2012",
       "created": "2010-11-27T01:44:52Z",
       "creator": "https://payswarm.example.com/people/bshambaugh#key-1",
       "signatureValue": "bALjKXXuAbj2Xnfyivq...PHchb2jWFQMA="
   }
}