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

Hi Steve,

I'm only using RDF/XML to manipulate resources like creation/selection dialogs, creation factories and query capabilities, because exists the guarantee that any OSLC service provider will accept this request. For the other resources, like Change Requests, Automation Results, Test Cases and so on, the user is free to choose the representation. But you are right, I need a RdfParser for _javascript_, I've found some and soon I will start to test with the _javascript_ client.

Thanks,
Fernando.

On Fri, Sep 18, 2015 at 2:43 PM, Steve Speicher <sspeiche@xxxxxxxxx> wrote:
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


_______________________________________________
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