Git Product home page Git Product logo

eclipse / lyo Goto Github PK

View Code? Open in Web Editor NEW
11.0 8.0 15.0 6.82 MB

Eclipse Lyo, a Java SDK for OSLC-based tool integration

Home Page: https://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html

License: Eclipse Public License 2.0

Ruby 0.24% HTML 7.29% Java 91.19% Kotlin 0.18% FreeMarker 0.03% GAP 0.47% Shell 0.19% JavaScript 0.30% CSS 0.04% Python 0.07%
integration oslc rdf

lyo's Introduction

Eclipse Lyo

GitHub Actions Status (master) Discourse users

Introduction

The Eclipse Lyo project is focused on providing an SDK to enable adoption of OSLC specifications. OSLC (Open Services for Lifecycle Collaboration) is an open community dedicated to reducing barriers for lifecycle tool integration. The community authors specifications for exposing lifecycle artifacts through uniform (REST) interfaces and relying on Internet and Linked Data standards.

OSLC's scope started with Application Lifecycle Management (ALM) and is expanding to include integrations across Product Lifecycle Management (PLM) and IT Service Management (ISM/DevOps), Lyo is designed to be a companion to the continuing specification efforts of the OSLC community. Its main purpose is to expand adoption of OSLC specifications and to enable the Eclipse community to easily build OSLC compliant tools.

Getting started

You can find more resources for developing OSLC applications with Lyo, under the OSLC Developer Guide.You are welcome to post questions on the OSLC forum.

The OLSLC OP Reference implementation repository contains sample code that demonstrates how to build OSLC servers for various domains.

Core

See OSLC Developer Guide.

Client

To use OSLC Client, follow the setup and development instructions under the OSLC Developer Guide for Client setup.

Domains

See under domains/README.

Store

See under store/README.

TRS Server

To use this library, follow the setup and development instructions under the OSLC Developer Guide for TRS server setup. The instructions assume you have followed the overall instructions to setup an OSLC4J server/client, as defined on that page.

You can find more resources for developing OSLC applications with Lyo in general under the OSLC Developer Guide, and in particular for TRS development.

See trs/server/README for dev notes.

TRS Client

See under trs/client/README.

Validation

See under validation/README.

Repositories

Main project repositories

Repo Status PRs Milestone Bugs
lyo.designer CI GitHub pull requests GitHub milestone GitHub issues by-label
lyo.oslc-ui N/A GitHub pull requests GitHub milestone GitHub issues by-label

Test and sample repositories

Repo Version Status PRs Activity
oslc-op/refimpl
danlz/lyo-in-spring-boot N/A
oslc-op/sysml-oslc-server
OSLC/lyo-adaptor-sample-modelling
lyo-samples/lyo-client-samples
lyo-samples/client-oauth-discovery-dui
OSLC/lyo-adaptor-bugzilla
OSLC/iotp-adaptor
OSLC/oslc-adapter-jama
eclipse/lyo.testsuite
ld4mbse/oslc4tdb N/A
kth-mda/adaptor-bugzilla-trs
berezovskyi/oslc-adapter-subversion
lyo-samples-attic/oslc-java-samples N/A N/A N/A
lyo-samples-attic/oslc4j-stockquote N/A N/A N/A
lyo-samples-attic/oslc4j-test N/A N/A N/A
lyo-samples-attic/oslc4j-bugzilla-sample N/A N/A N/A
lyo-samples-attic/trs4j-bugzilla-sample N/A N/A N/A
ld4mbse/oslc-adapter-simulink N/A
ld4mbse/oslc-adapter-magicdraw-sysml N/A
ld4mbse/oslc-adapter-integrity N/A
ld4mbse/oslc-adapter-fmi N/A
ld4mbse/oslc-modeltransformation-simulink-magicdraw N/A
ld4mbse/oslc-adapter-jena-tdb N/A
ld4mbse/oslc-adapter-amesim N/A
kth-mda/se.kth.md.cpse.adaptor.bugzilla
kth-mda/adaptor-bugzilla-store N/A

Caution

Lyo versions 4.1.0 and below are potentially vulnerable to CVE-2021-41042 when processing untrusted RDF/XML inputs.

Retired repositories

Repo Status Lyo version PRs Bugs
lyo.core N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.client N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.server N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.domains N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.store N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.trs-server N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.trs-client N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.validation N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.ldp N/A GitHub pull requests GitHub milestone GitHub issues by-label
lyo.rio CI GitHub pull requests GitHub issues by-label
lyo.docs N/A GitHub pull requests N/A GitHub issues by-label

Repositories that are maintained under OSLC organisation include:

Other repositories that are no longer actively maintained but are kept to preserve the history:

Contributing

See CONTRIBUTING.MD

Useful information for Lyo committers

Acknowledgments

Thanks to YourKit for providing us an open source license of YourKit Java Profiler!

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

lyo's People

Contributors

benjaminr-ps avatar berezovskyi avatar cenobyte321 avatar dancaetano avatar denisroy avatar dependabot[bot] avatar dgterry avatar eclipsewebmaster avatar fgrocha avatar fredg02 avatar fukudasjp avatar isccarrasco avatar jad-el-khoury avatar jad-elkhoury avatar jadelkhoury avatar jamsden avatar jhemm2 avatar jljlmatu avatar jruehlin avatar l-ohlen-ericsson avatar leo2100 avatar mwakao avatar neormx avatar olberger avatar parysto avatar rahulbhadauriya avatar snyk-bot avatar yashkhatri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lyo's Issues

javax.servlet-api requires a compile scope

javax.servlet-api should generally be provided by a container service but in this case the app runs stand-alone.

if the scope is set to runtime, the java.lang.NoClassDefFoundError: Ljavax/servlet/http/HttpServletRequest exception is thown.

Add a class to represent the primary resource and any number of resources to be inlined

I have a need to return an object of a certain class (the one that corresponds to the resource attached to a given capability). However, I need to inline a bunch of other resources in a response. This is a legit use case for OSLC requests, as shapes explicitly allow non-local resources to be inlined.

The solution I am currently using is a pair of custom classes that are then transformed into a simple Object[] (see eclipse/lyo.core#21; blocked by eclipse/lyo.core#22). I believe Lyo Core can do the transformation behind the scenes. Also, I cannot solve eclipse/lyo.core#30 myself but if the transformation happens in the JMH, it can keep a mapping between the System.identityHashCode(Object) and the org.apache.jena.graph.BlankNodeId (I had to stop using RDF BNodes / OSLC LocalResources completely as a workaround).

The classes I use right now (warning, Kotlin ahead):

data class InstanceWithResources<T : IResource>(val instance: T,
                                                val resources: Collection<IResource>)

data class InstanceMultiWithResources<T : IResource>(val instance: Collection<T>,
                                                val resources: Collection<IResource>)

Please comment on the proposal and I will switch the Status to PR Welcome or Abandoned (and remove you from assignees).

Upgrade shaclex to 0.1

The new version passes the SHACL test suite (the core part w/o the SPARQL extensions).

Plus, Ricardo has encountered some issue with may have manifested in the older versions of shaclex: weso/shaclex#118

Cannot link to blank nodes

Lyo allows resources to the serialised as blank nodes if null URI is passed the ctor. There might be a need to link to the still. Turtle and other formats allow to reference blank nodes by their IDs:

image

However, there is no way to create a Link to a resource instance w/o an about URI that would later be resolved to a blank node reference at the marshalling stage by the JMH. Here is the expected behaviour:

_:f10d8ddad853 a :clear;
      :prop "value" .

:res1 a :resource;
  :clear _:f10d8ddad853 .

Here is the actual behaviour:

[ a :clear;
    :prop "value" ] .

:res1 a :resource .

IllegalArgumentException in ServiceProviderFactory.createServiceProvider

If the overloaded version of ServiceProviderFactory.createServiceProvider w/o path params is called, it will cause java.lang.IllegalArgumentException: The values variable is missing. Verify that null is not being passed in in org.apache.wink.common.internal.UriBuilderImpl.buildFromMap(UriBuilderImpl.java:407).

Passing new HashMap<>() at the end solves the problem.

Remove the dep on j2bugzilla

org.eclipse.lyo.trs:trs-client:jar:4.0.0-SNAPSHOT:compile
[INFO] |  +- com.j2bugzilla:j2bugzilla:jar:2.2.1:compile
[INFO] |  |  \- org.apache.xmlrpc:xmlrpc-client:jar:3.1.3:compile

oslc4j-wink brings duplicate StAX API classes on the classpath

[INFO] +- org.eclipse.lyo.oslc4j.core:oslc4j-wink:jar:4.0.0-SNAPSHOT:compile
[INFO] |  +- org.apache.wink:wink:pom:1.2.1-incubating:compile
[INFO] |  +- org.apache.wink:wink-json4j:jar:1.2.1-incubating:compile
[INFO] |  +- org.apache.wink:wink-json4j-provider:jar:1.2.1-incubating:compile
[INFO] |  |  \- org.apache.wink:wink-common:jar:1.2.1-incubating:compile
[INFO] |  |     \- org.apache.geronimo.specs:geronimo-annotation_1.1_spec:jar:1.0:compile
[INFO] |  +- org.apache.wink:wink-client:jar:1.2.1-incubating:compile
[INFO] |  |  +- javax.xml.bind:jaxb-api:jar:2.2:compile
[INFO] |  |  |  \- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |  |  \- javax.activation:activation:jar:1.1:compile
[INFO] |  +- org.apache.wink:wink-server:jar:1.2.1-incubating:compile
[INFO] |  +- stax:stax-api:jar:1.0.1:compile
[INFO] |  \- com.sun.xml.bind:jaxb-impl:jar:2.2:compile

Workaround: use an exclusion as shown below.

    <dependency>
      <groupId>org.eclipse.lyo.oslc4j.core</groupId>
      <artifactId>oslc4j-wink</artifactId>
      <version>${version.lyo}</version>
      <exclusions>
        <exclusion>
          <groupId>stax</groupId>
          <artifactId>stax-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

Keep dependency lists for easy CQ management

Lyo is responsible for filing CQs for all transitive dependencies. We can do that though Maven dependency lists but it is not feasible to cross-check all 200+ dependencies with the IPZilla page. The approach I suggest is to put the dependency lists (see this wiki page for info how to make one) for each Lyo version in this repo and then we can always generate a new list and diff against it to see what dependencies were added and checked if they require a CQ.

NB! We need to keep Type A and Type B lists separate.

Add methods to simplify navigating inlined resources

If you use something similar to eclipse/lyo.core#83 on the server, the client gets a Jena model (at least until @neormx's patch eclipse/lyo.core#29 is merged and we allow unmarshalling a collection of any IResource's). Once a resource is unmarshalled through JMH, user is faced with a Link to another resource which has to be located in the Model and unmarshalled again.

Here are two helper methods I wrote to help with this:

    // TODO Andrew@2018-02-23: create a stateful JMH that would keep resources hashed by URI
    private static <R extends IResource> R nav(final Model m, final Link l,
            final Class<R> rClass) {
        final R[] rs = JMH.unmarshal(m, rClass);
        for (R r : rs) {
            if(l.getValue().equals(r.getAbout())) {
                return r;
            }
        }
        throw new IllegalArgumentException("Link cannot be followed in this model");
    }

    @SafeVarargs
    public static IResource navTry(final Model m, final Link l,
            final Class<? extends IResource>... rClass) {
        for (Class<? extends IResource> aClass : rClass) {
            try {
                return nav(m, l, aClass);
            } catch (IllegalArgumentException e) {
                log.warn("Fix RDFS reasoning in JMH!!!"); // see https://github.com/eclipse/lyo.core/pull/29
            }
        }
        // give up
        throw new IllegalArgumentException("Link cannot be followed in this model");
    }

As you can see, a version without workarounds needs eclipse/lyo.core#29. Further, it might be possible to speed up repeated calls to JMH if it were to keep a hash table of all previously unmarshalled resources.

cc @neormx

Add a web UI

I was originally thinking to turn the cli into a webapp but later realised we can build and OSS OSLC platform around this. Question is what part of the Jazz arch would need to be reimplemented to make this interesting in a way similar to Hadoop (see sl. 6).

consolidate comms channels

This issue breaks out a chat discussion for the preferred Lyo communication channels. Here is a summary:

  • We have the lyo-dev mailing list, we are moving to make it a dev-friendly list, not the place for users.
  • I have added a bit of insult to the injury by asking the webmaster to create a lyo-users mailing list.
  • We have announced OSLC community forum around the OSLCfest, which has a Lyo forum under it.
  • Finally, we still have the Lyo forum under Eclipse Forums.

Proposal is to:

  1. Ask the webmaster to close down the lyo-users list due to a lack of activity.
  2. Post a big announcement on the Lyo forum under Eclipse about the move to open-services.net

Eliminate support for OAuth 1.0a in oslc4j-client

Support for OAuth 1.0a can be obtained using the old oslc-java-client, OslcOAuthClient, and demonstrated using DoorsOauthSample (which accesses the DOORS Web Access OSLC server).

oslc4j-client will provide OpenIDConnect support as recommended by OSLC Core 3.0.

Remove OSLC4JMarshaller

This class overlaps in functionality with the providers and throws a web exception.

If we don't want to break compat, we should move it into 'legacy' module that users can add w/o breaking code.

Fix SLF4J logging in the tests

Running org.eclipse.lyo.store.JenaTdbStoreImplPathsIT
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

[EPIC] Release Lyo 2.4.0

Let's use this issue to discuss what should be included in the release and track its completion.

The primary elements for consideration in Release 2.4.0 may include:

Migrate build and release process to use the new GitHub repositories

Upgrade to Sirius 5

This includes various improvements of Lyo Designer that Yash has been waiting on Sirius 5 to introduce. e.g., delete a resource in a specification diagram, popups a dialog requesting if you want to delete from diagram or delete from model.

This is complete and included in 2.4.0-SNAPSHOT

Enable embedding Lyo Core as an eclipse plugin

This involves creating a ‘lyo-core-bundle’, which will be an OSGi bundle built with Apache Felix Maven Bundle Plugin (BND) plus will have all of its dependencies vendored via the Embed-Transitive instruction of the BND plugin.

This is complete and included in 2.4.0-SNAPSHOT

Export Domain Vocabularies to RDF

Allows exporting Lyo Designer Domain specifications as RDF vocabularies and/or OSLC ResourceShapes or SHACL. Import is not completed yet. This does not include the the ability to model SHACL shapes.

Ready for review and merge (was blocked waiting for lyo-core-bundle).

Lyo Validation

Validates RDF resources against constraints defined either as SHACL or OSLC Resource Shapes.

This is currently waiting for approval of two CQs:

CQ 13908 is for the shaclex library with includes over 80+ dependencies. Either this will take a long time, or we could consider distributing Lyo Validation with Type A due diligence in order to avoid holding up the release.

eclipse/Lyo, like any eclipse (sub) project can only deliver one thing under one due diligence type. So we can't deliver OSLC4J and Validation in the same project under two different due diligence types.

There are a few options for resolving this:

  1. Remove Validation from release 2.4.0 (note that it was already, perhaps erroneously included in 2.3.0, which exposes OSLC4J 2.3.0 with Type A content - this could be a problem). This artefact is considered released and will be kept.
  2. Hold up release 2.4.0 until CQ 13908 is approved for Type B Eclipse IP team does not give us a clear timeline. Also, we need to explicitly trigger this review!
  3. ✅ Decouple Validation from eclipse/Lyo, refactor the packages and artifact ids to remove references to Lyo, and distribute outside of eclipse. @yashkhatri is assigned to eclipse/lyo.validation#24

My recommendation would be #1 unless there is some compelling business reason for including Validation in 2.4.0.

TRS Consumer and Provider Library

This provides a framework for building TRS Providers on an adapted data source. The TRS consumer is a sample consumer that provides a SPARQL endpoint on data provided by one or more TRS providers.

This is work in progress, some additional refactoring might need to be done. It was not released in 2.3.0, and has a dependency on Validation.

Recommend this not be included in 2.4.0, but is a candidate for 2.5.0. There is no reason to hold up the 2.4.0 release to complete this work.

Open issues to be resolved

There are issues currently open in eclipse/Bugzilla against 2.4.0.

New list of items to be included in 2.4.0:

Old list of items to be include in 2.4.0:

Legend

🚧 means a Pull Request has been submitted and the review/rework is pending.

Release notes

Draft on hackmd

Update and Migrate the Lyo Wiki from Eclipse to Github

We need to migrate any active Wiki pages from Eclipse wiki (https://wiki.eclipse.org/Lyo) to Github.

I see 2 alternatives: (@jamsden @berezovskyi I would like your opinion on this)

  1. https://github.com/eclipse/lyo is only a launch point for related wikies. Wiki pages are managed udner the respective github repo of the Lyo project. (for example, Lyodesigner pages are under https://github.com/eclipse/lyo.designer/wiki)
  2. We consolidate ALL wiki pages under https://github.com/eclipse/lyo. Under the respective github repo, we can have ONLY developer-related wiki pages. But end-user documentation for ALL our repositories are consolidated to https://github.com/eclipse/lyo

Irrespective, This are the initial action points:

  1. Move this current front page (https://github.com/eclipse/lyo) to “repositories” or “working from source”.
  2. Move the the content from https://wiki.eclipse.org/Lyo to this front page https://github.com/eclipse/lyo.
  3. Move following pages from Eclipse-wiki to https://github.com/eclipse/lyo.core
  4. Create a simple Client page under (here, or under https://github.com/eclipse/lyo.client?)

Duplicate httpclient dependency

[WARNING] Some problems were encountered while building the effective model for org.eclipse.lyo.clients:oslc-java-client:jar:4.0.0-SNAPSHOT
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.httpcomponents:httpcore:jar -> duplicate declaration of version 4.4.5 @ line 206, column 25

Passing an Object[] to Client methods fails

When invoking OSLC4J Client with an array of resources, e.g.

client.createResource(twinInfo.cfUri, new Object[] {resA, resB}, 
     OslcMediaType.TEXT_TURTLE);

we get the following exception:

MessageBodyProviderNotFoundException: MessageBodyWriter not found for media type=text/turtle

Turtle support has been added a while ago to the Core (Bug 399761), so this should be a problem in the Client.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.