├── .editorconfig ├── .github ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ ├── maven-acceptance-manual.yml │ ├── maven-acceptance-wide.yml │ ├── maven-acceptance.yml │ ├── maven.yml │ └── rebase.yml ├── .gitignore ├── .gitpod.Dockerfile ├── .gitpod.yml ├── LICENSE ├── README.md ├── model ├── .project ├── generator.properties ├── license │ ├── edl-v10.html │ ├── epl-v10.html │ └── notice.html ├── representations.aird └── toolchain.xml └── src ├── .dockerignore ├── .gitignore ├── client-toolchain ├── pom.xml └── src │ └── main │ └── kotlin │ └── co │ └── oslc │ └── refimpl │ └── client │ ├── Helper.kt │ ├── Main.kt │ └── RandomResourceGen.kt ├── docker-compose.tomcat.yml ├── docker-compose.yml ├── lib-common ├── pom.xml └── src │ └── main │ └── java │ └── co │ └── oslc │ └── refimpl │ └── lib │ ├── MemResourceRepository.java │ └── ResourceRepository.java ├── pom.xml ├── refimpl-tests ├── .gitignore ├── LICENSE ├── NOTICE ├── README.adoc ├── pom.xml └── src │ └── test │ ├── groovy │ └── OslcSpec.groovy │ └── resources │ ├── ExcludeSlowConfig.groovy │ ├── IncludeFastConfig.groovy │ └── docker-compose.yml ├── server-am ├── .dockerignore ├── Dockerfile ├── config │ └── tomcat-log.properties ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── co │ │ │ └── oslc │ │ │ └── refimpl │ │ │ └── am │ │ │ └── gen │ │ │ ├── AMConstants.java │ │ │ ├── ResourcesFactory.java │ │ │ ├── RestDelegate.java │ │ │ ├── ServerConstants.java │ │ │ ├── ServiceProviderInfo.java │ │ │ ├── auth │ │ │ └── AuthenticationApplication.java │ │ │ ├── clients │ │ │ └── GenericRequiredAdaptorClient.java │ │ │ ├── resources │ │ │ └── package-info.java │ │ │ ├── services │ │ │ ├── LinksService.java │ │ │ ├── ResourceShapeService.java │ │ │ ├── ResourcesService.java │ │ │ ├── RootServicesService.java │ │ │ ├── ServiceProviderCatalogService.java │ │ │ ├── ServiceProviderService.java │ │ │ ├── WsLinkType.java │ │ │ └── WsResource.java │ │ │ └── servlet │ │ │ ├── Application.java │ │ │ ├── ApplicationBinder.java │ │ │ ├── CredentialsFilter.java │ │ │ ├── ServiceProviderCatalogSingleton.java │ │ │ ├── ServiceProvidersFactory.java │ │ │ └── ServletListener.java │ │ ├── resources │ │ └── simplelogger.properties │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── co │ │ └── oslc │ │ │ └── refimpl │ │ │ └── am │ │ │ └── gen │ │ │ ├── creationdialogsampleclient.jsp │ │ │ ├── linktype.jsp │ │ │ ├── linktypelargepreview.jsp │ │ │ ├── linktypescollection.jsp │ │ │ ├── linktypeselector.jsp │ │ │ ├── linktypeselectorresults.jsp │ │ │ ├── linktypesmallpreview.jsp │ │ │ ├── linktypetohtml.jsp │ │ │ ├── persontohtml.jsp │ │ │ ├── resource.jsp │ │ │ ├── resourcelargepreview.jsp │ │ │ ├── resourcescollection.jsp │ │ │ ├── resourceselector.jsp │ │ │ ├── resourceselectorresults.jsp │ │ │ ├── resourceshape.jsp │ │ │ ├── resourcesmallpreview.jsp │ │ │ ├── resourcetohtml.jsp │ │ │ ├── selectiondialogsampleclient.jsp │ │ │ ├── serviceprovider.jsp │ │ │ └── serviceprovidercatalog.jsp │ │ ├── index.jsp │ │ ├── static │ │ ├── css │ │ │ ├── adaptor.css │ │ │ └── bootstrap-4.0.0-beta.min.css │ │ └── js │ │ │ ├── bootstrap-4.0.0-beta.min.js │ │ │ ├── delegated-ui-helper.js │ │ │ ├── delegated-ui.js │ │ │ ├── jquery-3.2.1.min.js │ │ │ ├── popper-1.11.0.min.js │ │ │ └── ui-preview-helper.js │ │ └── swagger-ui │ │ └── index.jsp └── tomcat.Dockerfile ├── server-cm ├── .dockerignore ├── .gitignore ├── Dockerfile ├── config │ └── tomcat-log.properties ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── co │ │ │ └── oslc │ │ │ └── refimpl │ │ │ └── cm │ │ │ └── gen │ │ │ ├── CMConstants.java │ │ │ ├── ResourcesFactory.java │ │ │ ├── RestDelegate.java │ │ │ ├── ServerConstants.java │ │ │ ├── ServiceProviderInfo.java │ │ │ ├── auth │ │ │ └── AuthenticationApplication.java │ │ │ ├── clients │ │ │ └── GenericRequiredAdaptorClient.java │ │ │ ├── resources │ │ │ └── package-info.java │ │ │ ├── services │ │ │ ├── Change_requestsService.java │ │ │ ├── ResourceShapeService.java │ │ │ ├── RootServicesService.java │ │ │ ├── ServiceProviderCatalogService.java │ │ │ ├── ServiceProviderService.java │ │ │ └── WsChangeRequest.java │ │ │ └── servlet │ │ │ ├── Application.java │ │ │ ├── ApplicationBinder.java │ │ │ ├── CredentialsFilter.java │ │ │ ├── OslcCorsFilter.java │ │ │ ├── OslcCspFilter.java │ │ │ ├── ServiceProviderCatalogSingleton.java │ │ │ ├── ServiceProvidersFactory.java │ │ │ └── ServletListener.java │ │ ├── resources │ │ └── simplelogger.properties │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── co │ │ └── oslc │ │ │ └── refimpl │ │ │ └── cm │ │ │ └── gen │ │ │ ├── changenoticecreator.jsp │ │ │ ├── changenoticescollection.jsp │ │ │ ├── changerequestscollection.jsp │ │ │ ├── creationdialogsampleclient.jsp │ │ │ ├── defectcreator.jsp │ │ │ ├── defectscollection.jsp │ │ │ ├── enhancementcreator.jsp │ │ │ ├── enhancementscollection.jsp │ │ │ ├── resourceshape.jsp │ │ │ ├── reviewtaskcreator.jsp │ │ │ ├── reviewtaskscollection.jsp │ │ │ ├── selectiondialog.jsp │ │ │ ├── selectiondialogsampleclient.jsp │ │ │ ├── serviceprovider.jsp │ │ │ ├── serviceprovidercatalog.jsp │ │ │ ├── taskcreator.jsp │ │ │ ├── taskscollection.jsp │ │ │ ├── uipreview.jsp │ │ │ └── viewresource.jsp │ │ ├── index.jsp │ │ ├── static │ │ ├── css │ │ │ ├── adaptor.css │ │ │ └── bootstrap-4.0.0-beta.min.css │ │ ├── dist │ │ │ └── oslc-ui │ │ │ │ ├── 3rdpartylicenses.txt │ │ │ │ ├── favicon.ico │ │ │ │ ├── index.html │ │ │ │ ├── main-es2015.js │ │ │ │ ├── main-es5.js │ │ │ │ ├── polyfills-es2015.js │ │ │ │ ├── polyfills-es5.js │ │ │ │ ├── runtime-es2015.js │ │ │ │ ├── runtime-es5.js │ │ │ │ └── styles.css │ │ └── js │ │ │ ├── bootstrap-4.0.0-beta.min.js │ │ │ ├── delegated-ui-helper.js │ │ │ ├── delegated-ui.js │ │ │ ├── jquery-3.2.1.min.js │ │ │ ├── popper-1.11.0.min.js │ │ │ └── ui-preview-helper.js │ │ └── swagger-ui │ │ └── index.jsp └── tomcat.Dockerfile ├── server-qm ├── .dockerignore ├── Dockerfile ├── config │ └── tomcat-log.properties ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── co │ │ │ └── oslc │ │ │ └── refimpl │ │ │ └── qm │ │ │ └── gen │ │ │ ├── QMConstants.java │ │ │ ├── ResourcesFactory.java │ │ │ ├── RestDelegate.java │ │ │ ├── ServerConstants.java │ │ │ ├── ServiceProviderInfo.java │ │ │ ├── auth │ │ │ └── AuthenticationApplication.java │ │ │ ├── clients │ │ │ └── GenericRequiredAdaptorClient.java │ │ │ ├── resources │ │ │ └── package-info.java │ │ │ ├── services │ │ │ ├── CasesService.java │ │ │ ├── Execution_recordsService.java │ │ │ ├── PlansService.java │ │ │ ├── ResourceShapeService.java │ │ │ ├── ResultsService.java │ │ │ ├── RootServicesService.java │ │ │ ├── ScriptsService.java │ │ │ ├── ServiceProviderCatalogService.java │ │ │ ├── ServiceProviderService.java │ │ │ ├── WsCases.java │ │ │ ├── WsExecRecords.java │ │ │ ├── WsPlans.java │ │ │ ├── WsResults.java │ │ │ └── WsScripts.java │ │ │ └── servlet │ │ │ ├── Application.java │ │ │ ├── ApplicationBinder.java │ │ │ ├── CredentialsFilter.java │ │ │ ├── ServiceProviderCatalogSingleton.java │ │ │ ├── ServiceProvidersFactory.java │ │ │ └── ServletListener.java │ │ ├── resources │ │ └── simplelogger.properties │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── co │ │ └── oslc │ │ │ └── refimpl │ │ │ └── qm │ │ │ └── gen │ │ │ ├── agenttohtml.jsp │ │ │ ├── changerequesttohtml.jsp │ │ │ ├── changesettohtml.jsp │ │ │ ├── componenttohtml.jsp │ │ │ ├── conceptresourcetohtml.jsp │ │ │ ├── configurationtohtml.jsp │ │ │ ├── contributiontohtml.jsp │ │ │ ├── creationdialogsampleclient.jsp │ │ │ ├── defecttohtml.jsp │ │ │ ├── discussiontohtml.jsp │ │ │ ├── persontohtml.jsp │ │ │ ├── prioritytohtml.jsp │ │ │ ├── rdfsclasstohtml.jsp │ │ │ ├── requirementcollectiontohtml.jsp │ │ │ ├── requirementtohtml.jsp │ │ │ ├── resourceshape.jsp │ │ │ ├── selectiondialogsampleclient.jsp │ │ │ ├── selectionstohtml.jsp │ │ │ ├── serviceprovider.jsp │ │ │ ├── serviceprovidercatalog.jsp │ │ │ ├── statetohtml.jsp │ │ │ ├── testcase.jsp │ │ │ ├── testcaselargepreview.jsp │ │ │ ├── testcasescollection.jsp │ │ │ ├── testcaseselector.jsp │ │ │ ├── testcaseselectorresults.jsp │ │ │ ├── testcasesmallpreview.jsp │ │ │ ├── testcasetohtml.jsp │ │ │ ├── testexecutionrecord.jsp │ │ │ ├── testexecutionrecordlargepreview.jsp │ │ │ ├── testexecutionrecordscollection.jsp │ │ │ ├── testexecutionrecordselector.jsp │ │ │ ├── testexecutionrecordselectorresults.jsp │ │ │ ├── testexecutionrecordsmallpreview.jsp │ │ │ ├── testexecutionrecordtohtml.jsp │ │ │ ├── testplan.jsp │ │ │ ├── testplanlargepreview.jsp │ │ │ ├── testplanscollection.jsp │ │ │ ├── testplanselector.jsp │ │ │ ├── testplanselectorresults.jsp │ │ │ ├── testplansmallpreview.jsp │ │ │ ├── testplantohtml.jsp │ │ │ ├── testresult.jsp │ │ │ ├── testresultlargepreview.jsp │ │ │ ├── testresultscollection.jsp │ │ │ ├── testresultselector.jsp │ │ │ ├── testresultselectorresults.jsp │ │ │ ├── testresultsmallpreview.jsp │ │ │ ├── testresulttohtml.jsp │ │ │ ├── testscript.jsp │ │ │ ├── testscriptlargepreview.jsp │ │ │ ├── testscriptscollection.jsp │ │ │ ├── testscriptselector.jsp │ │ │ ├── testscriptselectorresults.jsp │ │ │ ├── testscriptsmallpreview.jsp │ │ │ ├── testscripttohtml.jsp │ │ │ └── versionresourcetohtml.jsp │ │ ├── index.jsp │ │ ├── static │ │ ├── css │ │ │ ├── adaptor.css │ │ │ └── bootstrap-4.0.0-beta.min.css │ │ └── js │ │ │ ├── bootstrap-4.0.0-beta.min.js │ │ │ ├── delegated-ui-helper.js │ │ │ ├── delegated-ui.js │ │ │ ├── jquery-3.2.1.min.js │ │ │ ├── popper-1.11.0.min.js │ │ │ └── ui-preview-helper.js │ │ └── swagger-ui │ │ └── index.jsp └── tomcat.Dockerfile └── server-rm ├── .dockerignore ├── .gitignore ├── Dockerfile ├── config └── tomcat-log.properties ├── pom.xml ├── src ├── main │ ├── java │ │ └── co │ │ │ └── oslc │ │ │ └── refimpl │ │ │ └── rm │ │ │ └── gen │ │ │ ├── RMConstants.java │ │ │ ├── ResourcesFactory.java │ │ │ ├── RestDelegate.java │ │ │ ├── ServerConstants.java │ │ │ ├── ServiceProviderInfo.java │ │ │ ├── auth │ │ │ └── AuthenticationApplication.java │ │ │ ├── clients │ │ │ └── GenericRequiredAdaptorClient.java │ │ │ ├── resources │ │ │ └── package-info.java │ │ │ ├── services │ │ │ ├── Requirement_collectionsService.java │ │ │ ├── RequirementsService.java │ │ │ ├── ResourceShapeService.java │ │ │ ├── RootServicesService.java │ │ │ ├── ServiceProviderCatalogService.java │ │ │ ├── ServiceProviderService.java │ │ │ └── WebServiceBasic.java │ │ │ └── servlet │ │ │ ├── Application.java │ │ │ ├── ApplicationBinder.java │ │ │ ├── CredentialsFilter.java │ │ │ ├── ServiceProviderCatalogSingleton.java │ │ │ ├── ServiceProvidersFactory.java │ │ │ └── ServletListener.java │ ├── resources │ │ ├── logging.properties │ │ └── simplelogger.properties │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── co │ │ └── oslc │ │ │ └── refimpl │ │ │ └── rm │ │ │ └── gen │ │ │ ├── creationdialogsampleclient.jsp │ │ │ ├── persontohtml.jsp │ │ │ ├── requirement.jsp │ │ │ ├── requirementcollection.jsp │ │ │ ├── requirementcollectionlargepreview.jsp │ │ │ ├── requirementcollectionscollection.jsp │ │ │ ├── requirementcollectionselector.jsp │ │ │ ├── requirementcollectionselectorresults.jsp │ │ │ ├── requirementcollectionsmallpreview.jsp │ │ │ ├── requirementcollectiontohtml.jsp │ │ │ ├── requirementcreator.jsp │ │ │ ├── requirementlargepreview.jsp │ │ │ ├── requirementscollection.jsp │ │ │ ├── requirementselector.jsp │ │ │ ├── requirementselectorresults.jsp │ │ │ ├── requirementsmallpreview.jsp │ │ │ ├── requirementtohtml.jsp │ │ │ ├── resourceshape.jsp │ │ │ ├── selectiondialogsampleclient.jsp │ │ │ ├── serviceprovider.jsp │ │ │ └── serviceprovidercatalog.jsp │ │ ├── index.jsp │ │ ├── static │ │ ├── css │ │ │ ├── adaptor.css │ │ │ └── bootstrap-4.0.0-beta.min.css │ │ └── js │ │ │ ├── bootstrap-4.0.0-beta.min.js │ │ │ ├── delegated-ui-helper.js │ │ │ ├── delegated-ui.js │ │ │ ├── jquery-3.2.1.min.js │ │ │ ├── popper-1.11.0.min.js │ │ │ └── ui-preview-helper.js │ │ └── swagger-ui │ │ └── index.jsp └── test │ └── java │ └── co │ └── oslc │ ├── misc │ └── OslcMatchers.java │ └── refimpl │ └── rm │ ├── RequirementsIT.java │ └── SpCatalogIT.java └── tomcat.Dockerfile /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | 10 | [*.{java,kt}] 11 | indent_style = space 12 | indent_size = 4 13 | 14 | # indent code easily 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | indent_style = space 18 | indent_size = 4 19 | 20 | [*.{xml,html,js,yml,css}] 21 | indent_style = space 22 | indent_size = 2 23 | 24 | [*.{java,jsp,xml}] 25 | # due to a problem in Acceleo 26 | trim_trailing_whitespace = false 27 | 28 | [**/pom.xml] 29 | # same as Acceleo 30 | trim_trailing_whitespace = false 31 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "maven" # See documentation for possible values 9 | directory: "/src/" # Location of package manifests 10 | open-pull-requests-limit: 50 11 | schedule: 12 | interval: "daily" 13 | - package-ecosystem: "docker" # See documentation for possible values 14 | directory: "/src/server-am" # Location of package manifests 15 | schedule: 16 | interval: "daily" 17 | - package-ecosystem: "docker" # See documentation for possible values 18 | directory: "/src/server-cm" # Location of package manifests 19 | schedule: 20 | interval: "daily" 21 | - package-ecosystem: "docker" # See documentation for possible values 22 | directory: "/src/server-rm" # Location of package manifests 23 | schedule: 24 | interval: "daily" 25 | - package-ecosystem: "docker" # See documentation for possible values 26 | directory: "/src/server-qm" # Location of package manifests 27 | schedule: 28 | interval: "daily" 29 | - package-ecosystem: "github-actions" # See documentation for possible values 30 | directory: "/" # Location of package manifests 31 | open-pull-requests-limit: 30 32 | schedule: 33 | interval: "daily" 34 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | # push: 16 | # branches: [ master ] 17 | pull_request: 18 | branches: [ master, main ] 19 | # schedule: 20 | # - cron: '33 8 * * 6' 21 | 22 | concurrency: 23 | group: ${{ github.workflow }}-${{ github.ref }} 24 | cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }} 25 | 26 | jobs: 27 | analyze: 28 | name: Analyze 29 | # doesn't like self-hosted runners 30 | runs-on: ubuntu-latest 31 | timeout-minutes: 30 32 | if: ${{ github.actor != 'dependabot[bot]' }} 33 | permissions: 34 | actions: read 35 | contents: read 36 | security-events: write 37 | 38 | strategy: 39 | fail-fast: false 40 | matrix: 41 | language: [ 'java' ] 42 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] 43 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 44 | 45 | steps: 46 | - name: Checkout repository 47 | uses: actions/checkout@v4 48 | 49 | # Initializes the CodeQL tools for scanning. 50 | - name: Initialize CodeQL 51 | uses: github/codeql-action/init@v3 52 | with: 53 | languages: ${{ matrix.language }} 54 | # If you wish to specify custom queries, you can do so here or in a config file. 55 | # By default, queries listed here will override any specified in a config file. 56 | # Prefix the list here with "+" to use these queries and those in the config file. 57 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 58 | 59 | - uses: actions/cache@v4 60 | with: 61 | path: ~/.m2/repository 62 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} 63 | restore-keys: | 64 | ${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven- 65 | 66 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 67 | # If this step fails, then you should remove it and run the build manually (see below) 68 | - uses: actions/setup-java@v4 69 | with: 70 | distribution: 'temurin' # See 'Supported distributions' for available options 71 | java-version: '17' 72 | - name: Autobuild 73 | uses: github/codeql-action/autobuild@v3 74 | 75 | # ℹ️ Command-line programs to run using the OS shell. 76 | # 📚 https://git.io/JvXDl 77 | 78 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 79 | # and modify them (or add more) to build your code if your project 80 | # uses a compiled language 81 | 82 | #- run: | 83 | # make bootstrap 84 | # make release 85 | 86 | - name: Perform CodeQL Analysis 87 | uses: github/codeql-action/analyze@v3 88 | -------------------------------------------------------------------------------- /.github/workflows/maven-acceptance-wide.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven 3 | 4 | name: CI acceptance tests (more JDKs) 5 | 6 | on: 7 | schedule: 8 | # run integration tests every Thursday 9 | - cron: "31 06 * * 4" 10 | workflow_dispatch: 11 | 12 | concurrency: 13 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 14 | cancel-in-progress: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:full') }} 15 | jobs: 16 | build: 17 | runs-on: [ubuntu-latest] 18 | timeout-minutes: 15 19 | continue-on-error: ${{ matrix.experimental }} 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | jdk: ['17', '21', '22'] 24 | distribution: ['temurin', 'corretto', 'zulu', 'liberica'] 25 | experimental: [false] 26 | include: 27 | - jdk: '17' 28 | distribution: 'microsoft' 29 | experimental: false 30 | - jdk: '17' 31 | distribution: 'adopt-openj9' 32 | experimental: false 33 | - jdk: '23' 34 | distribution: 'zulu' 35 | experimental: true 36 | - jdk: '24-ea' 37 | distribution: 'zulu' 38 | experimental: true 39 | 40 | steps: 41 | - uses: actions/checkout@v4 42 | - name: Set up JDK ${{ matrix.jdk }} 43 | uses: actions/setup-java@v4 44 | with: 45 | distribution: ${{ matrix.distribution }} 46 | java-version: ${{ matrix.jdk }} 47 | - uses: actions/cache@v4 48 | with: 49 | path: ~/.m2/repository 50 | key: ${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven-${{ hashFiles('**/pom.xml') }} 51 | restore-keys: | 52 | ${{ runner.os }}-${{ matrix.jdk }}_${{ matrix.distribution }}-maven- 53 | - name: Build with Maven 54 | run: mvn -B -Pacceptance verify --file src/pom.xml 55 | - name: Allow failures 56 | run: 'true' 57 | -------------------------------------------------------------------------------- /.github/workflows/rebase.yml: -------------------------------------------------------------------------------- 1 | name: Rebase 2 | on: 3 | schedule: 4 | - cron: '40 7 * * *' 5 | workflow_dispatch: 6 | 7 | jobs: 8 | rebase: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: peter-evans/rebase@v3 12 | with: 13 | exclude-labels: | 14 | no-rebase 15 | dependencies 16 | # exclude-drafts: true 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Lyo 2 | 3 | # Eclipse 4 | .settings/ 5 | 6 | # Maven 7 | target/ 8 | overlays/ 9 | pom.xml.tag 10 | pom.xml.releaseBackup 11 | pom.xml.versionsBackup 12 | pom.xml.next 13 | release.properties 14 | dependency-reduced-pom.xml 15 | buildNumber.properties 16 | .mvn/timing.properties 17 | 18 | # Avoid ignoring Maven wrapper jar file (.jar files are usually ignored) 19 | !.mvn/wrapper/maven-wrapper.jar 20 | 21 | #Idea 22 | .idea/ 23 | *.iml 24 | 25 | #VSCode 26 | .vscode/ 27 | 28 | #Misc 29 | .DS_Store 30 | /.project 31 | -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-full 2 | 3 | # Install custom tools, runtimes, etc. 4 | # For example "bastet", a command-line tetris clone: 5 | # RUN brew install bastet 6 | # 7 | # More information: https://www.gitpod.io/docs/config-docker/ 8 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.Dockerfile 3 | 4 | tasks: 5 | - init: mvn -f src/pom.xml clean install && gp sync-done mvninstall 6 | command: mvn -f src/server-rm/pom.xml jetty:run-exploded -Dlyo.baseurl=$(gp url 8800) 7 | - init: gp sync-await mvninstall 8 | command: mvn -f src/server-cm/pom.xml jetty:run-exploded -Dlyo.baseurl=$(gp url 8801) 9 | openMode: split-right 10 | - init: gp sync-await mvninstall 11 | command: mvn -f src/server-am/pom.xml jetty:run-exploded -Dlyo.baseurl=$(gp url 8803) 12 | openMode: split-right 13 | - init: gp sync-await mvninstall 14 | command: mvn -f src/server-qm/pom.xml jetty:run-exploded -Dlyo.baseurl=$(gp url 8802) 15 | openMode: split-right 16 | - init: gp sync-await mvninstall 17 | command: sleep 30; java -jar src/client-toolchain/target/client-toolchain-0.0.1-SNAPSHOT-jar-with-dependencies.jar --rm="$(gp url 8800)/services/catalog/singleton" --cm="$(gp url 8801)/services/catalog/singleton" --am="$(gp url 8803)/services/catalog/singleton" --qm="$(gp url 8802)/services/catalog/singleton" 18 | openMode: split-right 19 | 20 | 21 | ports: 22 | - port: 8800 23 | - port: 8801 24 | - port: 8802 25 | - port: 8803 26 | -------------------------------------------------------------------------------- /model/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | model 4 | 5 | 6 | 7 | 8 | 9 | 10 | org.eclipse.sirius.nature.modelingproject 11 | 12 | 13 | -------------------------------------------------------------------------------- /model/generator.properties: -------------------------------------------------------------------------------- 1 | generationPath=. -------------------------------------------------------------------------------- /model/license/edl-v10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Eclipse Distribution License - Version 1.0 8 | 25 | 26 | 27 | 28 | 29 | 30 |

Eclipse Distribution License - v 1.0

31 | 32 |

Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.

33 | 34 |

All rights reserved.

35 |

Redistribution and use in source and binary forms, with or without modification, 36 | are permitted provided that the following conditions are met: 37 |

45 |

46 |

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 47 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 48 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 49 | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 50 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 51 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 52 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 53 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 54 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 55 | POSSIBILITY OF SUCH DAMAGE.

56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/.dockerignore: -------------------------------------------------------------------------------- 1 | overlays/ 2 | target/ 3 | */target/ 4 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .settings/ 3 | .project 4 | .classpath 5 | -------------------------------------------------------------------------------- /src/client-toolchain/src/main/kotlin/co/oslc/refimpl/client/Helper.kt: -------------------------------------------------------------------------------- 1 | package co.oslc.refimpl.client 2 | 3 | import org.eclipse.lyo.oslc4j.core.model.Link 4 | import java.net.URI 5 | import kotlin.random.Random 6 | 7 | fun randomId(maxId: Int): Int { 8 | val r = Random(System.nanoTime()) 9 | return r.nextInt(1, maxId) 10 | } 11 | 12 | fun randomIdExcept(maxId: Int, exceptId: Int): Int { 13 | val r = Random(System.nanoTime()) 14 | var linkedId = r.nextInt(1, maxId) 15 | while (linkedId == exceptId) { 16 | linkedId = r.nextInt(1, maxId) 17 | } 18 | return linkedId 19 | } 20 | 21 | fun link(to: String): Link = Link(URI.create(to)) 22 | fun link(to: URI): Link = Link(to) 23 | 24 | fun singleLinkTo(to: String) = setOf(link(to)) 25 | fun singleLinkTo(to: URI) = setOf(link(to)) 26 | 27 | fun randomLink(links: List): Set { 28 | if (links.isEmpty()) { 29 | return emptySet() 30 | } 31 | return setOf(links[randomId(links.size+1) - 1]) 32 | } 33 | -------------------------------------------------------------------------------- /src/docker-compose.tomcat.yml: -------------------------------------------------------------------------------- 1 | services: 2 | server-rm: 3 | build: 4 | context: ./ 5 | dockerfile: ./server-rm/tomcat.Dockerfile 6 | ports: 7 | - "8800:8080" 8 | server-cm: 9 | build: 10 | context: ./ 11 | dockerfile: ./server-cm/tomcat.Dockerfile 12 | ports: 13 | - "8801:8080" 14 | server-qm: 15 | build: 16 | context: ./ 17 | dockerfile: ./server-qm/tomcat.Dockerfile 18 | ports: 19 | - "8802:8080" 20 | server-am: 21 | build: 22 | context: ./ 23 | dockerfile: ./server-am/tomcat.Dockerfile 24 | ports: 25 | - "8803:8080" 26 | -------------------------------------------------------------------------------- /src/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | server-rm: 3 | build: 4 | context: ./ 5 | dockerfile: server-rm/Dockerfile 6 | ports: 7 | - "127.0.0.1:8800:8080" 8 | server-cm: 9 | build: 10 | context: ./ 11 | dockerfile: server-cm/Dockerfile 12 | ports: 13 | - "127.0.0.1:8801:8080" 14 | server-qm: 15 | build: 16 | context: ./ 17 | dockerfile: server-qm/Dockerfile 18 | ports: 19 | - "127.0.0.1:8802:8080" 20 | server-am: 21 | build: 22 | context: ./ 23 | dockerfile: server-am/Dockerfile 24 | ports: 25 | - "127.0.0.1:8803:8080" 26 | -------------------------------------------------------------------------------- /src/lib-common/src/main/java/co/oslc/refimpl/lib/ResourceRepository.java: -------------------------------------------------------------------------------- 1 | package co.oslc.refimpl.lib; 2 | 3 | import org.eclipse.lyo.oslc4j.core.model.AbstractResource; 4 | 5 | import java.util.List; 6 | 7 | public interface ResourceRepository { 8 | List fetchResourcesForSP(String serviceProvider); 9 | List fetchResourcePageForSP(String serviceProvider, int page, int pageSize); 10 | void addResource(String serviceProvider, String id, R resource); 11 | R getResource(String serviceProvider, String id); 12 | void deleteResource(String serviceProvider, String id); 13 | boolean hasResource(String serviceProvider, String id); 14 | String calculateETag(R resource); 15 | 16 | List findResources(String serviceProvider, String terms, int limit); 17 | 18 | void updateResource(String spDefault, String id, R resource); 19 | } 20 | -------------------------------------------------------------------------------- /src/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | OSLC 2020 RefImpl (aggregator) 6 | co.oslc.refimpl 7 | parent 8 | 0.3.0-SNAPSHOT 9 | pom 10 | 11 | 12 | UTF-8 13 | UTF-8 14 | 17 15 | 17 16 | 17 | 18 | 19 | lib-common 20 | server-rm 21 | server-cm 22 | server-qm 23 | server-am 24 | client-toolchain 25 | 26 | 27 | 28 | 29 | 30 | co.oslc.refimpl 31 | lib-common 32 | ${project.version} 33 | 34 | 35 | io.github.classgraph 36 | classgraph 37 | 4.8.179 38 | 39 | 40 | com.fasterxml.jackson 41 | jackson-bom 42 | 2.19.0 43 | import 44 | pom 45 | 46 | 47 | org.yaml 48 | snakeyaml 49 | 2.4 50 | 51 | 52 | 53 | 54 | 55 | 56 | acceptance 57 | 58 | false 59 | 60 | 61 | refimpl-tests 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | org.codehaus.mojo 71 | versions-maven-plugin 72 | 2.18.0 73 | 74 | false 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/refimpl-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Ant 2 | ant/ 3 | 4 | # Gradle 5 | .gradle/ 6 | build/ 7 | 8 | # Maven 9 | target/ 10 | 11 | # Eclipse 12 | .classpath 13 | .project 14 | .settings/ 15 | bin/ 16 | 17 | # IDEA 18 | *.iws 19 | *.ipr 20 | *.iml 21 | .idea/ 22 | out/ 23 | -------------------------------------------------------------------------------- /src/refimpl-tests/NOTICE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslc-op/refimpl/c453de628dcb2ae4ee3fdb13ce6329b24a7b7988/src/refimpl-tests/NOTICE -------------------------------------------------------------------------------- /src/refimpl-tests/README.adoc: -------------------------------------------------------------------------------- 1 | [.float-group] 2 | -- 3 | image::https://img.shields.io/badge/License-Apache%202.0-blue.svg[link=https://github.com/spockframework/spock/blob/master/LICENSE,float=left] 4 | image::https://img.shields.io/github/checks-status/spockframework/spock-example/master.svg?label=Build[link=https://github.com/spockframework/spock-example/actions?query=workflow%3A%22CI+Builds%22+branch%3Amaster,float=left] 5 | image::https://badges.gitter.im/spockframework/spock.svg[link=https://gitter.im/spockframework/spock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge,float=left] 6 | -- 7 | 8 | == Spock Framework Example Project 9 | 10 | 11 | The purpose of this project is to help you get started with Spock. The project includes several example specifications and build scripts for Ant, Gradle, and Maven. It also makes it easy to create an Eclipse or IDEA project, allowing you to run the example specs from within your IDE. 12 | 13 | All three builds (Ant, Gradle, Maven) will automatically download all required dependencies, compile the project, and finally run the example specs. The Gradle build goes one step further by bootstrapping itself, alleviating the need to have a build tool preinstalled. 14 | 15 | === Prerequisites 16 | 17 | - JDK 8 or higher 18 | - Maven use `mvnw` wrapper 19 | - Gradle use `gradlew` wrapper 20 | 21 | NOTE: This example shows the usage of Spock 2.0, which uses the JUnit Platform. If you want to see how to get Spock 1.x with JUnit 4 up and running see the https://github.com/spockframework/spock-example/tree/spock-1.x[Spock-1.x] Branch. 22 | 23 | === Building with Gradle 24 | Type: 25 | 26 | ./gradlew clean test 27 | 28 | Downloaded files (including the Gradle distribution itself) will be stored in the Gradle user home directory (typically *user_home*`/.gradle`). 29 | 30 | === Building with Maven 31 | Type: 32 | 33 | ./mvnw clean test 34 | 35 | Downloaded files will be stored in the local Maven repository (typically *user_home*`/.m2/repository`). 36 | 37 | === Creating an Eclipse project 38 | 39 | Install the https://projects.eclipse.org/projects/tools.buildship[Buildship plugin] if you want to use gradle as build tool. 40 | 41 | === Creating an IDEA project 42 | Just open the project directory with Intelli IDEA and it should auto-detect the project settings. 43 | 44 | === Further Resources 45 | 46 | 47 | * https://spockframework.org[Spock homepage] 48 | * https://meetspock.appspot.com[Spock web console] 49 | * https://docs.spockframework.org/[Main documentation] 50 | * https://stackoverflow.com/questions/tagged/spock[Spock on Stackoverflow] 51 | * https://gitter.im/spockframework/spock[Spock Chat] 52 | * https://github.com/spockframework/spock/discussions[Discussion group] 53 | * https://issues.spockframework.org[Issue tracker] 54 | * https://twitter.com/spockframework[Spock on Twitter] 55 | * https://gradle.org[Gradle homepage] 56 | * https://groovy-lang.org/[Groovy homepage] 57 | * https://maven.apache.org[Maven homepage] 58 | 59 | If you have any comments or questions, please direct them to the Spock discussion group. We appreciate all feedback! 60 | 61 | Happy spec'ing! 62 | 63 | The Spock Framework Team 64 | 65 | -------------------------------------------------------------------------------- /src/refimpl-tests/src/test/resources/ExcludeSlowConfig.groovy: -------------------------------------------------------------------------------- 1 | runner { 2 | exclude Slow 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/refimpl-tests/src/test/resources/IncludeFastConfig.groovy: -------------------------------------------------------------------------------- 1 | runner { 2 | include Fast 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/refimpl-tests/src/test/resources/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | services: 3 | server-rm: 4 | build: 5 | context: ../../../../ 6 | dockerfile: server-rm/Dockerfile 7 | server-cm: 8 | build: 9 | context: ../../../../ 10 | dockerfile: server-cm/Dockerfile 11 | server-qm: 12 | build: 13 | context: ../../../../ 14 | dockerfile: server-qm/Dockerfile 15 | server-am: 16 | build: 17 | context: ../../../../ 18 | dockerfile: server-am/Dockerfile 19 | -------------------------------------------------------------------------------- /src/server-am/.dockerignore: -------------------------------------------------------------------------------- 1 | overlays/ 2 | target/ 3 | -------------------------------------------------------------------------------- /src/server-am/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-21-alpine AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-am -am 6 | 7 | FROM docker.io/library/jetty:12-jre21-eclipse-temurin 8 | # WARNING DO NOT CHANGE WORKDIR or set it back to what it was before 9 | # $JETTY_BASE must be correct before starting Jetty 10 | 11 | COPY --from=build /src/server-am/target/*.war /var/lib/jetty/webapps/ROOT.war 12 | 13 | RUN java -jar "$JETTY_HOME/start.jar" --add-modules=ee9-deploy,ee9-jsp,ee9-jstl 14 | -------------------------------------------------------------------------------- /src/server-am/config/tomcat-log.properties: -------------------------------------------------------------------------------- 1 | # Docker log config to make sure Tomcat logs everything to Docker! 2 | 3 | handlers = java.util.logging.ConsoleHandler 4 | 5 | .handlers = java.util.logging.ConsoleHandler 6 | 7 | java.util.logging.ConsoleHandler.level = FINE 8 | java.util.logging.ConsoleHandler.formatter = java.util.logging.OneLineFormatter 9 | java.util.logging.ConsoleHandler.encoding = UTF-8 10 | 11 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO 12 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = \ 13 | java.util.logging.ConsoleHandler 14 | 15 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO 16 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = \ 17 | java.util.logging.ConsoleHandler 18 | 19 | # For example, set the org.apache.catalina.util.LifecycleBase logger to log 20 | # each component that extends LifecycleBase changing state: 21 | #org.apache.catalina.util.LifecycleBase.level = FINE 22 | -------------------------------------------------------------------------------- /src/server-am/src/main/java/co/oslc/refimpl/am/gen/AMConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2012 IBM Corporation and others. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Russell Boykin - initial API and implementation 16 | * Alberto Giammaria - initial API and implementation 17 | * Chris Peters - initial API and implementation 18 | * Gianluca Bernardini - initial API and implementation 19 | * Michael Fiedler - Bugzilla adpater implementations 20 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 21 | * 22 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 23 | *******************************************************************************/ 24 | // End of user code 25 | 26 | package co.oslc.refimpl.am.gen; 27 | 28 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 29 | 30 | // Start of user code imports 31 | // End of user code 32 | 33 | public interface AMConstants 34 | { 35 | // Start of user code user constants 36 | // End of user code 37 | 38 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 39 | public static final String OSLC_VERSION_V2 = "2.0"; 40 | } 41 | -------------------------------------------------------------------------------- /src/server-am/src/main/java/co/oslc/refimpl/am/gen/ServerConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.am.gen; 19 | 20 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 21 | 22 | // Start of user code imports 23 | // End of user code 24 | 25 | public interface ServerConstants 26 | { 27 | // Start of user code user constants 28 | // End of user code 29 | 30 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 31 | public static final String OSLC_VERSION_V2 = "2.0"; 32 | } 33 | -------------------------------------------------------------------------------- /src/server-am/src/main/java/co/oslc/refimpl/am/gen/ServiceProviderInfo.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2014 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 16 | * 17 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 18 | *******************************************************************************/ 19 | // End of user code 20 | 21 | package co.oslc.refimpl.am.gen; 22 | 23 | // Start of user code imports 24 | // End of user code 25 | 26 | // Start of user code pre_class_code 27 | // End of user code 28 | public class ServiceProviderInfo { 29 | public String name; 30 | public String serviceProviderId; 31 | 32 | // Start of user code class_attributes 33 | // End of user code 34 | 35 | // Start of user code class_methods 36 | // End of user code 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/server-am/src/main/java/co/oslc/refimpl/am/gen/clients/GenericRequiredAdaptorClient.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2015 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of client code 16 | * 17 | *******************************************************************************/ 18 | // End of user code 19 | 20 | package co.oslc.refimpl.am.gen.clients; 21 | 22 | import jakarta.ws.rs.core.Response; 23 | import org.eclipse.lyo.client.OSLCConstants; 24 | import org.eclipse.lyo.client.OslcClient; 25 | import org.eclipse.lyo.oslc4j.core.model.ServiceProviderCatalog; 26 | 27 | // Start of user code imports 28 | // End of user code 29 | 30 | 31 | // Start of user code pre_class_code 32 | // End of user code 33 | 34 | public class GenericRequiredAdaptorClient 35 | { 36 | 37 | // Start of user code class_attributes 38 | // End of user code 39 | 40 | // Start of user code class_methods 41 | // End of user code 42 | 43 | static String serviceProviderCatalogURI = "http://your.host.com/adaptor/services/catalog/singleton"; 44 | 45 | public static ServiceProviderCatalog getServiceProviderCatalog() throws Exception { 46 | OslcClient client = new OslcClient(); 47 | Response response = null; 48 | ServiceProviderCatalog catalog = null; 49 | 50 | // Start of user code getServiceProviderCatalog_init 51 | // End of user code 52 | 53 | response = client.getResource(serviceProviderCatalogURI,OSLCConstants.CT_RDF); 54 | if (response != null) { 55 | catalog = response.readEntity(ServiceProviderCatalog.class); 56 | } 57 | // Start of user code getServiceProviderCatalog_final 58 | // End of user code 59 | return catalog; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/server-am/src/main/java/co/oslc/refimpl/am/gen/servlet/ApplicationBinder.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.am.gen.servlet; 19 | 20 | import org.slf4j.Logger; 21 | import org.slf4j.LoggerFactory; 22 | import org.glassfish.hk2.api.Factory; 23 | import org.glassfish.hk2.utilities.binding.AbstractBinder; 24 | 25 | import jakarta.inject.Singleton; 26 | 27 | import co.oslc.refimpl.am.gen.RestDelegate; 28 | import co.oslc.refimpl.am.gen.ResourcesFactory; 29 | 30 | import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; 31 | // Start of user code imports 32 | // End of user code 33 | 34 | // Start of user code pre_class_code 35 | // End of user code 36 | 37 | public class ApplicationBinder extends AbstractBinder { 38 | 39 | private static final Logger log = LoggerFactory.getLogger(ApplicationBinder.class); 40 | 41 | // Start of user code class_attributes 42 | // End of user code 43 | 44 | // Start of user code class_methods 45 | // End of user code 46 | 47 | public ApplicationBinder() 48 | { 49 | log.info("HK2 contract binding init"); 50 | } 51 | 52 | @Override 53 | protected void configure() { 54 | log.info("HK2 contract binding start"); 55 | 56 | // Start of user code ConfigureInitialise 57 | // End of user code 58 | bindAsContract(RestDelegate.class).in(Singleton.class); 59 | bindFactory(ResourcesFactoryFactory.class).to(ResourcesFactory.class).in(Singleton.class); 60 | 61 | 62 | 63 | // Start of user code ConfigureFinalize 64 | // End of user code 65 | } 66 | static class ResourcesFactoryFactory implements Factory { 67 | @Override 68 | public ResourcesFactory provide() { 69 | return new ResourcesFactory(OSLC4JUtils.getServletURI()); 70 | } 71 | 72 | @Override 73 | public void dispose(ResourcesFactory instance) { 74 | } 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/server-am/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | # General settings for compact layout 2 | org.slf4j.simpleLogger.logFile = System.out 3 | org.slf4j.simpleLogger.levelInBrackets = true 4 | org.slf4j.simpleLogger.showLogName = true 5 | org.slf4j.simpleLogger.showShortLogName = true 6 | org.slf4j.simpleLogger.showThreadName = false 7 | 8 | # Key levels 9 | org.slf4j.simpleLogger.defaultLogLevel = INFO 10 | org.slf4j.simpleLogger.log.co.oslc.refimpl = DEBUG 11 | org.slf4j.simpleLogger.log.org.eclipse.lyo = DEBUG 12 | 13 | # Timestamps 14 | org.slf4j.simpleLogger.showDateTime = true 15 | #org.slf4j.simpleLogger.dateTimeFormat = HH:mm:ss.SSS 16 | 17 | # Toggle-able for debug 18 | org.slf4j.simpleLogger.log.org.apache.http = INFO 19 | #org.slf4j.simpleLogger.log.org.eclipse.lyo.trs = TRACE 20 | 21 | # Permanently reduce noise 22 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.ordfm.ResourcePackages = INFO 23 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper = INFO 24 | org.slf4j.simpleLogger.log.io.swagger.v3 = WARN 25 | org.slf4j.simpleLogger.log.org.glassfish = INFO 26 | org.slf4j.simpleLogger.log.org.jboss.weld = DEBUG 27 | org.slf4j.simpleLogger.log.org.apache.jena = INFO 28 | org.slf4j.simpleLogger.log.Jena = INFO 29 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | AM 7 | 8 | Base URI for the adaptor. 9 | co.oslc.refimpl.am.gen.servlet.baseurl 10 | http://localhost:8803/ 11 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | Listener for ServletContext lifecycle changes 24 | co.oslc.refimpl.am.gen.servlet.ServletListener 25 | 26 | 28 | 29 | 31 | 32 | JAX-RS Servlet 33 | org.glassfish.jersey.servlet.ServletContainer 34 | 35 | jakarta.ws.rs.Application 36 | co.oslc.refimpl.am.gen.servlet.Application 37 | 38 | 1 39 | 40 | 42 | 43 | 45 | 46 | JAX-RS Servlet 47 | /services/* 48 | 49 | 50 | CredentialsFilter 51 | CredentialsFilter 52 | co.oslc.refimpl.am.gen.servlet.CredentialsFilter 53 | 54 | 55 | CredentialsFilter 56 | /services/* 57 | 58 | 59 | 61 | 62 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/linktypeselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.am.LinkType"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | LinkTypeSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/linktypeselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.am.LinkType"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (LinkType r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/linktypetohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.am.LinkType"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | LinkType aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new LinkType (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aLinkType") != null) { 27 | aResource = (LinkType) request.getAttribute("aLinkType"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local LinkType Resource} - update LinkType.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/persontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.Person"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Person aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Person (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aPerson") != null) { 27 | aResource = (Person) request.getAttribute("aPerson"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Person Resource} - update Person.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/resourceselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.am.Resource"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | ResourceSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/resourceselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.am.Resource"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (Resource r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/co/oslc/refimpl/am/gen/resourcetohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.am.Resource"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Resource aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Resource (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aResource") != null) { 27 | aResource = (Resource) request.getAttribute("aResource"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Resource Resource} - update Resource.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/static/css/adaptor.css: -------------------------------------------------------------------------------- 1 | /* Start of user code "Copyright" 2 | */ 3 | /******************************************************************************* 4 | Copyright (c) 2017 KTH Royal Institute of Technology. 5 | 6 | All rights reserved. This program and the accompanying materials 7 | are made available under the terms of the Eclipse Public License v1.0 8 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 9 | 10 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 11 | and the Eclipse Distribution License is available at 12 | http://www.eclipse.org/org/documents/edl-v10.php. 13 | 14 | Contributors: 15 | 16 | Fr�d�ric Loiret - Switch the template to Bootstrap (519699) 17 | Andrii Berezovskyi - Support for UI Preview (494303) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | *******************************************************************************/ 21 | /* End of user code */ 22 | 23 | /* Sticky footer 24 | -------------------------------------------------- */ 25 | html { 26 | position: relative; 27 | min-height: 100%; 28 | } 29 | body { 30 | /* Margin bottom by footer height */ 31 | margin-bottom: 60px; 32 | } 33 | .footer { 34 | position: absolute; 35 | bottom: 0; 36 | width: 100%; 37 | /* Set the fixed height of the footer here */ 38 | height: 60px; 39 | background-color: #f5f5f5; 40 | } 41 | 42 | 43 | /* Custom adaptor CSS 44 | -------------------------------------------------- */ 45 | 46 | body > .container { 47 | padding-top: 20px; 48 | padding-bottom: 10px; 49 | } 50 | .container .text-muted { 51 | margin: 20px 0; 52 | } 53 | 54 | .footer > .container { 55 | padding-right: 15px; 56 | padding-left: 15px; 57 | } 58 | 59 | code { 60 | font-size: 80%; 61 | } 62 | 63 | .popover { 64 | max-width: 520px; 65 | max-height: 270px; 66 | } 67 | 68 | .popover .popover-body { 69 | max-width: 515px; 70 | max-height: 215px; 71 | overflow: hidden; 72 | } 73 | 74 | #delegatedUI { 75 | width: 523px; 76 | height: 320px; /*this is selection; creation has 480px*/ 77 | } 78 | -------------------------------------------------------------------------------- /src/server-am/src/main/webapp/swagger-ui/index.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 19 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 20 | <%@page import="java.net.URI"%> 21 | <%@page import="java.io.File"%> 22 | 23 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 24 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 25 | <% 26 | URI yamlPath = UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build(); 27 | %> 28 | 29 | 30 | 31 | 32 | Swagger UI 33 | 34 | 35 | 36 | 57 | 58 | 59 |
60 | 61 | 62 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/server-am/tomcat.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-17 AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-am -am -Pwith-jstl-impl 6 | 7 | FROM docker.io/library/tomcat:10-jre17 8 | 9 | # do not write log files, log everything to the Docker daemon 10 | COPY --from=build /src/server-am/config/tomcat-log.properties $CATALINA_BASE/conf/logging.properties 11 | ENV CATALINA_OUT=/dev/null 12 | 13 | COPY --from=build /src/server-am/target/*.war /usr/local/tomcat/webapps/ROOT.war 14 | -------------------------------------------------------------------------------- /src/server-cm/.dockerignore: -------------------------------------------------------------------------------- 1 | overlays/ 2 | target/ 3 | -------------------------------------------------------------------------------- /src/server-cm/.gitignore: -------------------------------------------------------------------------------- 1 | /oslcOAuthStore.xml 2 | -------------------------------------------------------------------------------- /src/server-cm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-21-alpine AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-cm -am 6 | 7 | FROM docker.io/library/jetty:12-jre21-eclipse-temurin 8 | # WARNING DO NOT CHANGE WORKDIR or set it back to what it was before 9 | # $JETTY_BASE must be correct before starting Jetty 10 | 11 | COPY --from=build /src/server-cm/target/*.war /var/lib/jetty/webapps/ROOT.war 12 | 13 | RUN java -jar "$JETTY_HOME/start.jar" --add-modules=ee9-deploy,ee9-jsp,ee9-jstl 14 | -------------------------------------------------------------------------------- /src/server-cm/config/tomcat-log.properties: -------------------------------------------------------------------------------- 1 | # Docker log config to make sure Tomcat logs everything to Docker! 2 | 3 | handlers = java.util.logging.ConsoleHandler 4 | 5 | .handlers = java.util.logging.ConsoleHandler 6 | 7 | java.util.logging.ConsoleHandler.level = FINE 8 | java.util.logging.ConsoleHandler.formatter = java.util.logging.OneLineFormatter 9 | java.util.logging.ConsoleHandler.encoding = UTF-8 10 | 11 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO 12 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = \ 13 | java.util.logging.ConsoleHandler 14 | 15 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO 16 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = \ 17 | java.util.logging.ConsoleHandler 18 | 19 | # For example, set the org.apache.catalina.util.LifecycleBase logger to log 20 | # each component that extends LifecycleBase changing state: 21 | #org.apache.catalina.util.LifecycleBase.level = FINE 22 | -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/CMConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2012 IBM Corporation and others. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Russell Boykin - initial API and implementation 16 | * Alberto Giammaria - initial API and implementation 17 | * Chris Peters - initial API and implementation 18 | * Gianluca Bernardini - initial API and implementation 19 | * Michael Fiedler - Bugzilla adpater implementations 20 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 21 | * 22 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 23 | *******************************************************************************/ 24 | // End of user code 25 | 26 | package co.oslc.refimpl.cm.gen; 27 | 28 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 29 | 30 | // Start of user code imports 31 | // End of user code 32 | 33 | public interface CMConstants 34 | { 35 | // Start of user code user constants 36 | // End of user code 37 | 38 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 39 | public static final String OSLC_VERSION_V2 = "2.0"; 40 | } 41 | -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/ServerConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.cm.gen; 19 | 20 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 21 | 22 | // Start of user code imports 23 | // End of user code 24 | 25 | public interface ServerConstants 26 | { 27 | // Start of user code user constants 28 | // End of user code 29 | 30 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 31 | public static final String OSLC_VERSION_V2 = "2.0"; 32 | } 33 | -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/ServiceProviderInfo.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2014 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 16 | * 17 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 18 | *******************************************************************************/ 19 | // End of user code 20 | 21 | package co.oslc.refimpl.cm.gen; 22 | 23 | // Start of user code imports 24 | // End of user code 25 | 26 | // Start of user code pre_class_code 27 | // End of user code 28 | public class ServiceProviderInfo { 29 | public String name; 30 | public String serviceProviderId; 31 | 32 | // Start of user code class_attributes 33 | // End of user code 34 | 35 | // Start of user code class_methods 36 | // End of user code 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/clients/GenericRequiredAdaptorClient.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2015 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of client code 16 | * 17 | *******************************************************************************/ 18 | // End of user code 19 | 20 | package co.oslc.refimpl.cm.gen.clients; 21 | 22 | import jakarta.ws.rs.core.Response; 23 | import org.eclipse.lyo.client.OSLCConstants; 24 | import org.eclipse.lyo.client.OslcClient; 25 | import org.eclipse.lyo.oslc4j.core.model.ServiceProviderCatalog; 26 | 27 | // Start of user code imports 28 | // End of user code 29 | 30 | 31 | // Start of user code pre_class_code 32 | // End of user code 33 | 34 | public class GenericRequiredAdaptorClient 35 | { 36 | 37 | // Start of user code class_attributes 38 | // End of user code 39 | 40 | // Start of user code class_methods 41 | // End of user code 42 | 43 | static String serviceProviderCatalogURI = "http://your.host.com/adaptor/services/catalog/singleton"; 44 | 45 | public static ServiceProviderCatalog getServiceProviderCatalog() throws Exception { 46 | OslcClient client = new OslcClient(); 47 | Response response = null; 48 | ServiceProviderCatalog catalog = null; 49 | 50 | // Start of user code getServiceProviderCatalog_init 51 | // End of user code 52 | 53 | response = client.getResource(serviceProviderCatalogURI,OSLCConstants.CT_RDF); 54 | if (response != null) { 55 | catalog = response.readEntity(ServiceProviderCatalog.class); 56 | } 57 | // Start of user code getServiceProviderCatalog_final 58 | // End of user code 59 | return catalog; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/ApplicationBinder.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.cm.gen.servlet; 19 | 20 | import org.slf4j.Logger; 21 | import org.slf4j.LoggerFactory; 22 | import org.glassfish.hk2.api.Factory; 23 | import org.glassfish.hk2.utilities.binding.AbstractBinder; 24 | 25 | import jakarta.inject.Singleton; 26 | 27 | import co.oslc.refimpl.cm.gen.RestDelegate; 28 | import co.oslc.refimpl.cm.gen.ResourcesFactory; 29 | 30 | import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; 31 | // Start of user code imports 32 | // End of user code 33 | 34 | // Start of user code pre_class_code 35 | // End of user code 36 | 37 | public class ApplicationBinder extends AbstractBinder { 38 | 39 | private static final Logger log = LoggerFactory.getLogger(ApplicationBinder.class); 40 | 41 | // Start of user code class_attributes 42 | // End of user code 43 | 44 | // Start of user code class_methods 45 | // End of user code 46 | 47 | public ApplicationBinder() 48 | { 49 | log.info("HK2 contract binding init"); 50 | } 51 | 52 | @Override 53 | protected void configure() { 54 | log.info("HK2 contract binding start"); 55 | 56 | // Start of user code ConfigureInitialise 57 | // End of user code 58 | bindAsContract(RestDelegate.class).in(Singleton.class); 59 | bindFactory(ResourcesFactoryFactory.class).to(ResourcesFactory.class).in(Singleton.class); 60 | 61 | 62 | 63 | // Start of user code ConfigureFinalize 64 | // End of user code 65 | } 66 | static class ResourcesFactoryFactory implements Factory { 67 | @Override 68 | public ResourcesFactory provide() { 69 | return new ResourcesFactory(OSLC4JUtils.getServletURI()); 70 | } 71 | 72 | @Override 73 | public void dispose(ResourcesFactory instance) { 74 | } 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/OslcCorsFilter.java: -------------------------------------------------------------------------------- 1 | package co.oslc.refimpl.cm.gen.servlet; 2 | 3 | import jakarta.ws.rs.container.ContainerRequestContext; 4 | import jakarta.ws.rs.container.ContainerResponseContext; 5 | import jakarta.ws.rs.container.ContainerResponseFilter; 6 | import jakarta.ws.rs.ext.Provider; 7 | import java.io.IOException; 8 | 9 | /** 10 | * Allows OSLC requests to be made to the server from the web browser from another domain. 11 | */ 12 | @Provider 13 | public class OslcCorsFilter implements ContainerResponseFilter { 14 | 15 | @Override 16 | public void filter(ContainerRequestContext requestContext, 17 | ContainerResponseContext responseContext) throws IOException { 18 | String originAllow = "*"; 19 | final String requestOrigin = requestContext.getHeaderString("Origin"); 20 | if (requestOrigin != null) { 21 | //needed to enable Access-Control-Allow-Credentials 22 | originAllow = requestOrigin; 23 | } 24 | responseContext.getHeaders().add("Access-Control-Allow-Origin", originAllow); 25 | responseContext.getHeaders().add("Access-Control-Allow-Credentials", "true"); 26 | responseContext.getHeaders().add( 27 | "Access-Control-Allow-Headers", 28 | "origin, content-type, accept, authorization, oslc-core-version, Configuration-Context, OSLC-Configuration-Context" 29 | ); 30 | responseContext.getHeaders().add("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, HEAD"); 31 | } 32 | } -------------------------------------------------------------------------------- /src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/OslcCspFilter.java: -------------------------------------------------------------------------------- 1 | package co.oslc.refimpl.cm.gen.servlet; 2 | 3 | import jakarta.ws.rs.container.ContainerRequestContext; 4 | import jakarta.ws.rs.container.ContainerResponseContext; 5 | import jakarta.ws.rs.container.ContainerResponseFilter; 6 | import jakarta.ws.rs.ext.Provider; 7 | import java.io.IOException; 8 | 9 | /** 10 | * Allows Delegated UI from the server to be loaded on another domain. 11 | */ 12 | @Provider 13 | public class OslcCspFilter implements ContainerResponseFilter { 14 | 15 | @Override 16 | public void filter(ContainerRequestContext requestContext, 17 | ContainerResponseContext responseContext) throws IOException { 18 | responseContext.getHeaders().add("Content-Security-Policy", "frame-ancestors 'self' *"); 19 | } 20 | } -------------------------------------------------------------------------------- /src/server-cm/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | # General settings for compact layout 2 | org.slf4j.simpleLogger.logFile = System.out 3 | org.slf4j.simpleLogger.levelInBrackets = true 4 | org.slf4j.simpleLogger.showLogName = true 5 | org.slf4j.simpleLogger.showShortLogName = true 6 | org.slf4j.simpleLogger.showThreadName = false 7 | 8 | # Key levels 9 | org.slf4j.simpleLogger.defaultLogLevel = INFO 10 | org.slf4j.simpleLogger.log.co.oslc.refimpl = DEBUG 11 | org.slf4j.simpleLogger.log.org.eclipse.lyo = DEBUG 12 | 13 | # Timestamps 14 | org.slf4j.simpleLogger.showDateTime = true 15 | #org.slf4j.simpleLogger.dateTimeFormat = HH:mm:ss.SSS 16 | 17 | # Toggle-able for debug 18 | org.slf4j.simpleLogger.log.org.apache.http = INFO 19 | #org.slf4j.simpleLogger.log.org.eclipse.lyo.trs = TRACE 20 | 21 | # Permanently reduce noise 22 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.ordfm.ResourcePackages = INFO 23 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper = INFO 24 | org.slf4j.simpleLogger.log.io.swagger.v3 = WARN 25 | org.slf4j.simpleLogger.log.org.glassfish = INFO 26 | org.slf4j.simpleLogger.log.org.jboss.weld = DEBUG 27 | org.slf4j.simpleLogger.log.org.apache.jena = INFO 28 | org.slf4j.simpleLogger.log.Jena = INFO 29 | -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | CM 7 | 8 | Base URI for the adaptor. 9 | co.oslc.refimpl.cm.gen.servlet.baseurl 10 | http://localhost:8801/ 11 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | Listener for ServletContext lifecycle changes 24 | co.oslc.refimpl.cm.gen.servlet.ServletListener 25 | 26 | 28 | 29 | 31 | 32 | JAX-RS Servlet 33 | org.glassfish.jersey.servlet.ServletContainer 34 | 35 | jakarta.ws.rs.Application 36 | co.oslc.refimpl.cm.gen.servlet.Application 37 | 38 | 1 39 | 40 | 42 | 43 | 45 | 46 | JAX-RS Servlet 47 | /services/* 48 | 49 | 50 | CredentialsFilter 51 | CredentialsFilter 52 | co.oslc.refimpl.cm.gen.servlet.CredentialsFilter 53 | 54 | 55 | CredentialsFilter 56 | /services/* 57 | 58 | 59 | 61 | 62 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/selectiondialog.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 21 | 22 | <% 23 | String selectionUri = (String) request.getAttribute("selectionUri"); 24 | String resourceTypeLabel = (String) request.getAttribute("resourceTypeLabel"); 25 | String fieldsToList = (String) request.getAttribute("fieldsToList"); 26 | %> 27 | 28 | 29 | 30 | "> 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/uipreview.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 22 | 23 | <% 24 | String resourceTitle = (String) request.getAttribute("resourceTitle"); 25 | String resourcePreviewDataSet = (String) request.getAttribute("resourcePreviewDataSet"); 26 | %> 27 | 28 | 29 | 30 | 31 | <%= resourceTitle %> 32 | "> 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/static/css/adaptor.css: -------------------------------------------------------------------------------- 1 | /* Start of user code "Copyright" 2 | */ 3 | /******************************************************************************* 4 | Copyright (c) 2017 KTH Royal Institute of Technology. 5 | 6 | All rights reserved. This program and the accompanying materials 7 | are made available under the terms of the Eclipse Public License v1.0 8 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 9 | 10 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 11 | and the Eclipse Distribution License is available at 12 | http://www.eclipse.org/org/documents/edl-v10.php. 13 | 14 | Contributors: 15 | 16 | Fr�d�ric Loiret - Switch the template to Bootstrap (519699) 17 | Andrii Berezovskyi - Support for UI Preview (494303) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | *******************************************************************************/ 21 | /* End of user code */ 22 | 23 | /* Sticky footer 24 | -------------------------------------------------- */ 25 | html { 26 | position: relative; 27 | min-height: 100%; 28 | } 29 | body { 30 | /* Margin bottom by footer height */ 31 | margin-bottom: 60px; 32 | } 33 | .footer { 34 | position: absolute; 35 | bottom: 0; 36 | width: 100%; 37 | /* Set the fixed height of the footer here */ 38 | height: 60px; 39 | background-color: #f5f5f5; 40 | } 41 | 42 | 43 | /* Custom adaptor CSS 44 | -------------------------------------------------- */ 45 | 46 | body > .container { 47 | padding-top: 20px; 48 | padding-bottom: 10px; 49 | } 50 | .container .text-muted { 51 | margin: 20px 0; 52 | } 53 | 54 | .footer > .container { 55 | padding-right: 15px; 56 | padding-left: 15px; 57 | } 58 | 59 | code { 60 | font-size: 80%; 61 | } 62 | 63 | .popover { 64 | max-width: 520px; 65 | max-height: 270px; 66 | } 67 | 68 | .popover .popover-body { 69 | max-width: 515px; 70 | max-height: 215px; 71 | overflow: hidden; 72 | } 73 | 74 | #delegatedUI { 75 | width: 523px; 76 | height: 320px; /*this is selection; creation has 480px*/ 77 | } 78 | -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/static/dist/oslc-ui/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oslc-op/refimpl/c453de628dcb2ae4ee3fdb13ce6329b24a7b7988/src/server-cm/src/main/webapp/static/dist/oslc-ui/favicon.ico -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/static/dist/oslc-ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NgAdaptorSesammTool 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/server-cm/src/main/webapp/static/dist/oslc-ui/runtime-es2015.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,l,f=r[0],i=r[1],p=r[2],c=0,s=[];c 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 19 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 20 | <%@page import="java.net.URI"%> 21 | <%@page import="java.io.File"%> 22 | 23 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 24 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 25 | <% 26 | URI yamlPath = UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build(); 27 | %> 28 | 29 | 30 | 31 | 32 | Swagger UI 33 | 34 | 35 | 36 | 57 | 58 | 59 |
60 | 61 | 62 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/server-cm/tomcat.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-17 AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-cm -am -Pwith-jstl-impl 6 | 7 | FROM docker.io/library/tomcat:10-jre17 8 | 9 | # do not write log files, log everything to the Docker daemon 10 | COPY --from=build /src/server-cm/config/tomcat-log.properties $CATALINA_BASE/conf/logging.properties 11 | ENV CATALINA_OUT=/dev/null 12 | 13 | COPY --from=build /src/server-cm/target/*.war /usr/local/tomcat/webapps/ROOT.war 14 | -------------------------------------------------------------------------------- /src/server-qm/.dockerignore: -------------------------------------------------------------------------------- 1 | overlays/ 2 | target/ 3 | -------------------------------------------------------------------------------- /src/server-qm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-21-alpine AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-qm -am 6 | 7 | FROM docker.io/library/jetty:12-jre21-eclipse-temurin 8 | # WARNING DO NOT CHANGE WORKDIR or set it back to what it was before 9 | # $JETTY_BASE must be correct before starting Jetty 10 | 11 | COPY --from=build /src/server-qm/target/*.war /var/lib/jetty/webapps/ROOT.war 12 | 13 | RUN java -jar "$JETTY_HOME/start.jar" --add-modules=ee9-deploy,ee9-jsp,ee9-jstl 14 | -------------------------------------------------------------------------------- /src/server-qm/config/tomcat-log.properties: -------------------------------------------------------------------------------- 1 | # Docker log config to make sure Tomcat logs everything to Docker! 2 | 3 | handlers = java.util.logging.ConsoleHandler 4 | 5 | .handlers = java.util.logging.ConsoleHandler 6 | 7 | java.util.logging.ConsoleHandler.level = FINE 8 | java.util.logging.ConsoleHandler.formatter = java.util.logging.OneLineFormatter 9 | java.util.logging.ConsoleHandler.encoding = UTF-8 10 | 11 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO 12 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = \ 13 | java.util.logging.ConsoleHandler 14 | 15 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO 16 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = \ 17 | java.util.logging.ConsoleHandler 18 | 19 | # For example, set the org.apache.catalina.util.LifecycleBase logger to log 20 | # each component that extends LifecycleBase changing state: 21 | #org.apache.catalina.util.LifecycleBase.level = FINE 22 | -------------------------------------------------------------------------------- /src/server-qm/src/main/java/co/oslc/refimpl/qm/gen/QMConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2012 IBM Corporation and others. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Russell Boykin - initial API and implementation 16 | * Alberto Giammaria - initial API and implementation 17 | * Chris Peters - initial API and implementation 18 | * Gianluca Bernardini - initial API and implementation 19 | * Michael Fiedler - Bugzilla adpater implementations 20 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 21 | * 22 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 23 | *******************************************************************************/ 24 | // End of user code 25 | 26 | package co.oslc.refimpl.qm.gen; 27 | 28 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 29 | 30 | // Start of user code imports 31 | // End of user code 32 | 33 | public interface QMConstants 34 | { 35 | // Start of user code user constants 36 | // End of user code 37 | 38 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 39 | public static final String OSLC_VERSION_V2 = "2.0"; 40 | } 41 | -------------------------------------------------------------------------------- /src/server-qm/src/main/java/co/oslc/refimpl/qm/gen/ServerConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.qm.gen; 19 | 20 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 21 | 22 | // Start of user code imports 23 | // End of user code 24 | 25 | public interface ServerConstants 26 | { 27 | // Start of user code user constants 28 | // End of user code 29 | 30 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 31 | public static final String OSLC_VERSION_V2 = "2.0"; 32 | } 33 | -------------------------------------------------------------------------------- /src/server-qm/src/main/java/co/oslc/refimpl/qm/gen/ServiceProviderInfo.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2014 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 16 | * 17 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 18 | *******************************************************************************/ 19 | // End of user code 20 | 21 | package co.oslc.refimpl.qm.gen; 22 | 23 | // Start of user code imports 24 | // End of user code 25 | 26 | // Start of user code pre_class_code 27 | // End of user code 28 | public class ServiceProviderInfo { 29 | public String name; 30 | public String serviceProviderId; 31 | 32 | // Start of user code class_attributes 33 | // End of user code 34 | 35 | // Start of user code class_methods 36 | // End of user code 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/server-qm/src/main/java/co/oslc/refimpl/qm/gen/clients/GenericRequiredAdaptorClient.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2015 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of client code 16 | * 17 | *******************************************************************************/ 18 | // End of user code 19 | 20 | package co.oslc.refimpl.qm.gen.clients; 21 | 22 | import jakarta.ws.rs.core.Response; 23 | import org.eclipse.lyo.client.OSLCConstants; 24 | import org.eclipse.lyo.client.OslcClient; 25 | import org.eclipse.lyo.oslc4j.core.model.ServiceProviderCatalog; 26 | 27 | // Start of user code imports 28 | // End of user code 29 | 30 | 31 | // Start of user code pre_class_code 32 | // End of user code 33 | 34 | public class GenericRequiredAdaptorClient 35 | { 36 | 37 | // Start of user code class_attributes 38 | // End of user code 39 | 40 | // Start of user code class_methods 41 | // End of user code 42 | 43 | static String serviceProviderCatalogURI = "http://your.host.com/adaptor/services/catalog/singleton"; 44 | 45 | public static ServiceProviderCatalog getServiceProviderCatalog() throws Exception { 46 | OslcClient client = new OslcClient(); 47 | Response response = null; 48 | ServiceProviderCatalog catalog = null; 49 | 50 | // Start of user code getServiceProviderCatalog_init 51 | // End of user code 52 | 53 | response = client.getResource(serviceProviderCatalogURI,OSLCConstants.CT_RDF); 54 | if (response != null) { 55 | catalog = response.readEntity(ServiceProviderCatalog.class); 56 | } 57 | // Start of user code getServiceProviderCatalog_final 58 | // End of user code 59 | return catalog; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/server-qm/src/main/java/co/oslc/refimpl/qm/gen/servlet/ApplicationBinder.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.qm.gen.servlet; 19 | 20 | import org.slf4j.Logger; 21 | import org.slf4j.LoggerFactory; 22 | import org.glassfish.hk2.api.Factory; 23 | import org.glassfish.hk2.utilities.binding.AbstractBinder; 24 | 25 | import jakarta.inject.Singleton; 26 | 27 | import co.oslc.refimpl.qm.gen.RestDelegate; 28 | import co.oslc.refimpl.qm.gen.ResourcesFactory; 29 | 30 | import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; 31 | // Start of user code imports 32 | // End of user code 33 | 34 | // Start of user code pre_class_code 35 | // End of user code 36 | 37 | public class ApplicationBinder extends AbstractBinder { 38 | 39 | private static final Logger log = LoggerFactory.getLogger(ApplicationBinder.class); 40 | 41 | // Start of user code class_attributes 42 | // End of user code 43 | 44 | // Start of user code class_methods 45 | // End of user code 46 | 47 | public ApplicationBinder() 48 | { 49 | log.info("HK2 contract binding init"); 50 | } 51 | 52 | @Override 53 | protected void configure() { 54 | log.info("HK2 contract binding start"); 55 | 56 | // Start of user code ConfigureInitialise 57 | // End of user code 58 | bindAsContract(RestDelegate.class).in(Singleton.class); 59 | bindFactory(ResourcesFactoryFactory.class).to(ResourcesFactory.class).in(Singleton.class); 60 | 61 | 62 | 63 | // Start of user code ConfigureFinalize 64 | // End of user code 65 | } 66 | static class ResourcesFactoryFactory implements Factory { 67 | @Override 68 | public ResourcesFactory provide() { 69 | return new ResourcesFactory(OSLC4JUtils.getServletURI()); 70 | } 71 | 72 | @Override 73 | public void dispose(ResourcesFactory instance) { 74 | } 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/server-qm/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | # General settings for compact layout 2 | org.slf4j.simpleLogger.logFile = System.out 3 | org.slf4j.simpleLogger.levelInBrackets = true 4 | org.slf4j.simpleLogger.showLogName = true 5 | org.slf4j.simpleLogger.showShortLogName = true 6 | org.slf4j.simpleLogger.showThreadName = false 7 | 8 | # Key levels 9 | org.slf4j.simpleLogger.defaultLogLevel = INFO 10 | org.slf4j.simpleLogger.log.co.oslc.refimpl = DEBUG 11 | org.slf4j.simpleLogger.log.org.eclipse.lyo = DEBUG 12 | 13 | # Timestamps 14 | org.slf4j.simpleLogger.showDateTime = true 15 | #org.slf4j.simpleLogger.dateTimeFormat = HH:mm:ss.SSS 16 | 17 | # Toggle-able for debug 18 | org.slf4j.simpleLogger.log.org.apache.http = INFO 19 | #org.slf4j.simpleLogger.log.org.eclipse.lyo.trs = TRACE 20 | 21 | # Permanently reduce noise 22 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.ordfm.ResourcePackages = INFO 23 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper = INFO 24 | org.slf4j.simpleLogger.log.io.swagger.v3 = WARN 25 | org.slf4j.simpleLogger.log.org.glassfish = INFO 26 | org.slf4j.simpleLogger.log.org.jboss.weld = DEBUG 27 | org.slf4j.simpleLogger.log.org.apache.jena = INFO 28 | org.slf4j.simpleLogger.log.Jena = INFO 29 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | QM 7 | 8 | Base URI for the adaptor. 9 | co.oslc.refimpl.qm.gen.servlet.baseurl 10 | http://localhost:8802/ 11 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | Listener for ServletContext lifecycle changes 24 | co.oslc.refimpl.qm.gen.servlet.ServletListener 25 | 26 | 28 | 29 | 31 | 32 | JAX-RS Servlet 33 | org.glassfish.jersey.servlet.ServletContainer 34 | 35 | jakarta.ws.rs.Application 36 | co.oslc.refimpl.qm.gen.servlet.Application 37 | 38 | 1 39 | 40 | 42 | 43 | 45 | 46 | JAX-RS Servlet 47 | /services/* 48 | 49 | 50 | CredentialsFilter 51 | CredentialsFilter 52 | co.oslc.refimpl.qm.gen.servlet.CredentialsFilter 53 | 54 | 55 | CredentialsFilter 56 | /services/* 57 | 58 | 59 | 61 | 62 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/agenttohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.Agent"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Agent aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Agent (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aAgent") != null) { 27 | aResource = (Agent) request.getAttribute("aAgent"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Agent Resource} - update Agent.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/changerequesttohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.cm.ChangeRequest"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | ChangeRequest aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new ChangeRequest (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aChangeRequest") != null) { 27 | aResource = (ChangeRequest) request.getAttribute("aChangeRequest"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local ChangeRequest Resource} - update ChangeRequest.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/changesettohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.ChangeSet"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | ChangeSet aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new ChangeSet (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aChangeSet") != null) { 27 | aResource = (ChangeSet) request.getAttribute("aChangeSet"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local ChangeSet Resource} - update ChangeSet.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/componenttohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.Component"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Component aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Component (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aComponent") != null) { 27 | aResource = (Component) request.getAttribute("aComponent"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Component Resource} - update Component.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/conceptresourcetohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.ConceptResource"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | ConceptResource aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new ConceptResource (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aConceptResource") != null) { 27 | aResource = (ConceptResource) request.getAttribute("aConceptResource"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local ConceptResource Resource} - update ConceptResource.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/configurationtohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.Configuration"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Configuration aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Configuration (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aConfiguration") != null) { 27 | aResource = (Configuration) request.getAttribute("aConfiguration"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Configuration Resource} - update Configuration.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/contributiontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.Contribution"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Contribution aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Contribution (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aContribution") != null) { 27 | aResource = (Contribution) request.getAttribute("aContribution"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Contribution Resource} - update Contribution.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/defecttohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.cm.Defect"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Defect aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Defect (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aDefect") != null) { 27 | aResource = (Defect) request.getAttribute("aDefect"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Defect Resource} - update Defect.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/discussiontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc4j.core.model.Discussion"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Discussion aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Discussion (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aDiscussion") != null) { 27 | aResource = (Discussion) request.getAttribute("aDiscussion"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Discussion Resource} - update Discussion.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/persontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.Person"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Person aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Person (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aPerson") != null) { 27 | aResource = (Person) request.getAttribute("aPerson"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Person Resource} - update Person.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/prioritytohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.cm.Priority"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Priority aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Priority (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aPriority") != null) { 27 | aResource = (Priority) request.getAttribute("aPriority"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Priority Resource} - update Priority.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/rdfsclasstohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.RdfsClass"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | RdfsClass aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new RdfsClass (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aRdfsClass") != null) { 27 | aResource = (RdfsClass) request.getAttribute("aRdfsClass"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local RdfsClass Resource} - update RdfsClass.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/requirementcollectiontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.rm.RequirementCollection"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | RequirementCollection aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new RequirementCollection (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aRequirementCollection") != null) { 27 | aResource = (RequirementCollection) request.getAttribute("aRequirementCollection"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local RequirementCollection Resource} - update RequirementCollection.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/requirementtohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.rm.Requirement"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Requirement aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Requirement (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aRequirement") != null) { 27 | aResource = (Requirement) request.getAttribute("aRequirement"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Requirement Resource} - update Requirement.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/selectionstohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.Selections"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Selections aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Selections (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aSelections") != null) { 27 | aResource = (Selections) request.getAttribute("aSelections"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Selections Resource} - update Selections.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/statetohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.cm.State"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | State aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new State (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aState") != null) { 27 | aResource = (State) request.getAttribute("aState"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local State Resource} - update State.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testcaseselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestCase"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | TestCaseSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testcaseselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestCase"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (TestCase r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testcasetohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestCase"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | TestCase aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new TestCase (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aTestCase") != null) { 27 | aResource = (TestCase) request.getAttribute("aTestCase"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local TestCase Resource} - update TestCase.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testexecutionrecordselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestExecutionRecord"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | TestExecutionRecordSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testexecutionrecordselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestExecutionRecord"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (TestExecutionRecord r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testexecutionrecordtohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestExecutionRecord"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | TestExecutionRecord aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new TestExecutionRecord (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aTestExecutionRecord") != null) { 27 | aResource = (TestExecutionRecord) request.getAttribute("aTestExecutionRecord"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local TestExecutionRecord Resource} - update TestExecutionRecord.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testplanselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestPlan"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | TestPlanSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testplanselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestPlan"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (TestPlan r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testplantohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestPlan"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | TestPlan aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new TestPlan (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aTestPlan") != null) { 27 | aResource = (TestPlan) request.getAttribute("aTestPlan"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local TestPlan Resource} - update TestPlan.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testresultselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestResult"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | TestResultSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testresultselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestResult"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (TestResult r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testresulttohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestResult"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | TestResult aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new TestResult (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aTestResult") != null) { 27 | aResource = (TestResult) request.getAttribute("aTestResult"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local TestResult Resource} - update TestResult.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testscriptselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestScript"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | TestScriptSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testscriptselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestScript"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (TestScript r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/testscripttohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.qm.TestScript"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | TestScript aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new TestScript (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aTestScript") != null) { 27 | aResource = (TestScript) request.getAttribute("aTestScript"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local TestScript Resource} - update TestScript.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/co/oslc/refimpl/qm/gen/versionresourcetohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.config.VersionResource"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | VersionResource aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new VersionResource (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aVersionResource") != null) { 27 | aResource = (VersionResource) request.getAttribute("aVersionResource"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local VersionResource Resource} - update VersionResource.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/static/css/adaptor.css: -------------------------------------------------------------------------------- 1 | /* Start of user code "Copyright" 2 | */ 3 | /******************************************************************************* 4 | Copyright (c) 2017 KTH Royal Institute of Technology. 5 | 6 | All rights reserved. This program and the accompanying materials 7 | are made available under the terms of the Eclipse Public License v1.0 8 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 9 | 10 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 11 | and the Eclipse Distribution License is available at 12 | http://www.eclipse.org/org/documents/edl-v10.php. 13 | 14 | Contributors: 15 | 16 | Fr�d�ric Loiret - Switch the template to Bootstrap (519699) 17 | Andrii Berezovskyi - Support for UI Preview (494303) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | *******************************************************************************/ 21 | /* End of user code */ 22 | 23 | /* Sticky footer 24 | -------------------------------------------------- */ 25 | html { 26 | position: relative; 27 | min-height: 100%; 28 | } 29 | body { 30 | /* Margin bottom by footer height */ 31 | margin-bottom: 60px; 32 | } 33 | .footer { 34 | position: absolute; 35 | bottom: 0; 36 | width: 100%; 37 | /* Set the fixed height of the footer here */ 38 | height: 60px; 39 | background-color: #f5f5f5; 40 | } 41 | 42 | 43 | /* Custom adaptor CSS 44 | -------------------------------------------------- */ 45 | 46 | body > .container { 47 | padding-top: 20px; 48 | padding-bottom: 10px; 49 | } 50 | .container .text-muted { 51 | margin: 20px 0; 52 | } 53 | 54 | .footer > .container { 55 | padding-right: 15px; 56 | padding-left: 15px; 57 | } 58 | 59 | code { 60 | font-size: 80%; 61 | } 62 | 63 | .popover { 64 | max-width: 520px; 65 | max-height: 270px; 66 | } 67 | 68 | .popover .popover-body { 69 | max-width: 515px; 70 | max-height: 215px; 71 | overflow: hidden; 72 | } 73 | 74 | #delegatedUI { 75 | width: 523px; 76 | height: 320px; /*this is selection; creation has 480px*/ 77 | } 78 | -------------------------------------------------------------------------------- /src/server-qm/src/main/webapp/swagger-ui/index.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 19 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 20 | <%@page import="java.net.URI"%> 21 | <%@page import="java.io.File"%> 22 | 23 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 24 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 25 | <% 26 | URI yamlPath = UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build(); 27 | %> 28 | 29 | 30 | 31 | 32 | Swagger UI 33 | 34 | 35 | 36 | 57 | 58 | 59 |
60 | 61 | 62 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/server-qm/tomcat.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-17 AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-qm -am -Pwith-jstl-impl 6 | 7 | FROM docker.io/library/tomcat:10-jre17 8 | 9 | # do not write log files, log everything to the Docker daemon 10 | COPY --from=build /src/server-qm/config/tomcat-log.properties $CATALINA_BASE/conf/logging.properties 11 | ENV CATALINA_OUT=/dev/null 12 | 13 | COPY --from=build /src/server-qm/target/*.war /usr/local/tomcat/webapps/ROOT.war 14 | -------------------------------------------------------------------------------- /src/server-rm/.dockerignore: -------------------------------------------------------------------------------- 1 | overlays/ 2 | target/ 3 | -------------------------------------------------------------------------------- /src/server-rm/.gitignore: -------------------------------------------------------------------------------- 1 | /oslcOAuthStore.xml 2 | -------------------------------------------------------------------------------- /src/server-rm/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-21-alpine AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-rm -am 6 | 7 | FROM docker.io/library/jetty:12-jre21-eclipse-temurin 8 | # WARNING DO NOT CHANGE WORKDIR or set it back to what it was before 9 | # $JETTY_BASE must be correct before starting Jetty 10 | 11 | COPY --from=build /src/server-rm/target/*.war /var/lib/jetty/webapps/ROOT.war 12 | 13 | RUN java -jar "$JETTY_HOME/start.jar" --add-modules=ee9-deploy,ee9-jsp,ee9-jstl 14 | -------------------------------------------------------------------------------- /src/server-rm/config/tomcat-log.properties: -------------------------------------------------------------------------------- 1 | # Docker log config to make sure Tomcat logs everything to Docker! 2 | 3 | handlers = java.util.logging.ConsoleHandler 4 | 5 | .handlers = java.util.logging.ConsoleHandler 6 | 7 | java.util.logging.ConsoleHandler.level = FINE 8 | java.util.logging.ConsoleHandler.formatter = java.util.logging.OneLineFormatter 9 | java.util.logging.ConsoleHandler.encoding = UTF-8 10 | 11 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO 12 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = \ 13 | java.util.logging.ConsoleHandler 14 | 15 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO 16 | org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = \ 17 | java.util.logging.ConsoleHandler 18 | 19 | # For example, set the org.apache.catalina.util.LifecycleBase logger to log 20 | # each component that extends LifecycleBase changing state: 21 | #org.apache.catalina.util.LifecycleBase.level = FINE 22 | -------------------------------------------------------------------------------- /src/server-rm/src/main/java/co/oslc/refimpl/rm/gen/RMConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2012 IBM Corporation and others. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Russell Boykin - initial API and implementation 16 | * Alberto Giammaria - initial API and implementation 17 | * Chris Peters - initial API and implementation 18 | * Gianluca Bernardini - initial API and implementation 19 | * Michael Fiedler - Bugzilla adpater implementations 20 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 21 | * 22 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 23 | *******************************************************************************/ 24 | // End of user code 25 | 26 | package co.oslc.refimpl.rm.gen; 27 | 28 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 29 | 30 | // Start of user code imports 31 | // End of user code 32 | 33 | public interface RMConstants 34 | { 35 | // Start of user code user constants 36 | // End of user code 37 | 38 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 39 | public static final String OSLC_VERSION_V2 = "2.0"; 40 | } 41 | -------------------------------------------------------------------------------- /src/server-rm/src/main/java/co/oslc/refimpl/rm/gen/ServerConstants.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.rm.gen; 19 | 20 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 21 | 22 | // Start of user code imports 23 | // End of user code 24 | 25 | public interface ServerConstants 26 | { 27 | // Start of user code user constants 28 | // End of user code 29 | 30 | public static final String HDR_OSLC_VERSION = "OSLC-Core-Version"; 31 | public static final String OSLC_VERSION_V2 = "2.0"; 32 | } 33 | -------------------------------------------------------------------------------- /src/server-rm/src/main/java/co/oslc/refimpl/rm/gen/ServiceProviderInfo.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2014 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 16 | * 17 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 18 | *******************************************************************************/ 19 | // End of user code 20 | 21 | package co.oslc.refimpl.rm.gen; 22 | 23 | // Start of user code imports 24 | // End of user code 25 | 26 | // Start of user code pre_class_code 27 | // End of user code 28 | public class ServiceProviderInfo { 29 | public String name; 30 | public String serviceProviderId; 31 | 32 | // Start of user code class_attributes 33 | // End of user code 34 | 35 | // Start of user code class_methods 36 | // End of user code 37 | } 38 | 39 | -------------------------------------------------------------------------------- /src/server-rm/src/main/java/co/oslc/refimpl/rm/gen/clients/GenericRequiredAdaptorClient.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2015 Jad El-khoury. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Jad El-khoury - initial implementation of client code 16 | * 17 | *******************************************************************************/ 18 | // End of user code 19 | 20 | package co.oslc.refimpl.rm.gen.clients; 21 | 22 | import jakarta.ws.rs.core.Response; 23 | import org.eclipse.lyo.client.OSLCConstants; 24 | import org.eclipse.lyo.client.OslcClient; 25 | import org.eclipse.lyo.oslc4j.core.model.ServiceProviderCatalog; 26 | 27 | // Start of user code imports 28 | // End of user code 29 | 30 | 31 | // Start of user code pre_class_code 32 | // End of user code 33 | 34 | public class GenericRequiredAdaptorClient 35 | { 36 | 37 | // Start of user code class_attributes 38 | // End of user code 39 | 40 | // Start of user code class_methods 41 | // End of user code 42 | 43 | static String serviceProviderCatalogURI = "http://your.host.com/adaptor/services/catalog/singleton"; 44 | 45 | public static ServiceProviderCatalog getServiceProviderCatalog() throws Exception { 46 | OslcClient client = new OslcClient(); 47 | Response response = null; 48 | ServiceProviderCatalog catalog = null; 49 | 50 | // Start of user code getServiceProviderCatalog_init 51 | // End of user code 52 | 53 | response = client.getResource(serviceProviderCatalogURI,OSLCConstants.CT_RDF); 54 | if (response != null) { 55 | catalog = response.readEntity(ServiceProviderCatalog.class); 56 | } 57 | // Start of user code getServiceProviderCatalog_final 58 | // End of user code 59 | return catalog; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/server-rm/src/main/java/co/oslc/refimpl/rm/gen/resources/package-info.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /******************************************************************************* 3 | * Copyright (c) 2012 IBM Corporation and others. 4 | * 5 | * All rights reserved. This program and the accompanying materials 6 | * are made available under the terms of the Eclipse Public License v1.0 7 | * and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | * 9 | * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | * and the Eclipse Distribution License is available at 11 | * http://www.eclipse.org/org/documents/edl-v10.php. 12 | * 13 | * Contributors: 14 | * 15 | * Russell Boykin - initial API and implementation 16 | * Alberto Giammaria - initial API and implementation 17 | * Chris Peters - initial API and implementation 18 | * Gianluca Bernardini - initial API and implementation 19 | * Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 20 | * 21 | * This file is generated by org.eclipse.lyo.oslc4j.codegenerator 22 | *******************************************************************************/ 23 | // End of user code 24 | 25 | @OslcSchema ({ 26 | @OslcNamespaceDefinition(prefix = OslcConstants.DCTERMS_NAMESPACE_PREFIX, namespaceURI = OslcConstants.DCTERMS_NAMESPACE), 27 | @OslcNamespaceDefinition(prefix = OslcConstants.OSLC_CORE_NAMESPACE_PREFIX, namespaceURI = OslcConstants.OSLC_CORE_NAMESPACE), 28 | @OslcNamespaceDefinition(prefix = OslcConstants.OSLC_DATA_NAMESPACE_PREFIX, namespaceURI = OslcConstants.OSLC_DATA_NAMESPACE), 29 | @OslcNamespaceDefinition(prefix = OslcConstants.RDF_NAMESPACE_PREFIX, namespaceURI = OslcConstants.RDF_NAMESPACE), 30 | @OslcNamespaceDefinition(prefix = OslcConstants.RDFS_NAMESPACE_PREFIX, namespaceURI = OslcConstants.RDFS_NAMESPACE), 31 | @OslcNamespaceDefinition(prefix = DctermsDomainConstants.DUBLIN_CORE_NAMSPACE_PREFIX, namespaceURI = DctermsDomainConstants.DUBLIN_CORE_NAMSPACE), 32 | @OslcNamespaceDefinition(prefix = FoafDomainConstants.FOAF_NAMSPACE_PREFIX, namespaceURI = FoafDomainConstants.FOAF_NAMSPACE), 33 | @OslcNamespaceDefinition(prefix = OslcDomainConstants.OSLC_NAMSPACE_PREFIX, namespaceURI = OslcDomainConstants.OSLC_NAMSPACE), 34 | @OslcNamespaceDefinition(prefix = Oslc_rmDomainConstants.REQUIREMENTS_MANAGEMENT_SHAPES_NAMSPACE_PREFIX, namespaceURI = Oslc_rmDomainConstants.REQUIREMENTS_MANAGEMENT_SHAPES_NAMSPACE) 35 | }) 36 | package co.oslc.refimpl.rm.gen.resources; 37 | 38 | import org.eclipse.lyo.oslc4j.core.annotation.OslcNamespaceDefinition; 39 | import org.eclipse.lyo.oslc4j.core.annotation.OslcSchema; 40 | import org.eclipse.lyo.oslc4j.core.model.OslcConstants; 41 | 42 | import org.eclipse.lyo.oslc.domains.DctermsDomainConstants; 43 | import org.eclipse.lyo.oslc.domains.FoafDomainConstants; 44 | import org.eclipse.lyo.oslc4j.core.model.OslcDomainConstants; 45 | import org.eclipse.lyo.oslc.domains.rm.Oslc_rmDomainConstants; 46 | 47 | -------------------------------------------------------------------------------- /src/server-rm/src/main/java/co/oslc/refimpl/rm/gen/servlet/ApplicationBinder.java: -------------------------------------------------------------------------------- 1 | // Start of user code Copyright 2 | /* 3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | * 5 | * See the NOTICE file(s) distributed with this work for additional 6 | * information regarding copyright ownership. 7 | * 8 | * This program and the accompanying materials are made available under the 9 | * terms of the Eclipse Distribution License 1.0 which is available at 10 | * http://www.eclipse.org/org/documents/edl-v10.php. 11 | * 12 | * SPDX-License-Identifier: BSD-3-Simple 13 | * 14 | * This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | */ 16 | // End of user code 17 | 18 | package co.oslc.refimpl.rm.gen.servlet; 19 | 20 | import org.slf4j.Logger; 21 | import org.slf4j.LoggerFactory; 22 | import org.glassfish.hk2.api.Factory; 23 | import org.glassfish.hk2.utilities.binding.AbstractBinder; 24 | 25 | import jakarta.inject.Singleton; 26 | 27 | import co.oslc.refimpl.rm.gen.RestDelegate; 28 | import co.oslc.refimpl.rm.gen.ResourcesFactory; 29 | 30 | import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; 31 | // Start of user code imports 32 | // End of user code 33 | 34 | // Start of user code pre_class_code 35 | // End of user code 36 | 37 | public class ApplicationBinder extends AbstractBinder { 38 | 39 | private static final Logger log = LoggerFactory.getLogger(ApplicationBinder.class); 40 | 41 | // Start of user code class_attributes 42 | // End of user code 43 | 44 | // Start of user code class_methods 45 | // End of user code 46 | 47 | public ApplicationBinder() 48 | { 49 | log.info("HK2 contract binding init"); 50 | } 51 | 52 | @Override 53 | protected void configure() { 54 | log.info("HK2 contract binding start"); 55 | 56 | // Start of user code ConfigureInitialise 57 | // End of user code 58 | bindAsContract(RestDelegate.class).in(Singleton.class); 59 | bindFactory(ResourcesFactoryFactory.class).to(ResourcesFactory.class).in(Singleton.class); 60 | 61 | 62 | 63 | // Start of user code ConfigureFinalize 64 | // End of user code 65 | } 66 | static class ResourcesFactoryFactory implements Factory { 67 | @Override 68 | public ResourcesFactory provide() { 69 | return new ResourcesFactory(OSLC4JUtils.getServletURI()); 70 | } 71 | 72 | @Override 73 | public void dispose(ResourcesFactory instance) { 74 | } 75 | } 76 | 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/server-rm/src/main/resources/logging.properties: -------------------------------------------------------------------------------- 1 | # Tomcat log config for the webapp 2 | handlers = java.util.logging.ConsoleHandler 3 | 4 | java.util.logging.ConsoleHandler.level = FINE 5 | java.util.logging.ConsoleHandler.formatter = java.util.logging.OneLineFormatter 6 | -------------------------------------------------------------------------------- /src/server-rm/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | # General settings for compact layout 2 | org.slf4j.simpleLogger.logFile = System.out 3 | org.slf4j.simpleLogger.levelInBrackets = true 4 | org.slf4j.simpleLogger.showLogName = true 5 | org.slf4j.simpleLogger.showShortLogName = true 6 | org.slf4j.simpleLogger.showThreadName = false 7 | 8 | # Key levels 9 | org.slf4j.simpleLogger.defaultLogLevel = INFO 10 | org.slf4j.simpleLogger.log.co.oslc.refimpl = DEBUG 11 | org.slf4j.simpleLogger.log.org.eclipse.lyo = DEBUG 12 | 13 | # Timestamps 14 | org.slf4j.simpleLogger.showDateTime = true 15 | #org.slf4j.simpleLogger.dateTimeFormat = HH:mm:ss.SSS 16 | 17 | # Toggle-able for debug 18 | org.slf4j.simpleLogger.log.org.apache.http = INFO 19 | #org.slf4j.simpleLogger.log.org.eclipse.lyo.trs = TRACE 20 | 21 | # Permanently reduce noise 22 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.ordfm.ResourcePackages = INFO 23 | org.slf4j.simpleLogger.log.org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper = INFO 24 | org.slf4j.simpleLogger.log.io.swagger.v3 = WARN 25 | org.slf4j.simpleLogger.log.org.glassfish = INFO 26 | org.slf4j.simpleLogger.log.org.jboss.weld = DEBUG 27 | org.slf4j.simpleLogger.log.org.apache.jena = INFO 28 | org.slf4j.simpleLogger.log.Jena = INFO 29 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | RM 7 | 8 | Base URI for the adaptor. 9 | co.oslc.refimpl.rm.gen.servlet.baseurl 10 | http://localhost:8800/ 11 | 13 | 14 | 16 | 17 | 19 | 20 | 22 | 23 | Listener for ServletContext lifecycle changes 24 | co.oslc.refimpl.rm.gen.servlet.ServletListener 25 | 26 | 28 | 29 | 31 | 32 | JAX-RS Servlet 33 | org.glassfish.jersey.servlet.ServletContainer 34 | 35 | jakarta.ws.rs.Application 36 | co.oslc.refimpl.rm.gen.servlet.Application 37 | 38 | 1 39 | 40 | 42 | 43 | 45 | 46 | JAX-RS Servlet 47 | /services/* 48 | 49 | 50 | CredentialsFilter 51 | CredentialsFilter 52 | co.oslc.refimpl.rm.gen.servlet.CredentialsFilter 53 | 54 | 55 | CredentialsFilter 56 | /services/* 57 | 58 | 59 | 61 | 62 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/persontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.Person"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Person aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Person (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aPerson") != null) { 27 | aResource = (Person) request.getAttribute("aPerson"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Person Resource} - update Person.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/requirementcollectionselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.rm.RequirementCollection"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | RequirementCollectionSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/requirementcollectionselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.rm.RequirementCollection"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (RequirementCollection r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/requirementcollectiontohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.rm.RequirementCollection"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | RequirementCollection aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new RequirementCollection (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aRequirementCollection") != null) { 27 | aResource = (RequirementCollection) request.getAttribute("aRequirementCollection"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local RequirementCollection Resource} - update RequirementCollection.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/requirementselector.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 19 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 20 | 21 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 22 | <%@page import="org.eclipse.lyo.oslc.domains.rm.Requirement"%> 23 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 24 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 25 | 26 | <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> 27 | 28 | <% 29 | String selectionUri = (String) request.getAttribute("selectionUri"); 30 | 31 | %> 32 | 33 | 34 | 35 | 36 | RequirementSD 37 | 38 | 39 | 40 |
41 |

Find a specific resource through a free-text search.

42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 52 |
53 | 54 |
55 | 57 | 59 |
60 |
61 |
62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/requirementselectorresults.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2011, 2012 IBM Corporation and others. 4 | 5 | All rights reserved. This program and the accompanying materials 6 | are made available under the terms of the Eclipse Public License v1.0 7 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 8 | 9 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 10 | and the Eclipse Distribution License is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | Contributors: 14 | 15 | Sam Padgett - initial API and implementation 16 | Michael Fiedler - adapted for OSLC4J 17 | Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | --%> 21 | 22 | <%@ page import="java.net.*" %> 23 | <%@ page import="java.util.*" %> 24 | <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> 25 | <%@page import="org.eclipse.lyo.oslc4j.core.model.AbstractResource"%> 26 | <%@page import="org.eclipse.lyo.oslc.domains.rm.Requirement"%> 27 | 28 | <%@ page contentType="application/json" language="java" pageEncoding="UTF-8" %> 29 | 30 | { 31 | <% 32 | String selectionUri = (String) request.getAttribute("selectionUri"); 33 | List resources = (List) request.getAttribute("resources"); 34 | String terms = (String) request.getAttribute("terms"); 35 | %> 36 | "oslc:results": [ 37 | <% int i = 0; for (Requirement r : resources) { %> 38 | <% if (i > 0) { %>,<% } %> 39 | { 40 | "oslc:label" : "<%= r.toString() %>", 41 | "rdf:resource" : "<%= r.getAbout() %>" 42 | } 43 | <% i++; } %> 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/co/oslc/refimpl/rm/gen/requirementtohtml.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | <%-- 3 | Copyright (c) 2020 Contributors to the Eclipse Foundation 4 | 5 | See the NOTICE file(s) distributed with this work for additional 6 | information regarding copyright ownership. 7 | 8 | This program and the accompanying materials are made available under the 9 | terms of the Eclipse Distribution License 1.0 which is available at 10 | http://www.eclipse.org/org/documents/edl-v10.php. 11 | 12 | SPDX-License-Identifier: BSD-3-Simple 13 | 14 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 15 | --%> 16 | 17 | <%@page import="org.eclipse.lyo.oslc.domains.rm.Requirement"%> 18 | <%@page import="java.net.URI"%> 19 | <% 20 | String asLocalResource = request.getParameter("asLocalResource"); 21 | Requirement aResource = null; 22 | if (request.getParameter("resourceUri") != null) { 23 | aResource = new Requirement (new URI(request.getParameter("resourceUri"))); 24 | } 25 | else { 26 | if (request.getAttribute("aRequirement") != null) { 27 | aResource = (Requirement) request.getAttribute("aRequirement"); 28 | } 29 | } 30 | 31 | if (asLocalResource != null && asLocalResource.equalsIgnoreCase("true")) { 32 | out.write("{a Local Requirement Resource} - update Requirement.toString() to present resource as desired."); 33 | } 34 | else { 35 | if (aResource == null) { 36 | out.write("null"); 37 | } 38 | else { 39 | out.write("" + aResource.getAbout() + ""); 40 | } 41 | } 42 | %> 43 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/static/css/adaptor.css: -------------------------------------------------------------------------------- 1 | /* Start of user code "Copyright" 2 | */ 3 | /******************************************************************************* 4 | Copyright (c) 2017 KTH Royal Institute of Technology. 5 | 6 | All rights reserved. This program and the accompanying materials 7 | are made available under the terms of the Eclipse Public License v1.0 8 | and Eclipse Distribution License v. 1.0 which accompanies this distribution. 9 | 10 | The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html 11 | and the Eclipse Distribution License is available at 12 | http://www.eclipse.org/org/documents/edl-v10.php. 13 | 14 | Contributors: 15 | 16 | Fr�d�ric Loiret - Switch the template to Bootstrap (519699) 17 | Andrii Berezovskyi - Support for UI Preview (494303) 18 | 19 | This file is generated by org.eclipse.lyo.oslc4j.codegenerator 20 | *******************************************************************************/ 21 | /* End of user code */ 22 | 23 | /* Sticky footer 24 | -------------------------------------------------- */ 25 | html { 26 | position: relative; 27 | min-height: 100%; 28 | } 29 | body { 30 | /* Margin bottom by footer height */ 31 | margin-bottom: 60px; 32 | } 33 | .footer { 34 | position: absolute; 35 | bottom: 0; 36 | width: 100%; 37 | /* Set the fixed height of the footer here */ 38 | height: 60px; 39 | background-color: #f5f5f5; 40 | } 41 | 42 | 43 | /* Custom adaptor CSS 44 | -------------------------------------------------- */ 45 | 46 | body > .container { 47 | padding-top: 20px; 48 | padding-bottom: 10px; 49 | } 50 | .container .text-muted { 51 | margin: 20px 0; 52 | } 53 | 54 | .footer > .container { 55 | padding-right: 15px; 56 | padding-left: 15px; 57 | } 58 | 59 | code { 60 | font-size: 80%; 61 | } 62 | 63 | .popover { 64 | max-width: 520px; 65 | max-height: 270px; 66 | } 67 | 68 | .popover .popover-body { 69 | max-width: 515px; 70 | max-height: 215px; 71 | overflow: hidden; 72 | } 73 | 74 | #delegatedUI { 75 | width: 523px; 76 | height: 320px; /*this is selection; creation has 480px*/ 77 | } 78 | -------------------------------------------------------------------------------- /src/server-rm/src/main/webapp/swagger-ui/index.jsp: -------------------------------------------------------------------------------- 1 | <%--To avoid the overriding of any manual code changes upon subsequent code generations, disable "Generate JSP Files" option in the Adaptor model.--%> 2 | 3 | <%-- 4 | Copyright (c) 2020 Contributors to the Eclipse Foundation 5 | 6 | See the NOTICE file(s) distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Distribution License 1.0 which is available at 11 | http://www.eclipse.org/org/documents/edl-v10.php. 12 | 13 | SPDX-License-Identifier: BSD-3-Simple 14 | 15 | This file is generated by Lyo Designer (https://www.eclipse.org/lyo/) 16 | --%> 17 | 18 | <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> 19 | <%@page import="jakarta.ws.rs.core.UriBuilder"%> 20 | <%@page import="java.net.URI"%> 21 | <%@page import="java.io.File"%> 22 | 23 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 24 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 25 | <% 26 | URI yamlPath = UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path("/openapi.yaml").build(); 27 | %> 28 | 29 | 30 | 31 | 32 | Swagger UI 33 | 34 | 35 | 36 | 57 | 58 | 59 |
60 | 61 | 62 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/server-rm/src/test/java/co/oslc/misc/OslcMatchers.java: -------------------------------------------------------------------------------- 1 | package co.oslc.misc; 2 | 3 | import org.hamcrest.BaseMatcher; 4 | import org.hamcrest.Description; 5 | import org.hamcrest.Matcher; 6 | import org.junit.Assert; 7 | 8 | import java.util.Locale; 9 | import java.util.Set; 10 | 11 | public class OslcMatchers { 12 | public static Matcher isRdf() { 13 | return new BaseMatcher<>() { 14 | Set rdfTypes = Set.of("text/turtle", "application/rdf+xml", "application/ld+json", 15 | "application/n-triples"); 16 | 17 | @Override 18 | public boolean matches(Object actual) { 19 | Assert.assertNotNull(actual); 20 | String actualContentType = ((String) actual).toLowerCase(Locale.ROOT); 21 | return rdfTypes.contains(actualContentType); 22 | } 23 | 24 | @Override 25 | public void describeTo(Description description) { 26 | description.appendText("RDF type matches"); 27 | } 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/server-rm/tomcat.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/maven:3-eclipse-temurin-17 AS build 2 | 3 | COPY . /src 4 | WORKDIR /src 5 | RUN mvn -B --no-transfer-progress -DskipTests clean package -pl server-rm -am -Pwith-jstl-impl 6 | 7 | FROM docker.io/library/tomcat:10-jre17 8 | 9 | # do not write log files, log everything to the Docker daemon 10 | COPY --from=build /src/server-rm/config/tomcat-log.properties $CATALINA_BASE/conf/logging.properties 11 | ENV CATALINA_OUT=/dev/null 12 | 13 | COPY --from=build /src/server-rm/target/*.war /usr/local/tomcat/webapps/ROOT.war 14 | --------------------------------------------------------------------------------