Hi Yev,

 

Thanks for the pointer to the pointer vocabulary.

 

Below are some of my thoughts - feel free to propose alternatives or provide 
more specific examples on how we may use the pointer class for Snippets.

 

- I do think  using the pointer classes would work for our purposes and would 
have the advantage of using an already defined vocabulary.  It is a bit more 
complex, but manageable.

 

- I noticed that the pointers RDF vocabulary defines byte offsets based on 1 
for the first byte in the document (not zero).  If we want to re-use these 
terms, we would need to define the byte ranges relative to 1 for both RDF and 
Tag/Value for compatibility.

 

- Pointers include a required property to reference the document the byte range 
applies to.  We could use the URI for the SPDX file as the value for this 
property.  This would somewhat redundant with the SPDX File property.  Not sure 
if we should retain both of these properties or not.  I'm currently leaning 
toward retaining both properties.

 

- There are a few choices on how to represent the byte range.  After looking 
through the doc, the ByteOffsetCompondPointer uses an offset relative to the 
startPointer (the pointer to the beginning of the range).  Based the tag/value 
definition where the start byte and end bytes are relative to the beginning of 
the file,  a StartEndPointer may be a better fit.  The startPointer and 
endPointer would be a ByteOffsetPointer class to represent a byte offset.

 

- If we want to include optional line number offset, we could use the 
LineCharPointer class.

 

Below is an example based on my understanding of the pointer vocabulary:

 

Namespace ptr - http://www.w3.org/2009/pointers#

...

<ptr:StartEndPointer>

   <ptr:startPointer>

      <ptr:ByteOffsetPointer>

           <ptr:reference  rdf:resource="#SPDXRef-fileReference/>

           <ptr:offset>200</ptr:offset>

      </ptr:ByteOffsetPointer>

  </ptr:startPointer>

  <ptr:endPointer>

      <ptr:ByteOffsetPointer>

           <ptr:reference  rdf:resource="#SPDXRef-fileReference/>

           <ptr:offset>500</ptr:offset>

      </ptr:ByteOffsetPointer>

  </ptr:endPointer>

</ptr: StartEndPointer >

 

 

 

From: Yev Bronshteyn [mailto:[email protected]] 
Sent: Wednesday, July 8, 2015 8:20 AM
To: Gary O'Neall
Cc: [email protected]
Subject: Re: Follow-up on RDF byte range

 

Correction: In the latest version of the RDF Pointers spec, 
ByteOffsetRangePointer has been renamed to 
ByteOffsetCompoundPointer(http://www.w3.org/TR/Pointers-in-RDF10/#byteOffsetCompoundPointerClass).
 Still works just as well for our purposes. 

 

 

On Jul 8, 2015, at 11:16 AM, Yev Bronshteyn <[email protected]> 
wrote:

 

We don’t have to reuse all of the vocabulary from the RDF Pointer Methods 
spec.. Merely the StartEndPointer class, which contains pointers to the start 
and end of the snippet or the ByteOffsetRangePointer. Perhaps for the purposes 
of the SPDX Snippet spec, we could be more restrictive and demand that those 
pointers only reference byteOffSet pointers in their properties. This way, we 
minimize the need for SPDX implementors to deal with the orthogonal complexity 
of the spec while still producing something that’s compliant. 

 

Here’s the latest version of that spec, btw:  
<http://www.w3.org/TR/Pointers-in-RDF10/> 
http://www.w3.org/TR/Pointers-in-RDF10/

 

 

 

 

On Jul 8, 2015, at 10:27 AM, Gary O'Neall <[email protected]> wrote:

 

Following up on the Snippets discussion, I found an RDF vocabulary for 
identifying byte ranges in "documents" - which are typically RDF or HTML 
documents:  <http://www.w3.org/WAI/ER/Pointers/WD-Pointers-20080623> 
http://www.w3.org/WAI/ER/Pointers/WD-Pointers-20080623

 

We could re-use this vocabulary for source files, but I personally think this 
may be overly complex. Let me know if you know of other vocabularies that may 
be applicable or if you feel we should use the pointers class referenced above.

 

I updated the Snippets proposal to use the startByte and endByte per the 
discussion on the call:  
<https://docs.google.com/document/d/13OknzNnY56UZhnj_VVPatirBrNze5cWXDx2fnKbBI_g>
 https://docs.google.com/document/d/13OknzNnY56UZhnj_VVPatirBrNze5cWXDx2fnKbBI_g

 

Gary 

 

-------------------------------------------------

Gary O'Neall

Principal Consultant

Source Auditor Inc.

Mobile: 408.805.0586

Email: [email protected]

 

_______________________________________________
Spdx-tech mailing list
 <mailto:[email protected]> [email protected]
 <https://lists.spdx.org/mailman/listinfo/spdx-tech> 
https://lists.spdx.org/mailman/listinfo/spdx-tech

 

<7EA68D51-363B-4FAD-A939-D9CD926D70AB.png>
Yev Bronshteyn
Senior Software Engineer
Black Duck Software


Black Duck Software <http://www.blackducksoftware.com/>  | OpenHUB 
<https://www.openhub.net/>  | OSDelivers 
<http://osdelivers.blackducksoftware.com/>  | OSS Logistics 
<https://www.blackducksoftware.com/oss-logistics> 

 <http://twitter.com/black_duck_sw> <E33E6B21-2C3E-4C55-8796-46161EE14AC6.png>  
  <https://www.linkedin.com/company/black-duck-software> 
<EDB9C095-85D8-437C-A4CF-A515712839CA.png>    
<https://www.facebook.com/BlackDuckSoftware> 
<8D343C4D-B65C-473A-96DE-792AF2B5D16E.png>    
<https://plus.google.com/+Blackducksoftware/> 
<3FCDCA9B-C8EA-4EB2-9184-457FF1A9AB5D.png>    
<http://www.slideshare.net/blackducksoftware> 
<D1E6BBB6-3622-496C-B3BF-7DC86A214CB8.png>    
<https://www.youtube.com/user/BlackDuckSoftware> 
<B8FD9DF1-3230-44BF-80DA-AEA16CB00E29.png>

JP Morgan Chase & Co. Hall of Innovation Inductee 

 

_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech

 


Yev Bronshteyn
Senior Software Engineer
Black Duck Software


Black Duck Software <http://www.blackducksoftware.com/>  | OpenHUB 
<https://www.openhub.net/>  | OSDelivers 
<http://osdelivers.blackducksoftware.com/>  | OSS Logistics 
<https://www.blackducksoftware.com/oss-logistics> 

 <http://twitter.com/black_duck_sw>     
<https://www.linkedin.com/company/black-duck-software>     
<https://www.facebook.com/BlackDuckSoftware>     
<https://plus.google.com/+Blackducksoftware/>     
<http://www.slideshare.net/blackducksoftware>     
<https://www.youtube.com/user/BlackDuckSoftware> 

JP Morgan Chase & Co. Hall of Innovation Inductee 

 

_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech

Reply via email to