diff --git a/.editorconfig b/.editorconfig index bab3389dd..6ba6af2ba 100644 --- a/.editorconfig +++ b/.editorconfig @@ -20,3 +20,7 @@ indent_size = 4 [*.{xml,html,js,yml,css}] indent_style = space indent_size = 2 + +[Jenkinsfile] +indent_style = space +indent_size = 2 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4adb3600f..180aa2d05 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,7 @@ version: 2 updates: - package-ecosystem: "maven" # See documentation for possible values directory: "/" # Location of package manifests - open-pull-requests-limit: 30 + open-pull-requests-limit: 50 schedule: interval: "daily" - package-ecosystem: "github-actions" # See documentation for possible values diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5ada4a696..cfea4c989 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,14 +39,14 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-codeql-${{ hashFiles('.github/workflows/codeql-analysis.yml') }} @@ -54,12 +54,12 @@ jobs: # ${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' # See 'Supported distributions' for available options java-version: '17' - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -73,4 +73,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6a102d32c..221b5acfa 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -41,11 +41,11 @@ jobs: with: show-progress: false - name: Set up JDK ${{ matrix.jdk }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.jdk }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b5d0db6e..ac6c43f73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,58 @@ # Eclipse Lyo changelog -## [6.0.0-SNAPSHOT] +## [7.0.0-SNAPSHOT] ### Added -- Introducing capability to set the servletUri to be used by the OAuthConfiguration +### Changed + +### Deprecated + +### Removed + +### Fixed + +## [6.0.0] + +### Security + +This release does not contain security updates. + +### Added + +- Introducing capability to set the `servletUri` to be used by the `OAuthConfiguration` +- OSLC PROMCODE domain model and generated POJOs +- Support for additional request headers to `OslcQuery` ### Changed -- Kotlin 1.9.0 is used; `kotlin-stdlib-jdk8` dependency was replaced with `kotlin-stdlib` due to [Kotlin updates](https://kotlinlang.org/docs/whatsnew18.html#updated-jvm-compilation-target). -- Allow application to reset the oauth token cached within the server, when it deems that it is no longer valid -- 🧨Corrected cardinality and range of the oslc_config:acceptedBy property (from String[0..1] to Resource[0..*]) +- 🧨 Migrated from Java EE (`javax.` namespace) to Jakarta packages +- Upgrade to Jersey 3.1.5 +- **JDK 17 is the new baseline for Eclipse Lyo.** The SDK and sample code has + been tested using JDK 17, 21, 23, and 24-ea. +- Kotlin 1.9.0 is used; `kotlin-stdlib-jdk8` dependency was replaced with + `kotlin-stdlib` due to + [Kotlin updates](https://kotlinlang.org/docs/whatsnew18.html#updated-jvm-compilation-target). +- Allow application to reset the OAuth token cached within the server, when it + deems that it is no longer valid +- 🧨 Corrected cardinality and range of the `oslc_config:acceptedBy` property (from + String[0..1] to Resource[0..*]) +- Changed scope of dependencies in `oauth-webapp` to avoid inclusion multiple times + during runtime. ### Deprecated +This release does not introduce deprecations. + ### Removed -- 🧨 Support for JDK 11 (and all versions below 17) is removed. **JDK 17 is the new baseline for Eclipse Lyo.** The SDK and sample code has been tested using JDK 17, 20, and 21-ea. +- 🧨 Support for JDK 11 (and all versions below 17) is removed. +- 🧨 Support for Java EE and Jakarta EE 8 is removed. ### Fixed +This release does not contain bug fixes. + ## [5.1.1] ### Added diff --git a/Jenkinsfile b/Jenkinsfile index ee4866589..2d2223c52 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,150 +1,166 @@ pipeline { - agent any - options { - timeout(time: 40, unit: 'MINUTES') // timeout on whole pipeline job - } - tools { - maven 'apache-maven-latest' - jdk 'temurin-jdk17-latest' - } - stages { - stage('SonarCloud') { - when { - triggeredBy 'SCMTrigger' - } - environment { - PROJECT_NAME = 'lyo' - } - steps { - withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONARCLOUD_TOKEN')]) { - withSonarQubeEnv('SonarCloud.io') { - script { - def sonar_pr = "" - if(env.CHANGE_ID) { - sonar_pr += " -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=eclipse/${env.PROJECT_NAME} -Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}" - } - sh ''' - mvn clean verify -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ - -Dsonar.projectKey=org.eclipse.lyo -Dsonar.organization=eclipse -Dsonar.host.url=${SONAR_HOST_URL} -Dsonar.login=${SONARCLOUD_TOKEN}''' + sonar_pr - } - } - } - } - } - stage('Publish (OSSRH)') { - when { - anyOf { - branch 'master' - branch 'main' - branch 'maint-*' - } - } - steps { - withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) { - sh 'gpg --batch --import "${KEYRING}"' - sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done' - } - sh ''' - mvn -B -fae clean install -DskipTests javadoc:aggregate \ - -P dev,gpg-sign,!eclipse-deploy,ossrh-deploy - mvn -B deploy -DskipTests -Dmaven.install.skip=true \ - -P dev,gpg-sign,!eclipse-deploy,ossrh-deploy - ''' - } - } - stage('Publish (Javadocs)') { - when { - anyOf { - branch 'master' - branch 'main' - branch 'maint-*' - } - } - steps { - sshagent(['projects-storage.eclipse.org-bot-ssh']) { - sh ''' - DOCS_HOME=/home/data/httpd/download.eclipse.org/lyo/docs/all - VERSION=$(mvn -q \ - -Dexec.executable="echo" \ - -Dexec.args='${project.version}' \ - --non-recursive \ - org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | tail -n 1 | xargs) - # see https://github.com/eclipse/lyo.core/issues/135 for the tail/xargs temp fix + agent any + options { + timeout(time: 40, unit: 'MINUTES') // timeout on whole pipeline job + disableConcurrentBuilds(abortPrevious: false) + } + tools { + maven 'apache-maven-latest' + jdk 'temurin-jdk17-latest' + } + triggers { + pollSCM('H/10 * * * *') + } + stages { + stage('SonarCloud') { + when { + allOf { + // triggeredBy 'SCMTrigger' + not { + environment name: 'CHANGE_AUTHOR', value: 'dependabot[bot]' + } + not { + environment name: 'CHANGE_AUTHOR', value: 'dependabot-preview[bot]' + } + not { + branch pattern: 'dependabot/*', comparator: 'REGEXP' + } + } + } + environment { + PROJECT_NAME = 'lyo' + } + steps { + withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONARCLOUD_TOKEN')]) { + withSonarQubeEnv('SonarCloud.io') { + script { + def sonar_pr = '' + if (env.CHANGE_ID) { + sonar_pr += " -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=eclipse/${env.PROJECT_NAME} -Dsonar.pullrequest.key=${env.CHANGE_ID} -Dsonar.pullrequest.branch=${env.CHANGE_BRANCH}" + } + sh ''' + mvn clean verify -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + -Dsonar.projectKey=org.eclipse.lyo -Dsonar.organization=eclipse -Dsonar.host.url=${SONAR_HOST_URL} -Dsonar.token=${SONARCLOUD_TOKEN}''' + sonar_pr + } + } + } + } + } + stage('Publish (OSSRH)') { + when { + anyOf { + branch 'master' + branch 'main' + branch 'maint-*' + } + } + steps { + withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) { + sh 'gpg --batch --import "${KEYRING}"' + sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done' + } + sh ''' + mvn -B -fae clean install -DskipTests javadoc:aggregate \ + -P dev,gpg-sign,!eclipse-deploy,ossrh-deploy + mvn -B deploy -DskipTests -Dmaven.install.skip=true \ + -P dev,gpg-sign,!eclipse-deploy,ossrh-deploy + ''' + } + } + stage('Publish (Javadocs)') { + when { + anyOf { + branch 'master' + branch 'main' + branch 'maint-*' + } + } + steps { + sshagent(['projects-storage.eclipse.org-bot-ssh']) { + sh ''' + DOCS_HOME=/home/data/httpd/download.eclipse.org/lyo/docs/all + VERSION=$(mvn -q \ + -Dexec.executable="echo" \ + -Dexec.args='${project.version}' \ + --non-recursive \ + org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | tail -n 1 | xargs) + # see https://github.com/eclipse/lyo.core/issues/135 for the tail/xargs temp fix - ssh genie.lyo@projects-storage.eclipse.org rm -rf $DOCS_HOME/$VERSION - ssh genie.lyo@projects-storage.eclipse.org mkdir -p $DOCS_HOME/$VERSION - scp -rp target/site/apidocs/ genie.lyo@projects-storage.eclipse.org:$DOCS_HOME/$VERSION - ''' - } - } - } - stage('Publish (Eclipse)') { - when { - anyOf { - branch 'master' - branch 'main' - branch 'maint-*' - } - } - steps { - sh ''' - mvn -B deploy -DskipTests -Dmaven.install.skip=true \ - -P dev,gpg-sign,eclipse-deploy - ''' - // sh 'gpg --verify my-app/target/my-app-1.0-SNAPSHOT.jar.asc' - sshagent(['projects-storage.eclipse.org-bot-ssh']) { - sh ''' - DOCS_HOME=/home/data/httpd/download.eclipse.org/lyo/docs/all - VERSION=$(mvn -q \ - -Dexec.executable="echo" \ - -Dexec.args='${project.version}' \ - --non-recursive \ - org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | tail -n 1 | xargs) - # see https://github.com/eclipse/lyo.core/issues/135 for the tail/xargs temp fix + ssh genie.lyo@projects-storage.eclipse.org rm -rf $DOCS_HOME/$VERSION + ssh genie.lyo@projects-storage.eclipse.org mkdir -p $DOCS_HOME/$VERSION + scp -rp target/site/apidocs/ genie.lyo@projects-storage.eclipse.org:$DOCS_HOME/$VERSION + ''' + } + } + } + stage('Publish (Eclipse)') { + when { + anyOf { + branch 'master' + branch 'main' + branch 'maint-*' + } + } + steps { + sh ''' + mvn -B deploy -DskipTests -Dmaven.install.skip=true \ + -P dev,gpg-sign,eclipse-deploy + ''' + // sh 'gpg --verify my-app/target/my-app-1.0-SNAPSHOT.jar.asc' + sshagent(['projects-storage.eclipse.org-bot-ssh']) { + sh ''' + DOCS_HOME=/home/data/httpd/download.eclipse.org/lyo/docs/all + VERSION=$(mvn -q \ + -Dexec.executable="echo" \ + -Dexec.args='${project.version}' \ + --non-recursive \ + org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | tail -n 1 | xargs) + # see https://github.com/eclipse/lyo.core/issues/135 for the tail/xargs temp fix - ssh genie.lyo@projects-storage.eclipse.org rm -rf $DOCS_HOME/$VERSION - ssh genie.lyo@projects-storage.eclipse.org mkdir -p $DOCS_HOME/$VERSION - scp -rp target/site/apidocs/ genie.lyo@projects-storage.eclipse.org:$DOCS_HOME/$VERSION - ''' - } - } - } - stage('Publish HEAD Javadocs') { - when { - branch 'master' - } - steps { - sshagent(['projects-storage.eclipse.org-bot-ssh']) { - sh ''' - DOCS_HOME=/home/data/httpd/download.eclipse.org/lyo/docs/all - VERSION=$(mvn -q \ - -Dexec.executable="echo" \ - -Dexec.args='${project.version}' \ - --non-recursive \ - org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | tail -n 1 | xargs) - # see https://github.com/eclipse/lyo.core/issues/135 for the tail/xargs temp fix + ssh genie.lyo@projects-storage.eclipse.org rm -rf $DOCS_HOME/$VERSION + ssh genie.lyo@projects-storage.eclipse.org mkdir -p $DOCS_HOME/$VERSION + scp -rp target/site/apidocs/ genie.lyo@projects-storage.eclipse.org:$DOCS_HOME/$VERSION + ''' + } + } + } + stage('Publish HEAD Javadocs') { + when { + triggeredBy 'SCMTrigger' + branch 'master' + } + steps { + sshagent(['projects-storage.eclipse.org-bot-ssh']) { + sh ''' + DOCS_HOME=/home/data/httpd/download.eclipse.org/lyo/docs/all + VERSION=$(mvn -q \ + -Dexec.executable="echo" \ + -Dexec.args='${project.version}' \ + --non-recursive \ + org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | tail -n 1 | xargs) + # see https://github.com/eclipse/lyo.core/issues/135 for the tail/xargs temp fix - ssh genie.lyo@projects-storage.eclipse.org rm -rf $DOCS_HOME/latest - ssh genie.lyo@projects-storage.eclipse.org mkdir -p $DOCS_HOME/latest - scp -rp target/site/apidocs/ genie.lyo@projects-storage.eclipse.org:$DOCS_HOME/latest - ''' - } - } + ssh genie.lyo@projects-storage.eclipse.org rm -rf $DOCS_HOME/latest + ssh genie.lyo@projects-storage.eclipse.org mkdir -p $DOCS_HOME/latest + scp -rp target/site/apidocs/ genie.lyo@projects-storage.eclipse.org:$DOCS_HOME/latest + ''' } - } - post { - // send a mail on unsuccessful and fixed builds - unsuccessful { // means unstable || failure || aborted - emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!', - body: '''Check console output at $BUILD_URL to view the results.''', - recipientProviders: [culprits(), requestor()], - to: 'andrew+ham@berezovskyi.me' - } - fixed { // back to normal - emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!', - body: '''Check console output at $BUILD_URL to view the results.''', - recipientProviders: [culprits(), requestor()], - to: 'andrew+ham@berezovskyi.me' - } - } + } + } + } + post { + // send a mail on unsuccessful and fixed builds + unsuccessful { // means unstable || failure || aborted + emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!', + body: '''Check console output at $BUILD_URL to view the results.''', + recipientProviders: [culprits(), requestor()], + to: 'andrew+ham@berezovskyi.me' + } + fixed { // back to normal + emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER!', + body: '''Check console output at $BUILD_URL to view the results.''', + recipientProviders: [culprits(), requestor()], + to: 'andrew+ham@berezovskyi.me' + } + } } diff --git a/README.md b/README.md index b2d43b430..23f3c7424 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![GitHub Actions Status (master)](https://img.shields.io/github/actions/workflow/status/eclipse/lyo/maven.yml?branch=master&label=GH%20Actions) [![](https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fci.eclipse.org%2Flyo%2Fjob%2FLyo%2520multibranch%2Fjob%2Fmaster%2F&label=Eclipse%20Jenkins)](https://ci.eclipse.org/lyo/job/Lyo%20multibranch/job/master/) -[![](https://img.shields.io/badge/javadoc-5.0.0.Final-blue.svg)](https://download.eclipse.org/lyo/docs/all/5.0.0.Final/apidocs/) +[![](https://img.shields.io/badge/javadoc-6.0.0.Final-blue.svg)](https://download.eclipse.org/lyo/docs/all/6.0.0.Final/apidocs/) [![](https://img.shields.io/badge/javadoc-latest-blue.svg)](https://download.eclipse.org/lyo/docs/all/latest/apidocs/) [![Discourse users](https://img.shields.io/discourse/users?color=28bd84&server=https%3A%2F%2Fforum.open-services.net%2F)](https://forum.open-services.net/) @@ -64,51 +64,41 @@ See under [validation/README](validation/README.md). ### Test and sample repositories -| Repo | Version | Status | PRs | Bugs | Activity | -| ---- | ------- | ------ | --- | ---- | -------- | -| [oslc-op/refimpl](https://github.com/oslc-op/refimpl) | ![](https://img.shields.io/badge/Lyo-5.2.0--S-f329da) | ![](https://github.com/oslc-op/refimpl/workflows/CI/badge.svg) | [![](https://img.shields.io/github/issues-pr/oslc-op/refimpl?label=PR&color=blue)](https://github.com/oslc-op/refimpl/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/oslc-op/refimpl/Type:%20Bug?label=bugs)](https://github.com/oslc-op/refimpl/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/oslc-op/refimpl) | -| [oslc-op/sysml-oslc-server](https://github.com/oslc-op/sysml-oslc-server) | ![](https://img.shields.io/badge/Lyo-5.0.0--S-f329da) | ![](https://github.com/oslc-op/sysml-oslc-server/workflows/CI/badge.svg) | [![](https://img.shields.io/github/issues-pr/oslc-op/sysml-oslc-server?label=PR&color=blue)](https://github.com/oslc-op/sysml-oslc-server/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/oslc-op/sysml-oslc-server/Type:%20Bug?label=bugs)](https://github.com/oslc-op/sysml-oslc-server/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/oslc-op/sysml-oslc-server) | -| [OSLC/lyo-adaptor-sample-modelling](https://github.com/OSLC/lyo-adaptor-sample-modelling) | ![](https://img.shields.io/badge/Lyo-5.0.0--S-f329da) | ![](https://github.com/OSLC/lyo-adaptor-sample-modelling/actions/workflows/maven.yml/badge.svg?branch=main-5.x) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-adaptor-sample-modelling?label=PR&color=blue)](https://github.com/OSLC/lyo-adaptor-sample-modelling/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/OSLC/lyo-adaptor-sample-modelling/bug?label=bugs)](https://github.com/OSLC/lyo-adaptor-sample-modelling/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-adaptor-sample-modelling) | -| [lyo-samples/lyo-client-samples](https://github.com/OSLC/lyo-samples) | ![](https://img.shields.io/badge/Lyo-5.0.0--S-f329da) | ![](https://github.com/OSLC/lyo-samples/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-samples?label=PR&color=blue)](https://github.com/OSLC/lyo-samples/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/OSLC/lyo-samples/bug?label=bugs)](https://github.com/OSLC/lyo-samples/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-samples) | -| [lyo-samples/client-oauth-discovery-dui](https://github.com/OSLC/lyo-samples) | ![](https://img.shields.io/badge/Lyo-4.0.0-red) | ![](https://github.com/OSLC/lyo-samples/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-samples?label=PR&color=blue)](https://github.com/OSLC/lyo-samples/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/OSLC/lyo-samples/bug?label=bugs)](https://github.com/OSLC/lyo-samples/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-samples) | -| [OSLC/lyo-adaptor-bugzilla](https://github.com/OSLC/lyo-adaptor-bugzilla) | ![](https://img.shields.io/badge/Lyo-2.4.0-red) | ![](https://github.com/OSLC/lyo-adaptor-bugzilla/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-adaptor-bugzilla?label=PR&color=blue)](https://github.com/OSLC/lyo-adaptor-bugzilla/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/OSLC/lyo-adaptor-bugzilla/bug?label=bugs)](https://github.com/OSLC/lyo-adaptor-bugzilla/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-adaptor-bugzilla) | -| [OSLC/iotp-adaptor](https://github.com/OSLC/iotp-adaptor) | ![](https://img.shields.io/badge/Lyo-2.4.0-red) | ![](https://github.com/OSLC/iotp-adaptor/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/iotp-adaptor?label=PR&color=blue)](https://github.com/OSLC/iotp-adaptor/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/OSLC/iotp-adaptor/bug?label=bugs)](https://github.com/OSLC/iotp-adaptor/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/iotp-adaptor) | -| [OSLC/oslc-adapter-jama](https://github.com/OSLC/oslc-adapter-jama) | ![](https://img.shields.io/badge/Lyo-2.4.0-red) | ![](https://github.com/OSLC/oslc-adapter-jama/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/oslc-adapter-jama?label=PR&color=blue)](https://github.com/OSLC/oslc-adapter-jama/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/OSLC/oslc-adapter-jama/bug?label=bugs)](https://github.com/OSLC/oslc-adapter-jama/issues?q=is%3Aopen+label%3Abug+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/oslc-adapter-jama) | -| [eclipse/lyo.testsuite](https://github.com/eclipse/lyo.testsuite) | ![](https://img.shields.io/badge/Lyo-2.4.0-red) | ![](https://github.com/eclipse/lyo.testsuite/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/eclipse/lyo.testsuite?label=PR&color=blue)](https://github.com/eclipse/lyo.testsuite/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/eclipse/lyo.testsuite/Type:%20Bug?label=bugs)](https://github.com/eclipse/lyo.testsuite/issues?q=is%3Aopen+label%3A%22Type%3A+Bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/eclipse/lyo.testsuite) | -| [ld4mbse/oslc4tdb](https://github.com/ld4mbse/oslc4tdb) | ![](https://img.shields.io/badge/Lyo-2.3.0-red) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc4tdb?label=PR&color=blue)](https://github.com/ld4mbse/oslc4tdb/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc4tdb/bug?label=bugs)](https://github.com/ld4mbse/oslc4tdb/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc4tdb) | -| [kth-mda/adaptor-bugzilla-trs](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs) | ![](https://img.shields.io/badge/Lyo-2.2.0-red) | ![](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs/badges/master/pipeline.svg?ignore_skipped=true) | [![](https://img.shields.io/gitlab/merge-requests/open/kth-mda%2Flyo%2Fadaptor-bugzilla-trs?label=MR)](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs/-/merge_requests) | [![](https://img.shields.io/gitlab/issues/open/kth-mda%2Flyo%2Fadaptor-bugzilla-trs)](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs/-/issues) | ![](https://img.shields.io/gitlab/last-commit/kth-mda%2Flyo%2Fadaptor-bugzilla-trs) | -| [berezovskyi/oslc-adapter-subversion](https://github.com/berezovskyi/oslc-adapter-subversion) | ![](https://img.shields.io/badge/Lyo-2.1.2-red) | ![](https://github.com/berezovskyi/oslc-adapter-subversion/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/berezovskyi/oslc-adapter-subversion?label=PR&color=blue)](https://github.com/berezovskyi/oslc-adapter-subversion/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/berezovskyi/oslc-adapter-subversion/bug?label=bugs)](https://github.com/berezovskyi/oslc-adapter-subversion/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/berezovskyi/oslc-adapter-subversion) | -| [lyo-samples-attic/oslc-java-samples](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-4.1/oslc-java-samples) | ![](https://img.shields.io/badge/Lyo-4.1.0-ffcc00) | N/A | N/A | N/A | N/A | -| [lyo-samples-attic/oslc4j-stockquote](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.4/oslc4j-stockquote) | ![](https://img.shields.io/badge/Lyo-2.3.0-red) | N/A | N/A | N/A | N/A | -| [lyo-samples-attic/oslc4j-test](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.3/oslc4j-test) | ![](https://img.shields.io/badge/Lyo-2.3.0-red) | N/A | N/A | N/A | N/A | -| [lyo-samples-attic/oslc4j-bugzilla-sample](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.2/oslc4j-bugzilla-sample) | ![](https://img.shields.io/badge/Lyo-2.2.0-red) | N/A | N/A | N/A | N/A | -| [lyo-samples-attic/trs4j-bugzilla-sample](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.1/trs4j-bugzilla-sample) | ![](https://img.shields.io/badge/Lyo-2.1.2-red) | N/A | N/A | N/A | N/A | -| [ld4mbse/oslc-adapter-simulink](https://github.com/ld4mbse/oslc-adapter-simulink) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-simulink?label=PR&color=blue)](https://github.com/ld4mbse/oslc-adapter-simulink/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-adapter-simulink/bug?label=bugs)](https://github.com/ld4mbse/oslc-adapter-simulink/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-simulink) | -| [ld4mbse/oslc-adapter-magicdraw-sysml](https://github.com/ld4mbse/oslc-adapter-magicdraw-sysml) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-magicdraw-sysml?label=PR&color=blue)](https://github.com/ld4mbse/oslc-adapter-magicdraw-sysml/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-adapter-magicdraw-sysml/bug?label=bugs)](https://github.com/ld4mbse/oslc-adapter-magicdraw-sysml/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-magicdraw-sysml) | -| [ld4mbse/oslc-adapter-integrity](https://github.com/ld4mbse/oslc-adapter-integrity) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-integrity?label=PR&color=blue)](https://github.com/ld4mbse/oslc-adapter-integrity/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-adapter-integrity/bug?label=bugs)](https://github.com/ld4mbse/oslc-adapter-integrity/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-integrity) | -| [ld4mbse/oslc-adapter-fmi](https://github.com/ld4mbse/oslc-adapter-fmi) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-fmi?label=PR&color=blue)](https://github.com/ld4mbse/oslc-adapter-fmi/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-adapter-fmi/bug?label=bugs)](https://github.com/ld4mbse/oslc-adapter-fmi/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-fmi) | -| [ld4mbse/oslc-modeltransformation-simulink-magicdraw](https://github.com/ld4mbse/oslc-modeltransformation-simulink-magicdraw) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-modeltransformation-simulink-magicdraw?label=PR&color=blue)](https://github.com/ld4mbse/oslc-modeltransformation-simulink-magicdraw/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-modeltransformation-simulink-magicdraw/bug?label=bugs)](https://github.com/ld4mbse/oslc-modeltransformation-simulink-magicdraw/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-modeltransformation-simulink-magicdraw) | -| [ld4mbse/oslc-adapter-jena-tdb](https://github.com/ld4mbse/oslc-adapter-jena-tdb) | ![](https://img.shields.io/badge/Lyo-2.0.0-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-jena-tdb?label=PR&color=blue)](https://github.com/ld4mbse/oslc-adapter-jena-tdb/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-adapter-jena-tdb/bug?label=bugs)](https://github.com/ld4mbse/oslc-adapter-jena-tdb/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-jena-tdb) | -| [ld4mbse/oslc-adapter-amesim](https://github.com/ld4mbse/oslc-adapter-amesim) | ![](https://img.shields.io/badge/Lyo-2.0.0-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-amesim?label=PR&color=blue)](https://github.com/ld4mbse/oslc-adapter-amesim/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | [![](https://img.shields.io/github/issues/ld4mbse/oslc-adapter-amesim/bug?label=bugs)](https://github.com/ld4mbse/oslc-adapter-amesim/issues?q=is%3Aopen+label%3A%22bug%22+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-amesim) | -| [kth-mda/se.kth.md.cpse.adaptor.bugzilla](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla) | ![](https://img.shields.io/badge/Lyo-2.0.0-f42020) | ![](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla/badges/master/pipeline.svg?ignore_skipped=true) | [![](https://img.shields.io/gitlab/merge-requests/open/kth-mda%2Flyo%2Fse.kth.md.cpse.adaptor.bugzilla?label=MR)](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla/-/merge_requests) | [![](https://img.shields.io/gitlab/issues/open/kth-mda%2Flyo%2Fse.kth.md.cpse.adaptor.bugzilla)](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla/-/issues) | ![](https://img.shields.io/gitlab/last-commit/kth-mda%2Flyo%2Fse.kth.md.cpse.adaptor.bugzilla) | -| [kth-mda/adaptor-bugzilla-store](https://gitlab.com/kth-mda/lyo/adaptor-store-support) | ![](https://img.shields.io/badge/Lyo-2.1.0-f42020) | N/A | [![](https://img.shields.io/gitlab/merge-requests/open/kth-mda%2Flyo%2Fadaptor-store-support?label=MR)](https://gitlab.com/kth-mda/lyo/adaptor-store-support/-/merge_requests) | [![](https://img.shields.io/gitlab/issues/open/kth-mda%2Flyo%2Fadaptor-store-support)](https://gitlab.com/kth-mda/lyo/adaptor-store-support/-/issues) | ![](https://img.shields.io/gitlab/last-commit/kth-mda%2Flyo%2Fadaptor-store-support) | +| Repo | Version | Status | PRs | Activity | +| ---- | ------- | ------ | --- | -------- | +| [oslc-op/refimpl](https://github.com/oslc-op/refimpl) | ![](https://img.shields.io/badge/Lyo-6.0.0-brightgreen) | ![](https://github.com/oslc-op/refimpl/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/oslc-op/refimpl?label=PR)](https://github.com/oslc-op/refimpl/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/oslc-op/refimpl) | +| [lyo-samples/lyo-client-samples](https://github.com/OSLC/lyo-samples) | ![](https://img.shields.io/badge/Lyo-6.0.0-brightgreen) | ![](https://github.com/OSLC/lyo-samples/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-samples?label=PR)](https://github.com/OSLC/lyo-samples/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-samples) | +| [danlz/lyo-in-spring-boot](https://github.com/danlz/lyo-in-spring-boot) | ![](https://img.shields.io/badge/Lyo-6.0.0-brightgreen) | ![](https://github.com/danlz/lyo-in-spring-boot/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/danlz/lyo-in-spring-boot?label=PR)](https://github.com/danlz/lyo-in-spring-boot/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/danlz/lyo-in-spring-boot) | +| [oslc-op/sysml-oslc-server](https://github.com/oslc-op/sysml-oslc-server) | ![](https://img.shields.io/badge/Lyo-5.1.1-17C3B2) | ![](https://github.com/oslc-op/sysml-oslc-server/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/oslc-op/sysml-oslc-server?label=PR)](https://github.com/oslc-op/sysml-oslc-server/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/oslc-op/sysml-oslc-server) | +| [OSLC/lyo-adaptor-sample-modelling](https://github.com/OSLC/lyo-adaptor-sample-modelling) | ![](https://img.shields.io/badge/Lyo-5.0.1.CR-7B1E7A) | ![](https://github.com/OSLC/lyo-adaptor-sample-modelling/actions/workflows/maven.yml/badge.svg?branch=main-5.x) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-adaptor-sample-modelling?label=PR)](https://github.com/OSLC/lyo-adaptor-sample-modelling/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-adaptor-sample-modelling) | +| [lyo-samples/client-oauth-discovery-dui](https://github.com/OSLC/lyo-samples) | ![](https://img.shields.io/badge/Lyo-4.0.0-f42020) | ![](https://github.com/OSLC/lyo-samples/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-samples?label=PR)](https://github.com/OSLC/lyo-samples/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-samples) | +| [OSLC/lyo-adaptor-bugzilla](https://github.com/OSLC/lyo-adaptor-bugzilla) | ![](https://img.shields.io/badge/Lyo-2.4.0-f42020) | ![](https://github.com/OSLC/lyo-adaptor-bugzilla/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/lyo-adaptor-bugzilla?label=PR)](https://github.com/OSLC/lyo-adaptor-bugzilla/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/lyo-adaptor-bugzilla) | +| [OSLC/iotp-adaptor](https://github.com/OSLC/iotp-adaptor) | ![](https://img.shields.io/badge/Lyo-2.4.0-f42020) | ![](https://github.com/OSLC/iotp-adaptor/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/iotp-adaptor?label=PR)](https://github.com/OSLC/iotp-adaptor/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/iotp-adaptor) | +| [OSLC/oslc-adapter-jama](https://github.com/OSLC/oslc-adapter-jama) | ![](https://img.shields.io/badge/Lyo-2.4.0-f42020) | ![](https://github.com/OSLC/oslc-adapter-jama/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/OSLC/oslc-adapter-jama?label=PR)](https://github.com/OSLC/oslc-adapter-jama/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/OSLC/oslc-adapter-jama) | +| [eclipse/lyo.testsuite](https://github.com/eclipse/lyo.testsuite) | ![](https://img.shields.io/badge/Lyo-2.4.0-f42020) | ![](https://github.com/eclipse/lyo.testsuite/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/eclipse/lyo.testsuite?label=PR)](https://github.com/eclipse/lyo.testsuite/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/eclipse/lyo.testsuite) | +| [ld4mbse/oslc4tdb](https://github.com/ld4mbse/oslc4tdb) | ![](https://img.shields.io/badge/Lyo-2.3.0-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc4tdb?label=PR)](https://github.com/ld4mbse/oslc4tdb/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc4tdb) | +| [kth-mda/adaptor-bugzilla-trs](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs) | ![](https://img.shields.io/badge/Lyo-2.2.0-f42020) | ![](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs/badges/master/pipeline.svg?ignore_skipped=true) | [![](https://img.shields.io/gitlab/merge-requests/open/kth-mda%2Flyo%2Fadaptor-bugzilla-trs?label=MR)](https://gitlab.com/kth-mda/lyo/adaptor-bugzilla-trs/-/merge_requests) | ![](https://img.shields.io/gitlab/last-commit/kth-mda%2Flyo%2Fadaptor-bugzilla-trs) | +| [berezovskyi/oslc-adapter-subversion](https://github.com/berezovskyi/oslc-adapter-subversion) | ![](https://img.shields.io/badge/Lyo-2.1.2-f42020) | ![](https://github.com/berezovskyi/oslc-adapter-subversion/actions/workflows/maven.yml/badge.svg) | [![](https://img.shields.io/github/issues-pr/berezovskyi/oslc-adapter-subversion?label=PR)](https://github.com/berezovskyi/oslc-adapter-subversion/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/berezovskyi/oslc-adapter-subversion) | +| [lyo-samples-attic/oslc-java-samples](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-4.1/oslc-java-samples) | ![](https://img.shields.io/badge/Lyo-4.1.0-f42020) | N/A | N/A | N/A | +| [lyo-samples-attic/oslc4j-stockquote](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.4/oslc4j-stockquote) | ![](https://img.shields.io/badge/Lyo-2.3.0-f42020) | N/A | N/A | N/A | +| [lyo-samples-attic/oslc4j-test](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.3/oslc4j-test) | ![](https://img.shields.io/badge/Lyo-2.3.0-f42020) | N/A | N/A | N/A | +| [lyo-samples-attic/oslc4j-bugzilla-sample](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.2/oslc4j-bugzilla-sample) | ![](https://img.shields.io/badge/Lyo-2.2.0-f42020) | N/A | N/A | N/A | +| [lyo-samples-attic/trs4j-bugzilla-sample](https://github.com/OSLC/lyo-samples-attic/tree/main/lyo-2.1/trs4j-bugzilla-sample) | ![](https://img.shields.io/badge/Lyo-2.1.2-f42020) | N/A | N/A | N/A | +| [ld4mbse/oslc-adapter-simulink](https://github.com/ld4mbse/oslc-adapter-simulink) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-simulink?label=PR)](https://github.com/ld4mbse/oslc-adapter-simulink/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-simulink) | +| [ld4mbse/oslc-adapter-magicdraw-sysml](https://github.com/ld4mbse/oslc-adapter-magicdraw-sysml) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-magicdraw-sysml?label=PR)](https://github.com/ld4mbse/oslc-adapter-magicdraw-sysml/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-magicdraw-sysml) | +| [ld4mbse/oslc-adapter-integrity](https://github.com/ld4mbse/oslc-adapter-integrity) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-integrity?label=PR)](https://github.com/ld4mbse/oslc-adapter-integrity/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-integrity) | +| [ld4mbse/oslc-adapter-fmi](https://github.com/ld4mbse/oslc-adapter-fmi) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-fmi?label=PR)](https://github.com/ld4mbse/oslc-adapter-fmi/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-fmi) | +| [ld4mbse/oslc-modeltransformation-simulink-magicdraw](https://github.com/ld4mbse/oslc-modeltransformation-simulink-magicdraw) | ![](https://img.shields.io/badge/Lyo-3.0.0--S-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-modeltransformation-simulink-magicdraw?label=PR)](https://github.com/ld4mbse/oslc-modeltransformation-simulink-magicdraw/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-modeltransformation-simulink-magicdraw) | +| [ld4mbse/oslc-adapter-jena-tdb](https://github.com/ld4mbse/oslc-adapter-jena-tdb) | ![](https://img.shields.io/badge/Lyo-2.0.0-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-jena-tdb?label=PR)](https://github.com/ld4mbse/oslc-adapter-jena-tdb/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-jena-tdb) | +| [ld4mbse/oslc-adapter-amesim](https://github.com/ld4mbse/oslc-adapter-amesim) | ![](https://img.shields.io/badge/Lyo-2.0.0-f42020) | N/A | [![](https://img.shields.io/github/issues-pr/ld4mbse/oslc-adapter-amesim?label=PR)](https://github.com/ld4mbse/oslc-adapter-amesim/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) | ![](https://img.shields.io/github/last-commit/ld4mbse/oslc-adapter-amesim) | +| [kth-mda/se.kth.md.cpse.adaptor.bugzilla](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla) | ![](https://img.shields.io/badge/Lyo-2.0.0-f42020) | ![](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla/badges/master/pipeline.svg?ignore_skipped=true) | [![](https://img.shields.io/gitlab/merge-requests/open/kth-mda%2Flyo%2Fse.kth.md.cpse.adaptor.bugzilla?label=MR)](https://gitlab.com/kth-mda/lyo/se.kth.md.cpse.adaptor.bugzilla/-/merge_requests) | ![](https://img.shields.io/gitlab/last-commit/kth-mda%2Flyo%2Fse.kth.md.cpse.adaptor.bugzilla) | +| [kth-mda/adaptor-bugzilla-store](https://gitlab.com/kth-mda/lyo/adaptor-store-support) | ![](https://img.shields.io/badge/Lyo-2.1.0-f42020) | N/A | [![](https://img.shields.io/gitlab/merge-requests/open/kth-mda%2Flyo%2Fadaptor-store-support?label=MR)](https://gitlab.com/kth-mda/lyo/adaptor-store-support/-/merge_requests) | ![](https://img.shields.io/gitlab/last-commit/kth-mda%2Flyo%2Fadaptor-store-support) | - +> [!CAUTION] +> +> Lyo versions 4.1.0 and below are potentially vulnerable to [CVE-2021-41042](https://nvd.nist.gov/vuln/detail/CVE-2021-41042) when processing untrusted RDF/XML inputs. + ### Retired repositories diff --git a/client/oslc-client-base/pom.xml b/client/oslc-client-base/pom.xml index 8b3e20a3e..7cb548bef 100644 --- a/client/oslc-client-base/pom.xml +++ b/client/oslc-client-base/pom.xml @@ -6,11 +6,11 @@ org.eclipse.lyo.clients clients-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT oslc-client-base - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT Lyo :: Client :: Base diff --git a/client/oslc-client/pom.xml b/client/oslc-client/pom.xml index 880bceb30..ab5f353a8 100644 --- a/client/oslc-client/pom.xml +++ b/client/oslc-client/pom.xml @@ -1,167 +1,186 @@ - - 4.0.0 + + 4.0.0 - - org.eclipse.lyo.clients - clients-parent - 6.0.0-SNAPSHOT - ../pom.xml - + + org.eclipse.lyo.clients + clients-parent + 7.0.0-SNAPSHOT + ../pom.xml + - oslc-client - 6.0.0-SNAPSHOT - Lyo :: Client :: OSLC JAX-RS 2.0 (new) - Eclipse Lyo OSLC Java client based on OSLC4J and JAX-RS 2.0 + oslc-client + 7.0.0-SNAPSHOT + Lyo :: Client :: OSLC JAX-RS 2.0 (new) + Eclipse Lyo OSLC Java client based on OSLC4J and JAX-RS 2.0 - - - org.eclipse.lyo.clients - oslc-client-base - ${v.lyo} - + + + org.eclipse.lyo.clients + oslc-client-base + ${v.lyo} + - - org.slf4j - slf4j-api - ${v.slf4j} - - - org.apache.jena - apache-jena-libs - pom - ${v.jena} - - - org.apache.httpcomponents - httpclient - ${v.httpclient} - - - commons-logging - commons-logging - - - - - org.slf4j - jcl-over-slf4j - ${v.slf4j} - - - net.oauth.core - oauth - 20100527 - - - net.oauth.core - oauth-consumer - 20100527 - - - net.oauth.core - oauth-httpclient4 - 20090913 - - - org.apache.httpcomponents - httpclient - - - - - org.eclipse.lyo.oslc4j.core - oslc4j-core - ${v.lyo} - - - org.eclipse.lyo.oslc4j.core - oslc4j-jena-provider - ${v.lyo} - - - org.eclipse.lyo.oslc4j.core - oslc4j-json4j-provider - ${v.lyo} - + + org.slf4j + slf4j-api + ${v.slf4j} + + + org.apache.jena + apache-jena-libs + pom + ${v.jena} + + + org.apache.httpcomponents + httpclient + ${v.httpclient} + + + commons-logging + commons-logging + + + + + org.slf4j + jcl-over-slf4j + ${v.slf4j} + + + org.eclipse.lyo.server + net.oauth.core-oauth-jakarta + ${v.lyo} + + + + net.oauth.core + oauth + + + + + org.eclipse.lyo.server + net.oauth.core-oauth-consumer-jakarta + ${v.lyo} + + + + net.oauth.core + oauth-consumer + + + + + org.eclipse.lyo.server + net.oauth.core-oauth-httpclient4-jakarta + ${v.lyo} + + + + net.oauth.core + oauth-httpclient4 + + + + + org.eclipse.lyo.oslc4j.core + oslc4j-core + ${v.lyo} + + + org.eclipse.lyo.oslc4j.core + oslc4j-jena-provider + ${v.lyo} + + + org.eclipse.lyo.oslc4j.core + oslc4j-json4j-provider + ${v.lyo} + - - javax.servlet - javax.servlet-api - - - - - jakarta.ws.rs - jakarta.ws.rs-api - provided - + + jakarta.servlet + jakarta.servlet-api + + + jakarta.ws.rs + jakarta.ws.rs-api + - - - org.slf4j - slf4j-simple - ${v.slf4j} - test - - - org.mockito - mockito-core - test - - - org.junit.jupiter - junit-jupiter-api - test - - - junit - junit - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.vintage - junit-vintage-engine - test - - - - org.assertj - assertj-core - test - + + + org.slf4j + slf4j-simple + ${v.slf4j} + test + + + org.mockito + mockito-core + test + + + org.junit.jupiter + junit-jupiter-api + test + + + junit + junit + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.vintage + junit-vintage-engine + test + + + + org.assertj + assertj-core + test + - - org.glassfish.jersey.core - jersey-client - test - - - org.glassfish.jersey.inject - jersey-hk2 - test - + + org.glassfish.jersey.core + jersey-client + test + + + org.glassfish.jersey.inject + jersey-hk2 + test + - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - org.apache.maven.plugins - maven-surefire-plugin - - - + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/IOslcClient.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/IOslcClient.java index f94f98183..9de98e718 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/IOslcClient.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/IOslcClient.java @@ -14,8 +14,9 @@ package org.eclipse.lyo.client; import java.util.Map; -import javax.ws.rs.client.Client; -import javax.ws.rs.core.Response; + +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.core.Response; /** * An OSLC Client that extends the JAX-RS 2.0 REST client with OSLC specific CRUD and diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/JEEFormAuthenticator.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/JEEFormAuthenticator.java index fee5f9b6f..1c29b6c94 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/JEEFormAuthenticator.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/JEEFormAuthenticator.java @@ -13,26 +13,27 @@ */ package org.eclipse.lyo.client; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.ws.rs.ProcessingException; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientRequestContext; -import javax.ws.rs.client.ClientRequestFilter; -import javax.ws.rs.client.ClientResponseContext; -import javax.ws.rs.client.ClientResponseFilter; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.Invocation; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import jakarta.ws.rs.ProcessingException; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientRequestContext; +import jakarta.ws.rs.client.ClientRequestFilter; +import jakarta.ws.rs.client.ClientResponseContext; +import jakarta.ws.rs.client.ClientResponseFilter; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; + /** * A filter that can be registered in order to non-preemptively handle JEE Form * based authentication challenges. @@ -85,7 +86,7 @@ public JEEFormAuthenticator(final String baseUri, final String username, final S * authenticate the user, and then retries the request with the updated * session information. * - * @see javax.ws.rs.client.ClientResponseFilter#filter(javax.ws.rs.client.ClientRequestContext, javax.ws.rs.client.ClientResponseContext) + * @see jakarta.ws.rs.client.ClientResponseFilter#filter(jakarta.ws.rs.client.ClientRequestContext, jakarta.ws.rs.client.ClientResponseContext) */ @Override public void filter(ClientRequestContext request, ClientResponseContext response) { diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClient.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClient.java index 53b39c116..53f93c922 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClient.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClient.java @@ -13,6 +13,16 @@ */ package org.eclipse.lyo.client; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + import org.apache.http.HttpHeaders; import org.apache.http.HttpStatus; import org.eclipse.lyo.client.exception.ResourceNotFoundException; @@ -27,22 +37,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.Invocation.Builder; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.client.Invocation.Builder; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; /** * An OSLC Client that extends the JAX-RS 2.0 REST client with OSLC specific CRUD and diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClientBuilder.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClientBuilder.java index 0a223af06..9c126730c 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClientBuilder.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcClientBuilder.java @@ -13,11 +13,11 @@ */ package org.eclipse.lyo.client; -import javax.ws.rs.client.ClientBuilder; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.client.ClientBuilder; + public class OslcClientBuilder { private String version; private ClientBuilder clientBuilder; diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClient.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClient.java index cca96897b..49ee64059 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClient.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClient.java @@ -21,20 +21,20 @@ import java.util.Map; import java.util.Optional; -import javax.ws.rs.HttpMethod; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.core.Response; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.client.HttpClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import jakarta.ws.rs.HttpMethod; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.core.Response; import net.oauth.OAuthAccessor; import net.oauth.OAuthException; import net.oauth.OAuthMessage; import net.oauth.client.OAuthClient; import net.oauth.client.httpclient4.HttpClient4; -import org.apache.commons.lang3.StringUtils; -import org.apache.http.client.HttpClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class OslcOAuthClient implements IOslcClient { diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClientBuilder.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClientBuilder.java index aeb03ea79..df9f041c4 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClientBuilder.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/OslcOAuthClientBuilder.java @@ -13,11 +13,10 @@ */ package org.eclipse.lyo.client; -import javax.ws.rs.client.ClientBuilder; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.client.ClientBuilder; import net.oauth.OAuthAccessor; import net.oauth.OAuthConsumer; import net.oauth.OAuthServiceProvider; diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/RootServicesHelper.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/RootServicesHelper.java index 63877621a..cdbf8dbdf 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/RootServicesHelper.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/RootServicesHelper.java @@ -13,7 +13,11 @@ */ package org.eclipse.lyo.client; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.StatusLine; @@ -33,13 +37,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; +import com.fasterxml.jackson.databind.ObjectMapper; + +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriBuilder; /** * Helper class to assist in retrieval of attributes from the IBM Rational diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/UnderlyingHttpClient.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/UnderlyingHttpClient.java index 3150e93af..015676205 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/UnderlyingHttpClient.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/UnderlyingHttpClient.java @@ -13,9 +13,10 @@ */ package org.eclipse.lyo.client; -import javax.ws.rs.client.Client; import org.apache.http.client.HttpClient; +import jakarta.ws.rs.client.Client; + public interface UnderlyingHttpClient { /** diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQuery.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQuery.java index 4226d58d2..700708814 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQuery.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQuery.java @@ -1,215 +1,261 @@ /* - * Copyright (c) 2020 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License 1.0 - * which is available at http://www.eclipse.org/org/documents/edl-v10.php. - * + * Copyright (c) 2020 Contributors to the Eclipse Foundation See the NOTICE file(s) distributed with this work for + * additional information regarding copyright ownership. This program and the accompanying materials are made available + * under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0, or the + * Eclipse Distribution License 1.0 which is available at http://www.eclipse.org/org/documents/edl-v10.php. * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ package org.eclipse.lyo.client.query; +import java.util.Collections; +import java.util.Map; -import javax.ws.rs.core.Response; - -import org.eclipse.lyo.client.OslcClient; import org.eclipse.lyo.client.OSLCConstants; +import org.eclipse.lyo.client.OslcClient; -import javax.ws.rs.client.WebTarget; +import jakarta.ws.rs.client.Invocation.Builder; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.Response; /** - * Represents an OSLC query (HTTP GET) request to be made of a remote system. - * - * Immutable. + * Represents an OSLC query (HTTP GET) request to be made of a remote system. Immutable. */ @SuppressWarnings("WeakerAccess") public class OslcQuery { - private final OslcClient oslcClient; - - private final String capabilityUrl; - - private String queryUrl; - - private final int pageSize; - - private WebTarget queryResource; - - //query parameters - private final String where; - private final String select; - private final String orderBy; - private final String searchTerms; - private final String prefix; - private final String version; - private final String configurationContext; - - /** - * Create an OSLC query that uses the remote system's default page size. - * - * @param oslcClient the authenticated OSLC client - * @param capabilityUrl the URL that is the base - */ - public OslcQuery(OslcClient oslcClient, String capabilityUrl) { - this(oslcClient, capabilityUrl, 0); - } - - /** - * Create an OSLC query with query parameters that uses the default page size - * @param oslcClient the authenticated OSLC client - * @param capabilityUrl capabilityUrl the URL that is the base - * @param oslcQueryParams an OslcQueryParameters object - * @see OslcQueryParameters - */ - public OslcQuery(OslcClient oslcClient, String capabilityUrl, OslcQueryParameters oslcQueryParams) { - this(oslcClient, capabilityUrl, 0, oslcQueryParams); - } - - /** - * Create an OSLC query that uses the given page size - * - * @param oslcClient the authenticated OSLC client - * @param capabilityUrl the URL that is the base - * @param pageSize the number of results to include on each page (OslcQueryResult) - * - */ - public OslcQuery(OslcClient oslcClient, String capabilityUrl, int pageSize) { - this(oslcClient, capabilityUrl, pageSize, null); - } - - /** - * Create an OSLC query that uses OSLC query parameters and the given page size - * - * @param oslcClient the authenticated OSLC client - * @param capabilityUrl the URL that is the base - * @param pageSize the number of results to include on each page (OslcQueryResult) - * @param oslcQueryParams an OslcQueryParameters object (see {@link OslcQueryParameters}) - */ - public OslcQuery(OslcClient oslcClient, String capabilityUrl, - int pageSize, OslcQueryParameters oslcQueryParams) { - this(oslcClient, capabilityUrl, pageSize, oslcQueryParams, OSLCConstants.OSLC2_0); - } - - /** - * Create an OSLC query that uses OSLC query parameters and the given page size - * - * @param oslcClient the authenticated OSLC client - * @param capabilityUrl the URL that is the base - * @param pageSize the number of results to include on each page (OslcQueryResult) - * @param oslcQueryParams an OslcQueryParameters object (see {@link OslcQueryParameters}) - * @param version OSLC Version (see {@link OSLCConstants}) - */ - public OslcQuery(OslcClient oslcClient, String capabilityUrl, - int pageSize, OslcQueryParameters oslcQueryParams, String version) { - this.oslcClient = oslcClient; - this.capabilityUrl = capabilityUrl; - this.pageSize = (pageSize < 1) ? 0 : pageSize; - - //make a local copy of any query parameters - if (oslcQueryParams != null) - { - this.where = oslcQueryParams.getWhere(); - this.select = oslcQueryParams.getSelect(); - this.orderBy = oslcQueryParams.getOrderBy(); - this.searchTerms = oslcQueryParams.getSearchTerms(); - this.prefix = oslcQueryParams.getPrefix(); - this.configurationContext = oslcQueryParams.getConfigurationContext(); - } else { - this.where = this.select = this.orderBy = this.searchTerms = this.prefix = this.configurationContext = null; - } - this.queryResource = createQueryResource(this.getCapabilityUrl()); - this.queryUrl = this.getQueryUrl(); - - this.version = version; - } - - OslcQuery(OslcQueryResult previousResult) { - this(previousResult.getQuery(), previousResult.getNextPageUrl()); - } - - private OslcQuery(OslcQuery previousQuery, String nextPageUrl) { - this(previousQuery.oslcClient, previousQuery.capabilityUrl, previousQuery.pageSize); - this.queryUrl = nextPageUrl; - this.queryResource = createQueryResource(nextPageUrl); - } - - private WebTarget createQueryResource(final String capabilityUri) { - WebTarget resource = oslcClient.getWebResource(capabilityUri); - resource = applyPagination(resource); - resource = applyOslcQueryParams(resource); - return resource; - } - - private WebTarget applyPagination(WebTarget resource) { - WebTarget result = resource; - if (pageSize > 0) { - result = result.queryParam("oslc.paging", "true"); - result = result.queryParam("oslc.pageSize", pageSize); - } - return result; - } - - private WebTarget applyOslcQueryParams(WebTarget resource) { - WebTarget result = resource; - if (this.where != null && !this.where.isEmpty()) { - result = result.queryParam("oslc.where", this.where); - } - if (this.select != null && !this.select.isEmpty()) { - result = result.queryParam("oslc.select", this.select); - } - if (this.orderBy != null && !this.orderBy.isEmpty()) { - result = result.queryParam("oslc.orderBy", this.orderBy); - } - if (this.searchTerms != null && !this.searchTerms.isEmpty()) { - result = result.queryParam("oslc.searchTerms", this.searchTerms); - } - if (this.prefix != null && !this.prefix.isEmpty()) { - result = result.queryParam("oslc.prefix", this.prefix); - } - if (this.configurationContext != null && !this.configurationContext.isEmpty()) { - result = result.queryParam("oslc_config.context", this.configurationContext); - } - return result; - } - - /** - * @return the number of entries to return for each page, - * if zero, the remote system's (or full query's) default is used - */ - public int getPageSize() { - return pageSize; - } - - /** - * @return the base query capability URL - */ - public String getCapabilityUrl() { - return capabilityUrl; - } - - /** - * @return the complete query URL - */ - public String getQueryUrl() { - if (queryUrl == null) { - queryUrl = queryResource.getUriBuilder().build(new Object[0]).toString(); - } - return queryUrl; - } - - public OslcQueryResult submit() { - return new OslcQueryResult(this, getResponse()); - } - - Response getResponse() { - return queryResource.request(OSLCConstants.CT_RDF) - .header(OSLCConstants.OSLC_CORE_VERSION, version) - .get(); - } + private final OslcClient oslcClient; + + private final String capabilityUrl; + + private String queryUrl; + + private final int pageSize; + + private WebTarget queryResource; + + // query parameters + private final String where; + private final String select; + private final String orderBy; + private final String searchTerms; + private final String prefix; + private final String version; + private final String configurationContext; + private final Map additionalHeaders; + + /** + * Create an OSLC query that uses the remote system's default page size. + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl the URL that is the base + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl) { + this(oslcClient, capabilityUrl, 0); + } + + /** + * Create an OSLC query with query parameters that uses the default page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl capabilityUrl the URL that is the base + * @param oslcQueryParams an OslcQueryParameters object + * @see OslcQueryParameters + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, + final OslcQueryParameters oslcQueryParams) { + this(oslcClient, capabilityUrl, 0, oslcQueryParams); + } + + /** + * Create an OSLC query with query parameters that uses the default page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl capabilityUrl the URL that is the base + * @param oslcQueryParams an OslcQueryParameters object + * @param additionalHeaders additional request headers sent with the query + * @see OslcQueryParameters + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, final OslcQueryParameters oslcQueryParams, + final Map additionalHeaders) { + this(oslcClient, capabilityUrl, 0, oslcQueryParams, additionalHeaders); + } + + /** + * Create an OSLC query that uses the given page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl the URL that is the base + * @param pageSize the number of results to include on each page (OslcQueryResult) + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, final int pageSize) { + this(oslcClient, capabilityUrl, pageSize, null); + } + + /** + * Create an OSLC query that uses OSLC query parameters and the given page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl the URL that is the base + * @param pageSize the number of results to include on each page (OslcQueryResult) + * @param oslcQueryParams an OslcQueryParameters object (see {@link OslcQueryParameters}) + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, final int pageSize, + final OslcQueryParameters oslcQueryParams) { + this(oslcClient, capabilityUrl, pageSize, oslcQueryParams, OSLCConstants.OSLC2_0); + } + + /** + * Create an OSLC query that uses OSLC query parameters and the given page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl the URL that is the base + * @param pageSize the number of results to include on each page (OslcQueryResult) + * @param oslcQueryParams an OslcQueryParameters object (see {@link OslcQueryParameters}) + * @param additionalHeaders additional request headers sent with the query + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, final int pageSize, + final OslcQueryParameters oslcQueryParams, final Map additionalHeaders) { + this(oslcClient, capabilityUrl, pageSize, oslcQueryParams, OSLCConstants.OSLC2_0, additionalHeaders); + } + + /** + * Create an OSLC query that uses OSLC query parameters and the given page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl the URL that is the base + * @param pageSize the number of results to include on each page (OslcQueryResult) + * @param oslcQueryParams an OslcQueryParameters object (see {@link OslcQueryParameters}) + * @param version OSLC Version (see {@link OSLCConstants}) + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, final int pageSize, + final OslcQueryParameters oslcQueryParams, final String version) { + this(oslcClient, capabilityUrl, pageSize, oslcQueryParams, version, Collections.emptyMap()); + } + + /** + * Create an OSLC query that uses OSLC query parameters and the given page size + * + * @param oslcClient the authenticated OSLC client + * @param capabilityUrl the URL that is the base + * @param pageSize the number of results to include on each page (OslcQueryResult) + * @param oslcQueryParams an OslcQueryParameters object (see {@link OslcQueryParameters}) + * @param version OSLC Version (see {@link OSLCConstants}) + * @param additionalHeaders additional request headers sent with the query + */ + public OslcQuery(final OslcClient oslcClient, final String capabilityUrl, final int pageSize, + final OslcQueryParameters oslcQueryParams, final String version, + final Map additionalHeaders) { + this.oslcClient = oslcClient; + this.capabilityUrl = capabilityUrl; + this.pageSize = (pageSize < 1) ? 0 : pageSize; + + // make a local copy of any query parameters + if (oslcQueryParams != null) { + this.where = oslcQueryParams.getWhere(); + this.select = oslcQueryParams.getSelect(); + this.orderBy = oslcQueryParams.getOrderBy(); + this.searchTerms = oslcQueryParams.getSearchTerms(); + this.prefix = oslcQueryParams.getPrefix(); + this.configurationContext = oslcQueryParams.getConfigurationContext(); + } else { + this.where = this.select = this.orderBy = this.searchTerms = this.prefix = this.configurationContext = null; + } + this.queryResource = createQueryResource(this.getCapabilityUrl()); + this.queryUrl = this.getQueryUrl(); + + this.version = version; + this.additionalHeaders = additionalHeaders; + } + + OslcQuery(final OslcQueryResult previousResult) { + this(previousResult.getQuery(), previousResult.getNextPageUrl()); + } + + private OslcQuery(final OslcQuery previousQuery, final String nextPageUrl) { + this(previousQuery.oslcClient, previousQuery.capabilityUrl, previousQuery.pageSize); + this.queryUrl = nextPageUrl; + this.queryResource = createQueryResource(nextPageUrl); + } + + private WebTarget createQueryResource(final String capabilityUri) { + WebTarget resource = oslcClient.getWebResource(capabilityUri); + resource = applyPagination(resource); + resource = applyOslcQueryParams(resource); + return resource; + } + + private WebTarget applyPagination(final WebTarget resource) { + WebTarget result = resource; + if (pageSize > 0) { + result = result.queryParam("oslc.paging", "true"); + result = result.queryParam("oslc.pageSize", pageSize); + } + return result; + } + + private WebTarget applyOslcQueryParams(final WebTarget resource) { + WebTarget result = resource; + if (this.where != null && !this.where.isEmpty()) { + result = result.queryParam("oslc.where", this.where); + } + if (this.select != null && !this.select.isEmpty()) { + result = result.queryParam("oslc.select", this.select); + } + if (this.orderBy != null && !this.orderBy.isEmpty()) { + result = result.queryParam("oslc.orderBy", this.orderBy); + } + if (this.searchTerms != null && !this.searchTerms.isEmpty()) { + result = result.queryParam("oslc.searchTerms", this.searchTerms); + } + if (this.prefix != null && !this.prefix.isEmpty()) { + result = result.queryParam("oslc.prefix", this.prefix); + } + if (this.configurationContext != null && !this.configurationContext.isEmpty()) { + result = result.queryParam("oslc_config.context", this.configurationContext); + } + return result; + } + + /** + * @return the number of entries to return for each page, if zero, the remote system's (or full query's) default is + * used + */ + public int getPageSize() { + return pageSize; + } + + /** + * @return the base query capability URL + */ + public String getCapabilityUrl() { + return capabilityUrl; + } + + /** + * @return the complete query URL + */ + public String getQueryUrl() { + if (queryUrl == null) { + queryUrl = queryResource.getUriBuilder().build(new Object[0]).toString(); + } + return queryUrl; + } + + public OslcQueryResult submit() { + return new OslcQueryResult(this, getResponse()); + } + + Response getResponse() { + Builder builder = queryResource.request(OSLCConstants.CT_RDF).header(OSLCConstants.OSLC_CORE_VERSION, version); + if (additionalHeaders != null) { + additionalHeaders.entrySet().forEach(header -> builder.header(header.getKey(), header.getValue())); + } + return builder.get(); + } + + Map getAdditionalHeaders() { + return additionalHeaders; + } } diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQueryResult.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQueryResult.java index 70a6f2eb9..5654c10c7 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQueryResult.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/query/OslcQueryResult.java @@ -21,14 +21,6 @@ import javax.xml.datatype.DatatypeConfigurationException; -import javax.ws.rs.core.Response; - -import org.eclipse.lyo.client.OSLCConstants; -import org.eclipse.lyo.oslc4j.core.exception.LyoModelException; -import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; -import org.eclipse.lyo.oslc4j.core.model.OslcConstants; -import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; - import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Property; @@ -40,6 +32,13 @@ import org.apache.jena.rdf.model.Statement; import org.apache.jena.rdf.model.StmtIterator; import org.apache.jena.vocabulary.RDFS; +import org.eclipse.lyo.client.OSLCConstants; +import org.eclipse.lyo.oslc4j.core.exception.LyoModelException; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; + +import jakarta.ws.rs.core.Response; /** diff --git a/client/oslc-client/src/main/java/org/eclipse/lyo/client/resources/RmUtil.java b/client/oslc-client/src/main/java/org/eclipse/lyo/client/resources/RmUtil.java index e731ef8b0..44682a82c 100644 --- a/client/oslc-client/src/main/java/org/eclipse/lyo/client/resources/RmUtil.java +++ b/client/oslc-client/src/main/java/org/eclipse/lyo/client/resources/RmUtil.java @@ -13,19 +13,20 @@ */ package org.eclipse.lyo.client.resources; -import net.oauth.OAuthException; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import org.eclipse.lyo.client.OSLCConstants; import org.eclipse.lyo.client.OslcClient; import org.eclipse.lyo.client.exception.ResourceNotFoundException; -import org.eclipse.lyo.client.OSLCConstants; import org.eclipse.lyo.oslc4j.core.model.CreationFactory; import org.eclipse.lyo.oslc4j.core.model.ResourceShape; import org.eclipse.lyo.oslc4j.core.model.Service; import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; -import javax.ws.rs.core.Response; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; +import jakarta.ws.rs.core.Response; +import net.oauth.OAuthException; @Deprecated public final class RmUtil { diff --git a/client/oslc-client/src/test/java/org/eclipse/lyo/client/query/OslcQueryTest.java b/client/oslc-client/src/test/java/org/eclipse/lyo/client/query/OslcQueryTest.java new file mode 100644 index 000000000..1e15637eb --- /dev/null +++ b/client/oslc-client/src/test/java/org/eclipse/lyo/client/query/OslcQueryTest.java @@ -0,0 +1,36 @@ +package org.eclipse.lyo.client.query; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.Collections; +import java.util.Map; + +import org.eclipse.lyo.client.OslcClient; +import org.junit.Test; + +public class OslcQueryTest { + + private static final String CAPABILITY_URL = "http://lyo.query.capability.url"; + OslcClient client = new OslcClient(); + + @Test + public void testConstructors_default() { + OslcQuery query = new OslcQuery(client, CAPABILITY_URL); + + assertEquals(CAPABILITY_URL, query.getCapabilityUrl()); + assertEquals(0, query.getPageSize()); + assertEquals(CAPABILITY_URL, query.getQueryUrl()); + assertEquals(Collections.emptyMap(), query.getAdditionalHeaders()); + } + + @Test + public void testConstructors_additionalHeaders() { + OslcQuery query = new OslcQuery(client, CAPABILITY_URL, null, Map.of("key", "value")); + + assertEquals(CAPABILITY_URL, query.getCapabilityUrl()); + assertEquals(0, query.getPageSize()); + assertEquals(CAPABILITY_URL, query.getQueryUrl()); + assertEquals(Map.of("key", "value"), query.getAdditionalHeaders()); + } + +} diff --git a/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcClientTest.java b/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcClientTest.java index cc000c867..25729d7a4 100644 --- a/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcClientTest.java +++ b/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcClientTest.java @@ -20,8 +20,6 @@ import java.io.IOException; import java.net.URISyntaxException; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status.Family; import javax.xml.namespace.QName; import org.eclipse.lyo.client.OSLCConstants; @@ -29,6 +27,9 @@ import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; import org.junit.jupiter.api.Test; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status.Family; + public class OslcClientTest { /* * Tests that the RDF/XML MessageBodyWriter doesn't go into an infinite loop when diff --git a/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcQueryResultTest.java b/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcQueryResultTest.java index 717a8b12f..3add622b6 100644 --- a/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcQueryResultTest.java +++ b/client/oslc-client/src/test/java/org/eclipse/lyo/client/test/OslcQueryResultTest.java @@ -18,9 +18,6 @@ import java.io.InputStream; - -import javax.ws.rs.core.Response; - import org.eclipse.lyo.client.OslcClient; import org.eclipse.lyo.client.query.OslcQuery; import org.eclipse.lyo.client.query.OslcQueryParameters; @@ -29,6 +26,8 @@ import org.junit.Test; import org.mockito.Mockito; +import jakarta.ws.rs.core.Response; + /** * @author Samuel Padgett */ diff --git a/client/oslc-java-client-resources/pom.xml b/client/oslc-java-client-resources/pom.xml index 104065f1e..a976ef321 100644 --- a/client/oslc-java-client-resources/pom.xml +++ b/client/oslc-java-client-resources/pom.xml @@ -6,11 +6,11 @@ org.eclipse.lyo.clients clients-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT oslc-java-client-resources - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT Lyo :: Client :: Resources (legacy) diff --git a/client/pom.xml b/client/pom.xml index c9e8fa16e..a3d2add5d 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -6,13 +6,13 @@ org.eclipse.lyo.clients clients-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT pom Lyo :: Client :: _Parent org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml diff --git a/core/lyo-core-model/pom.xml b/core/lyo-core-model/pom.xml index 6f95f3530..683cdb1c4 100644 --- a/core/lyo-core-model/pom.xml +++ b/core/lyo-core-model/pom.xml @@ -6,7 +6,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml Lyo :: Core :: OSLC Core model diff --git a/core/lyo-core-settings/pom.xml b/core/lyo-core-settings/pom.xml index 102471adb..ad9dc12a3 100644 --- a/core/lyo-core-settings/pom.xml +++ b/core/lyo-core-settings/pom.xml @@ -1,11 +1,11 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> oslc4j-core-build org.eclipse.lyo.oslc4j.core - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build 4.0.0 @@ -17,15 +17,12 @@ - - javax.servlet - javax.servlet-api - provided + jakarta.servlet + jakarta.servlet-api jakarta.ws.rs jakarta.ws.rs-api - provided org.apache.jena @@ -33,8 +30,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents diff --git a/core/lyo-core-settings/src/main/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtils.java b/core/lyo-core-settings/src/main/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtils.java index 239a841b8..81e4784e8 100644 --- a/core/lyo-core-settings/src/main/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtils.java +++ b/core/lyo-core-settings/src/main/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtils.java @@ -27,8 +27,7 @@ import java.util.Calendar; import java.util.HashSet; import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.UriBuilder; + import javax.xml.XMLConstants; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; @@ -51,6 +50,9 @@ import org.slf4j.LoggerFactory; import org.xml.sax.SAXException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.UriBuilder; + // TODO: Lyo6 extract to LyoServletUriUtils public class OSLC4JUtils { diff --git a/core/lyo-core-settings/src/test/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtilsTest.java b/core/lyo-core-settings/src/test/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtilsTest.java index 27027a469..19d0f8811 100644 --- a/core/lyo-core-settings/src/test/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtilsTest.java +++ b/core/lyo-core-settings/src/test/java/org/eclipse/lyo/oslc4j/core/OSLC4JUtilsTest.java @@ -13,16 +13,19 @@ */ package org.eclipse.lyo.oslc4j.core; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import java.net.MalformedURLException; import java.util.List; -import javax.servlet.http.HttpServletRequest; -import static org.junit.Assert.*; import org.apache.commons.lang3.tuple.Pair; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; -import static org.mockito.Mockito.when; + +import jakarta.servlet.http.HttpServletRequest; public class OSLC4JUtilsTest { diff --git a/core/oslc-query/pom.xml b/core/oslc-query/pom.xml index 26d551cdf..d5b0d910e 100644 --- a/core/oslc-query/pom.xml +++ b/core/oslc-query/pom.xml @@ -4,7 +4,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml @@ -58,7 +58,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.4.0 + 3.6.0 generate-sources diff --git a/core/oslc-trs/pom.xml b/core/oslc-trs/pom.xml index e40ec4c13..084c99c89 100644 --- a/core/oslc-trs/pom.xml +++ b/core/oslc-trs/pom.xml @@ -5,7 +5,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml @@ -29,8 +29,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents diff --git a/core/oslc4j-core-build/pom.xml b/core/oslc4j-core-build/pom.xml index 8741150dd..604f23376 100644 --- a/core/oslc4j-core-build/pom.xml +++ b/core/oslc4j-core-build/pom.xml @@ -8,7 +8,7 @@ org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../../pom.xml diff --git a/core/oslc4j-core-wink/pom.xml b/core/oslc4j-core-wink/pom.xml index 089f25bcb..e9ca31a69 100644 --- a/core/oslc4j-core-wink/pom.xml +++ b/core/oslc4j-core-wink/pom.xml @@ -6,7 +6,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml oslc4j-core-wink diff --git a/core/oslc4j-core-wink/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/JsonHelper.java b/core/oslc4j-core-wink/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/JsonHelper.java index 8c93718c9..cdee7a04b 100644 --- a/core/oslc4j-core-wink/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/JsonHelper.java +++ b/core/oslc4j-core-wink/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/JsonHelper.java @@ -44,7 +44,6 @@ import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; -import java.util.logging.Logger; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; @@ -82,6 +81,8 @@ import org.eclipse.lyo.oslc4j.core.model.ResponseInfo; import org.eclipse.lyo.oslc4j.core.model.TypeFactory; import org.eclipse.lyo.oslc4j.core.model.XMLLiteral; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Use JSON-LD support in Jena provider. @@ -141,7 +142,7 @@ public final class JsonHelper */ public static final String OSLC4J_READ_SPECIAL_NUMS = "org.eclipse.lyo.oslc4j.readSpecialNumberValues"; - private static final Logger logger = Logger.getLogger(JsonHelper.class.getName()); + private static final Logger logger = LoggerFactory.getLogger(JsonHelper.class.getName()); private JsonHelper() { @@ -936,7 +937,7 @@ else if (properties instanceof NestedWildcardProperties) if (value == null && ! onlyNested) { - logger.warning("Could not add extended property " + extendedProperty.getKey() + " for resource " + extendedResource.getAbout()); + logger.warn("Could not add extended property " + extendedProperty.getKey() + " for resource " + extendedResource.getAbout()); } else { @@ -1615,7 +1616,7 @@ else if (bean instanceof IReifiedResource) { if (!JSON_PROPERTY_PREFIXES.equals(prefixedName)) { - logger.warning("Ignored JSON property '" + + logger.warn("Ignored JSON property '" + prefixedName + "'."); } @@ -1656,7 +1657,7 @@ else if (RDF_TYPE_URI.equals(propertyDefinition)) { if (extendedProperties == null) { - logger.fine("Set method not found for object type: " + + logger.debug("Set method not found for object type: " + beanClass.getName() + ", propertyDefinition: " + propertyDefinition); @@ -1717,9 +1718,15 @@ else if (Collection.class.isAssignableFrom(setMethodComponentParameterClass)) if (parameter != null) { - setMethod.invoke(bean, - new Object[] {parameter}); - } + try { + setMethod.invoke(bean, + new Object[] {parameter}); + } catch (IllegalAccessException | IllegalArgumentException | + InvocationTargetException e) { + logger.warn("Failed to set property {}='{}' via '{}'", prefixedName, parameter, setMethod.getName()); + throw e; + } + } } } } @@ -2146,7 +2153,7 @@ else if (jsonValue == null) { if (readSpecialNumberValues()) { - logger.warning("Null double value treated as NaN."); + logger.warn("Null double value treated as NaN."); return Double.NaN; } else @@ -2160,7 +2167,7 @@ else if (jsonValue == null) { if (readSpecialNumberValues()) { - logger.warning("Null float value treated as NaN."); + logger.warn("Null float value treated as NaN."); return Float.NaN; } else diff --git a/core/oslc4j-core/pom.xml b/core/oslc4j-core/pom.xml index 00fd9e36e..60f349729 100644 --- a/core/oslc4j-core/pom.xml +++ b/core/oslc4j-core/pom.xml @@ -4,7 +4,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml oslc4j-core @@ -27,7 +27,7 @@ io.github.classgraph classgraph - 4.8.164 + 4.8.177 jakarta.ws.rs @@ -40,8 +40,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents diff --git a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/OslcGlobalNamespaceProvider.java b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/OslcGlobalNamespaceProvider.java index af73f56ce..1d3f38a70 100644 --- a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/OslcGlobalNamespaceProvider.java +++ b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/OslcGlobalNamespaceProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Contributors to the Eclipse Foundation + * Copyright (c) 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -24,76 +24,65 @@ * over any other namespace mappings definition, which means * that in case of conflict the {@link OslcSchema} will * override the prefix. - * + *

* This class is a singleton instance, that can be obtained * calling {@link #getInstance()}, since it works with * any request even if there are no annotation mapping. * * @author Daniel Figueiredo Caetano - * */ public class OslcGlobalNamespaceProvider { - private static OslcGlobalNamespaceProvider instance; + private static OslcGlobalNamespaceProvider instance; - private Map prefixDefinitionMap; + private Map prefixDefinitionMap; - /** - * Private construct for singleton pattern. - */ - private OslcGlobalNamespaceProvider() - { - this.prefixDefinitionMap = new HashMap<>(); - } + /** + * Private construct for singleton pattern. + */ + private OslcGlobalNamespaceProvider() { + this.prefixDefinitionMap = new HashMap<>(); + } - /** - * Gets the unique instance of this class. - * @return singleton class instance. - */ - public static OslcGlobalNamespaceProvider getInstance() - { - if(null == instance) { - synchronized (OslcGlobalNamespaceProvider.class) { - if(null == instance) { - instance = new OslcGlobalNamespaceProvider(); - } - } - } - return instance; - } + /** + * Gets the unique instance of this class. + * + * @return singleton class instance. + */ + public static synchronized OslcGlobalNamespaceProvider getInstance() { + if (null == instance) { + instance = new OslcGlobalNamespaceProvider(); + } + return instance; + } - /** - * Gets the Global namespace mappings, these mappings are - * applied to all operations, even without the annotation - * mappings. - * - * key - prefix - * value - namespace - * - * @return empty hash map instance if there are no global - * namespace mappings. - */ - public Map getPrefixDefinitionMap() - { - return prefixDefinitionMap; - } + /** + * Gets the Global namespace mappings, these mappings are + * applied to all operations, even without the annotation + * mappings. + *

+ * key - prefix + * value - namespace + * + * @return empty hash map instance if there are no global + * namespace mappings. + */ + public Map getPrefixDefinitionMap() { + return prefixDefinitionMap; + } - /** - * Sets the global prefix definition map with the given map. - * Note that this operation overrides the current map. - * - * @param prefixDefinitionMap that will replace the current. - */ - public void setPrefixDefinitionMap(Map prefixDefinitionMap) - { - if(null == prefixDefinitionMap) - { - this.prefixDefinitionMap.clear(); - } - else - { - this.prefixDefinitionMap = prefixDefinitionMap; - } - } + /** + * Sets the global prefix definition map with the given map. + * Note that this operation overrides the current map. + * + * @param prefixDefinitionMap that will replace the current. + */ + public void setPrefixDefinitionMap(Map prefixDefinitionMap) { + if (null == prefixDefinitionMap) { + this.prefixDefinitionMap.clear(); + } else { + this.prefixDefinitionMap = prefixDefinitionMap; + } + } } diff --git a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/OslcMediaType.java b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/OslcMediaType.java index 23d4a19fc..1faa62ecd 100644 --- a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/OslcMediaType.java +++ b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/OslcMediaType.java @@ -13,7 +13,7 @@ */ package org.eclipse.lyo.oslc4j.core.model; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; public interface OslcMediaType { diff --git a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ResourceShapeFactory.java b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ResourceShapeFactory.java index 26ef6ce61..6b2cc2689 100644 --- a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ResourceShapeFactory.java +++ b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ResourceShapeFactory.java @@ -30,10 +30,25 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import javax.ws.rs.core.UriBuilder; import org.eclipse.lyo.oslc4j.core.CoreHelper; -import org.eclipse.lyo.oslc4j.core.annotation.*; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValues; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDefaultValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcHidden; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMaxSize; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; import org.eclipse.lyo.oslc4j.core.exception.OslcCoreDuplicatePropertyDefinitionException; import org.eclipse.lyo.oslc4j.core.exception.OslcCoreInvalidOccursException; @@ -46,6 +61,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.core.UriBuilder; + public class ResourceShapeFactory { private final static Logger log = LoggerFactory.getLogger(ResourceShapeFactory.class); diff --git a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactory.java b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactory.java index 6c22c57b5..86735020b 100644 --- a/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactory.java +++ b/core/oslc4j-core/src/main/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactory.java @@ -20,10 +20,7 @@ import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.core.UriBuilder; + import org.eclipse.lyo.oslc4j.core.annotation.OslcCreationFactory; import org.eclipse.lyo.oslc4j.core.annotation.OslcDialog; import org.eclipse.lyo.oslc4j.core.annotation.OslcDialogs; @@ -34,6 +31,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.UriBuilder; + public final class ServiceProviderFactory { private final static Logger log = LoggerFactory.getLogger(ServiceProviderFactory.class); diff --git a/core/oslc4j-core/src/test/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactoryTest.java b/core/oslc4j-core/src/test/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactoryTest.java index b5f3976ee..1448fea83 100644 --- a/core/oslc4j-core/src/test/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactoryTest.java +++ b/core/oslc4j-core/src/test/java/org/eclipse/lyo/oslc4j/core/model/ServiceProviderFactoryTest.java @@ -1,12 +1,15 @@ package org.eclipse.lyo.oslc4j.core.model; +import static org.junit.Assert.assertEquals; + import java.util.HashMap; -import javax.ws.rs.Path; + import org.eclipse.lyo.oslc4j.core.annotation.OslcCreationFactory; -import static org.junit.Assert.*; import org.junit.Test; import org.mockito.Mockito; +import jakarta.ws.rs.Path; + /** * Unit test for verifying {@link ServiceProviderFactory} URI-related code. * @author Andrew Berezovskyi (andriib@kth.se) diff --git a/core/oslc4j-jena-provider/pom.xml b/core/oslc4j-jena-provider/pom.xml index f2e8d6019..b293b3957 100644 --- a/core/oslc4j-jena-provider/pom.xml +++ b/core/oslc4j-jena-provider/pom.xml @@ -1,18 +1,17 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml oslc4j-jena-provider Lyo :: Core :: Jena Provider - JAX-RS provider for reading and writing RDF content using the Eclipse Lyo OSLC4J - SDK. - + JAX-RS provider for reading and writing RDF content using the + Eclipse Lyo OSLC4J SDK. @@ -24,56 +23,52 @@ - javax.servlet - javax.servlet-api - provided + jakarta.servlet + jakarta.servlet-api jakarta.ws.rs jakarta.ws.rs-api - provided - - - - org.slf4j - slf4j-api - - - org.apache.jena - apache-jena-libs - pom - - - javax.annotation - javax.annotation-api - - - org.apache.httpcomponents - httpclient - - - - - org.apache.httpcomponents - httpclient - - - commons-logging - commons-logging - - - - - org.slf4j - jcl-over-slf4j - - - jakarta.annotation - jakarta.annotation-api + + org.slf4j + slf4j-api + + + org.apache.jena + apache-jena-libs + pom + + + javax.annotation + javax.annotation-api + + + org.apache.httpcomponents + httpclient + + + + + org.apache.httpcomponents + httpclient + + + commons-logging + commons-logging + + + + + org.slf4j + jcl-over-slf4j + + + jakarta.annotation + jakarta.annotation-api + - @@ -135,21 +130,12 @@ jersey-test-framework-provider-grizzly2 ${v.jersey} test - - - - - javax.servlet - javax.servlet-api - - com.google.guava guava test - diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/AbstractOslcRdfXmlProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/AbstractOslcRdfXmlProvider.java index 41828901a..2b3418227 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/AbstractOslcRdfXmlProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/AbstractOslcRdfXmlProvider.java @@ -22,15 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.ResponseBuilder; -import javax.ws.rs.ext.Providers; + import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.RDFReaderI; @@ -49,6 +41,16 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.ResponseBuilder; +import jakarta.ws.rs.ext.Providers; + /** * @author Russell Boykin, Alberto Giammaria, Chris Peters, Gianluca Bernardini, Andrew Berezovskyi */ diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcCompactRdfProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcCompactRdfProvider.java index e4bc29fce..d62767f8b 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcCompactRdfProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcCompactRdfProvider.java @@ -19,18 +19,18 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.Compact; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * @author Russell Boykin, Alberto Giammaria, Chris Peters, Gianluca Bernardini */ diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdArrayProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdArrayProvider.java index 3918f4a5a..0deaf9488 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdArrayProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdArrayProvider.java @@ -13,11 +13,12 @@ */ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + /** * @author Andrew Berezovskyi * @since 2.4.0 diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdCollectionProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdCollectionProvider.java index e59a5465d..0f86e04d6 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdCollectionProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdCollectionProvider.java @@ -13,11 +13,12 @@ */ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + /** * @author Andrew Berezovskyi * @since 2.4.0 diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdProvider.java index 7b511a74c..909007137 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcJsonLdProvider.java @@ -13,11 +13,12 @@ */ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + /** * @author Andrew Berezovskyi * @since 2.4.0 diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlArrayProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlArrayProvider.java index ab36e9525..711d6848b 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlArrayProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlArrayProvider.java @@ -19,17 +19,17 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * @author Russell Boykin, Alberto Giammaria, Chris Peters, Gianluca Bernardini, Andrew Berezovskyi */ diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlCollectionProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlCollectionProvider.java index f1d63ff54..25a677b97 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlCollectionProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlCollectionProvider.java @@ -37,20 +37,20 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.CoreHelper; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * * @author Russell Boykin, Alberto Giammaria, Chris Peters, Gianluca Bernardini, Andrew Berezovskyi diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java index 768a27c83..a62973a12 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcRdfXmlProvider.java @@ -25,15 +25,6 @@ import java.util.Collection; import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.CoreHelper; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc4j.core.model.FilteredResource; @@ -44,6 +35,15 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * @author Russell Boykin, Alberto Giammaria, Chris Peters, Gianluca Bernardini, Steve Pitschke */ diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlArrayProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlArrayProvider.java index 48911f20f..163386b80 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlArrayProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlArrayProvider.java @@ -18,15 +18,15 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.APPLICATION_RDF_XML}) @Consumes({OslcMediaType.APPLICATION_RDF_XML}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlCollectionProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlCollectionProvider.java index 62896d84d..a9d791070 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlCollectionProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleRdfXmlCollectionProvider.java @@ -19,15 +19,15 @@ import java.lang.reflect.Type; import java.util.Collection; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.Provider; + /** * @author Russell Boykin, Alberto Giammaria, Chris Peters, Gianluca Bernardini, Andrew Berezovskyi */ diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlArrayProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlArrayProvider.java index c04ec95ab..594a95db3 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlArrayProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlArrayProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) @Consumes({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlCollectionProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlCollectionProvider.java index 06d7e8df7..566f009a7 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlCollectionProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcSimpleXmlCollectionProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) @Consumes({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleArrayProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleArrayProvider.java index 474640c6c..5ee8257a2 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleArrayProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleArrayProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.TEXT_TURTLE}) @Consumes({OslcMediaType.TEXT_TURTLE}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleCollectionProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleCollectionProvider.java index 582d7e455..24bc54fd3 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleCollectionProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleCollectionProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.TEXT_TURTLE}) @Consumes({OslcMediaType.TEXT_TURTLE}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleProvider.java index c46158040..79341da23 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcTurtleProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.TEXT_TURTLE}) @Consumes({OslcMediaType.TEXT_TURTLE}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlArrayProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlArrayProvider.java index 4848a89ee..0cb023a3c 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlArrayProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlArrayProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) @Consumes({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlCollectionProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlCollectionProvider.java index 48fbe2fd4..ba78f52c9 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlCollectionProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlCollectionProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) @Consumes({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) diff --git a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlProvider.java b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlProvider.java index fad0687b7..bde97af8c 100644 --- a/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlProvider.java +++ b/core/oslc4j-jena-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/jena/OslcXmlProvider.java @@ -14,12 +14,12 @@ package org.eclipse.lyo.oslc4j.provider.jena; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; - -import javax.ws.rs.ext.Provider; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; + @Provider @Produces({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) @Consumes({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/ProviderCollectionResource.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/ProviderCollectionResource.java index 184564bef..223422213 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/ProviderCollectionResource.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/ProviderCollectionResource.java @@ -1,5 +1,11 @@ package org.eclipse.lyo.oslc4j.provider.jena; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + import org.eclipse.lyo.oslc4j.core.OSLC4JConstants; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc4j.core.annotation.OslcQueryCapability; @@ -7,26 +13,21 @@ import org.eclipse.lyo.oslc4j.provider.jena.test.resources.TestResource; import org.eclipse.lyo.oslc4j.provider.jena.test.resources.TestResourceNonQ; -import javax.servlet.ServletConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; -import javax.ws.rs.core.UriInfo; -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriBuilder; +import jakarta.ws.rs.core.UriInfo; @Path("/test") public class ProviderCollectionResource { diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/RdfJenaProviderCollectionTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/RdfJenaProviderCollectionTest.java index 3e1ef5eef..7cda5778d 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/RdfJenaProviderCollectionTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/RdfJenaProviderCollectionTest.java @@ -1,5 +1,15 @@ package org.eclipse.lyo.oslc4j.provider.jena; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assumptions.assumeFalse; +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +import java.io.InputStream; +import java.lang.reflect.Array; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.Resource; @@ -28,17 +38,8 @@ import org.junit.jupiter.params.provider.ArgumentsProvider; import org.junit.jupiter.params.provider.ArgumentsSource; -import javax.ws.rs.core.GenericType; -import javax.ws.rs.core.Response; -import java.io.InputStream; -import java.lang.reflect.Array; -import java.util.List; -import java.util.Set; -import java.util.stream.Stream; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assumptions.assumeFalse; -import static org.junit.jupiter.api.Assumptions.assumeTrue; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; public class RdfJenaProviderCollectionTest extends JerseyTest { diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/shapefactory/resources/ILocalShape.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/shapefactory/resources/ILocalShape.java index 0b19c8427..368f73c61 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/shapefactory/resources/ILocalShape.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/shapefactory/resources/ILocalShape.java @@ -17,41 +17,15 @@ package org.eclipse.lyo.oslc4j.provider.jena.shapefactory.resources; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.text.SimpleDateFormat; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; -import java.util.Iterator; - -import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; -import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; -import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; import org.eclipse.lyo.oslc4j.core.annotation.OslcName; import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; -import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; -import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; -import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; -import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; -import org.eclipse.lyo.oslc4j.core.model.Link; import org.eclipse.lyo.oslc4j.core.model.Occurs; -import org.eclipse.lyo.oslc4j.core.model.OslcConstants; -import org.eclipse.lyo.oslc4j.core.model.Representation; import org.eclipse.lyo.oslc4j.core.model.ValueType; -import org.eclipse.lyo.oslc4j.provider.jena.shapefactory.resources.Oslc_sdDomainConstants; // Start of user code imports diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/JsonLdTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/JsonLdTest.java index a5aa33a97..814ab0769 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/JsonLdTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/JsonLdTest.java @@ -13,14 +13,15 @@ */ package org.eclipse.lyo.oslc4j.provider.jena.test; -import com.github.jsonldjava.utils.Obj; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.util.ArrayList; import java.util.Collection; -import javax.ws.rs.core.MultivaluedHashMap; -import com.google.common.collect.ImmutableList; +import org.apache.jena.ext.com.google.common.collect.ImmutableList; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; import org.eclipse.lyo.oslc4j.provider.jena.OslcJsonLdArrayProvider; @@ -29,7 +30,7 @@ import org.junit.Ignore; import org.junit.Test; -import static org.junit.Assert.*; +import jakarta.ws.rs.core.MultivaluedHashMap; /** * Created on 2018-03-03 diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/RdfXmlAbbreviatedWriterTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/RdfXmlAbbreviatedWriterTest.java index f5ccf2166..fb472a891 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/RdfXmlAbbreviatedWriterTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/RdfXmlAbbreviatedWriterTest.java @@ -13,6 +13,9 @@ */ package org.eclipse.lyo.oslc4j.provider.jena.test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -25,9 +28,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; + import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.eclipse.lyo.oslc4j.core.model.QueryCapability; @@ -41,7 +42,9 @@ import org.eclipse.lyo.oslc4j.provider.jena.RdfXmlAbbreviatedWriter; import org.junit.Test; -import static org.junit.Assert.*; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; public class RdfXmlAbbreviatedWriterTest { @Test diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ReifiedLinksTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ReifiedLinksTest.java index 3aa254768..f0e5d0c77 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ReifiedLinksTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ReifiedLinksTest.java @@ -13,19 +13,22 @@ */ package org.eclipse.lyo.oslc4j.provider.jena.test; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; + import java.lang.reflect.InvocationTargetException; import java.net.URI; import java.net.URISyntaxException; import java.util.List; + import javax.xml.datatype.DatatypeConfigurationException; + import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ReifiedStatement; -import static org.assertj.core.api.Assertions.assertThat; import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; import org.eclipse.lyo.oslc4j.core.model.Link; import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; import org.eclipse.lyo.oslc4j.provider.jena.test.resources.ResourceWithReifiedLinks; -import static org.junit.Assert.*; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ServiceProviderTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ServiceProviderTest.java index 4c7f83d48..83b48916c 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ServiceProviderTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ServiceProviderTest.java @@ -13,21 +13,22 @@ */ package org.eclipse.lyo.oslc4j.provider.jena.test; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import java.io.InputStream; import java.net.URI; import java.util.Arrays; import java.util.List; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.ModelFactory; import org.eclipse.lyo.oslc4j.core.model.Service; import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; import org.junit.Test; -import org.apache.jena.rdf.model.Model; -import org.apache.jena.rdf.model.ModelFactory; - public class ServiceProviderTest { @Test public void testUsage() throws Exception { diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ShapeTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ShapeTest.java index 2c4896ad1..b28a42c4f 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ShapeTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/ShapeTest.java @@ -25,14 +25,14 @@ import java.util.Collection; import java.util.List; -import javax.ws.rs.core.MediaType; - import org.eclipse.lyo.oslc4j.core.model.AllowedValues; import org.eclipse.lyo.oslc4j.core.model.Property; import org.eclipse.lyo.oslc4j.core.model.ResourceShape; import org.eclipse.lyo.oslc4j.provider.jena.OslcTurtleProvider; import org.junit.Test; +import jakarta.ws.rs.core.MediaType; + public class ShapeTest { @Test public void allowedAndDefaultValuesTest() throws Exception { diff --git a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/TurtleTest.java b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/TurtleTest.java index c34ae7fe2..cb26da82b 100644 --- a/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/TurtleTest.java +++ b/core/oslc4j-jena-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/jena/test/TurtleTest.java @@ -17,12 +17,12 @@ import java.io.InputStream; -import javax.ws.rs.core.MediaType; - import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; import org.eclipse.lyo.oslc4j.provider.jena.OslcTurtleProvider; import org.junit.Test; +import jakarta.ws.rs.core.MediaType; + public class TurtleTest { @Test @SuppressWarnings({ diff --git a/core/oslc4j-json4j-provider/pom.xml b/core/oslc4j-json4j-provider/pom.xml index 9dcccd045..19e74042f 100644 --- a/core/oslc4j-json4j-provider/pom.xml +++ b/core/oslc4j-json4j-provider/pom.xml @@ -1,133 +1,117 @@ - - 4.0.0 - - org.eclipse.lyo.oslc4j.core - oslc4j-core-build - 6.0.0-SNAPSHOT - ../oslc4j-core-build/pom.xml - - oslc4j-json4j-provider - Lyo :: Core :: JSON4J Provider (legacy) - JAX-RS provider for reading and writing OSLC 2.0 JSON content using the Eclipse Lyo OSLC4J SDK. + + 4.0.0 + + org.eclipse.lyo.oslc4j.core + oslc4j-core-build + 7.0.0-SNAPSHOT + ../oslc4j-core-build/pom.xml + + oslc4j-json4j-provider + Lyo :: Core :: JSON4J Provider (legacy) + JAX-RS provider for reading and writing OSLC 2.0 JSON content + using the Eclipse Lyo OSLC4J SDK. - - + + - - - org.eclipse.lyo.oslc4j.core - oslc4j-core-wink - ${v.lyo} - + + + org.eclipse.lyo.oslc4j.core + oslc4j-core-wink + ${v.lyo} + - - org.apache.wink - wink-json4j - 1.4 - - - javax.servlet - javax.servlet-api - provided - - - jakarta.ws.rs - jakarta.ws.rs-api - provided - + + org.apache.wink + wink-json4j + 1.4 + + + jakarta.servlet + jakarta.servlet-api + + + jakarta.ws.rs + jakarta.ws.rs-api + - - - org.junit.jupiter - junit-jupiter-api - test - - + + org.junit.jupiter + junit-jupiter-api + test + + - - org.junit.jupiter - junit-jupiter-engine - test - - - - org.junit.jupiter - junit-jupiter-params - test - - - org.assertj - assertj-core - test - - - org.glassfish.jersey.containers - jersey-container-servlet - test - - - org.glassfish.jersey.inject - jersey-hk2 - test - - - org.glassfish.jersey.core - jersey-server - test - - - org.glassfish.jersey.core - jersey-common - test - + + org.junit.jupiter + junit-jupiter-engine + test + + + + org.junit.jupiter + junit-jupiter-params + test + + + org.assertj + assertj-core + test + + + org.glassfish.jersey.containers + jersey-container-servlet + test + + + org.glassfish.jersey.inject + jersey-hk2 + test + + + org.glassfish.jersey.core + jersey-server + test + + + org.glassfish.jersey.core + jersey-common + test + - - - org.glassfish.jersey.test-framework.providers - jersey-test-framework-provider-grizzly2 - ${v.jersey} - test - - - - - javax.servlet - javax.servlet-api - - - + + + org.glassfish.jersey.test-framework.providers + jersey-test-framework-provider-grizzly2 + ${v.jersey} + test + - - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/AbstractOslcRdfJsonProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/AbstractOslcRdfJsonProvider.java index f964ea2ef..6a86a530c 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/AbstractOslcRdfJsonProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/AbstractOslcRdfJsonProvider.java @@ -21,17 +21,6 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.ResponseBuilder; -import javax.ws.rs.ext.Providers; - import org.apache.wink.json4j.JSONObject; import org.eclipse.lyo.oslc4j.core.OSLC4JConstants; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; @@ -42,6 +31,16 @@ import org.eclipse.lyo.oslc4j.core.model.ResponseInfo; import org.eclipse.lyo.oslc4j.core.model.ResponseInfoArray; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.ResponseBuilder; +import jakarta.ws.rs.ext.Providers; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcCompactJsonProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcCompactJsonProvider.java index 8a1c7e7e7..7401de774 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcCompactJsonProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcCompactJsonProvider.java @@ -19,18 +19,18 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.Compact; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonArrayProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonArrayProvider.java index 560326b6f..bee0743d5 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonArrayProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonArrayProvider.java @@ -19,17 +19,17 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonCollectionProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonCollectionProvider.java index ea3773f43..19ec1d72a 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonCollectionProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonCollectionProvider.java @@ -37,20 +37,20 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.CoreHelper; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonProvider.java index 2012a6609..7c6195dff 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcRdfJsonProvider.java @@ -25,15 +25,6 @@ import java.util.Collection; import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc4j.core.model.FilteredResource; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; @@ -43,6 +34,15 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonArrayProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonArrayProvider.java index e2016ded0..9716957d8 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonArrayProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonArrayProvider.java @@ -18,15 +18,15 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.Provider; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonCollectionProvider.java b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonCollectionProvider.java index 283a7df10..ca4c3e30c 100644 --- a/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonCollectionProvider.java +++ b/core/oslc4j-json4j-provider/src/main/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcSimpleRdfJsonCollectionProvider.java @@ -19,15 +19,15 @@ import java.lang.reflect.Type; import java.util.Collection; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.Provider; - import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.Provider; + /** * Use JSON-LD support in Jena provider. */ diff --git a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcJsonProviderCollectionTest.java b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcJsonProviderCollectionTest.java index c17b5095b..6687233cf 100644 --- a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcJsonProviderCollectionTest.java +++ b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/OslcJsonProviderCollectionTest.java @@ -1,5 +1,16 @@ package org.eclipse.lyo.oslc4j.provider.json4j; +import static org.assertj.core.api.Assertions.assertThat; + +import java.lang.reflect.Array; +import java.lang.reflect.InvocationTargetException; +import java.net.URISyntaxException; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + +import javax.xml.datatype.DatatypeConfigurationException; + import org.apache.wink.json4j.JSONException; import org.apache.wink.json4j.JSONObject; import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; @@ -21,18 +32,9 @@ import org.junit.jupiter.params.provider.ArgumentsProvider; import org.junit.jupiter.params.provider.ArgumentsSource; -import javax.ws.rs.core.GenericType; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.xml.datatype.DatatypeConfigurationException; -import java.lang.reflect.Array; -import java.lang.reflect.InvocationTargetException; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Set; -import java.util.stream.Stream; - -import static org.assertj.core.api.Assertions.*; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; public class OslcJsonProviderCollectionTest extends JerseyTest { diff --git a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/ProviderCollectionResource.java b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/ProviderCollectionResource.java index 03d117a2e..5abbe4ab1 100644 --- a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/ProviderCollectionResource.java +++ b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/ProviderCollectionResource.java @@ -1,37 +1,33 @@ package org.eclipse.lyo.oslc4j.provider.json4j; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + import org.eclipse.lyo.oslc4j.core.OSLC4JConstants; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc4j.core.annotation.OslcQueryCapability; -import org.eclipse.lyo.oslc4j.core.model.OslcConstants; import org.eclipse.lyo.oslc4j.core.model.OslcMediaType; import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.TestResource; import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.TestResourceNonQ; -import org.junit.Test; -import javax.servlet.ServletConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; -import javax.ws.rs.core.UriInfo; -import java.io.IOException; -import java.net.URI; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.IntStream; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriBuilder; +import jakarta.ws.rs.core.UriInfo; @Path("/test") public class ProviderCollectionResource { diff --git a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/JsonOslcNameTest.java b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/JsonOslcNameTest.java index ea84179e9..8f8b4c93f 100644 --- a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/JsonOslcNameTest.java +++ b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/JsonOslcNameTest.java @@ -13,6 +13,10 @@ */ package org.eclipse.lyo.oslc4j.provider.json4j.test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -21,8 +25,6 @@ import java.util.ArrayList; import java.util.List; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; import javax.xml.namespace.QName; import org.apache.wink.json4j.JSONArray; @@ -34,8 +36,10 @@ import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.EmptyNameResource; import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.TestResource; import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.UnnamedResource; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; /** * Tests Json working with different combinations of OslcName annotation. @@ -63,7 +67,7 @@ public void testJenaOslcNameEmptyString() throws Exception { final OslcRdfJsonProvider oslcRdfJsonProvider = new OslcRdfJsonProvider(); JSONObject jsonObject = getJSONObject(resource, oslcRdfJsonProvider); JSONArray rdfTypes = jsonObject.getJSONArray("rdf:type"); - Assert.assertTrue("Model should not contain RDF type as OslcName is empty", rdfTypes.isEmpty()); + assertTrue(rdfTypes.isEmpty(), "Model should not contain RDF type as OslcName is empty"); } private JSONObject getJSONObject(Object resource, final OslcRdfJsonProvider oslcRdfJsonProvider) @@ -90,7 +94,7 @@ public void testJenaOslcNameEmptyStringAndOtherTypes() throws Exception { final OslcRdfJsonProvider oslcRdfJsonProvider = new OslcRdfJsonProvider(); JSONObject jsonObject = getJSONObject(resource, oslcRdfJsonProvider); JSONArray rdfTypes = jsonObject.getJSONArray("rdf:type"); - Assert.assertEquals("Model should contain only added RDF type", rdfTypes.size(), 1); + assertEquals(1, rdfTypes.size(),"Model should contain only added RDF type"); verifyRDFTypes(new String[] { typeToAdd }, rdfTypes); } @@ -105,7 +109,7 @@ public void testJenaRegularOslcName() throws Exception { final OslcRdfJsonProvider oslcRdfJsonProvider = new OslcRdfJsonProvider(); JSONObject jsonObject = getJSONObject(resource, oslcRdfJsonProvider); JSONArray rdfTypes = jsonObject.getJSONArray("rdf:type"); - Assert.assertEquals("Model should contain default RDF type", rdfTypes.size(), 1); + assertEquals(1, rdfTypes.size(),"Model should contain default RDF type"); verifyRDFTypes(new String[] { TestResource.TEST_NAMESPACE + "Test" }, rdfTypes); } @@ -123,7 +127,7 @@ public void testJenaDefaultOslcName() throws Exception { final OslcRdfJsonProvider oslcRdfJsonProvider = new OslcRdfJsonProvider(); JSONObject jsonObject = getJSONObject(resource, oslcRdfJsonProvider); JSONArray rdfTypes = jsonObject.getJSONArray("rdf:type"); - Assert.assertFalse("Model should contain RDF types", rdfTypes.isEmpty()); + assertFalse( rdfTypes.isEmpty(), "Model should contain RDF types"); verifyRDFTypes(new String[] { typeToAdd, TestResource.TEST_NAMESPACE + "UnnamedResource" }, rdfTypes); } @@ -135,8 +139,7 @@ private void verifyRDFTypes(String[] expectedRDFTypes, JSONArray rdfTypes) throw actualRdfTypesList.add(type); } for (String expectedRdfType : expectedRDFTypes) { - Assert.assertTrue("Resource should contain RDF type " + expectedRdfType, - actualRdfTypesList.contains(expectedRdfType)); + assertTrue(actualRdfTypesList.contains(expectedRdfType), "Resource should contain RDF type " + expectedRdfType); } } diff --git a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/TestInvalidTypesJson.java b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/TestInvalidTypesJson.java index ed2e3205e..dedd67c3f 100644 --- a/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/TestInvalidTypesJson.java +++ b/core/oslc4j-json4j-provider/src/test/java/org/eclipse/lyo/oslc4j/provider/json4j/test/TestInvalidTypesJson.java @@ -11,39 +11,35 @@ * * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ + package org.eclipse.lyo.oslc4j.provider.json4j.test; +import static org.junit.jupiter.api.Assertions.assertThrows; + import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; -import javax.ws.rs.WebApplicationException; - import org.eclipse.lyo.oslc4j.provider.json4j.OslcRdfJsonProvider; import org.eclipse.lyo.oslc4j.provider.json4j.test.resources.TestResource; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import jakarta.ws.rs.WebApplicationException; @SuppressWarnings("deprecation") -public class TestInvalidTypesJson -{ - @Test(expected = WebApplicationException.class) - public void testInvalidJavaAboutRelativeURI() - throws IOException, - URISyntaxException - { - final TestResource relativeUri = new TestResource(); - - relativeUri.setAbout(new URI("relative")); - - final OslcRdfJsonProvider oslcRdfJsonProvider = new OslcRdfJsonProvider(); - - oslcRdfJsonProvider.writeTo(relativeUri, - null, - null, - null, - null, - null, - null); - - } +public class TestInvalidTypesJson { + @Test + public void testInvalidJavaAboutRelativeURI() throws IOException, URISyntaxException { + assertThrows(WebApplicationException.class, () -> { + + final TestResource relativeUri = new TestResource(); + + relativeUri.setAbout(new URI("relative")); + + final OslcRdfJsonProvider oslcRdfJsonProvider = new OslcRdfJsonProvider(); + + oslcRdfJsonProvider.writeTo(relativeUri, null, null, null, null, null, null); + }); + + } } diff --git a/core/oslc4j-utils/pom.xml b/core/oslc4j-utils/pom.xml index 2b5b02019..ef2ba97dd 100644 --- a/core/oslc4j-utils/pom.xml +++ b/core/oslc4j-utils/pom.xml @@ -4,7 +4,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml Lyo :: Core :: Utilities @@ -58,11 +58,6 @@ jersey-common test - diff --git a/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/MarshallerConstants.java b/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/MarshallerConstants.java index 9a5b73839..e2b5ab859 100644 --- a/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/MarshallerConstants.java +++ b/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/MarshallerConstants.java @@ -13,7 +13,7 @@ */ package org.eclipse.lyo.core.utils.marshallers; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; public class MarshallerConstants { //Media Types diff --git a/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JMarshaller.java b/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JMarshaller.java index 7874b77eb..24cbe574d 100644 --- a/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JMarshaller.java +++ b/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JMarshaller.java @@ -13,20 +13,23 @@ */ package org.eclipse.lyo.core.utils.marshallers; -import java.io.OutputStream; - -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; +import static org.eclipse.lyo.core.utils.marshallers.MarshallerConstants.MT_N3; +import static org.eclipse.lyo.core.utils.marshallers.MarshallerConstants.MT_N_TRIPLES; +import static org.eclipse.lyo.core.utils.marshallers.MarshallerConstants.MT_OSLC_COMPACT; +import static org.eclipse.lyo.core.utils.marshallers.MarshallerConstants.MT_RDF_XML; +import static org.eclipse.lyo.core.utils.marshallers.MarshallerConstants.MT_TURTLE; -import org.apache.wink.json4j.JSONObject; -import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; -import org.eclipse.lyo.oslc4j.provider.json4j.JsonHelper; +import java.io.OutputStream; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.RDFWriterI; import org.apache.jena.util.FileUtils; +import org.apache.wink.json4j.JSONObject; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; +import org.eclipse.lyo.oslc4j.provider.json4j.JsonHelper; -import static org.eclipse.lyo.core.utils.marshallers.MarshallerConstants.*; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; public class OSLC4JMarshaller { OSLC4JContext context = new OSLC4JContext(); diff --git a/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JUnmarshaller.java b/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JUnmarshaller.java index e1431c1ea..d95e442ce 100644 --- a/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JUnmarshaller.java +++ b/core/oslc4j-utils/src/main/java/org/eclipse/lyo/core/utils/marshallers/OSLC4JUnmarshaller.java @@ -22,16 +22,16 @@ import java.lang.reflect.InvocationTargetException; import java.net.URISyntaxException; -import javax.ws.rs.core.MediaType; import javax.xml.datatype.DatatypeConfigurationException; -import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; -import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; - import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.rdf.model.RDFReaderI; import org.apache.jena.util.FileUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper; + +import jakarta.ws.rs.core.MediaType; public class OSLC4JUnmarshaller { diff --git a/core/shacl/pom.xml b/core/shacl/pom.xml index 5f95257f7..3b7659914 100644 --- a/core/shacl/pom.xml +++ b/core/shacl/pom.xml @@ -5,7 +5,7 @@ org.eclipse.lyo.oslc4j.core oslc4j-core-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../oslc4j-core-build/pom.xml diff --git a/domains/org.eclipse.lyo.tools.domainmodels/oslcDomainSpecifications.xml b/domains/org.eclipse.lyo.tools.domainmodels/oslcDomainSpecifications.xml index 4d0a7153c..605527419 100644 --- a/domains/org.eclipse.lyo.tools.domainmodels/oslcDomainSpecifications.xml +++ b/domains/org.eclipse.lyo.tools.domainmodels/oslcDomainSpecifications.xml @@ -448,6 +448,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -461,6 +535,7 @@ + diff --git a/domains/org.eclipse.lyo.tools.domainmodels/representations.aird b/domains/org.eclipse.lyo.tools.domainmodels/representations.aird index 9e9438cc8..3928c4a0c 100644 --- a/domains/org.eclipse.lyo.tools.domainmodels/representations.aird +++ b/domains/org.eclipse.lyo.tools.domainmodels/representations.aird @@ -13,7 +13,7 @@ - + @@ -45,7 +45,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -65,10 +65,14 @@ - + + + + + @@ -2140,6 +2144,15 @@ + + + + + + + + + @@ -2502,6 +2515,14 @@ + + + + + + + + @@ -7731,77 +7752,77 @@ - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + @@ -7840,81 +7861,81 @@ - - - - - - - - - - - - - - - + + + - - - + + + - - - + + + + + + + - - - + + + - - - + + + - - - + + + + + + + - - - - - - - + + + - - - + + + - - - + + + - - - + + + + + + + + + + + @@ -7998,10 +8019,6 @@ - - - - @@ -8077,55 +8094,55 @@ - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic @@ -8140,37 +8157,19 @@ - - - - + + + + italic - - - - - italic - - - - - - - - - italic - - - - - - - - + + + + italic @@ -8185,19 +8184,19 @@ - - - - + + + + italic - - - - + + + + italic @@ -8212,10 +8211,10 @@ - - - - + + + + italic @@ -8230,10 +8229,28 @@ - - - - + + + + + italic + + + + + + + + + italic + + + + + + + + italic @@ -8303,64 +8320,46 @@ - - - - - italic - - - - - - - - - italic - - - - - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic @@ -8375,64 +8374,64 @@ - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic @@ -8447,10 +8446,10 @@ - - - - + + + + italic @@ -8465,10 +8464,28 @@ - - - - + + + + + italic + + + + + + + + + italic + + + + + + + + italic @@ -8636,14 +8653,6 @@ - - - - - - - - @@ -10030,18 +10039,30 @@ - - - + + + - - - + + + + + + + + + + + + + + + @@ -10050,25 +10071,13 @@ - - - - - - - - - - - - - - - + + + @@ -10099,14 +10108,14 @@ - - - - + + + + @@ -10137,10 +10146,6 @@ - - - - @@ -10224,46 +10229,46 @@ - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic - - - - + + + + italic @@ -10278,19 +10283,19 @@ - - - - + + + + italic - - - - + + + + italic @@ -10305,10 +10310,10 @@ - - - - + + + + italic @@ -10362,19 +10367,19 @@ - - - - + + + + italic - - - - + + + + italic @@ -10425,14 +10430,6 @@ - - - - - - - - @@ -11729,10 +11726,6 @@ - - - - @@ -11971,33 +11964,33 @@ + + + + - - - - + + + + - - - - - - - + + + @@ -12340,10 +12333,6 @@ - - - - @@ -12827,14 +12816,6 @@ - - - - - - - - @@ -12844,14 +12825,14 @@ - + - + @@ -12859,7 +12840,7 @@ - + @@ -12867,7 +12848,7 @@ - + @@ -12876,14 +12857,14 @@ - + - + @@ -12900,7 +12881,7 @@ - + @@ -12908,7 +12889,7 @@ - + @@ -12916,7 +12897,7 @@ - + @@ -13200,19 +13181,19 @@ - - - - + + + + italic - - - - + + + + italic @@ -13227,19 +13208,19 @@ - - - - + + + + italic - - - - + + + + italic @@ -13254,10 +13235,10 @@ - - - - + + + + italic @@ -13888,14 +13869,6 @@ - - - - - - - - @@ -14063,4 +14036,2749 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + bold + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + italic + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + underline + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/domains/org.eclipse.lyo.tools.domainmodels/vocabulary.xml b/domains/org.eclipse.lyo.tools.domainmodels/vocabulary.xml index 7cadcbbc7..b2948f0e2 100644 --- a/domains/org.eclipse.lyo.tools.domainmodels/vocabulary.xml +++ b/domains/org.eclipse.lyo.tools.domainmodels/vocabulary.xml @@ -117,6 +117,7 @@ + diff --git a/domains/oslc-domains/pom.xml b/domains/oslc-domains/pom.xml index 70da282c2..f2434b04f 100644 --- a/domains/oslc-domains/pom.xml +++ b/domains/oslc-domains/pom.xml @@ -1,79 +1,81 @@ - 4.0.0 - - - - org.eclipse.lyo - lyo-parent - 6.0.0-SNAPSHOT - ../../pom.xml - - + + org.eclipse.lyo - oslc-domains - 6.0.0-SNAPSHOT - jar - Lyo :: Domains - - + org.eclipse.lyo + oslc-domains + 7.0.0-SNAPSHOT + jar + Lyo :: Domains + + - - + - - - - - - + - - + - - - javax.servlet - javax.servlet-api - provided - - - javax.servlet.jsp.jstl - javax.servlet.jsp.jstl-api - provided - + + + jakarta.servlet + jakarta.servlet-api + + + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + - - - org.eclipse.lyo.oslc4j.core - oslc4j-core - - + + org.eclipse.lyo.oslc4j.core + oslc4j-core + + - - + - - - - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Artifact.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Artifact.java new file mode 100644 index 000000000..1700655dc --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Artifact.java @@ -0,0 +1,241 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItem; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Measure; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.ARTIFACT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.ARTIFACT_LOCALNAME) +@OslcResourceShape(title = "Artifact Shape", description = "Shape resource of an Artifact resource.", describes = Oslc_promcodeDomainConstants.ARTIFACT_TYPE) +public class Artifact + extends ManagedItem + implements IArtifact +{ + // Start of user code attributeAnnotation:isPartOf + // End of user code + private Link isPartOf; + // Start of user code attributeAnnotation:producedFor + // End of user code + private Set producedFor = new HashSet(); + // Start of user code attributeAnnotation:targets + // End of user code + private Set targets = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Artifact() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Artifact(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.ARTIFACT_PATH, + Artifact.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Artifact Resource} - update Artifact.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addProducedFor(final String producedFor) + { + this.producedFor.add(producedFor); + } + + public void addTargets(final Link targets) + { + this.targets.add(targets); + } + + + // Start of user code getterAnnotation:isPartOf + // End of user code + @OslcName("isPartOf") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "isPartOf") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE}) + @OslcReadOnly(false) + public Link getIsPartOf() + { + // Start of user code getterInit:isPartOf + // End of user code + return isPartOf; + } + + // Start of user code getterAnnotation:producedFor + // End of user code + @OslcName("producedFor") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "producedFor") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.String) + @OslcRange({Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getProducedFor() + { + // Start of user code getterInit:producedFor + // End of user code + return producedFor; + } + + // Start of user code getterAnnotation:targets + // End of user code + @OslcName("targets") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "targets") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.MEASURE_TYPE}) + @OslcReadOnly(false) + public Set getTargets() + { + // Start of user code getterInit:targets + // End of user code + return targets; + } + + // Start of user code setterAnnotation:isPartOf + // End of user code + public void setIsPartOf(final Link isPartOf ) + { + // Start of user code setterInit:isPartOf + // End of user code + this.isPartOf = isPartOf; + // Start of user code setterFinalize:isPartOf + // End of user code + } + + // Start of user code setterAnnotation:producedFor + // End of user code + public void setProducedFor(final Set producedFor ) + { + // Start of user code setterInit:producedFor + // End of user code + this.producedFor.clear(); + if (producedFor != null) + { + this.producedFor.addAll(producedFor); + } + // Start of user code setterFinalize:producedFor + // End of user code + } + + // Start of user code setterAnnotation:targets + // End of user code + public void setTargets(final Set targets ) + { + // Start of user code setterInit:targets + // End of user code + this.targets.clear(); + if (targets != null) + { + this.targets.addAll(targets); + } + // Start of user code setterFinalize:targets + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IArtifact.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IArtifact.java new file mode 100644 index 000000000..21386c772 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IArtifact.java @@ -0,0 +1,101 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IMeasure; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.ARTIFACT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.ARTIFACT_LOCALNAME) +@OslcResourceShape(title = "Artifact Shape", description = "Shape resource of an Artifact resource.", describes = Oslc_promcodeDomainConstants.ARTIFACT_TYPE) +public interface IArtifact +{ + + public void addProducedFor(final String producedFor ); + public void addTargets(final Link targets ); + + @OslcName("isPartOf") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "isPartOf") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE}) + @OslcReadOnly(false) + public Link getIsPartOf(); + + @OslcName("producedFor") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "producedFor") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.String) + @OslcRange({Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getProducedFor(); + + @OslcName("targets") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "targets") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.MEASURE_TYPE}) + @OslcReadOnly(false) + public Set getTargets(); + + + public void setIsPartOf(final Link isPartOf ); + public void setProducedFor(final Set producedFor ); + public void setTargets(final Set targets ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IIssue.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IIssue.java new file mode 100644 index 000000000..7ba7e17b8 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IIssue.java @@ -0,0 +1,141 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.ISSUE_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.ISSUE_LOCALNAME) +@OslcResourceShape(title = "Issue Shape", description = "An issue is a situation that must be resolved in order to meet the objectives of a project. Failure to resolve the situation may result in negative consequences for the project, such as a schedule delay.", describes = Oslc_promcodeDomainConstants.ISSUE_TYPE) +public interface IIssue +{ + + public void addRaisedBy(final Link raisedBy ); + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource(); + + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle(); + + @OslcName("raisedDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "raisedDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getRaisedDate(); + + @OslcName("raisedBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "raisedBy") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.RISK_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE, Oslc_promcodeDomainConstants.ISSUE_TYPE}) + @OslcReadOnly(false) + public Set getRaisedBy(); + + @OslcName("sequenceNumber") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "sequenceNumber") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Integer) + @OslcReadOnly(false) + public Integer getSequenceNumber(); + + @OslcName("stateOfIssue") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "stateOfIssue") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getStateOfIssue(); + + + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setSource(final String source ); + public void setTitle(final String title ); + public void setRaisedDate(final Date raisedDate ); + public void setRaisedBy(final Set raisedBy ); + public void setSequenceNumber(final Integer sequenceNumber ); + public void setStateOfIssue(final Link stateOfIssue ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IIssueCollection.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IIssueCollection.java new file mode 100644 index 000000000..0bd1f1c9b --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IIssueCollection.java @@ -0,0 +1,94 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IProject; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.ISSUECOLLECTION_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.ISSUECOLLECTION_LOCALNAME) +@OslcResourceShape(title = "IssueCollection Shape", description = "An IssueCollection is a resource which is a subclass of ManagedItemCollection. An IssueCollection only collects Issues. All of Issues raised in a project should be collected by an IssueCollection.", describes = Oslc_promcodeDomainConstants.ISSUECOLLECTION_TYPE) +public interface IIssueCollection +{ + + public void addOslc_promcodeCollects(final Link collects ); + + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo(); + + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ISSUE_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects(); + + + public void setOslc_promcodeBelongsTo(final Link belongsTo ); + public void setOslc_promcodeCollects(final Set collects ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IManagedItem.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IManagedItem.java new file mode 100644 index 000000000..bdc4b07ca --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IManagedItem.java @@ -0,0 +1,110 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.MANAGEDITEM_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MANAGEDITEM_LOCALNAME) +@OslcResourceShape(title = "ManagedItem Shape", description = "A managed item is a scope item, work item, artifact, issue, or some other entity that is part of a project. Managed item resources use dcterms:type to specify concrete subclasses. This practice is deprecated in OSLC Core 3.0.", describes = Oslc_promcodeDomainConstants.MANAGEDITEM_TYPE) +public interface IManagedItem +{ + + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource(); + + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle(); + + @OslcName("sequenceNumber") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "sequenceNumber") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Integer) + @OslcReadOnly(false) + public Integer getSequenceNumber(); + + + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setSource(final String source ); + public void setTitle(final String title ); + public void setSequenceNumber(final Integer sequenceNumber ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IManagedItemCollection.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IManagedItemCollection.java new file mode 100644 index 000000000..f02f67549 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IManagedItemCollection.java @@ -0,0 +1,135 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IProject; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_LOCALNAME) +@OslcResourceShape(title = "ManagedItemCollection Shape", description = "A managed item collection is container of managed items. Any combination of subclass such as a scope item, work item, artifact or issue can be hold in a ManagedItemCollection as a snapshot. ManagedItemCollection has concrete subclasses such as Plan, Report and IssueCollection.", describes = Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_TYPE) +public interface IManagedItemCollection +{ + + public void addCollects(final Link collects ); + + @OslcName("date") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "date") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getDate(); + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource(); + + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle(); + + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getBelongsTo(); + + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ISSUE_TYPE, Oslc_promcodeDomainConstants.RISK_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getCollects(); + + + public void setDate(final Date date ); + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setSource(final String source ); + public void setTitle(final String title ); + public void setBelongsTo(final Link belongsTo ); + public void setCollects(final Set collects ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IMeasure.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IMeasure.java new file mode 100644 index 000000000..31d13057c --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IMeasure.java @@ -0,0 +1,118 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.MEASURE_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MEASURE_LOCALNAME) +@OslcResourceShape(title = "Measure Shape", description = "A measure is an observation of some measurable aspect of an artifact.", describes = Oslc_promcodeDomainConstants.MEASURE_TYPE) +public interface IMeasure +{ + + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle(); + + @OslcName("metricOfMeasure") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "metricOfMeasure") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getMetricOfMeasure(); + + @OslcName("unitOfMeasure") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "unitOfMeasure") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getUnitOfMeasure(); + + @OslcName("valueOfMeasure") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "valueOfMeasure") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Float) + @OslcReadOnly(false) + public Float getValueOfMeasure(); + + + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setTitle(final String title ); + public void setMetricOfMeasure(final Link metricOfMeasure ); + public void setUnitOfMeasure(final Link unitOfMeasure ); + public void setValueOfMeasure(final Float valueOfMeasure ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IMeasurement.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IMeasurement.java new file mode 100644 index 000000000..296dcddec --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IMeasurement.java @@ -0,0 +1,116 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IMeasure; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.MEASUREMENT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MEASUREMENT_LOCALNAME) +@OslcResourceShape(title = "Measurement Shape", description = "A measurement measures some aspect of an artifact at some point in time.", describes = Oslc_promcodeDomainConstants.MEASUREMENT_TYPE) +public interface IMeasurement +{ + + public void addObserves(final Measure observes ); + + @OslcName("date") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "date") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getDate(); + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("measures") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "measures") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE}) + @OslcReadOnly(false) + public Link getMeasures(); + + @OslcName("observes") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "observes") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRepresentation(Representation.Inline) + @OslcRange({Oslc_promcodeDomainConstants.MEASURE_TYPE}) + @OslcReadOnly(false) + public Set getObserves(); + + + public void setDate(final Date date ); + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setMeasures(final Link measures ); + public void setObserves(final Set observes ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IPlan.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IPlan.java new file mode 100644 index 000000000..26c4c297f --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IPlan.java @@ -0,0 +1,94 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IProject; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.PLAN_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.PLAN_LOCALNAME) +@OslcResourceShape(title = "Plan Shape", description = "A Plan is a resource which is a subclass of ManagedItemCollection to describe a plan, which is agreed between an acquirer and a supplier at project initiation. A plan consists of ScopeItems, WorkItems, Artifacts, Targets and Measures.", describes = Oslc_promcodeDomainConstants.PLAN_TYPE) +public interface IPlan +{ + + public void addOslc_promcodeCollects(final Link collects ); + + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo(); + + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects(); + + + public void setOslc_promcodeBelongsTo(final Link belongsTo ); + public void setOslc_promcodeCollects(final Set collects ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IProject.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IProject.java new file mode 100644 index 000000000..6e38372e5 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IProject.java @@ -0,0 +1,150 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.PROJECT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.PROJECT_LOCALNAME) +@OslcResourceShape(title = "Project Shape", description = "A project is software development work to achieve some business goal.", describes = Oslc_promcodeDomainConstants.PROJECT_TYPE) +public interface IProject +{ + + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource(); + + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle(); + + @OslcName("actualEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualEndDate(); + + @OslcName("actualStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualStartDate(); + + @OslcName("metricOfScopeItemSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "metricOfScopeItemSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getMetricOfScopeItemSize(); + + @OslcName("plannedEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedEndDate(); + + @OslcName("plannedStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedStartDate(); + + @OslcName("unitOfScopeItemSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "unitOfScopeItemSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getUnitOfScopeItemSize(); + + + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setSource(final String source ); + public void setTitle(final String title ); + public void setActualEndDate(final Date actualEndDate ); + public void setActualStartDate(final Date actualStartDate ); + public void setMetricOfScopeItemSize(final Link metricOfScopeItemSize ); + public void setPlannedEndDate(final Date plannedEndDate ); + public void setPlannedStartDate(final Date plannedStartDate ); + public void setUnitOfScopeItemSize(final Link unitOfScopeItemSize ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IReport.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IReport.java new file mode 100644 index 000000000..2e2d7f967 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IReport.java @@ -0,0 +1,115 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IMeasurement; +import org.eclipse.lyo.oslc.domains.promcode.IPlan; +import org.eclipse.lyo.oslc.domains.promcode.IProject; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.REPORT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.REPORT_LOCALNAME) +@OslcResourceShape(title = "Report Shape", description = "A Report is a resource which is a subclass of ManagedItemCollection to describe a report. A Report is associated to corresponding Plan.", describes = Oslc_promcodeDomainConstants.REPORT_TYPE) +public interface IReport +{ + + public void addOslc_promcodeCollects(final Link collects ); + public void addIncludes(final Link includes ); + + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo(); + + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects(); + + @OslcName("correspondsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "correspondsTo") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PLAN_TYPE}) + @OslcReadOnly(false) + public Link getCorrespondsTo(); + + @OslcName("includes") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "includes") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.MEASUREMENT_TYPE}) + @OslcReadOnly(false) + public Set getIncludes(); + + + public void setOslc_promcodeBelongsTo(final Link belongsTo ); + public void setOslc_promcodeCollects(final Set collects ); + public void setCorrespondsTo(final Link correspondsTo ); + public void setIncludes(final Set includes ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IRisk.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IRisk.java new file mode 100644 index 000000000..2fd5e5745 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IRisk.java @@ -0,0 +1,141 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.RISK_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.RISK_LOCALNAME) +@OslcResourceShape(title = "Risk Shape", describes = Oslc_promcodeDomainConstants.RISK_TYPE) +public interface IRisk +{ + + public void addIdentifiedBy(final Link identifiedBy ); + + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription(); + + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier(); + + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource(); + + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle(); + + @OslcName("identifiedBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "identifiedBy") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.RISK_TYPE, Oslc_promcodeDomainConstants.ISSUE_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getIdentifiedBy(); + + @OslcName("identifiedDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "identifiedDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getIdentifiedDate(); + + @OslcName("sequenceNumber") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "sequenceNumber") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Integer) + @OslcReadOnly(false) + public Integer getSequenceNumber(); + + @OslcName("stateOfRisk") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "stateOfRisk") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getStateOfRisk(); + + + public void setDescription(final String description ); + public void setIdentifier(final String identifier ); + public void setSource(final String source ); + public void setTitle(final String title ); + public void setIdentifiedBy(final Set identifiedBy ); + public void setIdentifiedDate(final Date identifiedDate ); + public void setSequenceNumber(final Integer sequenceNumber ); + public void setStateOfRisk(final Link stateOfRisk ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IRiskCollection.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IRiskCollection.java new file mode 100644 index 000000000..b2c8a85e0 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IRiskCollection.java @@ -0,0 +1,94 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IIssue; +import org.eclipse.lyo.oslc.domains.promcode.IProject; +import org.eclipse.lyo.oslc.domains.promcode.IRisk; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.RISKCOLLECTION_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.RISKCOLLECTION_LOCALNAME) +@OslcResourceShape(title = "RiskCollection Shape", description = "", describes = Oslc_promcodeDomainConstants.RISKCOLLECTION_TYPE) +public interface IRiskCollection +{ + + public void addOslc_promcodeCollects(final Link collects ); + + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo(); + + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.RISK_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects(); + + + public void setOslc_promcodeBelongsTo(final Link belongsTo ); + public void setOslc_promcodeCollects(final Set collects ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IScopeItem.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IScopeItem.java new file mode 100644 index 000000000..aca014605 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IScopeItem.java @@ -0,0 +1,95 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.SCOPEITEM_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.SCOPEITEM_LOCALNAME) +@OslcResourceShape(title = "ScopeItem Shape", description = "A ScopeItem defines the work to be included in or excluded from a project. It defines the boundaries of the project", describes = Oslc_promcodeDomainConstants.SCOPEITEM_TYPE) +public interface IScopeItem +{ + + + @OslcName("actualSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Float) + @OslcReadOnly(false) + public Float getActualSize(); + + @OslcName("isPartOf") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "isPartOf") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Link getIsPartOf(); + + @OslcName("plannedSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Float) + @OslcReadOnly(false) + public Float getPlannedSize(); + + + public void setActualSize(final Float actualSize ); + public void setIsPartOf(final Link isPartOf ); + public void setPlannedSize(final Float plannedSize ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IWorkItem.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IWorkItem.java new file mode 100644 index 000000000..85b37081d --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IWorkItem.java @@ -0,0 +1,131 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.IArtifact; +import org.eclipse.lyo.oslc.domains.promcode.IScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.IWorkItem; +// Start of user code imports +// End of user code + +@OslcNamespace(Oslc_promcodeDomainConstants.WORKITEM_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.WORKITEM_LOCALNAME) +@OslcResourceShape(title = "WorkItem Shape", description = "A work item describes work to be performed in a project delivery contract. It adds detail to the description of work that is described by a scope item. These details typically include cost, schedule, and resource requirements. The set of all work items in a project form a work breakdown structure.", describes = Oslc_promcodeDomainConstants.WORKITEM_TYPE) +public interface IWorkItem +{ + + public void addRequiredBy(final Link requiredBy ); + + @OslcName("actualEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualEndDate(); + + @OslcName("actualStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualStartDate(); + + @OslcName("isPartOf") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "isPartOf") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.WORKITEM_TYPE}) + @OslcReadOnly(false) + public Link getIsPartOf(); + + @OslcName("plannedEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedEndDate(); + + @OslcName("plannedStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedStartDate(); + + @OslcName("representedBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "representedBy") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getRepresentedBy(); + + @OslcName("requiredBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "requiredBy") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.SCOPEITEM_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE}) + @OslcReadOnly(false) + public Set getRequiredBy(); + + + public void setActualEndDate(final Date actualEndDate ); + public void setActualStartDate(final Date actualStartDate ); + public void setIsPartOf(final Link isPartOf ); + public void setPlannedEndDate(final Date plannedEndDate ); + public void setPlannedStartDate(final Date plannedStartDate ); + public void setRepresentedBy(final Link representedBy ); + public void setRequiredBy(final Set requiredBy ); +} + diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Issue.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Issue.java new file mode 100644 index 000000000..5a9f1b07a --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Issue.java @@ -0,0 +1,373 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.ISSUE_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.ISSUE_LOCALNAME) +@OslcResourceShape(title = "Issue Shape", description = "An issue is a situation that must be resolved in order to meet the objectives of a project. Failure to resolve the situation may result in negative consequences for the project, such as a schedule delay.", describes = Oslc_promcodeDomainConstants.ISSUE_TYPE) +public class Issue + extends AbstractResource + implements IIssue +{ + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:source + // End of user code + private String source; + // Start of user code attributeAnnotation:title + // End of user code + private String title; + // Start of user code attributeAnnotation:raisedDate + // End of user code + private Date raisedDate; + // Start of user code attributeAnnotation:raisedBy + // End of user code + private Set raisedBy = new HashSet(); + // Start of user code attributeAnnotation:sequenceNumber + // End of user code + private Integer sequenceNumber; + // Start of user code attributeAnnotation:stateOfIssue + // End of user code + private Link stateOfIssue; + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Issue() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Issue(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.ISSUE_PATH, + Issue.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Issue Resource} - update Issue.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addRaisedBy(final Link raisedBy) + { + this.raisedBy.add(raisedBy); + } + + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:source + // End of user code + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource() + { + // Start of user code getterInit:source + // End of user code + return source; + } + + // Start of user code getterAnnotation:title + // End of user code + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle() + { + // Start of user code getterInit:title + // End of user code + return title; + } + + // Start of user code getterAnnotation:raisedDate + // End of user code + @OslcName("raisedDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "raisedDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getRaisedDate() + { + // Start of user code getterInit:raisedDate + // End of user code + return raisedDate; + } + + // Start of user code getterAnnotation:raisedBy + // End of user code + @OslcName("raisedBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "raisedBy") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.RISK_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE, Oslc_promcodeDomainConstants.ISSUE_TYPE}) + @OslcReadOnly(false) + public Set getRaisedBy() + { + // Start of user code getterInit:raisedBy + // End of user code + return raisedBy; + } + + // Start of user code getterAnnotation:sequenceNumber + // End of user code + @OslcName("sequenceNumber") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "sequenceNumber") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Integer) + @OslcReadOnly(false) + public Integer getSequenceNumber() + { + // Start of user code getterInit:sequenceNumber + // End of user code + return sequenceNumber; + } + + // Start of user code getterAnnotation:stateOfIssue + // End of user code + @OslcName("stateOfIssue") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "stateOfIssue") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getStateOfIssue() + { + // Start of user code getterInit:stateOfIssue + // End of user code + return stateOfIssue; + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:source + // End of user code + public void setSource(final String source ) + { + // Start of user code setterInit:source + // End of user code + this.source = source; + // Start of user code setterFinalize:source + // End of user code + } + + // Start of user code setterAnnotation:title + // End of user code + public void setTitle(final String title ) + { + // Start of user code setterInit:title + // End of user code + this.title = title; + // Start of user code setterFinalize:title + // End of user code + } + + // Start of user code setterAnnotation:raisedDate + // End of user code + public void setRaisedDate(final Date raisedDate ) + { + // Start of user code setterInit:raisedDate + // End of user code + this.raisedDate = raisedDate; + // Start of user code setterFinalize:raisedDate + // End of user code + } + + // Start of user code setterAnnotation:raisedBy + // End of user code + public void setRaisedBy(final Set raisedBy ) + { + // Start of user code setterInit:raisedBy + // End of user code + this.raisedBy.clear(); + if (raisedBy != null) + { + this.raisedBy.addAll(raisedBy); + } + // Start of user code setterFinalize:raisedBy + // End of user code + } + + // Start of user code setterAnnotation:sequenceNumber + // End of user code + public void setSequenceNumber(final Integer sequenceNumber ) + { + // Start of user code setterInit:sequenceNumber + // End of user code + this.sequenceNumber = sequenceNumber; + // Start of user code setterFinalize:sequenceNumber + // End of user code + } + + // Start of user code setterAnnotation:stateOfIssue + // End of user code + public void setStateOfIssue(final Link stateOfIssue ) + { + // Start of user code setterInit:stateOfIssue + // End of user code + this.stateOfIssue = stateOfIssue; + // Start of user code setterFinalize:stateOfIssue + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IssueCollection.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IssueCollection.java new file mode 100644 index 000000000..55706123a --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/IssueCollection.java @@ -0,0 +1,206 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItemCollection; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Project; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.ISSUECOLLECTION_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.ISSUECOLLECTION_LOCALNAME) +@OslcResourceShape(title = "IssueCollection Shape", description = "An IssueCollection is a resource which is a subclass of ManagedItemCollection. An IssueCollection only collects Issues. All of Issues raised in a project should be collected by an IssueCollection.", describes = Oslc_promcodeDomainConstants.ISSUECOLLECTION_TYPE) +public class IssueCollection + extends ManagedItemCollection + implements IIssueCollection +{ + // Start of user code attributeAnnotation:oslc_promcodeBelongsTo + // End of user code + private Link oslc_promcodeBelongsTo; + // Start of user code attributeAnnotation:oslc_promcodeCollects + // End of user code + private Set oslc_promcodeCollects = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public IssueCollection() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public IssueCollection(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.ISSUECOLLECTION_PATH, + IssueCollection.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local IssueCollection Resource} - update IssueCollection.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addOslc_promcodeCollects(final Link collects) + { + this.oslc_promcodeCollects.add(collects); + } + + + // Start of user code getterAnnotation:oslc_promcodeBelongsTo + // End of user code + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo() + { + // Start of user code getterInit:oslc_promcodeBelongsTo + // End of user code + return oslc_promcodeBelongsTo; + } + + // Start of user code getterAnnotation:oslc_promcodeCollects + // End of user code + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ISSUE_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects() + { + // Start of user code getterInit:oslc_promcodeCollects + // End of user code + return oslc_promcodeCollects; + } + + // Start of user code setterAnnotation:oslc_promcodeBelongsTo + // End of user code + public void setOslc_promcodeBelongsTo(final Link belongsTo ) + { + // Start of user code setterInit:oslc_promcodeBelongsTo + // End of user code + this.oslc_promcodeBelongsTo = belongsTo; + // Start of user code setterFinalize:oslc_promcodeBelongsTo + // End of user code + } + + // Start of user code setterAnnotation:oslc_promcodeCollects + // End of user code + public void setOslc_promcodeCollects(final Set collects ) + { + // Start of user code setterInit:oslc_promcodeCollects + // End of user code + this.oslc_promcodeCollects.clear(); + if (collects != null) + { + this.oslc_promcodeCollects.addAll(collects); + } + // Start of user code setterFinalize:oslc_promcodeCollects + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ManagedItem.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ManagedItem.java new file mode 100644 index 000000000..0266f44d6 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ManagedItem.java @@ -0,0 +1,274 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.MANAGEDITEM_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MANAGEDITEM_LOCALNAME) +@OslcResourceShape(title = "ManagedItem Shape", description = "A managed item is a scope item, work item, artifact, issue, or some other entity that is part of a project. Managed item resources use dcterms:type to specify concrete subclasses. This practice is deprecated in OSLC Core 3.0.", describes = Oslc_promcodeDomainConstants.MANAGEDITEM_TYPE) +public class ManagedItem + extends AbstractResource + implements IManagedItem +{ + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:source + // End of user code + private String source; + // Start of user code attributeAnnotation:title + // End of user code + private String title; + // Start of user code attributeAnnotation:sequenceNumber + // End of user code + private Integer sequenceNumber; + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public ManagedItem() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public ManagedItem(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.MANAGEDITEM_PATH, + ManagedItem.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local ManagedItem Resource} - update ManagedItem.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:source + // End of user code + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource() + { + // Start of user code getterInit:source + // End of user code + return source; + } + + // Start of user code getterAnnotation:title + // End of user code + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle() + { + // Start of user code getterInit:title + // End of user code + return title; + } + + // Start of user code getterAnnotation:sequenceNumber + // End of user code + @OslcName("sequenceNumber") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "sequenceNumber") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Integer) + @OslcReadOnly(false) + public Integer getSequenceNumber() + { + // Start of user code getterInit:sequenceNumber + // End of user code + return sequenceNumber; + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:source + // End of user code + public void setSource(final String source ) + { + // Start of user code setterInit:source + // End of user code + this.source = source; + // Start of user code setterFinalize:source + // End of user code + } + + // Start of user code setterAnnotation:title + // End of user code + public void setTitle(final String title ) + { + // Start of user code setterInit:title + // End of user code + this.title = title; + // Start of user code setterFinalize:title + // End of user code + } + + // Start of user code setterAnnotation:sequenceNumber + // End of user code + public void setSequenceNumber(final Integer sequenceNumber ) + { + // Start of user code setterInit:sequenceNumber + // End of user code + this.sequenceNumber = sequenceNumber; + // Start of user code setterFinalize:sequenceNumber + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ManagedItemCollection.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ManagedItemCollection.java new file mode 100644 index 000000000..be256af31 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ManagedItemCollection.java @@ -0,0 +1,347 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Project; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_LOCALNAME) +@OslcResourceShape(title = "ManagedItemCollection Shape", description = "A managed item collection is container of managed items. Any combination of subclass such as a scope item, work item, artifact or issue can be hold in a ManagedItemCollection as a snapshot. ManagedItemCollection has concrete subclasses such as Plan, Report and IssueCollection.", describes = Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_TYPE) +public class ManagedItemCollection + extends AbstractResource + implements IManagedItemCollection +{ + // Start of user code attributeAnnotation:date + // End of user code + private Date date; + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:source + // End of user code + private String source; + // Start of user code attributeAnnotation:title + // End of user code + private String title; + // Start of user code attributeAnnotation:belongsTo + // End of user code + private Link belongsTo; + // Start of user code attributeAnnotation:collects + // End of user code + private Set collects = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public ManagedItemCollection() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public ManagedItemCollection(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.MANAGEDITEMCOLLECTION_PATH, + ManagedItemCollection.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local ManagedItemCollection Resource} - update ManagedItemCollection.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addCollects(final Link collects) + { + this.collects.add(collects); + } + + + // Start of user code getterAnnotation:date + // End of user code + @OslcName("date") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "date") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getDate() + { + // Start of user code getterInit:date + // End of user code + return date; + } + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:source + // End of user code + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource() + { + // Start of user code getterInit:source + // End of user code + return source; + } + + // Start of user code getterAnnotation:title + // End of user code + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle() + { + // Start of user code getterInit:title + // End of user code + return title; + } + + // Start of user code getterAnnotation:belongsTo + // End of user code + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getBelongsTo() + { + // Start of user code getterInit:belongsTo + // End of user code + return belongsTo; + } + + // Start of user code getterAnnotation:collects + // End of user code + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ISSUE_TYPE, Oslc_promcodeDomainConstants.RISK_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getCollects() + { + // Start of user code getterInit:collects + // End of user code + return collects; + } + + // Start of user code setterAnnotation:date + // End of user code + public void setDate(final Date date ) + { + // Start of user code setterInit:date + // End of user code + this.date = date; + // Start of user code setterFinalize:date + // End of user code + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:source + // End of user code + public void setSource(final String source ) + { + // Start of user code setterInit:source + // End of user code + this.source = source; + // Start of user code setterFinalize:source + // End of user code + } + + // Start of user code setterAnnotation:title + // End of user code + public void setTitle(final String title ) + { + // Start of user code setterInit:title + // End of user code + this.title = title; + // Start of user code setterFinalize:title + // End of user code + } + + // Start of user code setterAnnotation:belongsTo + // End of user code + public void setBelongsTo(final Link belongsTo ) + { + // Start of user code setterInit:belongsTo + // End of user code + this.belongsTo = belongsTo; + // Start of user code setterFinalize:belongsTo + // End of user code + } + + // Start of user code setterAnnotation:collects + // End of user code + public void setCollects(final Set collects ) + { + // Start of user code setterInit:collects + // End of user code + this.collects.clear(); + if (collects != null) + { + this.collects.addAll(collects); + } + // Start of user code setterFinalize:collects + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Measure.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Measure.java new file mode 100644 index 000000000..ed7c5f648 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Measure.java @@ -0,0 +1,302 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.MEASURE_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MEASURE_LOCALNAME) +@OslcResourceShape(title = "Measure Shape", description = "A measure is an observation of some measurable aspect of an artifact.", describes = Oslc_promcodeDomainConstants.MEASURE_TYPE) +public class Measure + extends AbstractResource + implements IMeasure +{ + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:title + // End of user code + private String title; + // Start of user code attributeAnnotation:metricOfMeasure + // End of user code + private Link metricOfMeasure; + // Start of user code attributeAnnotation:unitOfMeasure + // End of user code + private Link unitOfMeasure; + // Start of user code attributeAnnotation:valueOfMeasure + // End of user code + private Float valueOfMeasure; + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Measure() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Measure(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.MEASURE_PATH, + Measure.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Measure Resource} - update Measure.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:title + // End of user code + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle() + { + // Start of user code getterInit:title + // End of user code + return title; + } + + // Start of user code getterAnnotation:metricOfMeasure + // End of user code + @OslcName("metricOfMeasure") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "metricOfMeasure") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getMetricOfMeasure() + { + // Start of user code getterInit:metricOfMeasure + // End of user code + return metricOfMeasure; + } + + // Start of user code getterAnnotation:unitOfMeasure + // End of user code + @OslcName("unitOfMeasure") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "unitOfMeasure") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getUnitOfMeasure() + { + // Start of user code getterInit:unitOfMeasure + // End of user code + return unitOfMeasure; + } + + // Start of user code getterAnnotation:valueOfMeasure + // End of user code + @OslcName("valueOfMeasure") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "valueOfMeasure") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Float) + @OslcReadOnly(false) + public Float getValueOfMeasure() + { + // Start of user code getterInit:valueOfMeasure + // End of user code + return valueOfMeasure; + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:title + // End of user code + public void setTitle(final String title ) + { + // Start of user code setterInit:title + // End of user code + this.title = title; + // Start of user code setterFinalize:title + // End of user code + } + + // Start of user code setterAnnotation:metricOfMeasure + // End of user code + public void setMetricOfMeasure(final Link metricOfMeasure ) + { + // Start of user code setterInit:metricOfMeasure + // End of user code + this.metricOfMeasure = metricOfMeasure; + // Start of user code setterFinalize:metricOfMeasure + // End of user code + } + + // Start of user code setterAnnotation:unitOfMeasure + // End of user code + public void setUnitOfMeasure(final Link unitOfMeasure ) + { + // Start of user code setterInit:unitOfMeasure + // End of user code + this.unitOfMeasure = unitOfMeasure; + // Start of user code setterFinalize:unitOfMeasure + // End of user code + } + + // Start of user code setterAnnotation:valueOfMeasure + // End of user code + public void setValueOfMeasure(final Float valueOfMeasure ) + { + // Start of user code setterInit:valueOfMeasure + // End of user code + this.valueOfMeasure = valueOfMeasure; + // Start of user code setterFinalize:valueOfMeasure + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Measurement.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Measurement.java new file mode 100644 index 000000000..2641cff61 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Measurement.java @@ -0,0 +1,288 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Measure; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.MEASUREMENT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.MEASUREMENT_LOCALNAME) +@OslcResourceShape(title = "Measurement Shape", description = "A measurement measures some aspect of an artifact at some point in time.", describes = Oslc_promcodeDomainConstants.MEASUREMENT_TYPE) +public class Measurement + extends AbstractResource + implements IMeasurement +{ + // Start of user code attributeAnnotation:date + // End of user code + private Date date; + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:measures + // End of user code + private Link measures; + // Start of user code attributeAnnotation:observes + // End of user code + private Set observes = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Measurement() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Measurement(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.MEASUREMENT_PATH, + Measurement.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Measurement Resource} - update Measurement.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addObserves(final Measure observes) + { + this.observes.add(observes); + } + + + // Start of user code getterAnnotation:date + // End of user code + @OslcName("date") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "date") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getDate() + { + // Start of user code getterInit:date + // End of user code + return date; + } + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:measures + // End of user code + @OslcName("measures") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "measures") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE}) + @OslcReadOnly(false) + public Link getMeasures() + { + // Start of user code getterInit:measures + // End of user code + return measures; + } + + // Start of user code getterAnnotation:observes + // End of user code + @OslcName("observes") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "observes") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRepresentation(Representation.Inline) + @OslcRange({Oslc_promcodeDomainConstants.MEASURE_TYPE}) + @OslcReadOnly(false) + public Set getObserves() + { + // Start of user code getterInit:observes + // End of user code + return observes; + } + + // Start of user code setterAnnotation:date + // End of user code + public void setDate(final Date date ) + { + // Start of user code setterInit:date + // End of user code + this.date = date; + // Start of user code setterFinalize:date + // End of user code + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:measures + // End of user code + public void setMeasures(final Link measures ) + { + // Start of user code setterInit:measures + // End of user code + this.measures = measures; + // Start of user code setterFinalize:measures + // End of user code + } + + // Start of user code setterAnnotation:observes + // End of user code + public void setObserves(final Set observes ) + { + // Start of user code setterInit:observes + // End of user code + this.observes.clear(); + if (observes != null) + { + this.observes.addAll(observes); + } + // Start of user code setterFinalize:observes + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Oslc_promcodeDomainConstants.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Oslc_promcodeDomainConstants.java new file mode 100644 index 000000000..6b425e09d --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Oslc_promcodeDomainConstants.java @@ -0,0 +1,96 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; + +// Start of user code imports +// End of user code + +public interface Oslc_promcodeDomainConstants +{ + // Start of user code user constants + // End of user code + + /** + * @deprecated use {@link Oslc_promcodeDomainConstants#PROMCODE_NAMSPACE} or {@link Oslc_promcodeDomainConstants#PROMCODE_DOMAIN_NAME} instead + */ + @Deprecated(since = "5.0.1") + public static String PROMCODE_DOMAIN = "http://open-services.net/ns/promcode#"; + public static String PROMCODE_DOMAIN_NAME = "PROMCODE"; + public static String PROMCODE_NAMSPACE = "http://open-services.net/ns/promcode#"; //Vocabulary namespace for the resources and resource properties, when no explicit vocabulary (describes, or propertyDefinition) is defined + public static String PROMCODE_NAMSPACE_PREFIX = "oslc_promcode"; //Vocabulary prefix for the resources and resource properties, when no explicit vocabulary (describes, or propertyDefinition) is defined + + public static String ARTIFACT_PATH = "artifact"; //the relative path of the resource shape URL. + public static String ARTIFACT_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String ARTIFACT_LOCALNAME = "Artifact"; //localName of the rdfs:class the resource describes + public static String ARTIFACT_TYPE = ARTIFACT_NAMESPACE + ARTIFACT_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String ISSUE_PATH = "issue"; //the relative path of the resource shape URL. + public static String ISSUE_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String ISSUE_LOCALNAME = "Issue"; //localName of the rdfs:class the resource describes + public static String ISSUE_TYPE = ISSUE_NAMESPACE + ISSUE_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String ISSUECOLLECTION_PATH = "issueCollection"; //the relative path of the resource shape URL. + public static String ISSUECOLLECTION_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String ISSUECOLLECTION_LOCALNAME = "IssueCollection"; //localName of the rdfs:class the resource describes + public static String ISSUECOLLECTION_TYPE = ISSUECOLLECTION_NAMESPACE + ISSUECOLLECTION_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String MANAGEDITEM_PATH = "managedItem"; //the relative path of the resource shape URL. + public static String MANAGEDITEM_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String MANAGEDITEM_LOCALNAME = "ManagedItem"; //localName of the rdfs:class the resource describes + public static String MANAGEDITEM_TYPE = MANAGEDITEM_NAMESPACE + MANAGEDITEM_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String MANAGEDITEMCOLLECTION_PATH = "managedItemCollection"; //the relative path of the resource shape URL. + public static String MANAGEDITEMCOLLECTION_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String MANAGEDITEMCOLLECTION_LOCALNAME = "ManagedItemCollection"; //localName of the rdfs:class the resource describes + public static String MANAGEDITEMCOLLECTION_TYPE = MANAGEDITEMCOLLECTION_NAMESPACE + MANAGEDITEMCOLLECTION_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String MEASURE_PATH = "measure"; //the relative path of the resource shape URL. + public static String MEASURE_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String MEASURE_LOCALNAME = "Measure"; //localName of the rdfs:class the resource describes + public static String MEASURE_TYPE = MEASURE_NAMESPACE + MEASURE_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String MEASUREMENT_PATH = "measurement"; //the relative path of the resource shape URL. + public static String MEASUREMENT_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String MEASUREMENT_LOCALNAME = "Measurement"; //localName of the rdfs:class the resource describes + public static String MEASUREMENT_TYPE = MEASUREMENT_NAMESPACE + MEASUREMENT_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String PLAN_PATH = "plan"; //the relative path of the resource shape URL. + public static String PLAN_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String PLAN_LOCALNAME = "Plan"; //localName of the rdfs:class the resource describes + public static String PLAN_TYPE = PLAN_NAMESPACE + PLAN_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String PROJECT_PATH = "project"; //the relative path of the resource shape URL. + public static String PROJECT_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String PROJECT_LOCALNAME = "Project"; //localName of the rdfs:class the resource describes + public static String PROJECT_TYPE = PROJECT_NAMESPACE + PROJECT_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String REPORT_PATH = "report"; //the relative path of the resource shape URL. + public static String REPORT_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String REPORT_LOCALNAME = "Report"; //localName of the rdfs:class the resource describes + public static String REPORT_TYPE = REPORT_NAMESPACE + REPORT_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String RISK_PATH = "risk"; //the relative path of the resource shape URL. + public static String RISK_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String RISK_LOCALNAME = "Risk"; //localName of the rdfs:class the resource describes + public static String RISK_TYPE = RISK_NAMESPACE + RISK_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String RISKCOLLECTION_PATH = "riskCollection"; //the relative path of the resource shape URL. + public static String RISKCOLLECTION_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String RISKCOLLECTION_LOCALNAME = "RiskCollection"; //localName of the rdfs:class the resource describes + public static String RISKCOLLECTION_TYPE = RISKCOLLECTION_NAMESPACE + RISKCOLLECTION_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String SCOPEITEM_PATH = "scopeItem"; //the relative path of the resource shape URL. + public static String SCOPEITEM_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String SCOPEITEM_LOCALNAME = "ScopeItem"; //localName of the rdfs:class the resource describes + public static String SCOPEITEM_TYPE = SCOPEITEM_NAMESPACE + SCOPEITEM_LOCALNAME; //fullname of the rdfs:class the resource describes + public static String WORKITEM_PATH = "workItem"; //the relative path of the resource shape URL. + public static String WORKITEM_NAMESPACE = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE; //namespace of the rdfs:class the resource describes + public static String WORKITEM_LOCALNAME = "WorkItem"; //localName of the rdfs:class the resource describes + public static String WORKITEM_TYPE = WORKITEM_NAMESPACE + WORKITEM_LOCALNAME; //fullname of the rdfs:class the resource describes +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Plan.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Plan.java new file mode 100644 index 000000000..d9fdc65c8 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Plan.java @@ -0,0 +1,206 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItemCollection; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Project; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.PLAN_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.PLAN_LOCALNAME) +@OslcResourceShape(title = "Plan Shape", description = "A Plan is a resource which is a subclass of ManagedItemCollection to describe a plan, which is agreed between an acquirer and a supplier at project initiation. A plan consists of ScopeItems, WorkItems, Artifacts, Targets and Measures.", describes = Oslc_promcodeDomainConstants.PLAN_TYPE) +public class Plan + extends ManagedItemCollection + implements IPlan +{ + // Start of user code attributeAnnotation:oslc_promcodeBelongsTo + // End of user code + private Link oslc_promcodeBelongsTo; + // Start of user code attributeAnnotation:oslc_promcodeCollects + // End of user code + private Set oslc_promcodeCollects = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Plan() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Plan(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.PLAN_PATH, + Plan.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Plan Resource} - update Plan.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addOslc_promcodeCollects(final Link collects) + { + this.oslc_promcodeCollects.add(collects); + } + + + // Start of user code getterAnnotation:oslc_promcodeBelongsTo + // End of user code + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo() + { + // Start of user code getterInit:oslc_promcodeBelongsTo + // End of user code + return oslc_promcodeBelongsTo; + } + + // Start of user code getterAnnotation:oslc_promcodeCollects + // End of user code + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects() + { + // Start of user code getterInit:oslc_promcodeCollects + // End of user code + return oslc_promcodeCollects; + } + + // Start of user code setterAnnotation:oslc_promcodeBelongsTo + // End of user code + public void setOslc_promcodeBelongsTo(final Link belongsTo ) + { + // Start of user code setterInit:oslc_promcodeBelongsTo + // End of user code + this.oslc_promcodeBelongsTo = belongsTo; + // Start of user code setterFinalize:oslc_promcodeBelongsTo + // End of user code + } + + // Start of user code setterAnnotation:oslc_promcodeCollects + // End of user code + public void setOslc_promcodeCollects(final Set collects ) + { + // Start of user code setterInit:oslc_promcodeCollects + // End of user code + this.oslc_promcodeCollects.clear(); + if (collects != null) + { + this.oslc_promcodeCollects.addAll(collects); + } + // Start of user code setterFinalize:oslc_promcodeCollects + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Project.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Project.java new file mode 100644 index 000000000..0f1b5a476 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Project.java @@ -0,0 +1,414 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.PROJECT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.PROJECT_LOCALNAME) +@OslcResourceShape(title = "Project Shape", description = "A project is software development work to achieve some business goal.", describes = Oslc_promcodeDomainConstants.PROJECT_TYPE) +public class Project + extends AbstractResource + implements IProject +{ + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:source + // End of user code + private String source; + // Start of user code attributeAnnotation:title + // End of user code + private String title; + // Start of user code attributeAnnotation:actualEndDate + // End of user code + private Date actualEndDate; + // Start of user code attributeAnnotation:actualStartDate + // End of user code + private Date actualStartDate; + // Start of user code attributeAnnotation:metricOfScopeItemSize + // End of user code + private Link metricOfScopeItemSize; + // Start of user code attributeAnnotation:plannedEndDate + // End of user code + private Date plannedEndDate; + // Start of user code attributeAnnotation:plannedStartDate + // End of user code + private Date plannedStartDate; + // Start of user code attributeAnnotation:unitOfScopeItemSize + // End of user code + private Link unitOfScopeItemSize; + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Project() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Project(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.PROJECT_PATH, + Project.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Project Resource} - update Project.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:source + // End of user code + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource() + { + // Start of user code getterInit:source + // End of user code + return source; + } + + // Start of user code getterAnnotation:title + // End of user code + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle() + { + // Start of user code getterInit:title + // End of user code + return title; + } + + // Start of user code getterAnnotation:actualEndDate + // End of user code + @OslcName("actualEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualEndDate() + { + // Start of user code getterInit:actualEndDate + // End of user code + return actualEndDate; + } + + // Start of user code getterAnnotation:actualStartDate + // End of user code + @OslcName("actualStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualStartDate() + { + // Start of user code getterInit:actualStartDate + // End of user code + return actualStartDate; + } + + // Start of user code getterAnnotation:metricOfScopeItemSize + // End of user code + @OslcName("metricOfScopeItemSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "metricOfScopeItemSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getMetricOfScopeItemSize() + { + // Start of user code getterInit:metricOfScopeItemSize + // End of user code + return metricOfScopeItemSize; + } + + // Start of user code getterAnnotation:plannedEndDate + // End of user code + @OslcName("plannedEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedEndDate() + { + // Start of user code getterInit:plannedEndDate + // End of user code + return plannedEndDate; + } + + // Start of user code getterAnnotation:plannedStartDate + // End of user code + @OslcName("plannedStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedStartDate() + { + // Start of user code getterInit:plannedStartDate + // End of user code + return plannedStartDate; + } + + // Start of user code getterAnnotation:unitOfScopeItemSize + // End of user code + @OslcName("unitOfScopeItemSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "unitOfScopeItemSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getUnitOfScopeItemSize() + { + // Start of user code getterInit:unitOfScopeItemSize + // End of user code + return unitOfScopeItemSize; + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:source + // End of user code + public void setSource(final String source ) + { + // Start of user code setterInit:source + // End of user code + this.source = source; + // Start of user code setterFinalize:source + // End of user code + } + + // Start of user code setterAnnotation:title + // End of user code + public void setTitle(final String title ) + { + // Start of user code setterInit:title + // End of user code + this.title = title; + // Start of user code setterFinalize:title + // End of user code + } + + // Start of user code setterAnnotation:actualEndDate + // End of user code + public void setActualEndDate(final Date actualEndDate ) + { + // Start of user code setterInit:actualEndDate + // End of user code + this.actualEndDate = actualEndDate; + // Start of user code setterFinalize:actualEndDate + // End of user code + } + + // Start of user code setterAnnotation:actualStartDate + // End of user code + public void setActualStartDate(final Date actualStartDate ) + { + // Start of user code setterInit:actualStartDate + // End of user code + this.actualStartDate = actualStartDate; + // Start of user code setterFinalize:actualStartDate + // End of user code + } + + // Start of user code setterAnnotation:metricOfScopeItemSize + // End of user code + public void setMetricOfScopeItemSize(final Link metricOfScopeItemSize ) + { + // Start of user code setterInit:metricOfScopeItemSize + // End of user code + this.metricOfScopeItemSize = metricOfScopeItemSize; + // Start of user code setterFinalize:metricOfScopeItemSize + // End of user code + } + + // Start of user code setterAnnotation:plannedEndDate + // End of user code + public void setPlannedEndDate(final Date plannedEndDate ) + { + // Start of user code setterInit:plannedEndDate + // End of user code + this.plannedEndDate = plannedEndDate; + // Start of user code setterFinalize:plannedEndDate + // End of user code + } + + // Start of user code setterAnnotation:plannedStartDate + // End of user code + public void setPlannedStartDate(final Date plannedStartDate ) + { + // Start of user code setterInit:plannedStartDate + // End of user code + this.plannedStartDate = plannedStartDate; + // Start of user code setterFinalize:plannedStartDate + // End of user code + } + + // Start of user code setterAnnotation:unitOfScopeItemSize + // End of user code + public void setUnitOfScopeItemSize(final Link unitOfScopeItemSize ) + { + // Start of user code setterInit:unitOfScopeItemSize + // End of user code + this.unitOfScopeItemSize = unitOfScopeItemSize; + // Start of user code setterFinalize:unitOfScopeItemSize + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Report.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Report.java new file mode 100644 index 000000000..135e25028 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Report.java @@ -0,0 +1,275 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItemCollection; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Measurement; +import org.eclipse.lyo.oslc.domains.promcode.Plan; +import org.eclipse.lyo.oslc.domains.promcode.Project; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.REPORT_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.REPORT_LOCALNAME) +@OslcResourceShape(title = "Report Shape", description = "A Report is a resource which is a subclass of ManagedItemCollection to describe a report. A Report is associated to corresponding Plan.", describes = Oslc_promcodeDomainConstants.REPORT_TYPE) +public class Report + extends ManagedItemCollection + implements IReport +{ + // Start of user code attributeAnnotation:oslc_promcodeBelongsTo + // End of user code + private Link oslc_promcodeBelongsTo; + // Start of user code attributeAnnotation:oslc_promcodeCollects + // End of user code + private Set oslc_promcodeCollects = new HashSet(); + // Start of user code attributeAnnotation:correspondsTo + // End of user code + private Link correspondsTo; + // Start of user code attributeAnnotation:includes + // End of user code + private Set includes = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Report() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Report(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.REPORT_PATH, + Report.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Report Resource} - update Report.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addOslc_promcodeCollects(final Link collects) + { + this.oslc_promcodeCollects.add(collects); + } + + public void addIncludes(final Link includes) + { + this.includes.add(includes); + } + + + // Start of user code getterAnnotation:oslc_promcodeBelongsTo + // End of user code + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo() + { + // Start of user code getterInit:oslc_promcodeBelongsTo + // End of user code + return oslc_promcodeBelongsTo; + } + + // Start of user code getterAnnotation:oslc_promcodeCollects + // End of user code + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects() + { + // Start of user code getterInit:oslc_promcodeCollects + // End of user code + return oslc_promcodeCollects; + } + + // Start of user code getterAnnotation:correspondsTo + // End of user code + @OslcName("correspondsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "correspondsTo") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PLAN_TYPE}) + @OslcReadOnly(false) + public Link getCorrespondsTo() + { + // Start of user code getterInit:correspondsTo + // End of user code + return correspondsTo; + } + + // Start of user code getterAnnotation:includes + // End of user code + @OslcName("includes") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "includes") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.MEASUREMENT_TYPE}) + @OslcReadOnly(false) + public Set getIncludes() + { + // Start of user code getterInit:includes + // End of user code + return includes; + } + + // Start of user code setterAnnotation:oslc_promcodeBelongsTo + // End of user code + public void setOslc_promcodeBelongsTo(final Link belongsTo ) + { + // Start of user code setterInit:oslc_promcodeBelongsTo + // End of user code + this.oslc_promcodeBelongsTo = belongsTo; + // Start of user code setterFinalize:oslc_promcodeBelongsTo + // End of user code + } + + // Start of user code setterAnnotation:oslc_promcodeCollects + // End of user code + public void setOslc_promcodeCollects(final Set collects ) + { + // Start of user code setterInit:oslc_promcodeCollects + // End of user code + this.oslc_promcodeCollects.clear(); + if (collects != null) + { + this.oslc_promcodeCollects.addAll(collects); + } + // Start of user code setterFinalize:oslc_promcodeCollects + // End of user code + } + + // Start of user code setterAnnotation:correspondsTo + // End of user code + public void setCorrespondsTo(final Link correspondsTo ) + { + // Start of user code setterInit:correspondsTo + // End of user code + this.correspondsTo = correspondsTo; + // Start of user code setterFinalize:correspondsTo + // End of user code + } + + // Start of user code setterAnnotation:includes + // End of user code + public void setIncludes(final Set includes ) + { + // Start of user code setterInit:includes + // End of user code + this.includes.clear(); + if (includes != null) + { + this.includes.addAll(includes); + } + // Start of user code setterFinalize:includes + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Risk.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Risk.java new file mode 100644 index 000000000..b707289d0 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/Risk.java @@ -0,0 +1,373 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsVocabularyConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.RISK_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.RISK_LOCALNAME) +@OslcResourceShape(title = "Risk Shape", describes = Oslc_promcodeDomainConstants.RISK_TYPE) +public class Risk + extends AbstractResource + implements IRisk +{ + // Start of user code attributeAnnotation:description + // End of user code + private String description; + // Start of user code attributeAnnotation:identifier + // End of user code + private String identifier; + // Start of user code attributeAnnotation:source + // End of user code + private String source; + // Start of user code attributeAnnotation:title + // End of user code + private String title; + // Start of user code attributeAnnotation:identifiedBy + // End of user code + private Set identifiedBy = new HashSet(); + // Start of user code attributeAnnotation:identifiedDate + // End of user code + private Date identifiedDate; + // Start of user code attributeAnnotation:sequenceNumber + // End of user code + private Integer sequenceNumber; + // Start of user code attributeAnnotation:stateOfRisk + // End of user code + private Link stateOfRisk; + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public Risk() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public Risk(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.RISK_PATH, + Risk.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local Risk Resource} - update Risk.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addIdentifiedBy(final Link identifiedBy) + { + this.identifiedBy.add(identifiedBy); + } + + + // Start of user code getterAnnotation:description + // End of user code + @OslcName("description") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "description") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getDescription() + { + // Start of user code getterInit:description + // End of user code + return description; + } + + // Start of user code getterAnnotation:identifier + // End of user code + @OslcName("identifier") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "identifier") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getIdentifier() + { + // Start of user code getterInit:identifier + // End of user code + return identifier; + } + + // Start of user code getterAnnotation:source + // End of user code + @OslcName("source") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "source") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.String) + @OslcReadOnly(false) + public String getSource() + { + // Start of user code getterInit:source + // End of user code + return source; + } + + // Start of user code getterAnnotation:title + // End of user code + @OslcName("title") + @OslcPropertyDefinition(DctermsVocabularyConstants.DUBLIN_CORE_NAMSPACE + "title") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.XMLLiteral) + @OslcReadOnly(false) + public String getTitle() + { + // Start of user code getterInit:title + // End of user code + return title; + } + + // Start of user code getterAnnotation:identifiedBy + // End of user code + @OslcName("identifiedBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "identifiedBy") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.RISK_TYPE, Oslc_promcodeDomainConstants.ISSUE_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE, Oslc_promcodeDomainConstants.WORKITEM_TYPE, Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Set getIdentifiedBy() + { + // Start of user code getterInit:identifiedBy + // End of user code + return identifiedBy; + } + + // Start of user code getterAnnotation:identifiedDate + // End of user code + @OslcName("identifiedDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "identifiedDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getIdentifiedDate() + { + // Start of user code getterInit:identifiedDate + // End of user code + return identifiedDate; + } + + // Start of user code getterAnnotation:sequenceNumber + // End of user code + @OslcName("sequenceNumber") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "sequenceNumber") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Integer) + @OslcReadOnly(false) + public Integer getSequenceNumber() + { + // Start of user code getterInit:sequenceNumber + // End of user code + return sequenceNumber; + } + + // Start of user code getterAnnotation:stateOfRisk + // End of user code + @OslcName("stateOfRisk") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "stateOfRisk") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getStateOfRisk() + { + // Start of user code getterInit:stateOfRisk + // End of user code + return stateOfRisk; + } + + // Start of user code setterAnnotation:description + // End of user code + public void setDescription(final String description ) + { + // Start of user code setterInit:description + // End of user code + this.description = description; + // Start of user code setterFinalize:description + // End of user code + } + + // Start of user code setterAnnotation:identifier + // End of user code + public void setIdentifier(final String identifier ) + { + // Start of user code setterInit:identifier + // End of user code + this.identifier = identifier; + // Start of user code setterFinalize:identifier + // End of user code + } + + // Start of user code setterAnnotation:source + // End of user code + public void setSource(final String source ) + { + // Start of user code setterInit:source + // End of user code + this.source = source; + // Start of user code setterFinalize:source + // End of user code + } + + // Start of user code setterAnnotation:title + // End of user code + public void setTitle(final String title ) + { + // Start of user code setterInit:title + // End of user code + this.title = title; + // Start of user code setterFinalize:title + // End of user code + } + + // Start of user code setterAnnotation:identifiedBy + // End of user code + public void setIdentifiedBy(final Set identifiedBy ) + { + // Start of user code setterInit:identifiedBy + // End of user code + this.identifiedBy.clear(); + if (identifiedBy != null) + { + this.identifiedBy.addAll(identifiedBy); + } + // Start of user code setterFinalize:identifiedBy + // End of user code + } + + // Start of user code setterAnnotation:identifiedDate + // End of user code + public void setIdentifiedDate(final Date identifiedDate ) + { + // Start of user code setterInit:identifiedDate + // End of user code + this.identifiedDate = identifiedDate; + // Start of user code setterFinalize:identifiedDate + // End of user code + } + + // Start of user code setterAnnotation:sequenceNumber + // End of user code + public void setSequenceNumber(final Integer sequenceNumber ) + { + // Start of user code setterInit:sequenceNumber + // End of user code + this.sequenceNumber = sequenceNumber; + // Start of user code setterFinalize:sequenceNumber + // End of user code + } + + // Start of user code setterAnnotation:stateOfRisk + // End of user code + public void setStateOfRisk(final Link stateOfRisk ) + { + // Start of user code setterInit:stateOfRisk + // End of user code + this.stateOfRisk = stateOfRisk; + // Start of user code setterFinalize:stateOfRisk + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/RiskCollection.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/RiskCollection.java new file mode 100644 index 000000000..0fbddab64 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/RiskCollection.java @@ -0,0 +1,206 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItemCollection; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.Issue; +import org.eclipse.lyo.oslc.domains.promcode.Project; +import org.eclipse.lyo.oslc.domains.promcode.Risk; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.RISKCOLLECTION_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.RISKCOLLECTION_LOCALNAME) +@OslcResourceShape(title = "RiskCollection Shape", description = "", describes = Oslc_promcodeDomainConstants.RISKCOLLECTION_TYPE) +public class RiskCollection + extends ManagedItemCollection + implements IRiskCollection +{ + // Start of user code attributeAnnotation:oslc_promcodeBelongsTo + // End of user code + private Link oslc_promcodeBelongsTo; + // Start of user code attributeAnnotation:oslc_promcodeCollects + // End of user code + private Set oslc_promcodeCollects = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public RiskCollection() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public RiskCollection(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.RISKCOLLECTION_PATH, + RiskCollection.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local RiskCollection Resource} - update RiskCollection.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addOslc_promcodeCollects(final Link collects) + { + this.oslc_promcodeCollects.add(collects); + } + + + // Start of user code getterAnnotation:oslc_promcodeBelongsTo + // End of user code + @OslcName("belongsTo") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "belongsTo") + @OslcOccurs(Occurs.ExactlyOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.PROJECT_TYPE}) + @OslcReadOnly(false) + public Link getOslc_promcodeBelongsTo() + { + // Start of user code getterInit:oslc_promcodeBelongsTo + // End of user code + return oslc_promcodeBelongsTo; + } + + // Start of user code getterAnnotation:oslc_promcodeCollects + // End of user code + @OslcName("collects") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "collects") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.RISK_TYPE}) + @OslcReadOnly(false) + public Set getOslc_promcodeCollects() + { + // Start of user code getterInit:oslc_promcodeCollects + // End of user code + return oslc_promcodeCollects; + } + + // Start of user code setterAnnotation:oslc_promcodeBelongsTo + // End of user code + public void setOslc_promcodeBelongsTo(final Link belongsTo ) + { + // Start of user code setterInit:oslc_promcodeBelongsTo + // End of user code + this.oslc_promcodeBelongsTo = belongsTo; + // Start of user code setterFinalize:oslc_promcodeBelongsTo + // End of user code + } + + // Start of user code setterAnnotation:oslc_promcodeCollects + // End of user code + public void setOslc_promcodeCollects(final Set collects ) + { + // Start of user code setterInit:oslc_promcodeCollects + // End of user code + this.oslc_promcodeCollects.clear(); + if (collects != null) + { + this.oslc_promcodeCollects.addAll(collects); + } + // Start of user code setterFinalize:oslc_promcodeCollects + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ScopeItem.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ScopeItem.java new file mode 100644 index 000000000..72140246e --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/ScopeItem.java @@ -0,0 +1,219 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItem; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.SCOPEITEM_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.SCOPEITEM_LOCALNAME) +@OslcResourceShape(title = "ScopeItem Shape", description = "A ScopeItem defines the work to be included in or excluded from a project. It defines the boundaries of the project", describes = Oslc_promcodeDomainConstants.SCOPEITEM_TYPE) +public class ScopeItem + extends ManagedItem + implements IScopeItem +{ + // Start of user code attributeAnnotation:actualSize + // End of user code + private Float actualSize; + // Start of user code attributeAnnotation:isPartOf + // End of user code + private Link isPartOf; + // Start of user code attributeAnnotation:plannedSize + // End of user code + private Float plannedSize; + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public ScopeItem() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public ScopeItem(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.SCOPEITEM_PATH, + ScopeItem.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local ScopeItem Resource} - update ScopeItem.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + + // Start of user code getterAnnotation:actualSize + // End of user code + @OslcName("actualSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Float) + @OslcReadOnly(false) + public Float getActualSize() + { + // Start of user code getterInit:actualSize + // End of user code + return actualSize; + } + + // Start of user code getterAnnotation:isPartOf + // End of user code + @OslcName("isPartOf") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "isPartOf") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.SCOPEITEM_TYPE}) + @OslcReadOnly(false) + public Link getIsPartOf() + { + // Start of user code getterInit:isPartOf + // End of user code + return isPartOf; + } + + // Start of user code getterAnnotation:plannedSize + // End of user code + @OslcName("plannedSize") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedSize") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Float) + @OslcReadOnly(false) + public Float getPlannedSize() + { + // Start of user code getterInit:plannedSize + // End of user code + return plannedSize; + } + + // Start of user code setterAnnotation:actualSize + // End of user code + public void setActualSize(final Float actualSize ) + { + // Start of user code setterInit:actualSize + // End of user code + this.actualSize = actualSize; + // Start of user code setterFinalize:actualSize + // End of user code + } + + // Start of user code setterAnnotation:isPartOf + // End of user code + public void setIsPartOf(final Link isPartOf ) + { + // Start of user code setterInit:isPartOf + // End of user code + this.isPartOf = isPartOf; + // Start of user code setterFinalize:isPartOf + // End of user code + } + + // Start of user code setterAnnotation:plannedSize + // End of user code + public void setPlannedSize(final Float plannedSize ) + { + // Start of user code setterInit:plannedSize + // End of user code + this.plannedSize = plannedSize; + // Start of user code setterFinalize:plannedSize + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/WorkItem.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/WorkItem.java new file mode 100644 index 000000000..53d5a2580 --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/WorkItem.java @@ -0,0 +1,343 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +package org.eclipse.lyo.oslc.domains.promcode; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Iterator; + +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.annotation.OslcAllowedValue; +import org.eclipse.lyo.oslc4j.core.annotation.OslcDescription; +import org.eclipse.lyo.oslc4j.core.annotation.OslcMemberProperty; +import org.eclipse.lyo.oslc4j.core.annotation.OslcName; +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespace; +import org.eclipse.lyo.oslc4j.core.annotation.OslcOccurs; +import org.eclipse.lyo.oslc4j.core.annotation.OslcPropertyDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRdfCollectionType; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRange; +import org.eclipse.lyo.oslc4j.core.annotation.OslcReadOnly; +import org.eclipse.lyo.oslc4j.core.annotation.OslcRepresentation; +import org.eclipse.lyo.oslc4j.core.annotation.OslcResourceShape; +import org.eclipse.lyo.oslc4j.core.annotation.OslcTitle; +import org.eclipse.lyo.oslc4j.core.annotation.OslcValueType; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import org.eclipse.lyo.oslc4j.core.model.Link; +import org.eclipse.lyo.oslc4j.core.model.Occurs; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.Representation; +import org.eclipse.lyo.oslc4j.core.model.ValueType; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc4j.core.model.ResourceShapeFactory; + +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.ManagedItem; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; +import org.eclipse.lyo.oslc.domains.promcode.Artifact; +import org.eclipse.lyo.oslc.domains.promcode.ScopeItem; +import org.eclipse.lyo.oslc.domains.promcode.WorkItem; +// Start of user code imports +// End of user code + +// Start of user code preClassCode +// End of user code + +// Start of user code classAnnotations +// End of user code +@OslcNamespace(Oslc_promcodeDomainConstants.WORKITEM_NAMESPACE) +@OslcName(Oslc_promcodeDomainConstants.WORKITEM_LOCALNAME) +@OslcResourceShape(title = "WorkItem Shape", description = "A work item describes work to be performed in a project delivery contract. It adds detail to the description of work that is described by a scope item. These details typically include cost, schedule, and resource requirements. The set of all work items in a project form a work breakdown structure.", describes = Oslc_promcodeDomainConstants.WORKITEM_TYPE) +public class WorkItem + extends ManagedItem + implements IWorkItem +{ + // Start of user code attributeAnnotation:actualEndDate + // End of user code + private Date actualEndDate; + // Start of user code attributeAnnotation:actualStartDate + // End of user code + private Date actualStartDate; + // Start of user code attributeAnnotation:isPartOf + // End of user code + private Link isPartOf; + // Start of user code attributeAnnotation:plannedEndDate + // End of user code + private Date plannedEndDate; + // Start of user code attributeAnnotation:plannedStartDate + // End of user code + private Date plannedStartDate; + // Start of user code attributeAnnotation:representedBy + // End of user code + private Link representedBy; + // Start of user code attributeAnnotation:requiredBy + // End of user code + private Set requiredBy = new HashSet(); + + // Start of user code classAttributes + // End of user code + // Start of user code classMethods + // End of user code + public WorkItem() + { + super(); + + // Start of user code constructor1 + // End of user code + } + + public WorkItem(final URI about) + { + super(about); + + // Start of user code constructor2 + // End of user code + } + + public static ResourceShape createResourceShape() throws OslcCoreApplicationException, URISyntaxException { + return ResourceShapeFactory.createResourceShape(OSLC4JUtils.getServletURI(), + OslcConstants.PATH_RESOURCE_SHAPES, + Oslc_promcodeDomainConstants.WORKITEM_PATH, + WorkItem.class); + } + + + public String toString() + { + return toString(false); + } + + public String toString(boolean asLocalResource) + { + String result = ""; + // Start of user code toString_init + // End of user code + + if (asLocalResource) { + result = result + "{a Local WorkItem Resource} - update WorkItem.toString() to present resource as desired."; + // Start of user code toString_bodyForLocalResource + // End of user code + } + else { + result = String.valueOf(getAbout()); + } + + // Start of user code toString_finalize + // End of user code + + return result; + } + + public void addRequiredBy(final Link requiredBy) + { + this.requiredBy.add(requiredBy); + } + + + // Start of user code getterAnnotation:actualEndDate + // End of user code + @OslcName("actualEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualEndDate() + { + // Start of user code getterInit:actualEndDate + // End of user code + return actualEndDate; + } + + // Start of user code getterAnnotation:actualStartDate + // End of user code + @OslcName("actualStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "actualStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getActualStartDate() + { + // Start of user code getterInit:actualStartDate + // End of user code + return actualStartDate; + } + + // Start of user code getterAnnotation:isPartOf + // End of user code + @OslcName("isPartOf") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "isPartOf") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.WORKITEM_TYPE}) + @OslcReadOnly(false) + public Link getIsPartOf() + { + // Start of user code getterInit:isPartOf + // End of user code + return isPartOf; + } + + // Start of user code getterAnnotation:plannedEndDate + // End of user code + @OslcName("plannedEndDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedEndDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedEndDate() + { + // Start of user code getterInit:plannedEndDate + // End of user code + return plannedEndDate; + } + + // Start of user code getterAnnotation:plannedStartDate + // End of user code + @OslcName("plannedStartDate") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "plannedStartDate") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.DateTime) + @OslcReadOnly(false) + public Date getPlannedStartDate() + { + // Start of user code getterInit:plannedStartDate + // End of user code + return plannedStartDate; + } + + // Start of user code getterAnnotation:representedBy + // End of user code + @OslcName("representedBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "representedBy") + @OslcOccurs(Occurs.ZeroOrOne) + @OslcValueType(ValueType.Resource) + @OslcReadOnly(false) + public Link getRepresentedBy() + { + // Start of user code getterInit:representedBy + // End of user code + return representedBy; + } + + // Start of user code getterAnnotation:requiredBy + // End of user code + @OslcName("requiredBy") + @OslcPropertyDefinition(Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE + "requiredBy") + @OslcOccurs(Occurs.ZeroOrMany) + @OslcValueType(ValueType.Resource) + @OslcRange({Oslc_promcodeDomainConstants.SCOPEITEM_TYPE, Oslc_promcodeDomainConstants.ARTIFACT_TYPE}) + @OslcReadOnly(false) + public Set getRequiredBy() + { + // Start of user code getterInit:requiredBy + // End of user code + return requiredBy; + } + + // Start of user code setterAnnotation:actualEndDate + // End of user code + public void setActualEndDate(final Date actualEndDate ) + { + // Start of user code setterInit:actualEndDate + // End of user code + this.actualEndDate = actualEndDate; + // Start of user code setterFinalize:actualEndDate + // End of user code + } + + // Start of user code setterAnnotation:actualStartDate + // End of user code + public void setActualStartDate(final Date actualStartDate ) + { + // Start of user code setterInit:actualStartDate + // End of user code + this.actualStartDate = actualStartDate; + // Start of user code setterFinalize:actualStartDate + // End of user code + } + + // Start of user code setterAnnotation:isPartOf + // End of user code + public void setIsPartOf(final Link isPartOf ) + { + // Start of user code setterInit:isPartOf + // End of user code + this.isPartOf = isPartOf; + // Start of user code setterFinalize:isPartOf + // End of user code + } + + // Start of user code setterAnnotation:plannedEndDate + // End of user code + public void setPlannedEndDate(final Date plannedEndDate ) + { + // Start of user code setterInit:plannedEndDate + // End of user code + this.plannedEndDate = plannedEndDate; + // Start of user code setterFinalize:plannedEndDate + // End of user code + } + + // Start of user code setterAnnotation:plannedStartDate + // End of user code + public void setPlannedStartDate(final Date plannedStartDate ) + { + // Start of user code setterInit:plannedStartDate + // End of user code + this.plannedStartDate = plannedStartDate; + // Start of user code setterFinalize:plannedStartDate + // End of user code + } + + // Start of user code setterAnnotation:representedBy + // End of user code + public void setRepresentedBy(final Link representedBy ) + { + // Start of user code setterInit:representedBy + // End of user code + this.representedBy = representedBy; + // Start of user code setterFinalize:representedBy + // End of user code + } + + // Start of user code setterAnnotation:requiredBy + // End of user code + public void setRequiredBy(final Set requiredBy ) + { + // Start of user code setterInit:requiredBy + // End of user code + this.requiredBy.clear(); + if (requiredBy != null) + { + this.requiredBy.addAll(requiredBy); + } + // Start of user code setterFinalize:requiredBy + // End of user code + } + +} diff --git a/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/package-info.java b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/package-info.java new file mode 100644 index 000000000..f61f0c28e --- /dev/null +++ b/domains/oslc-domains/src/main/java/org/eclipse/lyo/oslc/domains/promcode/package-info.java @@ -0,0 +1,31 @@ +// Start of user code Copyright +/* + * Copyright (c) 2020 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Simple + * + * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) + */ +// End of user code + +@OslcSchema ({ + @OslcNamespaceDefinition(prefix = OslcConstants.DCTERMS_NAMESPACE_PREFIX, namespaceURI = OslcConstants.DCTERMS_NAMESPACE), + @OslcNamespaceDefinition(prefix = OslcConstants.OSLC_CORE_NAMESPACE_PREFIX, namespaceURI = OslcConstants.OSLC_CORE_NAMESPACE), + @OslcNamespaceDefinition(prefix = OslcConstants.OSLC_DATA_NAMESPACE_PREFIX, namespaceURI = OslcConstants.OSLC_DATA_NAMESPACE), + @OslcNamespaceDefinition(prefix = OslcConstants.RDF_NAMESPACE_PREFIX, namespaceURI = OslcConstants.RDF_NAMESPACE), + @OslcNamespaceDefinition(prefix = OslcConstants.RDFS_NAMESPACE_PREFIX, namespaceURI = OslcConstants.RDFS_NAMESPACE), + @OslcNamespaceDefinition(prefix = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE_PREFIX, namespaceURI = Oslc_promcodeDomainConstants.PROMCODE_NAMSPACE), +}) +package org.eclipse.lyo.oslc.domains.promcode; + +import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespaceDefinition; +import org.eclipse.lyo.oslc4j.core.annotation.OslcSchema; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc.domains.promcode.Oslc_promcodeDomainConstants; diff --git a/pom.xml b/pom.xml index 60d1f0c6f..5a3f9b525 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,11 @@ - + 4.0.0 org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT pom Lyo :: _Parent @@ -17,27 +18,30 @@ ${project.version} - 1.9.20 - 1.9.10 + 2.0.20 + 1.9.20 - 2.35 + 3.1.9 3.1.0 4.10.0 2.15.3 4.5.14 - 2.0.7 + 2.0.16 - 32.1.3-jre + 33.3.1-jre https://eclipse.org/lyo - 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) + 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. @@ -97,7 +101,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.7 sign-artifacts @@ -136,7 +140,8 @@ jena-staging Apache Jena staging - https://repository.apache.org/content/repositories/orgapachejena-1052 + + https://repository.apache.org/content/repositories/orgapachejena-1052 false @@ -192,7 +197,8 @@ dash-licenses-snapshots - https://repo.eclipse.org/content/repositories/dash-licenses-snapshots/ + + https://repo.eclipse.org/content/repositories/dash-licenses-snapshots/ true @@ -216,9 +222,9 @@ - javax.servlet.jsp.jstl - javax.servlet.jsp.jstl-api - 1.2.2 + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + 3.0.0 org.eclipse.lyo.oslc4j.core @@ -238,12 +244,18 @@ jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + 4.0.2 + + + jakarta.annotation + jakarta.annotation-api + 3.0.0 + provided org.glassfish.jaxb jaxb-runtime - 2.3.6 + 4.0.5 @@ -299,12 +311,12 @@ jakarta.ws.rs jakarta.ws.rs-api - 2.1.6 + 3.1.0 - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 6.0.0 org.glassfish.jersey.containers @@ -340,12 +352,18 @@ commons-lang 2.6 + + org.apache.commons + commons-lang3 + 3.17.0 + + org.mockito mockito-core - 5.7.0 + 5.14.1 test @@ -357,14 +375,14 @@ org.junit junit-bom - 5.10.1 + 5.11.2 pom import org.assertj assertj-core - 3.22.0 + 3.26.3 @@ -372,28 +390,17 @@ commons-codec commons-codec - 1.16.0 - - - org.apache.commons - commons-lang3 - 3.13.0 + 1.17.1 com.google.guava guava ${v.guava} - - jakarta.annotation - jakarta.annotation-api - 1.3.5 - provided - jakarta.activation jakarta.activation-api - 1.2.2 + 2.1.3 provided @@ -409,12 +416,12 @@ org.apache.tomcat.embed tomcat-embed-core - 8.5.95 + 8.5.100 commons-io commons-io - 2.14.0 + 2.17.0 - - OslcSchema - X - - - OslcNamespaceDefinition - X - - - Deprecated - X - - all,-accessibility,-html,-missing @@ -498,31 +491,32 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.5.1 - + false org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.1 org.apache.maven.plugins maven-site-plugin - 3.12.1 + 3.20.0 org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.3 + 3.7.0 org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + 3.5.0 enforce-maven @@ -549,7 +543,7 @@ org.apache.logging.log4j:log4j-core - + @@ -594,27 +588,27 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-clean-plugin - 3.2.0 + 3.4.0 org.apache.maven.plugins maven-deploy-plugin - 3.1.1 + 3.1.3 org.apache.maven.plugins maven-install-plugin - 3.1.1 + 3.1.3 org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.4.2 @@ -623,7 +617,7 @@ org.codehaus.mojo versions-maven-plugin - 2.16.1 + 2.17.1 false @@ -660,6 +654,23 @@ org.apache.maven.plugins maven-install-plugin + + org.cyclonedx + cyclonedx-maven-plugin + 2.9.0 + + 1.4 + library + + + + package + + makeAggregateBom + + + + diff --git a/server/net.oauth.core-oauth-consumer-jakarta/pom.xml b/server/net.oauth.core-oauth-consumer-jakarta/pom.xml new file mode 100644 index 000000000..09637f27d --- /dev/null +++ b/server/net.oauth.core-oauth-consumer-jakarta/pom.xml @@ -0,0 +1,53 @@ + + 4.0.0 + + org.eclipse.lyo.oslc4j.server + lyo-server-build + 7.0.0-SNAPSHOT + ../pom.xml + + org.eclipse.lyo.server + net.oauth.core-oauth-consumer-jakarta + jar + + + net.oauth.core + oauth-consumer + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.eclipse.transformer + transformer-maven-plugin + 0.5.0 + true + + + true + + + + + default-jar + + jar + + + + net.oauth.core + oauth-consumer + + + + + + + + + diff --git a/server/net.oauth.core-oauth-consumer-jakarta/src/main/java/readme.md b/server/net.oauth.core-oauth-consumer-jakarta/src/main/java/readme.md new file mode 100644 index 000000000..81c49c44a --- /dev/null +++ b/server/net.oauth.core-oauth-consumer-jakarta/src/main/java/readme.md @@ -0,0 +1,2 @@ +Need to have the src/main/java folder in order to produce a source.jar file. +This in turn is needed to be able to publish to Maven Central. diff --git a/server/net.oauth.core-oauth-httpclient4-jakarta/pom.xml b/server/net.oauth.core-oauth-httpclient4-jakarta/pom.xml new file mode 100644 index 000000000..15835887d --- /dev/null +++ b/server/net.oauth.core-oauth-httpclient4-jakarta/pom.xml @@ -0,0 +1,59 @@ + + 4.0.0 + + org.eclipse.lyo.oslc4j.server + lyo-server-build + 7.0.0-SNAPSHOT + ../pom.xml + + org.eclipse.lyo.server + net.oauth.core-oauth-httpclient4-jakarta + jar + + + net.oauth.core + oauth-httpclient4 + + + org.apache.httpcomponents + httpclient + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.eclipse.transformer + transformer-maven-plugin + 0.5.0 + true + + + true + + + + + default-jar + + jar + + + + net.oauth.core + oauth-httpclient4 + + + + + + + + + diff --git a/server/net.oauth.core-oauth-httpclient4-jakarta/src/main/java/readme.md b/server/net.oauth.core-oauth-httpclient4-jakarta/src/main/java/readme.md new file mode 100644 index 000000000..81c49c44a --- /dev/null +++ b/server/net.oauth.core-oauth-httpclient4-jakarta/src/main/java/readme.md @@ -0,0 +1,2 @@ +Need to have the src/main/java folder in order to produce a source.jar file. +This in turn is needed to be able to publish to Maven Central. diff --git a/server/net.oauth.core-oauth-jakarta/pom.xml b/server/net.oauth.core-oauth-jakarta/pom.xml new file mode 100644 index 000000000..ebf2c37e5 --- /dev/null +++ b/server/net.oauth.core-oauth-jakarta/pom.xml @@ -0,0 +1,53 @@ + + 4.0.0 + + org.eclipse.lyo.oslc4j.server + lyo-server-build + 7.0.0-SNAPSHOT + ../pom.xml + + org.eclipse.lyo.server + net.oauth.core-oauth-jakarta + jar + + + net.oauth.core + oauth + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.eclipse.transformer + transformer-maven-plugin + 0.5.0 + true + + + true + + + + + default-jar + + jar + + + + net.oauth.core + oauth + + + + + + + + + diff --git a/server/net.oauth.core-oauth-jakarta/src/main/java/readme.md b/server/net.oauth.core-oauth-jakarta/src/main/java/readme.md new file mode 100644 index 000000000..81c49c44a --- /dev/null +++ b/server/net.oauth.core-oauth-jakarta/src/main/java/readme.md @@ -0,0 +1,2 @@ +Need to have the src/main/java folder in order to produce a source.jar file. +This in turn is needed to be able to publish to Maven Central. diff --git a/server/net.oauth.core-oauth-provider-jakarta/pom.xml b/server/net.oauth.core-oauth-provider-jakarta/pom.xml new file mode 100644 index 000000000..997d36829 --- /dev/null +++ b/server/net.oauth.core-oauth-provider-jakarta/pom.xml @@ -0,0 +1,53 @@ + + 4.0.0 + + org.eclipse.lyo.oslc4j.server + lyo-server-build + 7.0.0-SNAPSHOT + ../pom.xml + + org.eclipse.lyo.server + net.oauth.core-oauth-provider-jakarta + jar + + + net.oauth.core + oauth-provider + + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.eclipse.transformer + transformer-maven-plugin + 0.5.0 + true + + + true + + + + + default-jar + + jar + + + + net.oauth.core + oauth-provider + + + + + + + + + diff --git a/server/net.oauth.core-oauth-provider-jakarta/src/main/java/readme.md b/server/net.oauth.core-oauth-provider-jakarta/src/main/java/readme.md new file mode 100644 index 000000000..81c49c44a --- /dev/null +++ b/server/net.oauth.core-oauth-provider-jakarta/src/main/java/readme.md @@ -0,0 +1,2 @@ +Need to have the src/main/java folder in order to produce a source.jar file. +This in turn is needed to be able to publish to Maven Central. diff --git a/server/oauth-consumer-store/pom.xml b/server/oauth-consumer-store/pom.xml index 338175dbc..00552474f 100644 --- a/server/oauth-consumer-store/pom.xml +++ b/server/oauth-consumer-store/pom.xml @@ -4,7 +4,7 @@ org.eclipse.lyo.oslc4j.server lyo-server-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml org.eclipse.lyo.server @@ -29,8 +29,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents diff --git a/server/oauth-core/pom.xml b/server/oauth-core/pom.xml index 0e407377b..c401463f8 100644 --- a/server/oauth-core/pom.xml +++ b/server/oauth-core/pom.xml @@ -4,7 +4,7 @@ org.eclipse.lyo.oslc4j.server lyo-server-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml org.eclipse.lyo.server @@ -29,23 +29,52 @@ jakarta.ws.rs-api - net.oauth.core - oauth + org.eclipse.lyo.server + net.oauth.core-oauth-jakarta + ${v.lyo} + + + + net.oauth.core + oauth + + - net.oauth.core - oauth-consumer + org.eclipse.lyo.server + net.oauth.core-oauth-consumer-jakarta + ${v.lyo} + + + + net.oauth.core + oauth-consumer + + - net.oauth.core - oauth-provider + org.eclipse.lyo.server + net.oauth.core-oauth-provider-jakarta + ${v.lyo} + + + + net.oauth.core + oauth-provider + + - javax.servlet - javax.servlet-api - provided + jakarta.servlet + jakarta.servlet-api org.slf4j diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/Application.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/Application.java index 970141af4..a840aabb5 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/Application.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/Application.java @@ -13,7 +13,7 @@ */ package org.eclipse.lyo.server.oauth.core; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Handles authentication with the backend system. diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/AuthenticationException.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/AuthenticationException.java index 6f32a869c..e60eb2798 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/AuthenticationException.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/AuthenticationException.java @@ -13,7 +13,7 @@ */ package org.eclipse.lyo.server.oauth.core; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * An exception indicating that authentication failed. diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthConfiguration.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthConfiguration.java index 01f61e994..c35016fee 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthConfiguration.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthConfiguration.java @@ -13,18 +13,18 @@ */ package org.eclipse.lyo.server.oauth.core; -import javax.servlet.http.HttpServletResponse; - -import net.oauth.OAuthProblemException; -import net.oauth.OAuthValidator; -import net.oauth.SimpleOAuthValidator; -import net.oauth.http.HttpMessage; +import jakarta.servlet.http.HttpServletResponse; import org.eclipse.lyo.server.oauth.core.consumer.ConsumerStore; import org.eclipse.lyo.server.oauth.core.consumer.ConsumerStoreException; import org.eclipse.lyo.server.oauth.core.token.SimpleTokenStrategy; import org.eclipse.lyo.server.oauth.core.token.TokenStrategy; +import net.oauth.OAuthProblemException; +import net.oauth.OAuthValidator; +import net.oauth.SimpleOAuthValidator; +import net.oauth.http.HttpMessage; + /** * Manages the OAuth provider configuration, including the validator, consumer store, and * token strategy. diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthRequest.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthRequest.java index b1d4d1e8e..18c40394c 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthRequest.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/OAuthRequest.java @@ -16,10 +16,14 @@ import java.io.IOException; import java.net.URISyntaxException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.UriBuilder; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import jakarta.ws.rs.core.UriBuilder; import net.oauth.OAuth; import net.oauth.OAuthAccessor; import net.oauth.OAuthException; @@ -28,10 +32,6 @@ import net.oauth.OAuthValidator; import net.oauth.server.OAuthServlet; -import org.eclipse.lyo.server.oauth.core.consumer.LyoOAuthConsumer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Validates that a request is authorized. The request must contain a valid * access token and pass {@link OAuthValidator} tests. To change the validator @@ -120,7 +120,7 @@ public LyoOAuthConsumer getConsumer() { * using the validator set in the {@link OAuthConfiguration}. *

* If the request fails validation, you can use - * {@link OAuthServlet#handleException(javax.servlet.http.HttpServletResponse, Exception, String)} + * {@link OAuthServlet#handleException(jakarta.servlet.http.HttpServletResponse, Exception, String)} * to send an unauthorized response. * * @throws OAuthException if the request fails validation diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/SimpleTokenStrategy.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/SimpleTokenStrategy.java index c62865e15..82176e384 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/SimpleTokenStrategy.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/SimpleTokenStrategy.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.UUID; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.eclipse.lyo.server.oauth.core.OAuthRequest; diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/TokenStrategy.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/TokenStrategy.java index d321516f3..0f306a977 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/TokenStrategy.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/token/TokenStrategy.java @@ -15,14 +15,13 @@ import java.io.IOException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; + +import org.eclipse.lyo.server.oauth.core.OAuthRequest; -import net.oauth.OAuthAccessor; import net.oauth.OAuthException; import net.oauth.OAuthMessage; -import org.eclipse.lyo.server.oauth.core.OAuthRequest; - /** * Manages and validates OAuth tokens and token secrets. * {@link SimpleTokenStrategy} is a basic implementation, but you can implement diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java index 0f8b4d537..c73e490c4 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java @@ -16,26 +16,18 @@ import java.io.IOException; import java.net.URISyntaxException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionListener; - -import net.oauth.OAuth; -import net.oauth.OAuthAccessor; -import net.oauth.OAuthException; -import net.oauth.OAuthMessage; -import net.oauth.OAuthProblemException; -import net.oauth.http.HttpMessage; -import net.oauth.server.OAuthServlet; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSessionEvent; +import jakarta.servlet.http.HttpSessionListener; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.server.oauth.core.Application; @@ -49,6 +41,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import net.oauth.OAuth; +import net.oauth.OAuthAccessor; +import net.oauth.OAuthException; +import net.oauth.OAuthMessage; +import net.oauth.OAuthProblemException; +import net.oauth.http.HttpMessage; +import net.oauth.server.OAuthServlet; + /** *

Overview

* Purpose: Provide a JEE Servlet filter base implementation for accepting diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/RestException.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/RestException.java index 22eb80db5..3fc9f0786 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/RestException.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/RestException.java @@ -13,7 +13,7 @@ */ package org.eclipse.lyo.server.oauth.core.utils; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; /** * Holds a status code and error message for an error response. diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/UnauthorizedException.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/UnauthorizedException.java index a723ea78b..4f33efe82 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/UnauthorizedException.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/UnauthorizedException.java @@ -13,7 +13,7 @@ */ package org.eclipse.lyo.server.oauth.core.utils; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; /** * Corresponds to an HTTP 401 response. diff --git a/server/oauth-webapp/pom.xml b/server/oauth-webapp/pom.xml index 8781c0316..ec24d976d 100644 --- a/server/oauth-webapp/pom.xml +++ b/server/oauth-webapp/pom.xml @@ -4,7 +4,7 @@ org.eclipse.lyo.oslc4j.server lyo-server-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml org.eclipse.lyo.server @@ -16,34 +16,27 @@ + - - - net.oauth.core - oauth - - - net.oauth.core - oauth-provider - - org.eclipse.lyo.server oauth-core ${v.lyo} + provided - javax.servlet.jsp.jstl - javax.servlet.jsp.jstl-api + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api provided - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided @@ -55,10 +48,12 @@ org.slf4j slf4j-api + provided org.apache.wink wink-json4j + provided diff --git a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/CSRFPrevent.java b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/CSRFPrevent.java index 8b212e168..37b339504 100644 --- a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/CSRFPrevent.java +++ b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/CSRFPrevent.java @@ -13,15 +13,16 @@ */ package org.eclipse.lyo.server.oauth.webapp.services; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + /** * Checks requests to see if they have the right X-CSRF-Prevent header values. * diff --git a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/ConsumersService.java b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/ConsumersService.java index f96c35040..8e2095a3c 100644 --- a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/ConsumersService.java +++ b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/ConsumersService.java @@ -16,22 +16,8 @@ import java.util.Collection; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; - -import net.oauth.OAuthProblemException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.wink.json4j.JSONArray; import org.apache.wink.json4j.JSONException; @@ -43,6 +29,20 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import net.oauth.OAuthProblemException; + /** * Manages OAuth consumers for this provider. * diff --git a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthService.java b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthService.java index cde971f07..e2027aeeb 100644 --- a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthService.java +++ b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthService.java @@ -20,31 +20,9 @@ import java.util.List; import java.util.UUID; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriBuilder; - -import net.oauth.OAuth; -import net.oauth.OAuth.Parameter; -import net.oauth.OAuthAccessor; -import net.oauth.OAuthException; -import net.oauth.OAuthMessage; -import net.oauth.OAuthProblemException; -import net.oauth.OAuthValidator; -import net.oauth.server.OAuthServlet; -import net.oauth.signature.OAuthSignatureMethod; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.wink.json4j.JSON; import org.apache.wink.json4j.JSONException; @@ -59,6 +37,27 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.UriBuilder; +import net.oauth.OAuth; +import net.oauth.OAuth.Parameter; +import net.oauth.OAuthAccessor; +import net.oauth.OAuthException; +import net.oauth.OAuthMessage; +import net.oauth.OAuthProblemException; +import net.oauth.OAuthValidator; +import net.oauth.server.OAuthServlet; + /** * Issues OAuth request tokens, handles authentication, and then exchanges * request tokens for access tokens based on the OAuth configuration set in the diff --git a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthServletListener.java b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthServletListener.java index 30262b969..75d0c9c14 100644 --- a/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthServletListener.java +++ b/server/oauth-webapp/src/main/java/org/eclipse/lyo/server/oauth/webapp/services/OAuthServletListener.java @@ -14,13 +14,13 @@ package org.eclipse.lyo.server.oauth.webapp.services; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; + import org.eclipse.lyo.server.oauth.core.OAuthConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - public class OAuthServletListener implements ServletContextListener { private static final Logger log = LoggerFactory.getLogger(OAuthServletListener.class); diff --git a/server/oauth-webapp/src/main/webapp/WEB-INF/web.xml b/server/oauth-webapp/src/main/webapp/WEB-INF/web.xml index 593d8fcd2..ec1d01d2b 100644 --- a/server/oauth-webapp/src/main/webapp/WEB-INF/web.xml +++ b/server/oauth-webapp/src/main/webapp/WEB-INF/web.xml @@ -12,11 +12,11 @@ --> - + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee/ + https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" + version="5.0"> Eclipse Lyo Sample OAuth Provider An example demonstrating the Lyo OAuth provider framework. diff --git a/server/oslc-ui-model/pom.xml b/server/oslc-ui-model/pom.xml index 005f0a519..1205915c4 100644 --- a/server/oslc-ui-model/pom.xml +++ b/server/oslc-ui-model/pom.xml @@ -6,7 +6,7 @@ org.eclipse.lyo.oslc4j.server lyo-server-build - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml org.eclipse.lyo.server diff --git a/server/pom.xml b/server/pom.xml index ca3e40686..d97408451 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -10,7 +10,7 @@ org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml @@ -19,6 +19,10 @@ oauth-consumer-store oauth-webapp oslc-ui-model + net.oauth.core-oauth-jakarta + net.oauth.core-oauth-consumer-jakarta + net.oauth.core-oauth-provider-jakarta + net.oauth.core-oauth-httpclient4-jakarta @@ -38,6 +42,11 @@ oauth-provider 20100527 + + net.oauth.core + oauth-httpclient4 + 20090913 + org.apache.wink wink-server @@ -54,12 +63,6 @@ stax-api 1.0.1 - - javax.servlet - javax.servlet-api - 3.1.0 - provided - @@ -83,6 +86,9 @@ org.apache.maven.plugins maven-javadoc-plugin + + net.oauth.core-oauth-jakarta, net.oauth.core-oauth-consumer-jakarta, net.oauth.core-oauth-provider-jakarta + diff --git a/store/pom.xml b/store/pom.xml index 712de061e..d724ff2b7 100644 --- a/store/pom.xml +++ b/store/pom.xml @@ -6,14 +6,14 @@ org.eclipse.lyo.store store-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT pom Lyo :: Store :: _Parent org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT diff --git a/store/store-core/pom.xml b/store/store-core/pom.xml index 69dca5e32..0f408f61a 100644 --- a/store/store-core/pom.xml +++ b/store/store-core/pom.xml @@ -7,7 +7,7 @@ org.eclipse.lyo.store store-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml @@ -63,8 +63,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0 + 3.5.1 @@ -152,7 +152,7 @@ org.jacoco jacoco-maven-plugin - 0.8.11 + 0.8.12 jacoco-initialize @@ -190,7 +190,7 @@ org.jacoco jacoco-maven-plugin - 0.8.11 + 0.8.12 /e cat tmp.md' -e '//,//{//!d}' ../../README.md | sponge ../../README.md diff --git a/trs/client/client-source-mqtt/pom.xml b/trs/client/client-source-mqtt/pom.xml index 7bc1951f2..1e04e7ed1 100644 --- a/trs/client/client-source-mqtt/pom.xml +++ b/trs/client/client-source-mqtt/pom.xml @@ -6,7 +6,7 @@ org.eclipse.lyo.trs trs-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml @@ -76,8 +76,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents diff --git a/trs/client/pom.xml b/trs/client/pom.xml index 7ece1f8c2..a2ef1f2a1 100644 --- a/trs/client/pom.xml +++ b/trs/client/pom.xml @@ -10,7 +10,7 @@ org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../../pom.xml diff --git a/trs/client/trs-client/pom.xml b/trs/client/trs-client/pom.xml index 45259883b..c4bbe0a90 100644 --- a/trs/client/trs-client/pom.xml +++ b/trs/client/trs-client/pom.xml @@ -6,7 +6,7 @@ org.eclipse.lyo.trs trs-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml @@ -58,10 +58,9 @@ - - javax.servlet - javax.servlet-api - + jakarta.servlet + jakarta.servlet-api + 6.0.0 org.eclipse.lyo @@ -79,8 +78,8 @@ pom - javax.annotation - javax.annotation-api + jakarta.annotation + jakarta.annotation-api org.apache.httpcomponents diff --git a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConfigurationLoader.java b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConfigurationLoader.java index 460b15954..a31c15868 100644 --- a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConfigurationLoader.java +++ b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConfigurationLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Contributors to the Eclipse Foundation + * Copyright (c) 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -15,6 +15,7 @@ package org.eclipse.lyo.trs.client.config; import com.google.common.base.Strings; + import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; @@ -24,11 +25,16 @@ import java.util.Properties; /** - * Created on 2018-02-27 + * Loads TRS Provider configuration from a .properties file. + *

+ * Supported properties: + *

    + *
  • trs_uri - a TRS Provider endpoint
  • + *
  • baseAuth_user - HTTP Basic auth user (optional)
  • + *
  • baseAuth_pwd - HTTP Basic auth password (optional)
  • + *
* - * @author Andrew Berezovskyi (andriib@kth.se) - * @version $version-stub$ - * @since 0.0.1 + * @since 4.0.0 */ public class TrsConfigurationLoader { public static TrsProviderConfiguration from(File f) throws IOException { @@ -36,18 +42,19 @@ public static TrsProviderConfiguration from(File f) throws IOException { throw new IllegalArgumentException("File is null"); } - final InputStream input = new BufferedInputStream(new FileInputStream(f)); - Properties p = new Properties(); - p.load(input); + try (InputStream input = new BufferedInputStream(new FileInputStream(f))) { + Properties p = new Properties(); + p.load(input); - String trsUriParam = p.getProperty("trs_uri"); - if (Strings.isNullOrEmpty(trsUriParam)) { - throw new IllegalStateException("The 'trs_uri' field is missing in file " + f.getName()); - } + String trsUriParam = p.getProperty("trs_uri"); + if (Strings.isNullOrEmpty(trsUriParam)) { + throw new IllegalStateException("The 'trs_uri' field is missing in file " + f.getName()); + } - String user = p.getProperty("baseAuth_user"); - String pass = p.getProperty("baseAuth_pwd"); + String user = p.getProperty("baseAuth_user"); + String pass = p.getProperty("baseAuth_pwd"); - return new TrsProviderConfiguration(URI.create(trsUriParam), user, pass); + return new TrsProviderConfiguration(URI.create(trsUriParam), user, pass); + } } } diff --git a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConsumerConfiguration.java b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConsumerConfiguration.java index dc95e5a39..2396b5c8e 100644 --- a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConsumerConfiguration.java +++ b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/config/TrsConsumerConfiguration.java @@ -14,12 +14,15 @@ package org.eclipse.lyo.trs.client.config; -import com.google.common.base.Strings; import java.util.concurrent.ScheduledExecutorService; -import javax.ws.rs.client.ClientBuilder; + import org.eclipse.lyo.client.OslcClient; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; +import com.google.common.base.Strings; + +import jakarta.ws.rs.client.ClientBuilder; + public class TrsConsumerConfiguration { private final String sparqlQueryUrl; private final String sparqlUpdateUrl; diff --git a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/ClientUtil.java b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/ClientUtil.java index cf689ed32..3c9ebfe9f 100644 --- a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/ClientUtil.java +++ b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/ClientUtil.java @@ -5,7 +5,7 @@ import java.io.InputStream; import java.net.URISyntaxException; import java.util.Arrays; -import javax.ws.rs.core.Response; + import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.eclipse.lyo.core.trs.Base; @@ -23,6 +23,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.core.Response; + /** * TODO * diff --git a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/TrackedResourceClient.java b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/TrackedResourceClient.java index d1004d072..b80bc56a1 100644 --- a/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/TrackedResourceClient.java +++ b/trs/client/trs-client/src/main/java/org/eclipse/lyo/trs/client/util/TrackedResourceClient.java @@ -17,7 +17,7 @@ import java.net.URI; import java.util.ArrayList; import java.util.List; -import javax.ws.rs.core.Response; + import org.apache.jena.rdf.model.Model; import org.eclipse.lyo.client.IOslcClient; import org.eclipse.lyo.core.trs.Base; @@ -31,6 +31,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.core.Response; + public class TrackedResourceClient implements ITrackedResourceClient { private static final Logger log = LoggerFactory.getLogger(TrackedResourceClient.class); private final IOslcClient oslcClient; diff --git a/trs/server/pom.xml b/trs/server/pom.xml index 086ea2a1a..7ac0c72e9 100644 --- a/trs/server/pom.xml +++ b/trs/server/pom.xml @@ -20,13 +20,13 @@ 4.0.0 org.eclipse.lyo.trs trs-server - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT Lyo :: TRS :: Server org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../../pom.xml @@ -72,14 +72,14 @@ 3.6.0 - 11 + 17 - - + + The reactor is not valid @@ -116,19 +116,17 @@ ${v.slf4j}
- javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api jakarta.ws.rs jakarta.ws.rs-api - provided - javax.inject - javax.inject - 1 - provided + jakarta.inject + jakarta.inject-api + 2.0.1 diff --git a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/HistoryData.java b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/HistoryData.java index 834fbba3a..11c7038ad 100644 --- a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/HistoryData.java +++ b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/HistoryData.java @@ -15,6 +15,7 @@ import java.net.URI; import java.util.Date; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/InmemPagedTrs.java b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/InmemPagedTrs.java index c968df87c..20bdb986a 100644 --- a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/InmemPagedTrs.java +++ b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/InmemPagedTrs.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.UUID; import java.util.concurrent.atomic.AtomicLong; -import javax.ws.rs.core.UriBuilder; + import org.eclipse.lyo.core.trs.Base; import org.eclipse.lyo.core.trs.ChangeEvent; import org.eclipse.lyo.core.trs.ChangeLog; @@ -34,6 +34,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.core.UriBuilder; + /** * This class is the backbone of the Tracked resource set service class. This class is extended by * oslc adapters wishing to implement an OSLC TRS interface. The implementing classes need to diff --git a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/PagedTrsFactory.java b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/PagedTrsFactory.java index 8f98ab6f1..c79770e5f 100644 --- a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/PagedTrsFactory.java +++ b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/PagedTrsFactory.java @@ -4,11 +4,11 @@ import java.util.ArrayList; import java.util.Collection; -import javax.ws.rs.core.UriBuilder; - import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc4j.trs.server.service.TrackedResourceSetService; +import jakarta.ws.rs.core.UriBuilder; + public class PagedTrsFactory { public InmemPagedTrs getInmemPagedTrs(final int basePageLimit, final int changelogPageLimit, final URI uriBase, final String baseRelativePath, final String changeLogRelativePath, final Collection baseResourceUris) { diff --git a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TRSUtil.java b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TRSUtil.java index 92adc2212..7864b8ee6 100644 --- a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TRSUtil.java +++ b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TRSUtil.java @@ -27,6 +27,7 @@ import java.util.Date; import java.util.List; import java.util.TimeZone; + import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.namespace.QName; diff --git a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TrsEventHandler.java b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TrsEventHandler.java index f9f2e6e6e..e7da949f8 100644 --- a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TrsEventHandler.java +++ b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/TrsEventHandler.java @@ -1,6 +1,7 @@ package org.eclipse.lyo.oslc4j.trs.server; import java.net.URI; + import org.eclipse.lyo.oslc4j.core.model.IResource; public interface TrsEventHandler { diff --git a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/service/TrackedResourceSetService.java b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/service/TrackedResourceSetService.java index 84a048bd8..c50de8801 100644 --- a/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/service/TrackedResourceSetService.java +++ b/trs/server/src/main/java/org/eclipse/lyo/oslc4j/trs/server/service/TrackedResourceSetService.java @@ -16,15 +16,8 @@ import java.net.URI; import java.net.URISyntaxException; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriBuilder; + +import jakarta.inject.Inject; import com.google.common.base.Strings; import org.eclipse.lyo.core.trs.Base; @@ -41,6 +34,15 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.UriBuilder; + /** * The service class for the TRS interface. This class needs to be implemented by an OSLC adapter * wishing to implement a TRS interface diff --git a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceResource.java b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceResource.java index 462de1610..f724b8fa1 100644 --- a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceResource.java +++ b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceResource.java @@ -1,9 +1,9 @@ package org.eclipse.lyo.oslc4j.trs.server.service; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; @Path("/test") public class DummyServiceResource { diff --git a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceTest.java b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceTest.java index 17e7cfc7d..e22b593e9 100644 --- a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceTest.java +++ b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/DummyServiceTest.java @@ -1,19 +1,20 @@ package org.eclipse.lyo.oslc4j.trs.server.service; -import javax.ws.rs.core.Application; -import javax.ws.rs.core.Response; +import static org.assertj.core.api.Assertions.assertThat; + import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.DeploymentContext; import org.glassfish.jersey.test.JerseyTest; import org.glassfish.jersey.test.ServletDeploymentContext; import org.glassfish.jersey.test.TestProperties; import org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory; -import org.glassfish.jersey.test.jetty.JettyTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; import org.junit.Test; -import static org.assertj.core.api.Assertions.*; +import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response; public class DummyServiceTest extends JerseyTest { diff --git a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceDITest.java b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceDITest.java index b993ff7a2..e2af969c3 100644 --- a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceDITest.java +++ b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceDITest.java @@ -1,18 +1,15 @@ package org.eclipse.lyo.oslc4j.trs.server.service; +import static org.assertj.core.api.Assertions.assertThat; + import java.net.MalformedURLException; import java.util.ArrayList; -import javax.inject.Singleton; -import javax.ws.rs.core.Application; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; -import org.apache.http.client.utils.URIBuilder; + import org.eclipse.lyo.core.trs.Base; import org.eclipse.lyo.core.trs.TrackedResourceSet; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc4j.provider.jena.JenaProvidersRegistry; import org.eclipse.lyo.oslc4j.trs.server.InmemPagedTrs; -import org.eclipse.lyo.oslc4j.trs.server.InmemPagedTrsTest; import org.eclipse.lyo.oslc4j.trs.server.PagedTrs; import org.glassfish.hk2.utilities.binding.AbstractBinder; import org.glassfish.jersey.client.ClientConfig; @@ -24,10 +21,11 @@ import org.glassfish.jersey.test.grizzly.GrizzlyTestContainerFactory; import org.glassfish.jersey.test.spi.TestContainerException; import org.glassfish.jersey.test.spi.TestContainerFactory; -import org.junit.Before; import org.junit.Test; -import static org.assertj.core.api.Assertions.*; +import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriBuilder; public class TRSServiceDITest extends JerseyTest { diff --git a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceResource.java b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceResource.java index cb11a56d4..40758dfe2 100644 --- a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceResource.java +++ b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceResource.java @@ -1,16 +1,17 @@ package org.eclipse.lyo.oslc4j.trs.server.service; -import com.google.common.collect.ImmutableList; -import java.util.ArrayList; -import javax.ws.rs.Path; -import javax.ws.rs.core.UriBuilder; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; -import org.eclipse.lyo.oslc4j.trs.server.PagedTrs; import org.eclipse.lyo.oslc4j.trs.server.InmemPagedTrs; +import org.eclipse.lyo.oslc4j.trs.server.PagedTrs; import org.eclipse.lyo.oslc4j.trs.server.TRSTestUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.collect.ImmutableList; + +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.UriBuilder; + @Path("/trs") public class TRSServiceResource extends TrackedResourceSetService { private final static Logger log = LoggerFactory.getLogger(TRSServiceResource.class); diff --git a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceTest.java b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceTest.java index 8e4c03b32..924d9a4bc 100644 --- a/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceTest.java +++ b/trs/server/src/test/java/org/eclipse/lyo/oslc4j/trs/server/service/TRSServiceTest.java @@ -1,7 +1,7 @@ package org.eclipse.lyo.oslc4j.trs.server.service; -import javax.ws.rs.core.Application; -import javax.ws.rs.core.Response; +import static org.assertj.core.api.Assertions.assertThat; + import org.eclipse.lyo.core.trs.Base; import org.eclipse.lyo.core.trs.TrackedResourceSet; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; @@ -18,7 +18,8 @@ import org.junit.Before; import org.junit.Test; -import static org.assertj.core.api.Assertions.*; +import jakarta.ws.rs.core.Application; +import jakarta.ws.rs.core.Response; public class TRSServiceTest extends JerseyTest { diff --git a/validation/pom.xml b/validation/pom.xml index a0ddb9500..2a9474be3 100644 --- a/validation/pom.xml +++ b/validation/pom.xml @@ -3,13 +3,13 @@ 4.0.0 lyo-validation - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT Lyo :: Validation org.eclipse.lyo lyo-parent - 6.0.0-SNAPSHOT + 7.0.0-SNAPSHOT ../pom.xml