-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to 2.3.0-SNAPSHOT in the RM adaptor #12
Conversation
// trigger Jena init | ||
ModelFactory.createDefaultModel(); | ||
// force plain XML writer | ||
RDFWriterFImpl.alternative(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this now out of date based on:
We will:
- Depend on 'apache-jena-libs' instead of the individual artefacts.
- Replace calls to 'model.getWriter("RDF/XML")' with the invocation of the RDFDataManager 'RDFDataMgr.write(outputStream, model, RDFFormat.RDFXML_PLAIN);'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replacing model.getwriter() in the jena-provider project seems to be the proper way to go. If we want to do that, @berezovskyi is arguing that we should do a proper refactoring of the provider classes in the jena-provider project. Do you have the time/effort to do it?
There are many Jax-RS providers that handle XML/RDF. but from my analysis of these classes, they all end up in the AbstractOslcRdfXmlProvider.java class.
The alternative above is the hack because it is based on private classes of Jena (within an adaptor) that gives you the same result, in the short term, without touching Jena-provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I actually did develop a Universal provider but that patch needs more work eclipse/lyo.core#9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make these changes in OSLC4J instead?
- Depend on 'apache-jena-libs' instead of the individual artefacts.
- Replace calls to 'model.getWriter("RDF/XML")' with the invocation of the RDFDataManager 'RDFDataMgr.write(outputStream, model, RDFFormat.RDFXML_PLAIN);'.
Absolutely, we should make the changes to the OSLC4J if we expect the majority of the Lyo users to come in contact with the legacy apps that can't parse all variants of conformant RDF (typed node elements were legit even in RDF 1.0 https://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210/#section-Syntax-typed-nodes). Here is a list of things we need to do:
|
But I think that legacy-talking code can either call ModelFactory.createDefaultModel();
RDFWriterFImpl.alternative(null); Or we can add a static method in Lyo with these two lines. |
I am sorry to write this, but I completely lost the context why did we need to force any kind of Jena model writer? Also,
|
This was required to get the RFD/XML to output a specific format that the jazz-app web applications are expecting. |
What do you want to do with this patch then? Include it in the codegen? Or add it to the wiki?
–Andrew.
(sent from my phone)
… On 2 Jul 2018, at 13:29, Jim Amsden ***@***.***> wrote:
This was required to get the RFD/XML to output a specific format that the jazz-app web applications are expecting.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Add it to the wiki. Its noise in the code generator.
Jim Amsden, Senior Technical Staff Member
OSLC and Linked Lifecycle Data
919-525-6575
From: Andrew Berezovskyi <notifications@github.com>
To: OSLC/lyo-adaptor-sample-modelling
<lyo-adaptor-sample-modelling@noreply.github.com>
Cc: Jim Amsden <jamsden@us.ibm.com>, Review requested
<review_requested@noreply.github.com>
Date: 07/02/2018 02:24 PM
Subject: Re: [OSLC/lyo-adaptor-sample-modelling] Switch to
2.3.0-SNAPSHOT in the RM adaptor (#12)
What do you want to do with this patch then? Include it in the codegen? Or
add it to the wiki?
–Andrew.
(sent from my phone)
On 2 Jul 2018, at 13:29, Jim Amsden ***@***.***> wrote:
This was required to get the RFD/XML to output a specific format that
the jazz-app web applications are expecting.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Do you think you could do that, Jim, please? :) |
@jadelkhoury what's the status on this one? |
I don’t think we should be merging branches in this project. The code on master is meant to be generated. So if we want to make changes to the code, this ought to be done in the generator. |
From what I read above, we should just kill this branch? |
This is the code needed to maintain the non-abbrev output, see more details in https://issues.apache.org/jira/browse/JENA-1477
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)