Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] OSLC Javascript Client

On Fri, Sep 18, 2015 at 11:28 AM, Fernando Silva <fernd.ffs@xxxxxxxxx> wrote:
Hi Jim,

Sorry for the delay. This week I started to test with Bugzilla Lyo Adapter, but I discovered that the way that Team Concert and the adapter return the service catalog providers list are different. Team Concert uses RDF Typed nodes to represent olsc Service Providers and Bugzilla adapter only uses this when I change the accept header to application/xml.

In Team Concert I do:
Http GET: https://localhost:9443/jazz/oslc/workitems/catalog
Headers: 
Accept: application/rdf+xml
OSLC-Core-Version: 2.0 

This request returns, for example:
<rdf:RDF
...
 <oslc:ServiceProviderCatalog rdf:about="https://localhost:9443/jazz/oslc/workitems/catalog">
<dcterms:title rdf:parseType="Literal">Project Areas</dcterms:title>
<oslc:serviceProvider>
    <oslc:ServiceProvider rdf:about="https://localhost:9443/jazz/oslc/contexts/_QtRCAAoBEeWjCMPc0LkMOw/workitems/services.xml">
<dcterms:title rdf:parseType="Literal">My Project Area</dcterms:title>
And I use this response to navigate to the service provider that I want (oslc:ServiceProviderCatalog > oslc:serviceProvider > oslc:ServiceProvider).
But in Bugzilla Adapter I do request in the same way:
Http GET: http://localhost:8080/OSLC4JBugzilla/services/catalog/singleton 
Headers: 
Accept: application/rdf+xml
OSLC-Core-Version: 2.0 


And the response is like this:
<rdf:RDF
...
 
<rdf:Description rdf:about="http://localhost:8080/OSLC4JBugzilla/services/serviceProviders/21">
...
    <dcterms:description rdf:parseType="Literal">Service provider for Bugzilla product: testing-funky-hyphens</dcterms:description>
 <rdf:type rdf:resource="http://open-services.net/ns/core#ServiceProvider"/>
    <oslc:prefixDefinition rdf:nodeID="A103"/>     <dcterms:title rdf:parseType="Literal">testing-funky-hyphens</dcterms:title>    ...   </rdf:Description>
With this response, I need to navigate to all rdf:Description nodes that have rdf:type equals to http://open-services.net/ns/core#ServiceProvider  and then find the service provider that I want.

Using a proper RDF/XML parser would transparently handle this for you. If you are treating as plain XML, then you'd need to be careful as you suggested to ask and get application/xml.

"OSLC resources are defined using the RDF data model and so, the first guidance for both parsing and generating RDF/XML representations is to use an RDF/XML toolkit. Follow the RDF/XML specifications and your toolkit's documentation. There are such toolkits available for most popular languages.

Having said all that, I'm not aware of a solid RDF/XML parser in _javascript_. You'd be better to use another format if the tools support it, such as XML, JSON, Turtle...especially in _javascript_

Hope that helps.
 

I'm finishing to adapt the _javascript_ client to handle these differences. I think that I finish these modifications today.

Regards, 
Fernando.
 


On Fri, Sep 18, 2015 at 11:51 AM, Jim Ruehlin <jruehlin@xxxxxxxxxx> wrote:
Hi Fernando,
 
How is the OSLC _javascript_ contribution coming? I'm looking forward to seeing your latest version.
 
I'd be happy to be one of the reviewers of your code when you contribute to Lyo. Feel free to add me as a reviewer in Gerrit. You should add Michael Fiedler or Jad El-Khoury as reviewers because they're Lyo committers.
 
Thanks,
Jim Ruehlin
 
Jim Ruehlin
Open Integrations Team (OSLC)
 
IBM

600 Anton Blvd
Costa MesaCA 92626-7221
United States
 
 
----- Original message -----
From: Fernando Silva <fernd.ffs@xxxxxxxxx>
Sent by: lyo-dev-bounces@xxxxxxxxxxx
To: Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Cc:
Subject: Re: [lyo-dev] OSLC _javascript_ Client
Date: Wed, Sep 9, 2015 1:36 PM
 
Hi Jim,

For sure. In this week I'm correcting some minor defects, as soon as I finish I will push the code to Lyo Client Gerrit repo.

Regards,
Fernando.
 
On Wed, Sep 9, 2015 at 2:43 PM, Jim Ruehlin <jruehlin@xxxxxxxxxx> wrote:
Hi Fernando,
 
This is interesting stuff, and I think it would be useful for a lot of people using OSLC.
 
Are you considering contributing your _javascript_ client library to Lyo? My organization already has permission to use that code so reuse is easier for us if we get the code via Eclipse.
 
Thanks,
Jim Ruehlin
 
 
 
----- Original message -----
From: Fernando Silva <fernd.ffs@xxxxxxxxx>
Sent by: lyo-dev-bounces@xxxxxxxxxxx
To: lyo-dev@xxxxxxxxxxx
Cc:
Subject: [lyo-dev] OSLC _javascript_ Client
Date: Wed, Aug 5, 2015 9:24 AM
 
Hi,

I want to share with you a initial version of a OSLC _javascript_ client that I have developed to communicate with IBM Rational Team Concert. I have not had time to test with other OSLC enabled tools or other domains, but I think that this will not be difficult, because this library is basically a port of Lyo Java Client. 
The link is https://github.com/fernando-silva/oslc-js-client.

The main functionalities that are implemented in this version are:

- Creation
- Update 
- Delete
- Creation Dialog
- Selection Dialog
- Query

Obs.: It's necessary to be logged in the target tool in order to use the client. The login module will be implemented a part, because it's specif of each tool.

Thank you, Fernando.
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lyo-dev
 


_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lyo-dev
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lyo-dev
 


_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lyo-dev


_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/lyo-dev


Back to the top