Documentation for OSLC4NET

Jan 23, 2013 at 3:08 PM

Hello,

I know it's early days yet but is there any documentation for how to use this SDK? I suspect the answer is 'not yet', but I thought I would ask anyway.

Cheers,

Ian

 

 

 

Coordinator
Jan 24, 2013 at 12:03 PM

As you suspected, the answer is mostly 'not yet'. API documentation is turned on for a good chunk of the SDK - we're working on the remainder, but we don't have a "how-to" guide yet.   Do you have a particular scenario in mind?   Our next goal is to create an OSLC provider implementation and document how it was created, but perhaps we can get you started with using the SDK before then if we know a little more about what you are interested in doing.

Regards, Mike

Jan 24, 2013 at 3:25 PM

I’d really to create a dummy consumer and provider of oslc resources.

A simple provider GUI that would allow a user to create simple change requests and also a simple consumer GUI that would display them.

It sounds like you’re currently working on exactly what I need.

I can see in the DotNetRdfProviderTests how you’ve created change requests but I can’t see how you setup the service provider.

(By the way, changerequest is spelt wrong on line41 DotNetRdfHelper.cs)

Any information on creating a simple provider would be very welcome.

Regards,

Ian

From: mffiedler [mailto:notifications@codeplex.com]
Sent: 24 January 2013 13:04
To: Giblett, Ian
Subject: Re: Documentation for OSLC4NET [oslc4net:430604]

From: mffiedler

As you suspected, the answer is mostly 'not yet'. API documentation is turned on for a good chunk of the SDK - we're working on the remainder, but we don't have a "how-to" guide yet. Do you have a particular scenario in mind? Our next goal is to create an OSLC provider implementation and document how it was created, but perhaps we can get you started with using the SDK before then if we know a little more about what you are interested in doing.

Regards, Mike

Coordinator
Jan 30, 2013 at 12:03 PM

Currently the CM service provider you run the tests against needs to come from Eclipse Lyo (Java CM provider).   Instructions are here:  http://wiki.eclipse.org/Lyo/BuildingOSLC4J.

But that is pretty hacky.   I am going to start work on a dummy/stub CM provider this week which can be used with the tests.  It won't be a real CM system, but it will respond correctly as a provider  to GETs/POSTs/PUTs of ChangeRequest resources.   That is the plan, anyway.

Jan 30, 2013 at 12:44 PM

That's great, I look forward to the stub CM.

Regarding the serialisation of change requests, could you advise on how I could produce the rdf-xml to multiple change requests?

I can see from RdfXmlMediaTypeFormatterTests.cs how you produce the rdf-xml for a single change request using the Serialize method and link a second one with the "AddAffectedByDefect" but I can't see how I could have a list of change requests all on the same level.

Is there some sort of container of change requests which I could serialise?

 

Coordinator
Jan 31, 2013 at 9:20 PM
Sorry for the delay on your question on serializing multiple change requests. For a valid OSLC serialization like that (usually the response to a query or a GET on the Query Capability URI of the service provider) there are some extra bits beyond just the ChangeRequests required. There is a ResponseInfo resource and normally there are rdfs:member statements for each member of the collection.

We've just added one way of creating a valid collection like this to OSLC4Net. There will be a better way coming down the road with ResponseInfo classes to fully represent the ResponseInfo resource, but I think what we have right now should get you started in the mean time.

Pull the latest code from git and have a look at the new TestRdfXmlSerializationCollection test in RdfXmlMediaTypeFormatterTests. It gives an example of building an RDF graph with an IEnumerable set of ChangeRequests + the info required for OSLC4Net to build a ResponseInfo. The key call is:

IGraph rdfGraph = DotNetRdfHelper.CreateDotNetRdfGraph(
                                                                "http://com/somewhere/changerequests",                        ==> Usually the QueryCapability URL for the service provider
                                                                "http://com/somewhere/changerequests?page=20",     ==> The actual URL the user hit to generate this response (can be null)
                                                                "http://com/somewhere/changerequests?page=21",     ==> The URL of the next page of results (can be null)
                                                                null,                                                                                                ==> The total number of items in the result set (can be null)
                                                                crListOut,                                                                                     ==> IEnumerable set of ChangeRequests
                                                                null);                                                                                               ==> properties to include in response - see oslc.select/oslc.properties.  can be null
Hope this helps.
Coordinator
Jan 31, 2013 at 9:21 PM
The fomatting of the code got wonky there, hope you can follow it. See the actual source for the example usage.
Feb 6, 2013 at 1:10 PM
Yes, I tried it and was able to generate the RDF xml for multiple change requests.
Many thanks!

I do have more questions but I will start them in new threads for the sake of clarity to other readers.

Ian