Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Creating Modules in dng using OSLC

Can anyone help me how to create modules in dng using eclipse lyo [oslc], programatically?

0 votes



2 answers

Permanent link

Module is not part of the OSLC specification. You can take a look at the new Module API introduced in DNG 6.0.5.
https://jazz.net/wiki/bin/view/Main/DNGModuleApiOverview
https://jazz.net/wiki/bin/view/Main/DNGModuleAPI

0 votes


Permanent link

 Here's the sketch of an algorithm:


find the URI of the ResourceShape for the InstanceShape of your new Module;
find the URI of the Parent folder for the new Module;
find the URI of the ProjectArea Component that the new Module will be within;

Response postResponse = Stream.of( componentUri )
.map( cu -> OslcOauthGet( cu ) )
.map( cmp -> cmp.getServiceProvider() )
.map( spu -> OslcOauthGet( spu ) )
.flatMap( sp -> Arrays.stream( sp.getServices() ) )
.flatMap( srv -> srv.getCreationFactories() )
.filter( cf -> isForOslcComponent( componentUri ) )
.filter( cf -> isForRdfType( "http://open-services.net/ns/rm#RequirementCollection" ) )
.filter( cf -> cf.getCreation() ) .first()
.map( cfu -> {
blankNodeModule = RdfXmlModule.newForType( "http://jazz.net/ns/rm#Module" ).parent( parentUri ).shape( moduleInstanceShapeUri ).title( "My New Module" );
return OslcOauthPost( cfu ).body( blankNodeModule ).type( TextTurtle etc );
} )
.orElseThrow( "ask for help, don't give up hope. this can be done." );

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,943
× 1,700

Question asked: Jan 22 '18, 1:47 a.m.

Question was seen: 3,611 times

Last updated: Jan 22 '18, 7:16 p.m.

Related questions
Confirmation Cancel Confirm