├── .github └── workflows │ └── harp.yml ├── .gitignore ├── .nojekyll ├── _harp ├── .nojekyll ├── 404.md ├── _data.json ├── _harp.json ├── _layout.jade ├── additional-security-considerations.md ├── css │ ├── oslc.css │ └── oslc_enhanced.css ├── eclipse_lyo │ ├── _data.json │ ├── domain-specification-modelling-workshop.md │ ├── eclipse-lyo.md │ ├── eclipse-setup-for-lyo-based-development.md │ ├── images │ │ ├── CreateMavenAdaptorProject_CodeStructure.png │ │ ├── CreateMavenAdaptorProject_Step1.png │ │ ├── CreateMavenAdaptorProject_Step2.png │ │ ├── CreateMavenAdaptorProject_Step3.png │ │ ├── Lyo-ToolchainModelValidation.png │ │ ├── LyoModels-ThreeInOne-P1.png │ │ ├── LyoModels-ThreeInOne-P2.png │ │ ├── LyoModels-ThreeInOne-P3.png │ │ ├── LyoModels-ThreeInOne.png │ │ ├── LyoToolchainModel-AdaptorInterfaceDiagram.png │ │ ├── LyoToolchainModel-SpecificationDiagram.png │ │ ├── LyoToolchainModel-ToolchainDiagram.png │ │ └── OSLCToolAdaptorMetalModel.png │ ├── install-lyo-designer.md │ ├── lyo-as-osgi-bundles.md │ ├── lyo-core-internals.md │ ├── lyo-designer.md │ ├── modelling-howto.md │ ├── setup-an-oslc-provider-consumer-application.md │ └── toolchain-modelling-workshop.md ├── img │ ├── OSLC4JS-schematic.png │ ├── logo-new-big.png │ ├── logo-new-mobile.png │ ├── logo-old-50px.png │ ├── logo-old-big.gif │ └── logo-old.png ├── index.md ├── integrating_products_with_oslc │ ├── _data.json │ ├── _harp.json │ ├── implementing_an_oslc_provider │ │ ├── 1_0_implementing_a_provider.md │ │ ├── 1_1_planning_partial_cm_provider.md │ │ ├── 1_2_providing_service_resources.md │ │ ├── 1_3_intro_to_oslc4j.md │ │ ├── 1_4_ui_preview.md │ │ ├── 1_5_ui_selection.md │ │ ├── 1_6_ui_creation.md │ │ └── 1_7_factory.md │ ├── index.md │ ├── integrating_with_an_oslc_provider │ │ ├── 2_0_implementing_consumer.md │ │ ├── 2_1_consumer_use_cases.md │ │ ├── 2_2_links_and_previews.md │ │ ├── 2_3_delegatedUI.md │ │ ├── 2_4_notify_customers.md │ │ └── 2_5_automatic_bugs.md │ ├── integrating_with_oslc_tutorial.pdf │ ├── overview_of_oslc.md │ └── running_the_examples.md ├── iotp-adaptor-sample.md ├── iotp_adaptor │ ├── _data.json │ ├── _harp.json │ ├── artifact-container-associations.md │ ├── authentication.md │ ├── code-generator.md │ ├── consumer-friend.md │ ├── developer-guide.md │ ├── dialogs.md │ ├── environment-setup.md │ ├── exploring-the-code.md │ ├── images │ │ ├── Bluemix-Domain.png │ │ ├── CE4IoTConnector.png │ │ ├── CRUD-Operations.png │ │ ├── CoreDiscovery.png │ │ ├── Creation-Dialogs.png │ │ ├── Creation-Factories.png │ │ ├── Device-BasicCapability.png │ │ ├── DeviceType-Creation-Factory.png │ │ ├── Generate-the-code.png │ │ ├── Generated-project.png │ │ ├── IoT-Platform-Domain.png │ │ ├── LQE-process-resources.png │ │ ├── Project-Dependencies.png │ │ ├── Query-Capability.png │ │ ├── Selection-Dialogs.png │ │ └── authenticating-with-oauth.png │ ├── implement-domain-class.md │ ├── junit-tests.md │ ├── rootservices.md │ ├── ssl-support.md │ ├── toolchain-model.md │ ├── trs-provider.md │ └── userGuide │ │ ├── _data.json │ │ ├── administration.md │ │ ├── debug-interface.md │ │ ├── images │ │ ├── artifact-container-associations.png │ │ ├── bluemix-ontology.png │ │ ├── concepts-detailed.png │ │ ├── iot-and-bluemix-packages.png │ │ ├── iotp-ontology.png │ │ ├── link-requirement.png │ │ ├── preview-in-dng.png │ │ ├── sample-preview.png │ │ └── sample-selection-dialog.png │ │ ├── install-and-config.md │ │ ├── user-guide.md │ │ └── using.md ├── js │ ├── lib │ │ ├── $.js │ │ ├── delegate.js │ │ ├── modernizr.js │ │ ├── polyfills │ │ │ └── classlist.js │ │ └── underscore.js │ └── oslc.js ├── oslc-open-source-node-projects.md ├── sample-applications-and-code.md ├── services-resources-and-design-patterns.md ├── technical-foundations.md ├── tutorials.md └── why-develop-oslc-applications.md └── docs ├── .nojekyll ├── 404.html ├── additional-security-considerations.html ├── css ├── oslc.css └── oslc_enhanced.css ├── eclipse_lyo ├── domain-specification-modelling-workshop.html ├── eclipse-lyo.html ├── eclipse-setup-for-lyo-based-development.html ├── images │ ├── CreateMavenAdaptorProject_CodeStructure.png │ ├── CreateMavenAdaptorProject_Step1.png │ ├── CreateMavenAdaptorProject_Step2.png │ ├── CreateMavenAdaptorProject_Step3.png │ ├── Lyo-ToolchainModelValidation.png │ ├── LyoModels-ThreeInOne-P1.png │ ├── LyoModels-ThreeInOne-P2.png │ ├── LyoModels-ThreeInOne-P3.png │ ├── LyoModels-ThreeInOne.png │ ├── LyoToolchainModel-AdaptorInterfaceDiagram.png │ ├── LyoToolchainModel-SpecificationDiagram.png │ ├── LyoToolchainModel-ToolchainDiagram.png │ └── OSLCToolAdaptorMetalModel.png ├── install-lyo-designer.html ├── lyo-as-osgi-bundles.html ├── lyo-core-internals.html ├── lyo-designer.html ├── modelling-howto.html ├── setup-an-oslc-provider-consumer-application.html └── toolchain-modelling-workshop.html ├── img ├── OSLC4JS-schematic.png ├── logo-new-big.png ├── logo-new-mobile.png ├── logo-old-50px.png ├── logo-old-big.gif └── logo-old.png ├── index.html ├── integrating_products_with_oslc ├── implementing_an_oslc_provider │ ├── 1_0_implementing_a_provider.html │ ├── 1_1_planning_partial_cm_provider.html │ ├── 1_2_providing_service_resources.html │ ├── 1_3_intro_to_oslc4j.html │ ├── 1_4_ui_preview.html │ ├── 1_5_ui_selection.html │ ├── 1_6_ui_creation.html │ └── 1_7_factory.html ├── index.html ├── integrating_with_an_oslc_provider │ ├── 2_0_implementing_consumer.html │ ├── 2_1_consumer_use_cases.html │ ├── 2_2_links_and_previews.html │ ├── 2_3_delegatedUI.html │ ├── 2_4_notify_customers.html │ └── 2_5_automatic_bugs.html ├── integrating_with_oslc_tutorial.pdf ├── overview_of_oslc.html └── running_the_examples.html ├── iotp-adaptor-sample.html ├── iotp_adaptor ├── artifact-container-associations.html ├── authentication.html ├── code-generator.html ├── consumer-friend.html ├── developer-guide.html ├── dialogs.html ├── environment-setup.html ├── exploring-the-code.html ├── images │ ├── Bluemix-Domain.png │ ├── CE4IoTConnector.png │ ├── CRUD-Operations.png │ ├── CoreDiscovery.png │ ├── Creation-Dialogs.png │ ├── Creation-Factories.png │ ├── Device-BasicCapability.png │ ├── DeviceType-Creation-Factory.png │ ├── Generate-the-code.png │ ├── Generated-project.png │ ├── IoT-Platform-Domain.png │ ├── LQE-process-resources.png │ ├── Project-Dependencies.png │ ├── Query-Capability.png │ ├── Selection-Dialogs.png │ └── authenticating-with-oauth.png ├── implement-domain-class.html ├── junit-tests.html ├── rootservices.html ├── ssl-support.html ├── toolchain-model.html ├── trs-provider.html └── userGuide │ ├── administration.html │ ├── debug-interface.html │ ├── images │ ├── artifact-container-associations.png │ ├── bluemix-ontology.png │ ├── concepts-detailed.png │ ├── iot-and-bluemix-packages.png │ ├── iotp-ontology.png │ ├── link-requirement.png │ ├── preview-in-dng.png │ ├── sample-preview.png │ └── sample-selection-dialog.png │ ├── install-and-config.html │ ├── user-guide.html │ └── using.html ├── js ├── lib │ ├── $.js │ ├── delegate.js │ ├── modernizr.js │ ├── polyfills │ │ └── classlist.js │ └── underscore.js └── oslc.js ├── oslc-open-source-node-projects.html ├── sample-applications-and-code.html ├── services-resources-and-design-patterns.html ├── technical-foundations.html ├── tutorials.html └── why-develop-oslc-applications.html /.github/workflows/harp.yml: -------------------------------------------------------------------------------- 1 | name: Harp CI 2 | 3 | on: 4 | push: 5 | branches: [ gh-pages ] 6 | # pull_request: 7 | # branches: [ gh-pages ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: Setup Node.js environment 16 | uses: actions/setup-node@v2.5.1 17 | with: 18 | # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 19 | node-version: 'lts/*' 20 | # # File containing the version Spec of the version to use. Examples: .nvmrc, .node-version 21 | # node-version-file: # optional 22 | # # Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm 23 | # cache: # optional 24 | # # Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies. 25 | # cache-dependency-path: # optional 26 | 27 | - name: Install Harp 28 | run: | 29 | npm install -g harp 30 | - name: Build 31 | run: | 32 | harp ./_harp/ ./docs/ 33 | - name: Deploy 34 | run: | 35 | git config user.name "GitHub Actions Bot" 36 | git config user.email "<>" 37 | git add -A 38 | git commit -m "Harp rebuild" 39 | git push origin gh-pages 40 | 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _lib/bourbon/ 2 | 3 | node_modules/ 4 | Gruntfile.js 5 | package.json 6 | 7 | .DS_Store 8 | .project 9 | .settings 10 | 11 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/.nojekyll -------------------------------------------------------------------------------- /_harp/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/.nojekyll -------------------------------------------------------------------------------- /_harp/404.md: -------------------------------------------------------------------------------- 1 | ## Nothing here! 2 | 3 | [Try the home page?](/developing-oslc-applications/) -------------------------------------------------------------------------------- /_harp/_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": { 3 | "title": "Get started with developing OSLC applications" 4 | }, 5 | "./eclipse_lyo/eclipse-lyo" : { 6 | "title": "Eclipse Lyo - support for Java developers" 7 | }, 8 | "tutorials": { 9 | "title": "Tutorials" 10 | }, 11 | "iotp-adaptor-sample": { 12 | "title": "Sample OSLC adapter for IoT Platform" 13 | }, 14 | "sample-applications-and-code": { 15 | "title": "Sample applications and code" 16 | }, 17 | "why-develop-oslc-applications": { 18 | "title": "Why develop OSLC applications?" 19 | }, 20 | "technical-foundations": { 21 | "title": "Technical foundations" 22 | }, 23 | "oslc-open-source-node-projects": { 24 | "title": "OSLC4JS Projects" 25 | }, 26 | "services-resources-and-design-patterns": { 27 | "title": "Services, resources, and design patterns" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /_harp/_harp.json: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "org_name": "Open Services for Lifecycle Collaboration", 4 | "org_abbr": "OSLC", 5 | "site_name": "Developer Guide", 6 | "parent_uri": null 7 | } 8 | } -------------------------------------------------------------------------------- /_harp/_layout.jade: -------------------------------------------------------------------------------- 1 | - var site_url = environment == "production" ? 'https://oslc.github.io/developing-oslc-applications/' : '/'; 2 | doctype 3 | html.no-js(lang="en") 4 | head 5 | meta(charset="utf-8") 6 | meta(http-equiv="X-UA-Compatible", content="IE=edge,chrome=1") 7 | meta(name="viewport", content="width=device-width, initial-scale=1") 8 | title #{ title || 'Learn to develop OSLC applications'} 9 | 10 | link(rel="preconnect" href="https://fonts.googleapis.com" crossorigin="anonymous") 11 | link(rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous") 12 | link(rel="stylesheet" href="#{ site_url }css/oslc.css") 13 | link(rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/solid.css" integrity="sha384-QokYePQSOwpBDuhlHOsX0ymF6R/vLk/UQVz3WHa6wygxI5oGTmDTv8wahFOSspdm" crossorigin="anonymous") 14 | link(rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/fontawesome.css" integrity="sha384-vd1e11sR28tEK9YANUtpIOdjGW14pS87bUBuOIoBILVWLFnS+MCX9T6MMf0VdPGq" crossorigin="anonymous") 15 | link(rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600;1,700&family=Roboto+Mono&display=swap" crossorigin="anonymous") 16 | 17 | script(src="#{ site_url }js/lib/modernizr.js") 18 | 19 | //- script. 20 | //- // add .mustard/.no-mustard css classes 21 | //- Modernizr.addTest( 'mustard', 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ); 22 | 23 | //- Modernizr.load([{ 24 | //- test: Modernizr.mustard, 25 | //- yep: '#{ site_url }css/oslc_enhanced.css' 26 | //- }]); 27 | link(rel="stylesheet" href="#{ site_url }css/oslc_enhanced.css") 28 | 29 | 30 | body 31 | header.header 32 | .flag 33 | .image 34 | button.navburger.mustard-only(title="Main menu", role="button", aria-label="Toggle Navigation", data-toggle-class="primary-nav-is-open", data-toggle-target="body") 35 | span.navburger-line.top 36 | span.navburger-line.middle 37 | span.navburger-line.bottom 38 | .body 39 | a.flag.image-link(href="#{ site_url }") 40 | .image 41 | img.logo-img(src="#{ site_url }img/logo-new-mobile.png") 42 | .body 43 | span.logo-text 44 | abbr.oslc-name(title="#{ org_name }") #{ org_abbr } 45 | br 46 | span.project-name #{ site_name } 47 | 48 | .sticky-footer-body.off-canvas-wrap 49 | nav.nav 50 | .menu.primary 51 | .item.desk-up 52 | a.image-link(href="#{ site_url }") 53 | img(src="#{ site_url }img/logo-new-big.png" width=100 height=100).logo 54 | span.logo-text 55 | abbr.oslc-name(title="#{ org_name }") #{ org_abbr } 56 | span.project-name #{ site_name } 57 | ul.items 58 | if parent_uri !== null 59 | li(class='item' role="presentation") 60 | a(href="#{ parent_uri }") One level up 61 | - var dir = current.path[0] 62 | case dir 63 | when 'eclipse_lyo' 64 | - var $i = 1; 65 | for page, slug in public.eclipse_lyo._data 66 | li(class='item #{ current.source === slug ? "current" : "" }' role="presentation") 67 | a(href="#{ site_url }#{ slug === 'index' ? '' : ('eclipse_lyo/' + slug + '.html') }") #{ page.title } 68 | when 'integrating_products_with_oslc' 69 | - var $i = 1; 70 | for page, slug in public.integrating_products_with_oslc._data 71 | //- - var fslug = 'integrating_products_with_oslc/' + slug 72 | li(class='item #{ current.source === slug ? "current" : "" }' role="presentation") 73 | //- a(href="#{ site_url }#{ slug === 'index' ? '' : ('integrating_products_with_oslc/' + slug + '.html') }") #{ page.title } 74 | a(href="#{ site_url }#{ 'integrating_products_with_oslc/' + slug + '.html' }") #{ page.title } 75 | when 'iotp_adaptor' 76 | - var subdir = current.path[1] 77 | case subdir 78 | when 'userGuide' 79 | - var $i = 1; 80 | for page, slug in public.iotp_adaptor.userGuide._data 81 | li(class='item #{ current.source === slug ? "current" : "" }' role="presentation") 82 | a(href="#{ site_url }#{ slug === 'index' ? '' : ('iotp_adaptor/userGuide/' + slug + '.html') }") #{ page.title } 83 | default 84 | - var $i = 1; 85 | for page, slug in public.iotp_adaptor._data 86 | li(class='item #{ current.source === slug ? "current" : "" }' role="presentation") 87 | a(href="#{ site_url }#{ slug === 'index' ? '' : ('iotp_adaptor/' + slug + '.html') }") #{ page.title } 88 | default 89 | - var $i = 1; 90 | for page, slug in public._data 91 | li(class='item #{ current.source === slug ? "current" : "" }' role="presentation") 92 | a(href="#{ site_url }#{ slug === 'index' ? '' : (slug + '.html') }") #{ page.title } 93 | 94 | div 95 | | 96 | main.main 97 | .card 98 | header.header 99 | h1.title #{ title } 100 | section.content 101 | div.copy 102 | != yield 103 | 104 | a.close-off-canvas(role="button", aria-label="Toggle Navigation", data-toggle-class="primary-nav-is-open", data-toggle-target="body") 105 | footer.footer 106 | p 107 | |Content licensed under Creative Commons Attribution 3.0 US | Edit this page | Report an issue | Open Services for Lifecycle Collaboration 108 | script. 109 | window.site_url = '#{site_url}'; 110 | script(src="#{ site_url }js/oslc.js") 111 | if (environment == "production") 112 | script(async='' src='https://www.googletagmanager.com/gtag/js?id=G-ER4THK2G7V') 113 | script. 114 | window.dataLayer = window.dataLayer || []; 115 | function gtag(){dataLayer.push(arguments);} 116 | gtag('js', new Date()); 117 | gtag('config', 'G-ER4THK2G7V', {'anonymize_ip' : true, 'client_storage': 'none'}); 118 | -------------------------------------------------------------------------------- /_harp/eclipse_lyo/_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "eclipse-lyo": { 3 | "title": "Eclipse Lyo - support for Java developers", 4 | "parent_uri": "../" 5 | }, 6 | "eclipse-setup-for-lyo-based-development": { 7 | "title": "Eclipse Setup for Lyo-based Development", 8 | "parent_uri": "../" 9 | }, 10 | "setup-an-oslc-provider-consumer-application": { 11 | "title": "Setup an OSLC Provider/Consumer Application", 12 | "parent_uri": "../" 13 | }, 14 | "lyo-designer": { 15 | "title": "Lyo Designer - Toolchain modelling support", 16 | "parent_uri": "../" 17 | }, 18 | "install-lyo-designer": { 19 | "title": "Lyo Designer - Install", 20 | "parent_uri": "../" 21 | }, 22 | "toolchain-modelling-workshop": { 23 | "title": "Toolchain Modelling Workshop", 24 | "parent_uri": "../" 25 | }, 26 | "domain-specification-modelling-workshop": { 27 | "title": "Domain Specification Modelling Workshop", 28 | "parent_uri": "../" 29 | }, 30 | "modelling-howto": { 31 | "title": "Modelling - Howto and Advanced Topics", 32 | "parent_uri": "../" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_harp/eclipse_lyo/eclipse-setup-for-lyo-based-development.md: -------------------------------------------------------------------------------- 1 | You first need to setup an Eclipse environment for general Lyo 2 | development: 3 | 4 | 1. Unless already installed, you need to first install the JDK 11 to use Lyo 5 | 5.0 or newer. Older versions of Lyo and Lyo-based applications may require 6 | JDK 8 to run. 7 | 1. You also need Maven version 3.6.3 or higher. 8 | 1. **Pro tip:** use [SDKMAN!](https://sdkman.io/) to install multiple versions of JDK and Maven and switch between them depending on the project. We recommend to `sdk install java 11.0.15-tem` provided by [Eclipse Temurin](https://adoptium.net/) as your default JDK. 9 | 1. Install [Eclipse IDE for Java EE 10 | Developers](https://www.eclipse.org/downloads/packages/release/2022-03/r/eclipse-ide-enterprise-java-and-web-developers) 11 | distribution. Alternatively, you need to install the plugins included in 12 | the JEE release, such as *Eclipse Java EE Developer Tools* and *Eclipse 13 | Java Web Developer Tools*. 14 | 1. Once Eclipse is installed, you need to make sure the `JAVA_HOME` 15 | environment variable is set to the installed JDK (instead of the default 16 | JRE). 17 | 1. Select *Window➞Preferences*. 18 | 1. Select *Java➞Installed JREs*. 19 | 1. Click *Add...* 20 | 1. In the new window that appears, 21 | 1. Choose *Standard VM* as JRE Type. 22 | 1. Click *Next*. 23 | 1. As *JRE home* choose the installation dir of your JDK. 24 | 1. Click *Finish*. 25 | 1. Back to the preferences screen: 26 | 1. Select the old JRE. 27 | 1. Click *Remove*. 28 | 1. Check the newly added JDK, and 29 | 1. Click *OK*. 30 | 31 | Eclipse M2E expects `JAVA_HOME` to be defined in the OS environment variables. This presents some challenges on macOS because Eclipse.app does not typically run from a user shell. To avoid having to start Eclipse.app from a Terminal, use `launchctl` set an environment variable to be set on all future processes launched by launchd in the caller's context. For example: 32 | 33 | `launchctl setenv JAVA_HOME /Users/{userId}/.sdkman/candidates/java/current` 34 | 35 | Substitute your user id for {userId}. If not using SDKMAN!, use the path to your Java 11 installation. After a reboot, `JAVA_HOME` will be set to your current [SDKMAN!](https://sdkman.io/) JDK. 36 | 37 | -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/CreateMavenAdaptorProject_CodeStructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/CreateMavenAdaptorProject_CodeStructure.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/CreateMavenAdaptorProject_Step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/CreateMavenAdaptorProject_Step1.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/CreateMavenAdaptorProject_Step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/CreateMavenAdaptorProject_Step2.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/CreateMavenAdaptorProject_Step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/CreateMavenAdaptorProject_Step3.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/Lyo-ToolchainModelValidation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/Lyo-ToolchainModelValidation.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoModels-ThreeInOne-P1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoModels-ThreeInOne-P1.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoModels-ThreeInOne-P2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoModels-ThreeInOne-P2.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoModels-ThreeInOne-P3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoModels-ThreeInOne-P3.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoModels-ThreeInOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoModels-ThreeInOne.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoToolchainModel-AdaptorInterfaceDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoToolchainModel-AdaptorInterfaceDiagram.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoToolchainModel-SpecificationDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoToolchainModel-SpecificationDiagram.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/LyoToolchainModel-ToolchainDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/LyoToolchainModel-ToolchainDiagram.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/images/OSLCToolAdaptorMetalModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/eclipse_lyo/images/OSLCToolAdaptorMetalModel.png -------------------------------------------------------------------------------- /_harp/eclipse_lyo/install-lyo-designer.md: -------------------------------------------------------------------------------- 1 | # Installing Lyo Designer 2 | 3 | 1. Make sure you have Java 8 installed on your platform. 4 | 1. Download the Lyo Designer application for your target operating system from [Lyo download site](https://download.eclipse.org/lyo/product/binaries/stable/) 5 | 1. Unzip your download to any desired application. 6 | 1. Run the lyodesigner executable. 7 | 1. Regularly try to update the application by selecting ***help\--\>Check for Updates*** 8 | 9 | ## Installing as plugins on an Eclipse installation 10 | You can also install Lyo Designer as a set of plugins into an existing Eclipse installation. 11 | This is recommended for advanced users that can deal with conflicts in plugin dependencies when installing multiple plugins. 12 | 13 | The Modelling environment and code generator are known to work on Eclipse 14 | versions up until Eclipse 2020-09 (v4.18). 15 | 16 | The easiest way to install Lyo Designer is via the update-site 17 | `http://download.eclipse.org/lyo/p2/stable/` (This URL is intended to 18 | be accessed via the Eclipse update functionality, and not via a web 19 | browser.) 20 | 21 | 1. First make sure your Eclipse environment is setup 22 | as expected for general Lyo-based development, as instructed in [Eclipse Setup for Lyo-based Development](./eclipse-setup-for-lyo-based-development) 23 | 1. Select ***Help \--\> Install New Software\...*** 24 | 1. Set ***Work With:*** to the update site 25 | 26 | 1. Select both features (1) ***Lyo Code Generator*** and (2) ***Lyo 27 | Toolchain Designer***. 28 | 1. Proceed with the installation steps. 29 | 1. Install the following plugins 30 | * Acceleo 31 | * Sirius Integration with Xtext 32 | * Sirius Properties Views - Runtime Support 33 | * Sirius Properties Views - Specifier Support 34 | * Sirius Specifier Environment 35 | 36 | **Problems installing?**: If you face problems installing the plugin 37 | (or when updating to a new version), try one of the following: 38 | 1. check the \"Contact all update sites during install to find 39 | required software\" option 40 | 2. check/uncheck "Group items by category" (particularly the case, 41 | if you get the message "there are no categorized items") 42 | 3. uninstall existing version and then re-install the plugin again. 43 | 44 | # Bleeding edge 45 | 46 | **USE AT YOUR RISK** 47 | 48 | You can configure the Lyo Designer application to get updates from yet-unreleased builds of Lyo Designer. 49 | 1. Select ***Window\--\>Preferences*** 50 | 1. Select ***Install/Update\--\>Available Software Sites*** 51 | 1. Either enable or create a new site with the location 52 | 1. Click ***Apply and Close***. 53 | 1. Update the appliation by selecting ***help\--\>Check for Updates*** 54 | 55 | ## Lyo Designer Plugins 56 | 57 | For Lyo Designer installed as plugins, you can specify the update site . 58 | -------------------------------------------------------------------------------- /_harp/eclipse_lyo/lyo-as-osgi-bundles.md: -------------------------------------------------------------------------------- 1 | # Lyo As OSGI Bundles 2 | 3 | This is an experimental setup. 4 | 5 | ## Installing Lyo components as plugins on an Eclipse installation 6 | 7 | This setup is known to work on Eclipse 8 | version [Eclipse 2020-12](https://www.eclipse.org/downloads/packages/release/2020-12/r/eclipse-ide-enterprise-java-developers). 9 | 10 | 1. Make sure your Eclipse environment is setup 11 | as expected for general Lyo-based development, as instructed in [Eclipse Setup for Lyo-based Development](./eclipse-setup-for-lyo-based-development) 12 | 13 | 1. Install Jersey plugins from Orbit 14 | 1. Select ***Help \--\> Install New Software\...*** 15 | 1. Set ***Work With:*** to the update site 16 | 17 | 1. Select to install the following features 18 | * jersey-core-common 19 | * jersey-core-client 20 | * jersey.inject-hk2 21 | 1. Install the Lyo plugins 22 | 1. Select ***Help \--\> Install New Software\...*** 23 | 1. Set ***Work With:*** to the update site 24 | 25 | 1. Select to plugins you need 26 | * Lyo Core 27 | * Lyo Client 28 | * Lyo Store 29 | 30 | # Bleeding edge 31 | 32 | **USE AT YOUR RISK** 33 | 34 | You can choose to use the following update sites to get updates from yet-unreleased builds of Lyo plugins: 35 | 36 | * 37 | * 38 | -------------------------------------------------------------------------------- /_harp/eclipse_lyo/lyo-core-internals.md: -------------------------------------------------------------------------------- 1 | # Lyo Core internals 2 | 3 | ## Annotation processing 4 | 5 | Lyo allows (un)marshalling Java POJOs (but you will almost always want to extend an `AbstractResource`) from/to Jena models by processing objects and applying rules driven by class annotations ([Javadoc](https://download.eclipse.org/lyo/docs/core/latest/org/eclipse/lyo/oslc4j/core/annotation/package-summary.html)). 6 | 7 | > Lyo Designer normally generates the code with the appropriate annotations. Right now, only the code for OSLC Shapes is generated, even though the Designer allows specifying models for both RDF classes (vocabularies) and OSLC Shapes (domain specifications). 8 | 9 | The following annotations can be applied on the class level: 10 | 11 | - `OslcName` (mandatory): defines the name of the RDF class. 12 | - `OslcNamespace` (mandatory): defines the RDF namespace of the class. 13 | - `OslcResourceShape` (mandatory) 14 | - `OslcService` 15 | - `OslcNotQueryResult` 16 | 17 | The following annotations can be applied on a getter method: 18 | 19 | - `OslcName` (mandatory): defines a property name. 20 | - `OslcPropertyDefinition` (mandatory). URI of the property. 21 | - `OslcOccurs` (mandatory) 22 | - `OslcRange` (mandatory) 23 | - `OslcReadonly` 24 | - `OslcTitle` 25 | - `OslcRepresentation` 26 | - `OslcValueType` 27 | - `OslcValueShape` 28 | - `OslcAllowedValue` (NB! takes an array) 29 | - `OslcAllowedValues` (NB! takes a single argument) 30 | - `OslcDefaultValue` 31 | - `OslcDescription` 32 | - `OslcHidden` 33 | - `OslcMaxSize` 34 | - `OslcMemberProperty` 35 | 36 | The following methods are allowed on the JAX-RS methods that accept or return instances of Lyo model classes: 37 | 38 | - `OslcCreationFactory` 39 | - `OslcDialog` 40 | 41 | Additionally, `OslcSchema` may be applied on the package level (i.e. in the `package-info.java`) -------------------------------------------------------------------------------- /_harp/eclipse_lyo/lyo-designer.md: -------------------------------------------------------------------------------- 1 | Lyo Designer is an Eclipse plugin that allows one to graphically model (1) the overall system architecture, (2) the information model of the RDF resources being shared, and (3) the individual services and operations of each Server in the system. 2 | 3 | A short [video demonstration of Lyo Designer](https://www.youtube.com/watch?v=tZxPzlSTdeM). 4 | 5 | The figure below shows the information modelling interface: 6 | 7 | ![An example domain specification diagram](./images/LyoToolchainModel-SpecificationDiagram.png) 8 | 9 | Lyo Designer includes a integrated code generator that synthesizes the model into almost-complete OSLC-compliant JAX-RS webapps that are ready to run in one of many containers (Jetty, Tomcat, TomEE, WildFly, Payara). 10 | 11 | The resulting code includes: 12 | 13 | * Java classes with appropriate Lyo annotations to reflect the modelled RDF resource shapes 14 | * This automates the marshaling/unmarshaling of Java instances as Linked Data RDF resources. 15 | * JAX-RS Service operations for accessing, updating, creating and deleting RDF resources. 16 | * These operations handle any of the supported formats (turtle, RDF/XML, Json, etc.) 17 | * For debugging purposes, JSP pages are also produced to deliver HTML representations of all RDF resources. 18 | * JAX-RS Service operations to completely handle [Delegated UI](http://docs.oasis-open.org/oslc-core/oslc-core/v3.0/cs01/part4-delegated-dialogs/oslc-core-v3.0-cs01-part4-delegated-dialogs.html) for both creation and selection dialogs. 19 | * Including the initial generation of basic JSP pages for the html-representation of the dialogs. 20 | * JAX-RS Service operations to handle [Resource Preview](http://docs.oasis-open.org/oslc-core/oslc-core/v3.0/cs01/part3-resource-preview/oslc-core-v3.0-cs01-part3-resource-preview.html) 21 | * Including the initial generation of basic JSP pages for the html-representation of the resource previews. 22 | 23 | Lyo Designer supports incremental development, where manual changes to the generated code are preserved upon changes to the model, and subsequent code regeneration. 24 | 25 | 26 | ### Tutorials and Documentation 27 | 28 | * How to [install Lyo Designer](./install-lyo-designer) 29 | * How to use Lyo Designer to [model a toolchain](./toolchain-modelling-workshop) and generate an initial code base 30 | * How to use Lyo Designer to [model domain specifications](./domain-specification-modelling-workshop), and generate Lyo-annotated Java classes to reflect the defined OSLC Resources. 31 | * If you want to contribute to Lyo Designer, you can [work from its source code](https://github.com/eclipse/lyo.designer/wiki/Working-from-Source-Code) 32 | -------------------------------------------------------------------------------- /_harp/eclipse_lyo/modelling-howto.md: -------------------------------------------------------------------------------- 1 | Configuring the URLs of JAX-RS web services 2 | ================== 3 | 4 | For each **ServiceProviderCatalog**, **ServiceProvider** and **Service** in the model, there will be a corresponding JAX-RS web service, that responds to web requests on a specific relative URL. If you want to control the relative URLs of these web services, specify the following optional properties: 5 | 6 | For the **ServiceProvider** web Service: 7 | 8 | 1. *serviceNamespace* - specifies the relative URL for the 9 | ServiceProvider JAX-RS Service. For example, *projects* 10 | will lead to the url 11 | *http://localhost:8080/YourAdaptor/services/projects*. The 12 | default is *serviceProviders* (leading to the default 13 | **). 14 | 1. *instanceID* - specifies the relative URL of a single 15 | service provider, including the parameter variables 16 | necessary to identify a specific service provider. For 17 | example, *{projectId}* leads to the url 18 | *http://localhost:8080/YourAdaptor/services/projects/1* 19 | mapping the value 1 to the *projectId* parameter in the 20 | java code. Other IDs can be 21 | *collectionName/{collectionName}/project/{projectName}*. The 22 | default is *{serviceProviderId}*. 23 | 24 | For the **Service** web Service: 25 | 1. *serviceNamespace* - specifies whether the relative URL of the 26 | web service should build upon the URL of its managing 27 | service provider (*relativeToServiceProvider*), or it should be 28 | standalone (*independantOfServiceProvider*). 29 | 30 | Handling Large Models 31 | ================== 32 | To manage large models, Lyo Designer supports two model structuring techniques, which will be detailed in the following subsections: 33 | 34 | 1. Creating multiple diagrams within the same model file 35 | 1. Composing a model into multiple model files 36 | 37 | Common Domains 38 | --------------- 39 | But first a sample model that can be used to illustrate the suggested techniques. 40 | 41 | A model of the OSLC and other common domains is already available for reuse. To reuse these common specifications: 42 | 43 | 1. Clone the [Github lyo.domains](https://github.com/eclipse/lyo.domains) git repository 44 | 1. Import the project *org.eclipse.lyo.tools.domainmodels*. 45 | * This project models many of the OSLC domains across a number of diagrams. 46 | 1. Navigate the model as any other Domain Specification model. 47 | 48 | In the next subsections, you will learn how to import this model into other models for reuse. 49 | 50 | Creating multiple diagrams within the same model file 51 | --------------- 52 | Within a single model, you can create any number of diagrams, each of which can contain any number of (overlapping) Domain Specifications. 53 | 54 | 1. Open the Model Explorer view. 55 | 1. Expand the *domainModel.xml* file until the 56 | *Specification* entry is visible. (Do not double-click on the file. Instead, press the triangle/arrow to the left of the file entry.) 57 | 1. right-click the *Specification* entry, and select **New Representation > New SpecificationDiagram**. 58 | 59 | You can define your Domain Specifications in any of these diagrams. Note the following: 60 | 61 | * A Diagram can contain any number of Domain Specifications. 62 | * A Domain Specification can be viewed in any number of Specification diagrams. 63 | * Once defined in a diagram, you can drag-drop a Domain Specification from the Model Explorer view into any other diagram to represent that domain in additional diagrams. 64 | * a change to a model entity (a Domain Specification, Resource, Resource Property) are reflected in all diagrams. 65 | 66 | Composing a model into multiple model files 67 | --------------- 68 | You can import and use a previously defined model, through the addition of *Project Dependencies*: 69 | 70 | 1. In the *Model Explorer* view, right-click on the *Project Dependencies* entry within the modelling project, and select **Add Model**. 71 | 1. select **Browse Workspace** 72 | 1. Navigate and select the desired model. 73 | 1. Press **OK**. 74 | 1. In your own SpecificationDiagram, you can now create relationships to the imported Domain Specifications (or their contained Resources and Resource Properties). 75 | 1. Expand the imported Specification model (under the the *Project Dependencies* entry) until the Domain Specification entries are visible. 76 | 1. You can drag-drop any Domain Specification into an existing SpecificationDiagram to visualize its content. 77 | 1. Also, when selecting the Resource Properties of a Resource, you will notice that all imported Resource properties are available as well. 78 | 79 | Controlling the generation parameters of Domain Specification(s) 80 | ========================= 81 | 82 | By default, the Java classes corresponding to the OSLC Resources of Domain Specification are generated under the same destination folder path as the containing overall model. Similarly, the java package name is the same as that of the containing model. 83 | 84 | It may sometimes be desired to generate OSLC-resource Java classes into a separate java library, which is then included in multiple OSLC projects. For example, you might want to generated the classes from each Domain Specification into a separate Java (maven) projects. 85 | 86 | Lyo Designer allows you to control the generation settings of each individual Domain Specification and/or all Domain Specifications. Such settings will override the *java Class Base Namespace* and *Java Files Base Path* settings of an adaptor. 87 | 88 | Lyo Designer allows you even to model Domain Specification(s) without necessarily generating them. This can be useful if: 89 | * you want to model existing implemented Domain Specifications so that they can be used in the model. That is, you can define OSLC services on such Java classes, but you don't necessarily want to generate these classes. 90 | * You have previously generated domain specificaitons, and have done manual modifications that you don't want to overrride. 91 | 92 | To configure the generation settings for a single Domain Specification: 93 | 94 | 1. Select **Generation Setting** from the tools pallet, and then select a **Domain Specification** in the diagram. 95 | 1. Set the generation properties as desired. 96 | * *Java Files Path* - The relative file path to be used to save the generated Java classes. 97 | * *Java class Package Name* - The package name of the generated Java classes. 98 | * *Do Not Generate* - whether the Java classes should be generated at all. 99 | 100 | To configure the generation settings for all Domain Specifications: 101 | 1. Select **Generation Setting** from the tools pallet, and then select an empty area in the Specification Diagram (that is, do not select any Domain Specification). 102 | 1. Set the generation properties as above. 103 | 104 | The following rules applies when generation settings are set at different levels in the model: 105 | * The generation settings of a specific Domain Specification (if defined) override those set for the overall Specification model. 106 | * The generation settings of the overall Specification model (if defined) override those set for a specific Tool Adaptor. 107 | 108 | **Important to note** that when related Java classes are distributed into different Java projects, it is necessary to set dependencies betweeen these Java projects, in order for the code to compile. For example Resource *oslc:Requirement* contains a reference property *dcterms:creator*, whose range is Resource *foaf:Person*. If the *OSLC* and *FOAF* Domain Specifications are generated into different maven projects, th e *OSLC* maven project should include a maven dependency to the *FOAF* maven project. 109 | -------------------------------------------------------------------------------- /_harp/img/OSLC4JS-schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/img/OSLC4JS-schematic.png -------------------------------------------------------------------------------- /_harp/img/logo-new-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/img/logo-new-big.png -------------------------------------------------------------------------------- /_harp/img/logo-new-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/img/logo-new-mobile.png -------------------------------------------------------------------------------- /_harp/img/logo-old-50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/img/logo-old-50px.png -------------------------------------------------------------------------------- /_harp/img/logo-old-big.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/img/logo-old-big.gif -------------------------------------------------------------------------------- /_harp/img/logo-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/img/logo-old.png -------------------------------------------------------------------------------- /_harp/index.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |

“OSL-whaaaat now?”

4 |
5 |
6 | Open Services for Lifecycle Collaboration (OSLC) is a community that writes specifications to integrate software. Learn more at Why develop OSLC applications and at our main site. 7 |
8 |
9 | 10 | For a high-level overview of how to add OSLC support to software, we recommend our video "[Getting started on implementing OSLC](http://www.youtube.com/watch?v=-oXqudLmNMI)": 11 | 12 | 13 | 14 | 15 | Explore our tutorial 16 | ---------------------------------------------- 17 | 18 | For a more detailed look at what goes into OSLC support, read through our tutorials "[Integrating Products with OSLC](tutorials)", which walks you through building an adapter that adds OSLC support to the popular Bugzilla defect-tracking software. 19 | 20 | The concepts in the tutorial are broadly applicable to other software. 21 | 22 | If you are **building an OSLC provider** (in other words, software that *outputs* OSLC resources), you'll learn how to 23 | 24 | - [Provide Service Providers and catalogs](integrating_products_with_oslc/implementing_an_oslc_provider/1_2_providing_service_resources) 25 | - [Represent Bugzilla bugs as OSLC Change Management resources](integrating_products_with_oslc/implementing_an_oslc_provider/1_3_intro_to_oslc4j) 26 | - [Provide UI Previews](integrating_products_with_oslc/implementing_an_oslc_provider/1_4_ui_preview) 27 | - [Provide a delegated UI for finding existing bugs](integrating_products_with_oslc/implementing_an_oslc_provider/1_5_ui_selection) 28 | - [Provide a delegated UI for creating new bugs](integrating_products_with_oslc/implementing_an_oslc_provider/1_6_ui_creation) 29 | - [Allow software to programmatically create new bugs](integrating_products_with_oslc/implementing_an_oslc_provider/1_7_factory) 30 | 31 | If you are **building an OSLC consumer application**, you'll learn how to: 32 | 33 | - [Link to OSLC resources in another application and display previews](integrating_products_with_oslc/integrating_with_an_oslc_provider/2_2_links_and_previews) 34 | - [Find, select, and create bugs without leaving the application with delegated UIs](integrating_products_with_oslc/integrating_with_an_oslc_provider/2_3_delegatedUI) 35 | - [Parse OSLC resources](integrating_products_with_oslc/integrating_with_an_oslc_provider/2_4_notify_customers) 36 | - [Create new bugs automatically](integrating_products_with_oslc/integrating_with_an_oslc_provider/2_5_automatic_bugs) 37 | 38 | The tutorial has working sample applications and [detailed instructions for running them](integrating_products_with_oslc/running_the_examples). 39 | 40 | -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": { 3 | "title": "Tutorial Overview", 4 | "parent_uri": "../tutorials.html" 5 | }, 6 | "overview_of_oslc": { 7 | "title": "A brief overview of OSLC", 8 | "parent_uri": "../tutorials.html" 9 | }, 10 | "running_the_examples": { 11 | "title": "Downloading and starting the sample applications", 12 | "parent_uri": "../tutorials.html" 13 | }, 14 | "implementing_an_oslc_provider/1_0_implementing_a_provider": { 15 | "title": "Part 1, turning Bugzilla into a provider of the Change Management OSLC specification" 16 | }, 17 | "implementing_an_oslc_provider/1_1_planning_partial_cm_provider": { 18 | "title": "Part 1.1, Planning Partial CM Provider" 19 | }, 20 | "implementing_an_oslc_provider/1_2_providing_service_resources": { 21 | "title": "Part 1.2, Providing Service Resources" 22 | }, 23 | "implementing_an_oslc_provider/1_3_intro_to_oslc4j": { 24 | "title": "Part 1.3, Intro to Eclipse Lyo" 25 | }, 26 | "implementing_an_oslc_provider/1_4_ui_preview": { 27 | "title": "Part 1.4, UI Preview" 28 | }, 29 | "implementing_an_oslc_provider/1_5_ui_selection": { 30 | "title": "Part 1.5, UI Selection" 31 | }, 32 | "implementing_an_oslc_provider/1_6_ui_creation": { 33 | "title": "Part 1.6, UI Creation" 34 | }, 35 | "implementing_an_oslc_provider/1_7_factory": { 36 | "title": "Part 1.7, Factory" 37 | }, 38 | "integrating_with_an_oslc_provider/2_0_implementing_consumer": { 39 | "title": "Part 2, Implementing Consumer" 40 | }, 41 | "integrating_with_an_oslc_provider/2_1_consumer_use_cases": { 42 | "title": "Part 2.1, Consumer Use Cases" 43 | }, 44 | "integrating_with_an_oslc_provider/2_2_links_and_previews": { 45 | "title": "Part 2.2, Links and Previews" 46 | }, 47 | "integrating_with_an_oslc_provider/2_3_delegatedUI": { 48 | "title": "Part 2.3, DelegatedUI" 49 | }, 50 | "integrating_with_an_oslc_provider/2_4_notify_customers": { 51 | "title": "Part 2.4, Notify Customers" 52 | }, 53 | "integrating_with_an_oslc_provider/2_5_automatic_bugs": { 54 | "title": "Part 2.5, Automatic Bugs" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/_harp.json: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "org_name": "Open Services for Lifecycle Collaboration", 4 | "org_abbr": "OSLC", 5 | "site_name": "Developer Guide" 6 | } 7 | } -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/implementing_an_oslc_provider/1_0_implementing_a_provider.md: -------------------------------------------------------------------------------- 1 | # Implementing an OSLC provider 2 | 3 | In this section, we'll be creating an adapter to add [OSLC Change Management](https://docs.oasis-open-projects.org/oslc-op/cm/v3.0/os/change-mgt-spec.html) support 4 | to [Bugzilla](https://www.bugzilla.org/), an open source Defect Tracking system. 5 | Although the Bugzilla adapter is available now as part of Eclipse Lyo, its 6 | features and architecture are broadly applicable to any OSLC adaptor that adds OSLC Server 7 | support to an existing product. 8 | 9 | This video explores some of the challenges and considerations in getting 10 | started with adding OSLC support to existing applications: 11 | 12 | 13 | 14 | Next: [Part 1.1, Planning Partial CM Provider](1_1_planning_partial_cm_provider) -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/implementing_an_oslc_provider/1_1_planning_partial_cm_provider.md: -------------------------------------------------------------------------------- 1 | # Planning out a partial implementation of OSLC-CM 2 | 3 | Our integration use cases that we want to add to Bugzilla require only a partial implementation of the [OSLC Change Management](https://docs.oasis-open-projects.org/oslc-op/cm/v3.0/os/change-mgt-spec.html) specification: 4 | 5 | + __Service Provider and Catalogs__: These resources describe the services offered and make it possible for consumers of the OSLC CM service to find the ones they need. In Part 2, you will use these to help implement [Automated Bug Creation](../integrating_with_an_oslc_provider/2_5_automatic_bugs) so that the Testing team's build scripts can use Service Provider documents to locate a URL. 6 | + **OSLC representations for bugs**: This means making each Bug available at a stable URI as an OSLC-CM Change Request resource, with RDF/XML and UI Preview representations via content negotiation. In Part 2, these RDF/XML representations will help [automate customer notifications](../integrating_with_an_oslc_provider/2_4_notify_customers). 7 | + **Delegated UI for Creation & Selection**: Enables users of other systems to create and select bugs in Bugzilla without leaving the web UI of those other systems. You'll use these dialogs in Part 2's to [make it easy to link a customer incident to a Bugzilla bug](../integrating_with_an_oslc_provider/2_3_delegatedUI). 8 | + **Creation Factories for bugs**: Enables creation of new bugs by HTTP posting RDF/XML bug representations to the server. We also used this feature in Part 2 [for Automated Bug Creation](../integrating_with_an_oslc_provider/2_5_automatic_bugs). 9 | 10 | Although this leaves out some seemingly critical parts of OSLC (including UPDATE and DELETE via HTTP and OSLC Query), that's OK. 11 | 12 | First, though, we need to decide how we'll add OSLC support to the existing applications. 13 | 14 | ## Different approaches to implementing OSLC support 15 | 16 | There are (broadly) three different approaches to implementing an OSLC-CM provider for Bugzilla (or any other software): 17 | 18 | + The __Native Support__ approach is to add OSLC-CM support directly into Bugzilla, modifying whatever code is necessary to implement the OSLC-CM specification. 19 | + The __Plugin__ approach is add OSLC-CM support to Bugzilla by developing code that plugs-in to Bugzilla and uses its add-on API. 20 | + The __Adapter__ approach is to create new web application that acts as an OSLC Adapter, runs along-side of Bugzilla, provides OSLC-CM support and "under the hood" makes calls to the Bugzilla web APIs to create, retrieve, update and delete resources. 21 | 22 | Although any of these approaches are valid approaches for an OSLC implementation, here are some of the pros and cons of each: 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 41 | 48 | 49 | 50 | 51 | 56 | 62 | 63 | 64 | 66 | 72 | 78 | 79 | 80 |
ApproachProsCons
Native approach 36 |
    37 |
  • Complete control over the quality implementation
  • 38 |
  • Good approach for tool vendors shipping products with OSLC support
  • 39 |
40 |
42 |
    43 |
  • You need control over the application code
  • 44 |
  • You need to learn product's language and platform
  • 45 |
  • Not a good approach for customers who want to add OSLC support to a vendor's products
  • 46 |
47 |
Plugin approach 52 |
    53 |
  • Uses established and supported mechanism to extend product and add OSLC support
  • 54 |
55 |
57 |
    58 |
  • Limitations on plugins may limit quality of OSLC implementation
  • 59 |
  • You need to learn product's language, platform, and plugin architecture
  • 60 |
61 |
65 | Adapter approach 67 |
    68 |
  • Can be implemented without modifying the product
  • 69 |
  • Can use your preferred platform and language
  • 70 |
71 |
73 |
    74 |
  • Limitations of product's API may limit quality of OSLC implementation
  • 75 |
  • May introduce redundant URL for product resources. For example, adapter-provided URLs must be used instead of native Bugzilla bug URLs
  • 76 |
77 |
81 | 82 | In short, the Native approach is the right approach for tool vendor who wants to add OSLC support to the products that they understand well. The Plugin and Adapter approaches are best for when you want to add OSLC support to a tool that you've bought from a tool vendor or obtained from an open source project. If the tool has a good Plugin API and you like the language/platform that it requires, then try the Plugin approach. If not, then an Adapter approach is probably best. 83 | 84 | In our case, building an adapter makes the most sense. 85 | 86 | ## Architecture for the adapter 87 | 88 | [Download the OSLC4J Bugzilla adapter](../running_the_examples). We'll be exploring the adapter instead of writing one from scratch. 89 | 90 | The OSLC4J Bugzilla adapter is a RESTful web application built on Java EE with [JAX-RS](http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html). It has the following additional dependencies: 91 | 92 | + [OSLC4J SDK part of Eclipse Lyo](../../eclipse_lyo/eclipse-lyo), OSLC4J is a Java toolkit that simplifies building OSLC applications 93 | + [J2Bugzilla](http://code.google.com/p/j2bugzilla/): Java wrapper classes for Bugzilla's XML-RPC based web services interface 94 | 95 | In addition, it uses the following helper classes (in the `utils` directory): 96 | 97 | + **BugzillaHttpClient**: helper classes for doing HTTP GET requests against a Bugzilla server 98 | + **HttpUtils**: helper classes for working with HTTP requests and responses 99 | + **StringUtils**: helper classes for dealing with strings 100 | + **XmlUtils**: helper classes for XML processing 101 | 102 | Finally, the JAX-RS resource definitions are in `org.eclipse.lyo.oslc4j.bugzilla.services`. 103 | 104 |

In older versions of this tutorial and Bugzilla adapter, we defined many individual servlets in the application's web.xml file; now, the OSLC4J Bugzilla adapter uses JAX-RS to handle URLs, requests, and resources.

105 | 106 | 107 | Next: [Part 1.2, Providing Service Resources](1_2_providing_service_resources) -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/index.md: -------------------------------------------------------------------------------- 1 | # Integrating products with OSLC - Tutorial Overview 2 | 3 | 4 | ## Table of Contents 5 | 6 | - [Introduction](#introduction) 7 | - [Audience](#audience) 8 | - [Sample applications](#sample-applications) 9 | 10 | ## Introduction 11 | 12 | *Older version of the tutorial for Lyo 2.1 can be [downloaded as pdf](integrating_with_oslc_tutorial.pdf).* 13 | 14 | 15 | This tutorial explains how to implement OSLC consumers and providers by examining realistic use cases and showing how to implement OSLC specifications with lots of examples and working code. 16 | 17 | > **WARNING!** This tutorial targets Lyo 2.2 and has not been updated to run on Lyo 5.0, the currently supported version. Please post [on the forum](https://forum.open-services.net/c/sdks/lyo/9) if you encounter any problems in the tutorial! 18 | 19 | This tutorial walks you through a fully developed adapter, with no need to code. If you want to have a more hands-on approach, you can refer to the complementary [hands-on tutorial](https://github.com/eclipse/lyo.docs/blob/master/lyo-rest-workshop/Lab1/Lyo_OSLC_Workshop.pdf) takes you through the incremental programming steps. 20 | 21 | It is organized into the following parts: 22 | 23 | 1. This introduction 24 | 2. [__A brief overview of OSLC__](overview_of_oslc) 25 | 3. [**Downloading and starting the sample applications**](running_the_examples) 26 | 3. [**Part 1**, turning Bugzilla into a provider of the Change Management OSLC specification](implementing_an_oslc_provider/1_0_implementing_a_provider). We'll walk through the architecture of the integration, create OSLC catalogs and representations, provide delegated UIs, and allow you to create Bugzilla bugs programmatically. 27 | 4. [**Part 2**, turning a home-grown application into a consumer of the Change Management OSLC specification](integrating_with_an_oslc_provider/2_0_implementing_consumer) that works with the Bugzilla adapter from Part 1. We'll implement links to Bugzilla bugs, UI previews, delegated UIs, and automated bug creation. 28 | 29 | 30 | ## Audience 31 | 32 | This tutorial is for people who will be writing code to implement OSLC consumers and providers; we assume the following about you: 33 | 34 | + You understand the basics of software development, web architecture, HTTP, [linked data](http://youtu.be/40mjwqGEKBU), and [RDF](http://www.youtube.com/watch?v=Nk9TOx1sBUk&feature=share&list=PLpqpu1CS6Rj4dRKWX1UICKseBq_20nk6k) 35 | + You want to learn more about OSLC 36 | + You can follow examples in XML, JSON, HTML, and JavaScript 37 | + You can understand server-side programming languages, particularly in Java and JSP (see below) 38 | + You want to learn more about how [Eclipse Lyo](../eclipse_lyo/eclipse-lyo) can help you more quickly develop OSLC-driven integrations 39 | 40 | 41 | > **On the choice of server-side programming language** 42 | > Although our sample applications use Java and JSP, many of the methods of 43 | > implementing OSLC are the same regardless of your choice of server-side 44 | > programming-language. Later versions of this document might expand to other 45 | > languages and platforms. OSLC is a community effort and we'd love your help 46 | > in adding examples in different programming languages to this tutorial (or 47 | > other material) to help those on other platforms such as Perl, PHP, Python, 48 | > Ruby, or .Net. 49 | 50 | ## Sample applications 51 | 52 | You can follow along with the OSLC Tutorial by using the following software: 53 | 54 | - Bugzilla: a common open-source defect tracking application. In this tutorial, 55 | you will configure a running Bugzilla system using Docker if you do not want 56 | to set up your own Bugzilla application. 57 | - OSLC4J Bugzilla adapter: a full-featured adapter that presents Bugzilla bugs 58 | as OSLC Change Management v2 resources. In our examples, we assume the 59 | Bugzilla adapter is running at 60 | [http://localhost:8080/OSLC4JBugzilla](http://localhost:8080/OSLC4JBugzilla) 61 | - NinaCRM: A simple, fictional Customer Relationship Management (CRM) system 62 | that hosts OSLC UI Preview and OSLC Delegated UI examples, implemented as a 63 | Java EE web application. In our examples, we assume that NinaCRM is running 64 | at [http://localhost:8181/ninacrm](http://localhost:8181/ninacrm) 65 | - Poster browser plugin (for 66 | [Firefox](https://addons.mozilla.org/en-US/firefox/addon/poster/) or 67 | [Chrome](https://chrome.google.com/webstore/detail/chrome-poster/cdjfedloinmbppobahmonnjigpmlajcd)): 68 | we will browse and manipulate OSLC resources with this plugin that makes it 69 | easy to issue HTTP requests and set custom headers. An alternative for 70 | Firefox is 71 | [RESTClient](https://addons.mozilla.org/en-us/firefox/addon/restclient/). 72 | 73 | For more information, see our section about [downloading, building, and starting the NinaCRM and OSLC4J Bugzilla applications](running_the_examples). 74 | 75 | Get Started: [A brief overview of OSLC](overview_of_oslc) 76 | 77 | -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/integrating_with_an_oslc_provider/2_0_implementing_consumer.md: -------------------------------------------------------------------------------- 1 | # Integrating with an OSLC provider 2 | 3 | In this section, we'll integrate a sample homegrown Customer Relationship Management (CRM) with Bugzilla. Because Bugzilla (via our adapter that we built in the last section) is now an OSLC Change Management Provider, we can integrate NinaCRM with Bugzilla by making NinaCRM an OSLC-CM _Consumer_. 4 | 5 |
6 |
7 |

Why is the sample application called "NinaCRM"?

8 |
9 | 10 |
11 | In older versions of this tutorial, we had a fictional protagonist named Nina who "designed" these applications. I've removed her story from this tutorial, but her legacy lives on in our sample application. 12 |
13 |
14 | 15 | First up, we'll discuss the specific use cases that we want to support. 16 | 17 | [Next: Part 2.1, Consumer Use Cases](2_1_consumer_use_cases) -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/integrating_with_an_oslc_provider/2_1_consumer_use_cases.md: -------------------------------------------------------------------------------- 1 | # Sample use cases for an OSLC-CM Consumer 2 | 3 | Our NinaCRM sample application presents a number of use cases that could benefit from OSLC. 4 | 5 | NinaCRM is a [Customer Relationship Management](http://en.wikipedia.org/wiki/Customer_relationship_management) system that allows employees to store and track interactions with customers. First, let's explore how a typical interaction between a customer and a support representative: 6 | 7 | 1. Customer calls with a problem 8 | 2. Support rep brings up the record for the Customer, or creates one if necessary 9 | 3. Support rep finds the last incident involving the customer, or creates a new one if necessary. 10 | 4. Support rep searches for the customer's problem in the company's defect system (Bugzilla). If found, add the defect ID number to the Incident record. 11 | 5. If Defect includes work-around or fix, give it to the Customer 12 | 6. If the customer is satisfied with the solution, close the Incident 13 | 14 | A better integration between Bugzilla and the NinaCRM system will make the process work more smoothly and efficiently. Here are the top items we want to target with our integration work: 15 | 16 | 3. **Linking Incidents to bugs is too difficult**: It takes support reps too much time to leave the CRM web UI and search for solutions to customer problems manually using Bugzilla. First, we should use OSLC UI previews to allow reps to see more details about linked bugs without leaving the NinaCRM application. Then we should automate the process of entering bugs by modifying NinaCRM system to use OSLC Delegated UI and let support reps search, create, and link to bugss without leaving the CRM web UI. 17 | 2. **Customer notifications are a manual process**: Customers can request notification whenever a specific bug is updated. Customer reps have to set aside time each week to review customer requests and check on bug status. We can surely automate this entire process, including writing and sending an email notification to each customer. 18 | 19 | 20 | ## A Plan of Action 21 | 22 | Here's our plan of action to add OSLC-CM support to NinaCRM. 23 | 24 | ### Milestone 1: Use links and OSLC UI Preview 25 | 26 | + Modify NinaCRM to enable OSLC UI Preview for links to Bugzilla bugs 27 | 28 | ### Milestone 2: Use OSLC Delegated UI for creating and selecting Bugzilla bugs to link to 29 | 30 | + Add to CRM's Incident page ability to link via Delegated UI 31 | 32 | ### Milestone 3: Use OSLC protocol to automate customer notifications 33 | 34 | + Create a program that can run as a scheduled job, e.g. via build system 35 | + This program will query NinaCRM for list of notification requests and check the associated bugs 36 | + If the bug has updated since last run, send an email to customer with summary 37 | 38 | First up, we'll implement OSLC links and previews in NinaCRM. 39 | 40 | [Next: Part 2.2, Links and Previews](2_2_links_and_previews) -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/integrating_with_oslc_tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/integrating_products_with_oslc/integrating_with_oslc_tutorial.pdf -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/overview_of_oslc.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | Open Services for Lifecycle Collaboration (OSLC) is an initiative to define standards that enable easier and more effective integrations between the many tools that software and product developers use. OSLC is a different approach to tool integration that seeks to integrate the resources managed by those tools into the web of data. OSLC uses variety of web integration patterns, which are all either based on or complementary to what the World Wide Web Consortium (W3C) calls [Linked Data](http://www.w3.org/standards/semanticweb/data). 6 | 7 | To learn more about core OSLC concepts and architectural underpinnings, read the [OSLC Primer](https://open-services.net/resources/oslc-primer). We'll be implementing many of these core resources and services in this tutorial. 8 | 9 | For more information on the value of integrating with open protocols, read our whitepaper ["The Case for Open Services"](https://archive.open-services.net/resources/whitepapers/the-case-for-open-services/). 10 | 11 | Next: [Downloading and starting the sample applications](running_the_examples) 12 | 13 | -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/running_the_examples.md: -------------------------------------------------------------------------------- 1 | ## Running the example applications 2 | 3 | This section explains how to setup the development environment to run the OSLC4J Bugzilla Adapter and the NinaCRM example application. 4 | 5 | ## Environment Setup 6 | 7 | Make sure your environment is set up for Lyo development as instructed on [Eclipse Setup for Lyo-based Development](../eclipse_lyo/eclipse-setup-for-lyo-based-development). The tutorial requires JDK 8 to be used. The code may run on JDK 11 with the warnings, and certain parts may fail to run on JDK 17 as of 2022-05. 8 | 9 | ## Bugzilla Setup 10 | 11 | Unless you have a Bugzilla system (with admin access) you can integrate against, you need to setup a running [Bugzilla system using Docker](https://hub.docker.com/r/smarx008/bugzilla-dev-lyo) for the purposes of this tutorial. 12 | 13 | 1. [Set up your Docker environment](https://docs.docker.com/get-started/). This is beyond the scope of this tutorial. You should be able to use [Rancher Desktop](https://rancherdesktop.io/) as well. 14 | 15 | 1. Launch the Bugzilla container that will be destroyed once you stop it: 16 | ```bash 17 | docker run --rm -p 80:80 --name bugzilla-dev smarx008/bugzilla-dev-lyo 18 | ``` 19 | 20 | 1. You can now browse to the Bugzilla homepage at http://localhost/bugzilla and use `admin:password` as admin credentials. 21 | 22 | ## Importing the tutorial projects into Eclipse 23 | 24 | The [Lyo documentation](https://github.com/eclipse/lyo.docs) Git repository contains the necessary code for this tutorial, while https://github.com/OSLC/lyo-adaptor-ninacrm contains the sample application, NinaCRM, which is used to demonstrate how a 3rd-party tool would integrate with a newly developed OSLC Server. **The finished OSLC Server can be found under [OSLC/lyo-adaptor-bugzilla](https://github.com/OSLC/lyo-adaptor-bugzilla)** 25 | 26 | 1. Clone the [Lyo documentation](https://github.com/eclipse/lyo.docs) Git repository 27 | 1. In Eclipse, open the Git Repositories view. (**Window** → **Show View** → **Other**, search for `Git repo` and click **OK**.) 28 | 2. Click **Clone a Git Repository**. 29 | 3. In the Clone Git Repository window, in the **URI** field paste the following [https://github.com/eclipse/lyo.docs](https://github.com/eclipse/lyo.docs). The **Host** and **Repository** fields will autofill. Leave the **Username** and **Password** fields empty. 30 | 4. Click **Next**. 31 | 5. On the Branch Selection page, select **master** and click **Next**. 32 | 6. For the **Destination**, select a folder for the files or accept the default of your Eclipse workspace. 33 | 7. Click **Finish**. `lyo.docs` will appear in the Git Repositories view. 34 | 35 | 2. Next, import the tutorial projects into Eclipse 36 | 1. In Eclipse, switch to the Java perspective. (**Window** → **Perspective** → **Open Perspective** → **Java**) 37 | 1. Open the Project Explorer view. (**Window** → **Show View** → **Project Explorer**) 38 | 1. Select **File** → **Import...** 39 | 1. In the Import dialog that appears select **Maven** → **Existing Maven Projects**, and click **Next**. 40 | 1. Browse to the root directory of the recently cloned git repository. 41 | 1. Select the project **./lyo.docs/lyo-rest-workshop/Lab6** from the `lyo.docs` repo and click **Finish**. 42 | 1. Repeat the steps above for the **./lyo-adaptor-ninacrm** project from the `lyo-adaptor-ninacrm` repo. 43 | 44 | ## Configuring the Bugzilla adapter 45 | 46 | Configure the Bugzilla adapter to point to your Bugzilla application. 47 | 48 | 1. In the Project Explorer view, find and edit the file `src/main/resources/bugz.properties` in the Lab6 project. 49 | 1. Edit the `bugzilla_uri` property to the URL of your Bugzilla server. If you’re using the Bugzilla docker container, it will be: 50 | `bugzilla_uri=http://localhost/bugzilla` 51 | 1. For the `admin` property, provide your Bugzilla user ID. 52 | 1. Save `bugz.properties`. 53 | 54 | ## Update the applications 55 | 56 | Update the project configurations for the projects. 57 | 58 | 1. In Eclipse, open the Package Explorer view. (**Window** → **Show View** → **Package Explorer**) 59 | 2. In the Package Explorer view, select the following packages: 60 | 61 | * **ninacrm** 62 | * **oslc4j-bugzilla-sample-lab6** 63 | 64 | 3. Right-click and select **Maven** → **Update Project**. 65 | 4. In the Update Maven Project window, verify that those projects are selected and click **OK**. 66 | 67 | ## Running the sample applications 68 | 69 | ### Starting the OSLC4J Bugzilla adapter: 70 | 71 | 1. In the Package Explorer view, expand **Lab6**. 72 | 2. Find the file **pom.xml** 73 | 3. Right-click on **pom.xml** and select **Run as** → **Maven Build...**. 74 | 4. Enter **jetty:run** in the **Goals** field. 75 | 5. Select **Run** 76 | 77 | This will start the application. You will see a lot of messages in the Console view. The application will be running when you see this: 78 | 79 | [INFO] Started Jetty Server 80 | [INFO] Starting scanner at interval of 5 seconds. 81 | 82 | In your web browser navigate to the OSLC Catalog at [http://localhost:8080/OSLC4JBugzilla/services/catalog/singleton](http://localhost:8080/OSLC4JBugzilla/services/catalog/singleton) 83 | 84 | Log in with your Bugzilla user ID and password. 85 | 86 | ### Starting NinaCRM 87 | 88 | 1. In the Package Explorer view, expand **ninacrm**. 89 | 2. Find the file **pom.xml** 90 | 3. Right-click on **pom.xml** and select **Run as** → **Maven Build...**. 91 | 4. Enter **jetty:run** in the **Goals** field. 92 | 5. Select **Run** 93 | 94 | This will start the application. You will see a lot of messages in the Console view. The application will be running when you see this: 95 | 96 | [INFO] Started Jetty Server 97 | [INFO] Starting scanner at interval of 5 seconds. 98 | 99 | 100 | When the server starts, in your web browser navigate to [http://localhost:8181/ninacrm](http://localhost:8181/ninacrm) to see the NinaCRM example. 101 | 102 | Next: [Part 1, turning Bugzilla into a provider of the Change Management OSLC specification](implementing_an_oslc_provider/1_0_implementing_a_provider) 103 | -------------------------------------------------------------------------------- /_harp/iotp-adaptor-sample.md: -------------------------------------------------------------------------------- 1 | iotp-adaptor is a partial implementation of an OSLC adapter for IBM Watson IoT Platform resources developed using eclipse/Lyo Designer. This adaptor provides an example of how to build an OSLC adaptor using [Lyo Designer](https://github.com/eclipse/lyo.designer/wiki), and how to customize the generated adaptor to expose Watson IoT Platform resources through OSLC capabilities and enable integration with IBM's jazz.net based [Continuous Engineering](https://jazz.net/products/continuous-engineering-solution/) solution. 2 | 3 | The [iotp-adaptor project](https://github.com/OSLC/iotp-adaptor) provides source code for a subset of [IBM Rational Engineering Lifecycle Manager](https://jazz.net/products/rational-engineering-lifecycle-manager/) (CE) version 6.0.6. The intent of providing this source code and documentation is help others who are developing OSLC integrations with IBM offerings. The [Developer Guide](./iotp_adaptor/developer-guide) provides the additional information you need to integrate OSLC clients and servers with the IBM jazz-based applications. This includes: 4 | 5 | * Providing a rootservices document for discovering server discovery capabilities 6 | * Establishing Consumer/Friend relationships using OAuth to allow servers to interact 7 | * Creating project area artifact container associations to enable linking between jazz.net CE tools and OSLC resources provided by adaptors 8 | * What link types are available in each of the applications based on the chosen artifact container association 9 | * Specific integration requirements of each CE application (RDNG, RTC and RQM) that you need to know to get the integrations working 10 | 11 | [iotp-adaptor User Guide](./iotp_adaptor/userGuide/user-guide) is a simple user's guide for installing, configuring, administering and using iotp-adapter with the CE tools. 12 | 13 | [iotp-adaptor Developer Guide](./iotp_adaptor/developer-guide) provides the complete documentation on how the server was developed. 14 | 15 | ## What is an Adaptor? 16 | 17 | Developing integrations using OSLC follows a number of common patterns: 18 | 19 | * **Facade** - OSLC native implementation in the tool or through a plugin using tool’s extensibility mechanisms - very tool specific 20 | * **Mediator** - OSLC adapter for the tool (tool responsible for storage) - using Lyo Designer, factors out all OSLC capabilities and requires only implementation of connector manager. 21 | * **Data mining** - into common OSLC manager (e.g. Rational Design Manager, MID Smartfacts) can result in data redundancy and ETL overhead 22 | * **Synchronization** - of common or overlapping data between tools - limited traceability and impact analysis (e.g., Tasktop Integration Hub) 23 | 24 | An OSLC adaptor (or adapter) follows the Mediator pattern. The adaptor can be quite simple: providing only OSLC capabilities and delegating all user management, persistence and user interaction to the integrated tools. Or the adaptor can be quite complex: providing OSLC capabilities on one or more adapted data sources, but also providing an integration hub with its own storage facilities, user management and UI in order to support integrations that are not possible or appropriate to implement in the individual tools. 25 | 26 | This range of adaptors represents a continuum between enabling and supporting integration. Enabling integration is primarily about providing OSLC capabilities on data sources in order to link resources across tools. These OSLC capabilities or services include: 27 | 28 | * **CRUD operations** - on resources using RDF resource representations (provides predictable resource formats, rich semantics, and goos support for links) 29 | * **Service discovery** - ServiceProviderCatalog, ServiceProvicers (containers of managed resources), Services that describe what OSLC capabilities are provided on what resources 30 | * **Query Capability** – persistent independent query capability for integration 31 | * **Delegated dialogs** – to allow an application to create and select resources in another application for the purpose of establishing links 32 | * **Resource preview** – to provide icons and labels in order to view a link to a resource managed by another tool 33 | * **Tracked Resource Sets** – in order to efficiently contribute data from many data sources into a single repository for cross-tool views, queries and reporting 34 | 35 | Providing these capabilities enables the integration of OSLC based clients and servers. But supporting integration can go beyond simple enabling of links to establishing and maintaining the meaning of the links, and the ability to automate workflow based on link semantics. 36 | 37 | iotp-adaptor is a simple OSLC adaptor that has no persistence of its own and does no user management. Login is delegated to the IBM Watson IoT Platform using your IBM Cloud credentials. All resources are stored in the Watson IoT Platform, and all links between the CE tools and the IoT Platform resources are stored in the CE tools repositories. 38 | 39 | Lyo Designer does generate a Web application that uses OSLC discovery to provide a "debug" interface on the OSLC representations of the IoT Platform resources. See [Generated Debug Web App](./iotp_adaptor/userGuide/debug-interface) for details. This generated Web application could be extended to provide additional UI and integration capabilities that could compliment the Watson IoT Platform UI. However this is not necessary in this case because the Watson IoT Platform already provides a sufficient Web UI. 40 | 41 | Other adaptors may need additional UI, workflow scripting and other capabilities. Lyo Designer can be used to create a starting point for such applications. 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "developer-guide": { 3 | "title": "Developer Guide", 4 | "parent_uri": "../iotp-adaptor-sample.html" 5 | }, 6 | "environment-setup": { 7 | "title": "eclipse environment setup", 8 | "parent_uri": "../iotp-adaptor-sample.html" 9 | }, 10 | "toolchain-model": { 11 | "title": "The toolchain model", 12 | "parent_uri": "../iotp-adaptor-sample.html" 13 | }, 14 | "code-generator": { 15 | "title": "Generating the server code", 16 | "parent_uri": "../iotp-adaptor-sample.html" 17 | }, 18 | "exploring-the-code" : { 19 | "title": "Exploring the generated code", 20 | "parent_uri": "../iotp-adaptor-sample.html" 21 | }, 22 | "ssl-support": { 23 | "title": "https and SSL support", 24 | "parent_uri": "../iotp-adaptor-sample.html" 25 | }, 26 | "authentication": { 27 | "title": "Authentication", 28 | "parent_uri": "../iotp-adaptor-sample.html" 29 | }, 30 | "rootservices": { 31 | "title": "Creating the rootservices document", 32 | "parent_uri": "../iotp-adaptor-sample.html" 33 | }, 34 | "consumer-friend": { 35 | "title": "Connecting Servers", 36 | "parent_uri": "../iotp-adaptor-sample.html" 37 | }, 38 | "artifact-container-associations": { 39 | "title": "Artifact Container Associations", 40 | "parent_uri": "../iotp-adaptor-sample.html" 41 | }, 42 | "dialogs": { 43 | "title": "Updating generated dialogs", 44 | "parent_uri": "../iotp-adaptor-sample.html" 45 | }, 46 | "implement-domain-class": { 47 | "title": "Implementing a Domain Class", 48 | "parent_uri": "../iotp-adaptor-sample.html" 49 | }, 50 | "trs-provider": { 51 | "title": "Implementing a TRS Provider", 52 | "parent_uri": "../iotp-adaptor-sample.html" 53 | }, 54 | "junit-tests": { 55 | "title": "JUnit Tests", 56 | "parent_uri": "../iotp-adaptor-sample.html" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/_harp.json: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "org_name": "Open Services for Lifecycle Collaboration", 4 | "org_abbr": "OSLC", 5 | "site_name": "Developer Guide" 6 | } 7 | } -------------------------------------------------------------------------------- /_harp/iotp_adaptor/artifact-container-associations.md: -------------------------------------------------------------------------------- 1 | # Artifact Container Associations 2 | 3 | OSLC discovery allows a client application to discover the services provided by and OSLC server application. Discovery capabilities include: 4 | 5 | * Service Provider Catalog: a list of Service Providers provided by the server. Jazz-apps obtain links to service provider catalogs using the rootservices document (an OSLC extension) 6 | * Service Provider: a container of managed resources accessed through OSLC capabilities. Jazz-app service providers correspond to project areas, the container of managed resources. 7 | * Services: includes creation factory, query capability, delegated creation and selection dialog and resource preview service URLs as shown below 8 | 9 | ![OSLC Discovery Capability](./images/CoreDiscovery.png "OSLC Discovery Capability") 10 | 11 | Jazz-apps initiate discovery by adding a friend application. This provides a link to the app's rootservices document which specifies the information needed to establish client/server interactions including: 12 | 13 | * Service provider catalogs using oalc_rm:rmServiceProviders, oslc_cm:cmServiceProviders, oslc_am:amServiceProviders for Requirement, Change Request and Architecture Management service providers 14 | * OAuth URLs required to establish OAuth authentication between OSLC client and server applications 15 | * TRS providers 16 | 17 | But this isn't enough to be able to create links between resources managed by a server's service providers. Artifact container associations are used to configure a project area for connections with service providers or project areas in another application. This is used in the client applications selection/creation dialog to allow user to select application and artifact container that has the resource to link to or create, based on the chosen link type. The association describes the relationship i.e. what kind of links can exist between resources managed by the client and server . So when you create a specific link type, the list is scoped based on the associations for that type of relationship. 18 | 19 | For iotp-adaptor, the organization as the service provider and users configure the project area to organization association because they are both the unit of user login and authentication. 20 | 21 | Table 1. Associations and links by application 22 | 23 | | Application Name | Associations | Links | 24 | | ---------------- | ------------ | ------ | 25 | | Change and Configuration Management | Provides: Implementation Requests
Provides: Related Change Requests
Provides: Requirements Change Requests | Tracks Requirement
Implements Requirement
Affects Requirement
Related Change Request 26 | | Quality Management | Uses: Defect
Uses: Requirement | Test Development Items
Validates Requirements | 27 | | DOORS Next Generation | Provides: Related Requirements | References | 28 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/consumer-friend.md: -------------------------------------------------------------------------------- 1 | Integration between jazz.net apps and iotp-adaptor requires an established, authenticated communication between the Jazz Team Server that hosts the lifecycle management applications and the iotp-adaptor OSLC server. This relationship between the two servers is called a friend relationship. It indicates that the requests coming from the servers can be trusted, and the two servers can communicate with each other. 2 | 3 | By creating this friend relationship and associating project areas, you can link tasks, defects, stories, or requirements from the lifecycle management applications with IoT Platform artifacts. To establish the friend relationship between Jazz Team Server and the connector, you must log in to Jazz Team Server with an account that has Jazz Project Administrator privileges. 4 | 5 | ## Adding A Friend 6 | 7 | [The User Guide](./userGuide/administration) documents how to add a friend to the jazz.net consumer apps to the iotp-adaptor server. Adding a friend requires the URL to the iotp-adaptor rootservices document. This URL must be known to the user and is typically `https://server:port/rootservices`. 8 | 9 | An administrator opens the jazz.net server admin page, typically the Jazz Team Server (JTS), and adds a friend providing the iotp-adaptor server rootservices URL. The JTS uses the OAuth1.0a URLs in the rootservices document to know what authentication scheme to use. The administrator specifies the OAuth secret and the server generates the consumer key. The authentication is completed by having an admin of the iotp-adaptor server accept the provisional key which completes the OAuth authentication sequence. 10 | 11 | The jazz.net apps and the iotp-adaptor can now communicate using OAuth tokens. 12 | 13 | ## OAuth Implementation 14 | 15 | The OAuth implementation used by iotp-adaptor is provided by eclipse/Lyo. There are four Maven projects in [https://github.com/eclipse/lyo.server](https://github.com/eclipse/lyo.server) that implement the OAuth support. 16 | 17 | 1. oauth-consumer-store - an implementation of an encrypted consumer store for OAuth tokens. This is where consumer keys created when the iotp-adaptor server is added as a friend to the jazz.net consumer apps 18 | 2. oauth-core - the OSLC4J implementation of OAuth1.0a 19 | 3. oauth-test - test cases for the OAuth implementation 20 | 4. oauth-webapp - a JEE web application that Lyo Designer uses to provide needed user interaction for OAuth authentication 21 | 22 | Lyo Designer generates the Application.java OslcWinkApplication file, but does not by default include OAuth support. You have to add it in the user code inside the static initializer in Application class. 23 | 24 | ``` 25 | // Start of user code Custom Resource Classes 26 | // OAuth service and Swagger.io service 27 | try { 28 | RESOURCE_CLASSES.add(Class.forName("org.eclipse.lyo.server.oauth.webapp.services.ConsumersService")); 29 | RESOURCE_CLASSES.add(Class.forName("org.eclipse.lyo.server.oauth.webapp.services.OAuthService")); 30 | RESOURCE_CLASSES.add(io.swagger.jaxrs.listing.ApiListingResource.class); 31 | RESOURCE_CLASSES.add(io.swagger.jaxrs.listing.SwaggerSerializers.class); 32 | } catch (ClassNotFoundException e) { 33 | // TODO Auto-generated catch block 34 | e.printStackTrace(); 35 | } 36 | // TRS service 37 | RESOURCE_CLASSES.add(TrackedResourceSetService.class); 38 | 39 | // trigger Jena init 40 | ModelFactory.createDefaultModel(); 41 | // force plain XML writer 42 | RDFWriterFImpl.alternative(null); 43 | // End of user code 44 | ``` 45 | This add additional services to your Web app in order to support OAuth1.0a. The OAuth classes need to be added using the Class.ForName method instead of through imports because they are defined in a separate, reusable Web application WAR file, not a Java JAR file. 46 | 47 | This dependency in the iotp-adaptor pom.xml file causes the oauth-webapp to be merged with the iotp-adaptor app when the user does a maven install. 48 | ``` 49 | 50 | org.eclipse.lyo.server 51 | oauth-webapp 52 | ${lyo.version} 53 | war 54 | 55 | ``` 56 | 57 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/developer-guide.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Developing an OSLC adaptor for Watson IoT Platform

4 |
5 |
6 | iotp-adapter is an OSLC server that exposes IBM Watson IoT Platform resources as OSLC resources. The Developer Guid explains how this server was developed and integrated with the IBM jazz.net applications. 7 |
8 |
9 | 10 | 11 | 12 | # Introduction 13 | 14 | See the [iotp-adaptor User Guide](./userGuide/user-guide) for information on how to install, configure, administer and use the iotp-adaptor OSLC server. This Developer Guide explains how the adaptor was build and integrated with the IBM CE jazz.net applications. The source code is available in a the GitHub [iotp-adaptor Project](https://github.com/OSLC/iotp-adaptor). 15 | 16 | iotp-adaptor was designed and initially created using the [eclipse/Lyo Designer](https://github.com/eclipse/lyo.designer/wiki). This tool using model-based development techniques to generate an OSLC server implementation with a minimal Web UI "debug" application that allows you to browse the OSLC services and adapted resources. The code generator uses [M2T](https://www.eclipse.org/modeling/m2t/) templates that were developed using the eclipse/Lyo [OSLC4J Bugzilla](https://wiki.eclipse.org/Lyo/BuildOSLC4JBugzilla) sample application. 17 | 18 | The Lyo Designer code generator creates an [OSLC Core 2.0](https://archive.open-services.net/bin/view/Main/OslcCoreSpecification) compliant OSLC server. This server is sufficient to explore the adapted resources using OSLC capabilities, but it is not enough to be able to integrate that server with the IBM jazz.net based applications. Additional considerations must be addressed in order to integrate with these applications including: 19 | 20 | * Providing a rootservices document for discovering server discovery capabilities 21 | * Establishing Consumer/Friend relationships using OAuth to allow servers to interact 22 | * Creating project area artifact container associations to enable linking between jazz.net CE tools and OSLC resources provided by adaptors 23 | * What link types are available in each of the applications based on the chosen artifact container association 24 | * Specific integration requirements of each CE application (RDNG, RTC and RQM) that you need to know to get the integrations working 25 | * Creating a TRS provider that can contribute to IBM [RELM](https://www.ibm.com/support/knowledgecenter/en/SS2L6K_6.0.5/com.ibm.team.jp.relm.doc/topics/c_node_product_relm.html) and [LQE](https://www.ibm.com/support/knowledgecenter/en/SS2L6K_6.0.5/com.ibm.team.jp.lqe2.doc/topics/t_lqe_admin.html). 26 | 27 | The iotp-adaptor Developer Guide walks through all of these considerations and provides example solutions. Here's an overview of each of the sections in the Developer Guide: 28 | 29 | * [eclipse environment setup](./environment-setup.html): describes how to setup an eclipse development environment for developing the model and code. Eclipse is required in order to use Lyo Designer, which is an eclipse plug-in. 30 | * [The toolchain model](./toolchain-model.html) - describes the design of the Watson IoT Platform OSLC domain model, and the model of the OSLC services that are provided 31 | * [Generating the server code](./code-generator.html) - explains how to generate the server implementation using the Lyo Designer code generator with additional details for managing embedded user code. 32 | * [Exploring the generated code](./exploring-the-code.html) - looks at the structure of the iotp-adaptor eclipse project, and discusses the key folders and files of the generated application. 33 | * [https and SSL support](./ssl-support.html) - discusses the important topic of secure connections and how to configure the Web application to support SSL, and how to manage self-assigned certificates. 34 | * [Authentication](./authentication.html) - addresses the often sticky problem of end-user login as well as server-to-server connections through OAuth. 35 | * [Creating the rootservices document](./rootservices.html) - Describes how to provide a rootservices document which is required to establish consumer/friend connections between the jazz.net applications (primarily the Jazz Team Server) and the iotp-adaptor. 36 | * [Connecting Servers](./consumer-friend.html) - describes how to create a consumer/friend relationship using OAuth in order to establish server-to-server communications with jazz.net applications 37 | * [Artifact Container Associations](./artifact-container-associations.html) - describes how to configure jazz.net application project areas so they are able to access OSLC services provided by iotp-adaptor 38 | * [Updating generated dialogs](./dialogs.html) - explains how to customize the preview and delegated dialogs created by the Lyo Designer code generator 39 | * [Implementing a Domain Class](./implement-domain-class.html) - summarizes all of the user code that needs to be developed to implement an adaptor domain class, using DeviceType as an example. 40 | * [Implementing a TRS Provider](./trs-provider.html) - provides and overview of the design and implementation of the iotp-adaptor TRS provider 41 | * [JUnit Tests](./junit-tests.html) - describes an example of a typical JUnit test that tests the OSLC CRUD operations of an IoT Platform resource. 42 | 43 | # Resources 44 | 45 | * [OSLC Web Site](https://open-services.net) 46 | * [OSLC Developer Guide](http://oslc.github.io/developing-oslc-applications/) 47 | * [OSLC Primer](https://archive.open-services.net/primer) 48 | * [eclipse/Lyo Project](https://www.eclipse.org/lyo/) 49 | * [Lyo Designer](https://github.com/eclipse/lyo.designer/wiki) 50 | * [OSLC Swagger.io](https://github.com/OSLC/OSLC-API) 51 | * [OSLC GitHub Organization](https://github.com/OSLC) 52 | * [iotp-adaptor Project](https://github.com/OSLC/iotp-adaptor) 53 | 54 | # Call for Contrubtion 55 | 56 | This documentation site is under continuous development as we discover more information about how to develop OSLC clients and servers that integrate with the jazz.net applications. We encourage you to contribute if you find something missing, incorrect, or unclear. You can email suggestions to [Jim Amsden](mailto:jamsden@us.ibm.com). 57 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/environment-setup.md: -------------------------------------------------------------------------------- 1 | # Environment Setup 2 | 3 | iotp-adaptor was developed using [eclipse/Lyo Designer](https://github.com/eclipse/lyo.designer/wiki) which is an eclipse plug-in. So you'll need to use eclipse to follow along in this Developer Guide, as well as create your own adpaters using a similar technique. 4 | 5 | This section summarizes how to install and configure eclipse so it is ready to be used for adapter development. It doesn't go into a lot of detail, and assumes some familiarity with eclipse, JEE and git. If you need help on any of these, the Web is full of great tutorials, references and samples that are a quick Google/Bing search away. 6 | 7 | If you run into trouble, you can ask questions on [stackoverflow](https://stackoverflow.com) or the [jazz.net/forum](https://jazz.net/forum). 8 | 9 | ## Installing Eclipse 10 | 11 | Go to the [eclipse.org/downloads](https://www.eclipse.org/downloads/) page and download [Eclipse Eclipse 2020-03](https://www.eclipse.org/downloads/packages/installer) (or later) to access the Eclipse Installer for your platform. Run the Eclipse Installer and install Eclipse IDE for Java EE Developers. The Web app generated by Lyo Designer is a JEE WAR file, so you'll need the plug-ins that are already installed in the Eclipse IDE for Java EE Developers. This includes additional components you'll need: 12 | 13 | * Data Tools Platform 14 | * Git integration for Eclipse 15 | * Eclipse Java Development Tools 16 | * Eclipse Java EE Developer Tools 17 | * JavaScript Development Tools 18 | * Maven Integration for Eclipse 19 | * Mylyn Task List 20 | * Eclipse Plug-in Development Environment 21 | * Code Recommenders Tools for Java Developers 22 | * Eclipse XML Editors and Tools 23 | 24 | Once eclipse is installed, start it up and open the Eclipse Marketplace and add the following additional solutions 25 | Added the following: 26 | 27 | * Install the Eclipse Jetty 5.0.0 or later 28 | 29 | ## Install eclipse/Lyo Designer 30 | 31 | Eclipse/Lyo designer comes in two parts, the Lyo Toolchain editor (which is built on [Sirius](https://www.eclipse.org/sirius/)), and the Lyo Code Generator. These two components are installed using and eclipse install and update site. 32 | 33 | 1. Start eclipse and invoke Help/Install New Software... 34 | 2. Configure an install and update site called Lyo Designer with one of the following update site URLs: 35 | * https://download.eclipse.org/lyo/product/binaries/stable/ - these are the most recent released versions 36 | * https://download.eclipse.org/lyo/product/binaries/edge/ - these are the latest builds from eclipse.org 37 | 3. Install the following features: 38 | * Lyo Toolchain 39 | * Lyo Code Generator 40 | 41 | You'll need to restart eclipse to complete the installation. 42 | 43 | Note: If the About Eclipse menu item, and clicking on the Installation Details button show no installed software, restart with eclipse with the -clean option. 44 | 45 | ## Install Jetty 46 | 47 | You can deploy the WAR file created in the iotp-adaptor/iotp-adaptor eclipse Maven project to any JEE container. However, Jetty is a very convenient container to use for rapid development. Install Jetty from https://www.eclipse.org/jetty/download.html. 48 | 49 | 1. Start eclipse 50 | 51 | After installing, edit your .bash_profile or whatever is appropriate for your platform and set the JETTY_HOME environment variable. For example: 52 | 53 | export JETTY_HOME=~/Applications/jetty-distribution-9.4.5.v20170502 54 | 55 | Next use the Eclipse Marketplace to install Eclipse Jetty if you want to be able to lanuch iotp-adaptor as a Jetty Webapp. Use `src/main/webapp` as the WebApp Folder so that changes made during debugging will be immediately available. Typically use `/iotp` as the Context Path. 56 | 57 | Add the following VM arguments: 58 | 59 | ``` 60 | -Diot.platform.base=internetofthings.ibmcloud.com 61 | -Diot.platform.api.version=v0002 62 | -Dlog4j.debug=true 63 | ``` 64 | 65 | ## Install git and GitHub Desktop 66 | 67 | [iotp-adaptor](https://github.com/OSLC/iotp-adaptor) is a GitHub project, so you'll need to use git to access the source code. If you're here, you are likely already quite familiar with git. But just in case, here's a few notes to get you started. 68 | 69 | You can use EGit in eclipse, [git](https://git-scm.com/downloads) command line interface, and/or [GitHub Desktop](https://desktop.github.com). These are all efficient, effective ways to use git and each has characteristics that make it useful in different contexts. The [git reference manual](https://git-scm.com/docs) is also a very useful resource if you forget the specifics of a particular git command. There more at the [git documentation site](https://git-scm.com/doc). 70 | 71 | 72 | # Getting the iotp-adaptor Code 73 | 74 | Now that your eclipse platform is all setup, you're ready to clone the iotp-adaptor repository and install the eclipse Maven projects. The following is a brief summary of how to do this: 75 | 76 | 1. Start eclipse 77 | 2. Open the Git perspective 78 | 3. paste the following URI in the Git Repositories view: https://github.com/OSLC/iotp-adaptor.git 79 | 4. Select the iotp-adaptor repository, right click, and invoke Import Maven Projects... to import the iotp-adaptor maven project. Note: if this menu item isn't available, you will need to install the m2e egit connector from the eclipse marketplace. Follow [these instructions](https://stackoverflow.com/questions/4542104/how-do-you-get-git-integration-working-with-m2eclipse). 80 | 5. Select the iotp-awaptor repository again, right click and invoke Import Projects... to import the iotp-adaptor-model project. 81 | 5. Switch to the Java EE perspective 82 | 6. Expand eclipse maven project iotp-adaptor 83 | 7. Select the pom.xml file, right click and invoke Run As > Maven install 84 | 85 | If all goes well, you should have completed the build of iotp-adaptor, and the deployable WAR file will be in target/iotp-0.0.1-SNAPSHOT (or something similar, the version might be different). 86 | 87 | Note, when you load a Maven project (instead of an eclipse project), Maven automatically updates the eclipse project settings from information in the Maven pom.xml file. If you make significant changes to the pom.xml file, you may need to update the eclipse project settings again. To do this, select the iotp-adaptor project, right click, and invoke Maven > Update Project.... This will ensure the eclipse automatic build will use the same settings and dependencies as the Maven commands (e.g., mvn install from the command line or Run As > Maven install from the Project Explorer). This way compilation errors will show up in the Project Explorer and Markers view as you are editing. 88 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Bluemix-Domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Bluemix-Domain.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/CE4IoTConnector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/CE4IoTConnector.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/CRUD-Operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/CRUD-Operations.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/CoreDiscovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/CoreDiscovery.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Creation-Dialogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Creation-Dialogs.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Creation-Factories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Creation-Factories.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Device-BasicCapability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Device-BasicCapability.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/DeviceType-Creation-Factory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/DeviceType-Creation-Factory.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Generate-the-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Generate-the-code.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Generated-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Generated-project.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/IoT-Platform-Domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/IoT-Platform-Domain.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/LQE-process-resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/LQE-process-resources.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Project-Dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Project-Dependencies.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Query-Capability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Query-Capability.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/Selection-Dialogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/Selection-Dialogs.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/images/authenticating-with-oauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/images/authenticating-with-oauth.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/junit-tests.md: -------------------------------------------------------------------------------- 1 | # JUnit Tests 2 | 3 | Sample JUnit tests are provided to test the CRUD operations on the IoT Platform DeviceType resource in `com.ibm.oslc.adaptor.tests.iotp-adaptorTests.java`. This can be used as a pattern to develop tests for other resources as they are supported. 4 | 5 | 6 | 7 | There are a few considerations to address in implementing these JUnit test cases that are covered in this section. 8 | 9 | There are also opportunities to introduce other automated tests for the generated Web UI, especially for the creation and selection dialogs, and the small and large preview dialogs. These tests are currently done manually. 10 | 11 | ## OslcClient login 12 | 13 | The OSLC4J OslcClient provides OAuth and Jazz FORM based login, and these are what is supported by the jazz.net apps. But does not directly support pre-emptive login with user credentials which is required by the IBM Watson IoT Platform. There's no constructor `OslcClient(String userId, String password)`. These a straightforward work around demonstrated in the following code fragment (which comes from C4IoTConnectorTests.java). The workaround is to construct a simple OslcClient, and then add an Authorization header that will be included on all requests. 14 | 15 | ``` 16 | try { 17 | client = new OslcClient(); 18 | // Add a receptor to set the Authorization header as a default 19 | // header for all requests 20 | Header header = new BasicHeader(HttpHeaders.AUTHORIZATION, 21 | "Basic "+Base64.encode((userId+":"+password).getBytes())); 22 | List
headers = new ArrayList
(); 23 | headers.add(header); 24 | RequestDefaultHeaders defaultHeaders = new RequestDefaultHeaders(headers); 25 | ((DefaultHttpClient)client.getHttpClient()).addRequestInterceptor(defaultHeaders); 26 | 27 | String catalogUrl = serverUrl + "/services/catalog/singleton"; 28 | 29 | String orgTitle = "IoT Platform Service Provider: "+orgId+"(/"+orgId+")"; 30 | String serviceProviderUrl = client.lookupServiceProviderUrl(catalogUrl, orgTitle); 31 | 32 | queryCapability = client.lookupQueryCapability(serviceProviderUrl, 33 | Oslc_iotDomainConstants.IOT_PLATFORM_NAMSPACE, Oslc_iotDomainConstants.DEVICETYPE_TYPE); 34 | 35 | creationFactory = client.lookupCreationFactory(serviceProviderUrl, 36 | Oslc_iotDomainConstants.IOT_PLATFORM_NAMSPACE, Oslc_iotDomainConstants.DEVICETYPE_TYPE); 37 | } catch (Exception e) { 38 | e.printStackTrace(); 39 | } 40 | ``` 41 | 42 | At some point, this simple approach should be migrated into the eclipse/Lyo Java client API. 43 | 44 | You will probably get deprecated code warnings in this code because OSLC4J OslcClient needs to be updated to use the updated HttpClient 45 | 46 | 47 | ## A Typical Resource Test Case 48 | 49 | The tests for CRUD operations on resources follow a typical pattern: 50 | 51 | 1. Create a new resource 52 | 2. Read the resource you just created 53 | 3. Update the resource 54 | 4. Read back the resource and make sure the update was applied 55 | 5. Delete the created resource 56 | 57 | This test pattern doesn't require much prior setup, and leaves the data source unchanged after it runs successfully. 58 | 59 | Here's the implementation of this typical pattern on Watson IoT Platform DeviceType: 60 | 61 | ``` 62 | @Test 63 | public void testDeviceType() throws Exception { 64 | String uri = creationFactory.replace("devicetype", "iotDeviceTypes") + "/TestDeviceType"; 65 | 66 | // Create 67 | DeviceType deviceType = new DeviceType(new URI(uri)); 68 | deviceType.setIdentifier("TestDeviceType"); 69 | deviceType.setTitle("TestDeviceType"); 70 | // TODO: add values to all the supported properties 71 | deviceType.setDescription("This is a test device that will be deleted"); 72 | ClientResponse response = client.createResource(creationFactory, deviceType, OSLCConstants.CT_RDF); 73 | assertEquals(response.getStatusCode(), HttpStatus.SC_CREATED); 74 | logger.info("Created DeviceType: " + deviceType.getTitle()); 75 | response.consumeContent(); 76 | 77 | // Read 78 | deviceType = client.getResource(uri).getEntity(DeviceType.class); 79 | assertEquals("TestDeviceType", deviceType.getIdentifier()); 80 | // TODO: Check all the read properties to be sure they are what was set when the resource was created 81 | logger.info("Read DeviceType: " + deviceType.getTitle()); 82 | response.consumeContent(); 83 | 84 | // Update 85 | deviceType.setDescription("This is the updated description"); 86 | // TODO: make changes to more of the properties 87 | response = client.updateResource(uri, deviceType, OSLCConstants.CT_RDF); 88 | assertEquals(response.getStatusCode(), HttpStatus.SC_OK); 89 | logger.info("Updated DeviceType: " + deviceType.getTitle()); 90 | response.consumeContent(); 91 | 92 | // Read back the DeviceType that was just updated 93 | deviceType = client.getResource(uri).getEntity(DeviceType.class); 94 | // TODO: Check that all of the updated properties have the expected values 95 | assertEquals(deviceType.getDescription(), "This is the updated description"); 96 | logger.info("Read updated DeviceType: " + deviceType.getTitle()); 97 | response.consumeContent(); 98 | 99 | // Delete 100 | response = client.deleteResource(uri); 101 | assertEquals(response.getStatusCode(), HttpStatus.SC_OK); 102 | logger.info("Deleted DeviceType: " + uri); 103 | response.consumeContent(); 104 | } 105 | ``` 106 | Eventually test cases for all supported IoT Platform Resources should be implemented. But since this is intended to be incomplete sample code for the purposes of enhancing the OSLC Developer Guide, these details are not covered. 107 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "user-guide": { 3 | "title": "Overview", 4 | "parent_uri": "../../iotp-adaptor-sample.html" 5 | }, 6 | "install-and-config": { 7 | "title": "Installation and Configuration", 8 | "parent_uri": "../../iotp-adaptor-sample.html" 9 | }, 10 | "administration": { 11 | "title": "Administration", 12 | "parent_uri": "../../iotp-adaptor-sample.html" 13 | }, 14 | "debug-interface": { 15 | "title": "Generated Debug Web App", 16 | "parent_uri": "../../iotp-adaptor-sample.html" 17 | }, 18 | "using" : { 19 | "title": "Using with IBM Continuous Engineering", 20 | "parent_uri": "../../iotp-adaptor-sample.html" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/administration.md: -------------------------------------------------------------------------------- 1 | 2 | # Introduction 3 | 4 | The following sections describe how to administer the IBM Continuous Engineering applications (RDNG, RTC, RQM, etc.) to enable lifecycle management of IBM Watson IoT Platform resources using the OSLC iotp-adaptor server. 5 | 6 | The administration steps connect the CE applications with the iotp-adaptor OSLC server, and establish the artifact container associations between the CE project areas and the IoT Platform organizations. This will enable the creation of links between CE resources and IoT Platform resources. 7 | 8 | # Establish cross-server communication 9 | 10 | For lifecycle management applications to interact with the IoT Platform artifacts, you must establish communication between the Jazz Team Server that hosts the lifecycle management applications and the iotp-adaptor OSLC server. This relationship between the two servers is called a friend relationship. It indicates that the requests coming from the servers can be trusted, and the two servers can communicate with each other. By creating this friend relationship and associating project areas, you can link tasks, defects, stories, or requirements from the lifecycle management applications with IoT Platform artifacts. To establish the friend relationship between Jazz Team Server and the connector, you must log in to Jazz Team Server with an account that has Jazz Project Administrator privileges. 11 | 12 | 1. Log on to Jazz Team Server, and go to the Administration page. In your web browser, enter: https://host_name:port/jts/admin. host_name is the host name with the DNS domain reference of the computer where the Jazz Team Server is installed. 13 | 1. On the Jazz Team Server Administration page, click the Server tab. 14 | 1. From the menu on the left, under Communication, click Friends (Outbound). 15 | 1. On the Friends page, in the Friends List section, click Add. 16 | 1. In the Add Friend window, specify the field values: 17 | 1. Enter the root services URI for the connector in the following format: 18 | 1. https://host_name:port/iotp/rootservices 19 | 1. Note: The URI is case sensitive. Use the same values as the ones that are set for scheme, host, and port in the web.xml file. 20 | 1. Enter a name to identify the friend server. For example, CE Connector for IoT. 21 | 1. Click Next, and enter the OAuth Secret twice. 22 | 1. Note: You must remember the OAuth Secret for later use. 23 | 1. Select the Trusted check box. Trusted consumers can share authorization with other trusted consumers and do not require user approval to access data. 24 | 1. Click Create Friend. 25 | 1. Click Next. You can see the provisional key. 26 | 1. On the Authorize Provisional Key page, click Grant access for the provisional key. 27 | 1. Type your IBM IoT Platform credentials, and click Continue. 28 | 1. Enter the server name, select the Trusted check box, and click Allow. A message indicates that the provisional key is approved. 29 | 1. Click Finish. On the Friends page, the friend relationship is established, and the relationship is displayed in the list of friends. 30 | 31 | # Creating artifact container associations 32 | 33 | Artifact container associations connect service providers with consumers. An artifact container includes a set of artifacts and capabilities specified by a service provider. 34 | 35 | Artifact containers are often the unit of access control and version management. The CE tools use project areas as artifact containers, each tool managing different artifacts and links between artifacts. The Watson IoT platform uses organizations as the artifact container. Choose the appropriate artifact container association for the tool and links you want to use to connect CE artifacts with Watson IoT Platform artifacts. 36 | 37 | 1. Associate the connector with each CE application you will use it with. In each application, go to Manage Project Areas. Note: Continuous engineering applications can be Change Management, Quality Management, or DOORS Next Generation. 38 | 1. On the Application Administration page, from the Active Project Areas list, click a project area to configure. 39 | 1. Scroll to the Associations section; then click Add. 40 | 1. In the Add Association dialog box: 41 | * From the Application list, select the target connector application to link to. 42 | * From the Association list, select the connector association. 43 | * In the Artifact Containers section, select the project area that the connector links to, and then click OK. 44 | 1. Use the following table to find the supported associations and links for each application. ![Artifact Container Associations](images/artifact-container-associations.png "Artifact Container Associations") 45 | 1. Click OK to close the Add Association dialog box. -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/debug-interface.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | The eclipse/Lyo Designer Toolchain modeler and code generator creates a standard JEE Web application (WAR file) that provides a simple "debug" interface to the generated OSLC server. This simple interface allows you to easily navigate the OSLC service provider catalog, see the available service providers, and explore the available services on the supported domains. 4 | 5 | The Lyo Designer generated Web application is not intended to be a production application for end users. Rather it provides a convenient means to explore and test the OSLC services you have configured in the adaptor model for your domains. Much of the generated Web application is in JSP pages whose content is largely inside protected user code (code that is retained on code regeneration). So it is possible to substantially improve the generated UI so that it can support production needs. 6 | 7 | The iotp-adaptor is what might be called a "pure" adaptor. That is, it has no user management or persistence of its own, delegating these capabilities to the underlying IBM Watson IoT Platform. It also is not intended to provide an direct end-user functionality. Rather it supports creation and navigation of links to IoT Platform resources from the IBM Continuous Engineering applications. It is these applications, and the Watson IoT Platform Web UI that provide the end user interface. iotp-adaptor is just a facade on Watson IoT Platform in order to expose its managed resources as OSLC resources and through standard OSLC capabilities. 8 | 9 | # iotp-adaptor Web UI 10 | 11 | This brief guide provides an introduction to the iotp-adaptor Web application in order to guide early experimentation. 12 | 13 | ## Home page 14 | 15 | Visit [http://localhost:8080/iotp/](http://localhost:808/iotp/) to access the home page. This provides the generated home page with a link to the [Service Provider Catalog](http://localhost:8080/iotp/services/catalog/singleton). 16 | 17 | ## Service Provider Catalog 18 | 19 | Click on the [Service Provider Catalog](http://localhost:8080/iotp/services/catalog/singleton) to view the service providers. This will likely result in an authentication challenge what will be requesting your IBM Watson IoT Platform credentials. Use the same userid and password that you use to login to the [Watson IoT Platform Web UI](https://internetofthings.ibmcloud.com/#/). 20 | 21 | A list of service providers will be shown. The service providers correspond to the Watson IoT Platform and Bluemix organizations. IBM Cloud uses organizations as a means of managing resources. Organizations contain the resources and provide member management, roles, and permissions to control access to the managed resources. 22 | 23 | Click on any of the service provider links to view the services provided for that organization. 24 | 25 | ## Service Provider 26 | 27 | An OSLC ServiceProvider defines a container of managed resources, and the OSLC services that are provided on those resources. Services that can be accessed from this page include: 28 | 29 | * Selection Dialogs 30 | * Creation Dialogs 31 | * Creation Factories 32 | * Query Capabilities 33 | * Creation Resource Shapes 34 | * Query Resource Shapes 35 | 36 | For the selection and creation dialogs, two urls are provided, one to the OSLC dialog itself, and the other to a sample client that allows you to select or create resources and see the results. 37 | 38 | For example, click on the (sample client) link for the selection dialogs for one of your service providers (i.e., organizations). Choose a type of resource to select from the dropdown, and enter a Java regular expression in the search field to select some resources. Multi-selection is supported. Click on the OK button to see the selected resources. 39 | 40 | The (sample client) is an HTML page that acts as a typical OSLC selection dialog client. It does a GET on the selection dialog URL and puts the resulting dialog in its iframe. When you click on OK in the selection dialog, the sample client gets a Window event with the OSLC selection result. It then displays the results with their title and links to the selected resources. This sample client shows how to use selection dialogs in other web applications. 41 | 42 | ![Sample Selection Dialog](images/sample-selection-dialog.png "Sample Collection Dialog") 43 | 44 | You can click on any of the Query Capability URLs to get an HTML page that lists the instances of that resource type. The iotp-adaptor sample code only provides implementations of the following resource types: 45 | 46 | * DeviceType 47 | * Device 48 | 49 | For example, click on the DeviceTypeQueryCapability link to see a list of IoT Platform device types. Hover the cursor over any of the device type links to see the small preview. 50 | 51 | ![Sample Small Preview](images/sample-preview.png "Sample Small Preview") 52 | 53 | Go ahead and explore the rest of the generated UI. Note that this sample code is an incomplete implementation, so expect there to be things that aren't fully supported, and possible bugs. 54 | 55 | ## Resource Shapes 56 | 57 | The Lyo Designer code generator also generates OSLC ResourceShape constraints for all the domain classes. These shapes can be used to describe the results from OSLC queries, or to validate the contents of PUT entity request bodies for updating resources. For example, click on [http://localhost:8080/iotp/services/resourceShapes/deviceType](http://localhost:8081/iotp/services/resourceShapes/deviceType) to see the resource shape for resource DeviceType rendered as an HTML page. 58 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/artifact-container-associations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/artifact-container-associations.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/bluemix-ontology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/bluemix-ontology.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/concepts-detailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/concepts-detailed.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/iot-and-bluemix-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/iot-and-bluemix-packages.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/iotp-ontology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/iotp-ontology.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/link-requirement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/link-requirement.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/preview-in-dng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/preview-in-dng.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/sample-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/sample-preview.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/images/sample-selection-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/_harp/iotp_adaptor/userGuide/images/sample-selection-dialog.png -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/install-and-config.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | The iopt-adaptor is sample code available at [OSLC/iotp-adaptor](https://github.com/OSLC/iotp-adaptor). The GitHub repo does not contain a build of the adaptor, so you will need to build one yourself. [Environment Setup](../environment-setup) describes in detail how to do this in an eclipse Maven project. But if you have maven installed on your machine, you can easily use the command line to build the WAR file. 4 | 5 | ``` 6 | git clone https://github.com/OSLC/iotp-adaptor.git 7 | cd iotp-adaptor/iotp-adaptor 8 | mvn install 9 | ``` 10 | This will result in creating target/iotp-0.0.1-SNAPSHOT.war. You can then install this WAR file in any compatible JEE container such as Tomcat, Jetty, WebSphere Liberty, etc. 11 | 12 | For example, download [Tomcat 9](https://tomcat.apache.org/download-90.cgi) and unzip in a convenient folder. Follow the instructions in [How do Deploy a WAR File to Tomcat](http://www.baeldung.com/tomcat-deploy-war) to deploy target/iotp-0.0.1-SNAPSHOT.war to webapp/iotp.war. Then start the tomcat server and visit [http://localhost:8080/iotp](http://localhost:8080/iotp). Here's a brief summary of the instructions: 13 | 14 | 1. Download and unzip [Tomcat 9](https://tomcat.apache.org/download-90.cgi) 15 | 2. Set $CATALINA_BASE to where you unzipped Tomcat 9 16 | 3. Make sure $CATALINA_BASE/bin/startup.sh, shutdown.sh and catalina.sh are executable 17 | 4. Edit $CATALINA_BASE/conf/tomcat-users.xml as needed 18 | 5. Edit $CATALINA_BASE/conf/server.xml as needed (perhaps to change the port) 19 | 6. copy target/iotp-0.0.1-SNAPSHOT.war to $CATALINA_BASE/iotp.war 20 | 7. Start the Tomcat Server using $CATALINA_BASE/bin/startup.sh 21 | 8. Visit [http://localhost:8080/iotp](http://localhost/iotp/) to access the Watson IoT Platform resources using the iotp-adaptor. 22 | 23 | Here's some minimal sample commands that work on MacOS. Adjust the paths below to where you cloned iotp-adaptor and installed Tomcat, and open the link on the browser any way that is convenient for you. This also assumes you're using the default base uri of http://localhost:8080, port 8080, and scheme http in the iotp/WEB-INF/web.xml file. 24 | 25 | ``` 26 | cd ~/bin 27 | wget http://www.trieuvan.com/apache/tomcat/tomcat-9/v9.0.7/bin/apache-tomcat-9.0.7.zip 28 | unzip apache-tomcat-9.0.7.zip 29 | CATALINA_BASE=apache-tomcat-9.0.7 30 | cd $CATALINA_BASE/bin 31 | chmod +x startup.sh shutdown.sh catalina.sh 32 | cp ~/GitHub/iotp-adaptor/iotp-adaptor/target/iotp-0.0.1-SNAPSHOT.war $CATALINA_BASE/webapp/iotp.war 33 | $CATALINA_BASE/bin/startup.sh 34 | open /Applications/Safari.app http://localhost:8081/iotp 35 | 36 | ``` 37 | 38 | # Configuration 39 | 40 | iotp-adaptor doesn't require much configuration, but there are a few things you may want to set. After Tomcat runs, iotp.war will be uncompressed into folder iotp. The iotp-adapter configuration parameters are in the iotp/WEB-INF/web.xml file. The default values are: 41 | 42 | * com.ibm.oslc.adaptor.iotp.servlet.scheme: http 43 | * com.ibm.oslc.adaptor.iotp.servlet.baseurl: http://localhost:8080 44 | * com.ibm.oslc.adaptor.iotp.servlet.port: 8080 45 | 46 | These values correspond to the defaults for Tomcat, so no editing is required if Tomcat is running on localhost and port 8080. 47 | 48 | If these values need to change, edit them in the web.xml file. For example, here's how to change the port to 8081: 49 | 50 | ``` 51 | 52 | Scheme used for URI when registering ServiceProvider. Can be overridden by System property of the same name. 53 | com.ibm.oslc.adaptor.iotp.servlet.scheme 54 | http 55 | 56 | 57 | Base URI for the adaptor. 58 | com.ibm.oslc.adaptor.iotp.servlet.baseurl 59 | http://localhost:8081 60 | 61 | 62 | Port used for URI when registering ServiceProvider. Can be overridden by System property of the same name. 63 | com.ibm.oslc.adaptor.iotp.servlet.port 64 | 8081 65 | 66 | 67 | ``` 68 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/userGuide/using.md: -------------------------------------------------------------------------------- 1 | # Using the Watson IoT Platform Data in CE Projects 2 | 3 | Lifecycle management of IoT artifacts is not that different from dealing with analysis, design or implementation artifacts produced by CE applications such as IBM Rational DOORS Next Generation, IBM Rational Rhapsody, IBM Rational Team Concert, IBM Rational Quality Manager. You can use Continuous Engineering Lifecycle Management capabilities to facilitate the design, development, and implementation of your Watson IoT Platform applications. You can also use these capabilities in an embedded software development to deploy solution components to the Watson IoT Platform. This way you can expand the scope of traditional Systems and Software Engineering (SSE) solutions to the IoT. 4 | 5 | Here are a few examples of how you can use the connector with continuous enginering capabilities: 6 | 7 | 1. Creating links to Watson IoT Platform artifacts 8 | 1. Previewing IoT Platform artifacts in Continuous Engineering applications 9 | 1. Using traceability and impact analysis to manage change 10 | 11 | # Creating Links to IoT Platform Resources 12 | 13 | The iotp-adaptor OSLC server provides creation and selection dialogs for Watson IoT Platform artifacts as OSLC Change Management artifacts. You can link IoT Platform artifacts to any other OSLC provider that supports links to Change Management (CCM) artifacts. Various OSLC domain specifications define standard links to Change Management artifacts. These properties are supported by the products that are part of the IBM Continuous Engineering Solution. 14 | 15 | You can create links from IoT Platform artifacts to requirements, change requests (or any IBM Rational Team Concert work item type), and so on. When you create a link to an IoT Platform artifact, the selection dialog of the iotp-adaptor lists the possible target elements to link to. For example, if you are viewing a requirement in Rational DOORS Next Generation, you can create a References link to one or more IoT platform artifacts. 16 | 17 | ![Create Requirement Link](images/link-requirement.png "Create Requirement Link") 18 | 19 | You can search for the IoT Platform artifacts based on their names using [Java regular expressions](https://www.tutorialspoint.com/java/java_regular_expressions.htm), or type * or .* to show all artifacts. You can also select multiple artifacts to create several links in a single operation. 20 | 21 | # Previewing IoT Platform Resources in CE Applications 22 | 23 | After you create links between CE artifacts, including IoT Platform artifacts, OSLC consumer applications can use OSLC preview to show artifacts managed by other tools. For example, if you created a References link from a requirement to an IoT Platform artifact Low Flow Washing Machine (represented as LFWM), Rational DOORS Next Generation shows a preview of the LFWM device type. Hover over the link to see it. 24 | 25 | ![LFWM Resource Preview](images/preview-in-dng.png "LFWM Resource Preview") 26 | 27 | The preview includes the following details: 28 | 29 | * Artifact icon and label 30 | * Basic information about the artifact 31 | * For Device, the current values of the Device are shown using its logical interface 32 | 33 | Note: You can also click Show more at the bottom of the window to see more details. 34 | 35 | The preview makes it easy to view linked artifacts across tools in order to understand their relationships. To open the artifact in the tool in which it was created, click the artifact. If you click an IoT Platform artifact, you see it directly on the Watson IoT Platform dashboard. 36 | 37 | # Using Traceability and Impact Analysis 38 | 39 | Managing change is one of the main purposes of the IBM Continuous Engineering Solution. It facilitates collaborative interaction across multiple teams and across the whole solution delivery lifecycle to maximize the positive impact of change while minimizing its negative effects. The primary means of managing change is through comprehensive impact analysis across the lifecycle. 40 | 41 | The IoT Continuous Engineering Solution provides several ways to manage change, from fine-grained impact analysis in individual tools, to comprehensive impact analysis across tools by using Rational Engineering Lifecycle Manager (RELM). 42 | 43 | Individual tools often provide their own fine-grained traceability and impact analysis capabilities. In these tools, impact analysis extends only to the "edge" of the tool. That is, the tool can show traceability among its own artifacts, and links to artifacts in other tools. However, you cannot navigate beyond these links into the tool where the artifact resides. 44 | 45 | With Rational Engineering Lifecycle Manager you unlock the data from the CE applications, and perform impact analysis across tools. Each individual tool provides additional details that support a richer impact analysis of change. 46 | 47 | iotp-adaptor supports a minimal OSLC Tracked Resource Set (TRS) provider for IoT Platform device types. See the [IBM Continuous Engineering Connector for IoT in Rational Engineering Lifecycle Manager 6.0.5.1](https://jazz.net/downloads/ce4iot-connector/releases/6.0.5.1?p=userGuide) documentation for information on how to configure iotp-adaptor as an LQE data source, and to create RELM views. 48 | -------------------------------------------------------------------------------- /_harp/js/lib/$.js: -------------------------------------------------------------------------------- 1 | // https://github.com/remy/min.js 2 | /*globals Node:true, NodeList:true*/ 3 | $ = (function (document, window, $) { 4 | // Node covers all elements, but also the document objects 5 | var node = Node.prototype, 6 | nodeList = NodeList.prototype, 7 | forEach = 'forEach', 8 | trigger = 'trigger', 9 | each = [][forEach], 10 | // note: createElement requires a string in Firefox 11 | dummy = document.createElement('i'); 12 | 13 | nodeList[forEach] = each; 14 | 15 | // we have to explicitly add a window.on as it's not included 16 | // in the Node object. 17 | window.on = node.on = function (event, fn) { 18 | this.addEventListener(event, fn, false); 19 | 20 | // allow for chaining 21 | return this; 22 | }; 23 | 24 | nodeList.on = function (event, fn) { 25 | this[forEach](function (el) { 26 | el.on(event, fn); 27 | }); 28 | return this; 29 | }; 30 | 31 | // we save a few bytes (but none really in compression) 32 | // by using [trigger] - really it's for consistency in the 33 | // source code. 34 | window[trigger] = node[trigger] = function (type, data) { 35 | // construct an HTML event. This could have 36 | // been a real custom event 37 | var event = document.createEvent('HTMLEvents'); 38 | event.initEvent(type, true, true); 39 | event.data = data || {}; 40 | event.eventName = type; 41 | event.target = this; 42 | this.dispatchEvent(event); 43 | return this; 44 | }; 45 | 46 | nodeList[trigger] = function (event) { 47 | this[forEach](function (el) { 48 | el[trigger](event); 49 | }); 50 | return this; 51 | }; 52 | 53 | $ = function (s) { 54 | // querySelectorAll requires a string with a length 55 | // otherwise it throws an exception 56 | var r = document.querySelectorAll(s || '☺'), 57 | length = r.length; 58 | // if we have a single element, just return that. 59 | // if there's no matched elements, return a nodeList to chain from 60 | // else return the NodeList collection from qSA 61 | return length == 1 ? r[0] : r; 62 | }; 63 | 64 | // $.on and $.trigger allow for pub/sub type global 65 | // custom events. 66 | $.on = node.on.bind(dummy); 67 | $[trigger] = node[trigger].bind(dummy); 68 | 69 | return $; 70 | })(document, this); -------------------------------------------------------------------------------- /_harp/js/lib/delegate.js: -------------------------------------------------------------------------------- 1 | // https://github.com/remy/min.js 2 | // usage: $('body').delegate('li > a', 'click', fn); 3 | 4 | Node.prototype.delegate = function (selector, event, fn) { 5 | var matches = this.mozMatchesSelector || this.webkitMatchesSelector || this.oMatchesSelector || this.matchesSelector || (function (selector) { 6 | // support IE10 (basically) 7 | var target = this, 8 | elements = $(selector), 9 | match = false; 10 | if (elements instanceof NodeList) { 11 | elements.forEach(function (el) { 12 | if (el === target) match = true; 13 | }); 14 | } else if (elements === target) { 15 | match = true; 16 | } 17 | 18 | return match; 19 | }); 20 | 21 | this.on(event, function (event) { 22 | if (matches.call(event.target, selector)) { 23 | fn.call(event.target, event); 24 | } 25 | }); 26 | 27 | return this; 28 | }; -------------------------------------------------------------------------------- /_harp/js/lib/polyfills/classlist.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Via Remy Sharp's Polyfill project 3 | * https://github.com/remy/polyfills 4 | */ 5 | (function () { 6 | 7 | if (typeof window.Element === "undefined" || "classList" in document.documentElement) return; 8 | 9 | // adds indexOf to Array prototype for IE support 10 | if (!Array.prototype.indexOf) { 11 | Array.prototype.indexOf = function(obj, start) { 12 | for (var i = (start || 0), j = this.length; i < j; i++) { 13 | if (this[i] === obj) { return i; } 14 | } 15 | return -1; 16 | } 17 | } 18 | 19 | var prototype = Array.prototype, 20 | indexOf = prototype.indexOf, 21 | slice = prototype.slice, 22 | push = prototype.push, 23 | splice = prototype.splice, 24 | join = prototype.join; 25 | 26 | function DOMTokenList(el) { 27 | this._element = el; 28 | if (el.className != this._classCache) { 29 | this._classCache = el.className; 30 | 31 | if (!this._classCache) return; 32 | 33 | // The className needs to be trimmed and split on whitespace 34 | // to retrieve a list of classes. 35 | var classes = this._classCache.replace(/^\s+|\s+$/g,'').split(/\s+/), 36 | i; 37 | for (i = 0; i < classes.length; i++) { 38 | push.call(this, classes[i]); 39 | } 40 | } 41 | }; 42 | 43 | function setToClassName(el, classes) { 44 | el.className = classes.join(' '); 45 | } 46 | 47 | DOMTokenList.prototype = { 48 | add: function(token) { 49 | if(this.contains(token)) return; 50 | push.call(this, token); 51 | setToClassName(this._element, slice.call(this, 0)); 52 | }, 53 | contains: function(token) { 54 | return indexOf.call(this, token) !== -1; 55 | }, 56 | item: function(index) { 57 | return this[index] || null; 58 | }, 59 | remove: function(token) { 60 | var i = indexOf.call(this, token); 61 | if (i === -1) { 62 | return; 63 | } 64 | splice.call(this, i, 1); 65 | setToClassName(this._element, slice.call(this, 0)); 66 | }, 67 | toString: function() { 68 | return join.call(this, ' '); 69 | }, 70 | toggle: function(token) { 71 | if (!this.contains(token)) { 72 | this.add(token); 73 | } else { 74 | this.remove(token); 75 | } 76 | 77 | return this.contains(token); 78 | } 79 | }; 80 | 81 | window.DOMTokenList = DOMTokenList; 82 | 83 | function defineElementGetter (obj, prop, getter) { 84 | if (Object.defineProperty) { 85 | Object.defineProperty(obj, prop,{ 86 | get : getter 87 | }) 88 | } else { 89 | obj.__defineGetter__(prop, getter); 90 | } 91 | } 92 | 93 | defineElementGetter(Element.prototype, 'classList', function () { 94 | return new DOMTokenList(this); 95 | }); 96 | 97 | })(); -------------------------------------------------------------------------------- /_harp/js/oslc.js: -------------------------------------------------------------------------------- 1 | window.site_url = window.site_url || "/"; 2 | 3 | /** 4 | * Cut the mustard 5 | */ 6 | if ( 7 | "querySelector" in document && 8 | "localStorage" in window && 9 | "addEventListener" in window 10 | ) { 11 | /* Catch console.log errors. You are welcome. */ 12 | if (!window.console) { 13 | window.console = { 14 | log: function () {}, 15 | }; 16 | } 17 | 18 | var OSLC = { 19 | init: function () { 20 | // 21 | // SUPER SIMPLE CLASS TOGGLER 22 | // 23 | // On an element, add data-toggle-class="%class string%" 24 | // Set the target with a CSS selector data-toggle-target="%selector string%" 25 | // 26 | 27 | document.delegate( 28 | "[data-toggle-class], [data-toggle-class] > *", 29 | "click", 30 | function () { 31 | var targetEl = this.getAttribute("data-toggle-class") 32 | ? this 33 | : this.parentElement; 34 | var toggleClass = targetEl.getAttribute("data-toggle-class"); 35 | var toggleTarget = targetEl.getAttribute("data-toggle-target"); 36 | 37 | toggleTarget && $(toggleTarget).classList.toggle(toggleClass); 38 | } 39 | ); 40 | 41 | this.makeFluidVideos(); 42 | }, 43 | 44 | // 45 | // FLUID VIDEOS 46 | // 47 | // Wraps youtube/vimeo iframes in a div.fluid-video class 48 | // 49 | makeFluidVideos: function () { 50 | var videos = document.querySelectorAll( 51 | 'iframe[src*="youtube"], iframe[src*="vimeo"]' 52 | ); 53 | var fluidVidTemplate = _.template( 54 | '
><%= video %>
' 55 | ); 56 | 57 | // Filter out .no-resize videos 58 | videos = _.reject(videos, function (vid) { 59 | return vid.classList.contains("no-resize"); 60 | }); 61 | 62 | _.each(videos, function (vid) { 63 | var data = { 64 | style: 65 | 'style="padding-bottom: ' + (vid.height / vid.width) * 100 + '%;"', 66 | video: vid.outerHTML, 67 | }; 68 | 69 | // Replace the videos HTML with the new template 70 | vid.outerHTML = fluidVidTemplate(data); 71 | }); 72 | }, 73 | }; 74 | 75 | var polyfills = ["classlist"]; 76 | var libraries = ["underscore", "$", "delegate"]; 77 | var load = []; 78 | 79 | polyfills.forEach(function (test) { 80 | Modernizr[test] || 81 | load.push(window.site_url + "js/lib/polyfills/" + test + ".js"); 82 | }); 83 | 84 | libraries.forEach(function (lib) { 85 | load.push(window.site_url + "js/lib/" + lib + ".js"); 86 | }); 87 | 88 | Modernizr.load({ 89 | load: load, 90 | // must .bind to own object, as this will get called in the window context 91 | complete: OSLC.init.bind(OSLC), 92 | }); 93 | } 94 | 95 | // http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ 96 | var anchorForId = function (id) { 97 | var anchor = document.createElement("a"); 98 | anchor.className = "header-link"; 99 | anchor.href = "#" + id; 100 | anchor.innerHTML = ''; 101 | return anchor; 102 | }; 103 | 104 | // https://gist.github.com/codeguy/6684588 105 | var slugify = function (string) { 106 | const a = 107 | "àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;"; 108 | const b = 109 | "aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------"; 110 | const p = new RegExp(a.split("").join("|"), "g"); 111 | 112 | return string 113 | .toString() 114 | .toLowerCase() 115 | .replace(/\s+/g, "-") // Replace spaces with - 116 | .replace(p, (c) => b.charAt(a.indexOf(c))) // Replace special characters 117 | .replace(/&/g, "-and-") // Replace & with 'and' 118 | .replace(/[^\w\-]+/g, "") // Remove all non-word characters 119 | .replace(/\-\-+/g, "-") // Replace multiple - with single - 120 | .replace(/^-+/, "") // Trim - from start of text 121 | .replace(/-+$/, ""); // Trim - from end of text 122 | }; 123 | 124 | var linkifyAnchors = function (level, containingElement) { 125 | var headers = containingElement.getElementsByTagName("h" + level); 126 | for (var h = 0; h < headers.length; h++) { 127 | var header = headers[h]; 128 | 129 | if (typeof header.id == "undefined" || header.id == "") { 130 | header.id = slugify(header.innerText); 131 | } 132 | header.appendChild(anchorForId(header.id)); 133 | } 134 | }; 135 | 136 | document.onreadystatechange = function () { 137 | if (this.readyState === "complete") { 138 | var contentBlock = document.getElementsByClassName("copy")[0]; 139 | if (!contentBlock) { 140 | return; 141 | } 142 | for (var level = 1; level <= 6; level++) { 143 | linkifyAnchors(level, contentBlock); 144 | } 145 | } 146 | }; 147 | -------------------------------------------------------------------------------- /_harp/oslc-open-source-node-projects.md: -------------------------------------------------------------------------------- 1 | Eclipse/Lyo provides a set of Java based APIs and generative tools to support the creation of OSLC domain servers and integrated client applications. While Eclipse/Lyo provides a very rich and robust platfrom for OSLC development, it has a relatively high learning curve and that can increase development time, costs and risks. 2 | 3 | OSLC4JS represents a set of related Open Source projects supporting the creation and integration of OSLC based client and server applications that leverage the dynamic and asynchronous capabilities of JavaScript and Node.js. The LDP Service and OSLC Service projects provide Express.js middleware components that can be used to add LDP and/or OSLC services to any Express Web application. The OSLC Browser and OSLC Server projects use these services to create sample OSLC client and server apps that can easily and dynamically adapted to any OSLC domain, extensions to domains, and/or integrations between domains. 4 | 5 | OSLC4JS's goal is to minimize the cost of developing the OSLC specifications, reference implementation and test suites. The OASIS OSLC specifications would also benefit from a reference implementation in dynamic language such as JavaScript. 6 | 7 | ## The OSLC4JS Projects 8 | 9 | The following sections provide a brief description of each OSLC4JS sub-project and provide links to the development sites and related work products. The figure below shows the relationship between the modules created in the projects, and how they are assembled into a Web application. 10 | 11 | ![OSLC4JS Schematic](img/OSLC4JS-schematic.png) 12 | 13 | Adapter middleware in the figure represents some Express.js middleware component that provides CRUD access to some existing data source. This provides a simple way for vendors to provide OSLC access to their data sources without having to implement the details of OSLC and/or LDP. 14 | 15 | A [oslc4js Slack Channel](https://openintegrations.slack.com/archives/oslc4js) has been created to facilitate collaborative development of these Open Source Projects. Documentation and collaboration will be capture in the GitHub Wikis for each of the repositories. GitHub issues will be used to manage the development work. 16 | 17 | Project | Description | More information 18 | ------- | ----------- | ---------------- 19 | [OSLC Browser](https://github.com/OSLC/oslc-browser) | A sample OSLC Web application that uses the OSLC Service to provide a means of browsing OSLC resources. OSLC Browser allows you to configure a connection pool of contributing OSLC servers, and provides a convenient means of browsing the content contributed by those servers. The federation of thigs information is supported by the OSLC service with can also support OSLC domains, extension to domains, integration between domains. This allows the OSLC Browser to act as a federation hub for OSLC resources where stakeholder viewpoints, views (i.e., active dashboards) can be created to support integration needs. | [Mural Design](https://app.mural.ly/t/ibm14/m/ibm14/1452806819730)
[Wiki](https://github.com/OSLC/oslc-browser/wiki) 20 | [OSLC Client API](https://github.com/OSLC/oslc-client) | A simple Node.js asynchronous OSLC client API to facilitate rich application development in JavaScript. This API may be attractive to client developers who wish to access OSLC capabilities and resources through a more logical API abstraction rather than more raw REST services. | [Wiki](https://github.com/OSLC/oslc-client/wiki)
npm package 21 | [OSLC Service](https://github.com/OSLC/oslc-service) | A generic Node.js Express middleware OSLC 3.0 service that can support any domain and can be easily adapted to any applicable data source. This services also utilizes the LDP Service. | [ Wiki](https://github.com/OSLC/oslc-service/wiki)
npm package 22 | [OSLC Server](https://github.com/OSLC/oslc-server) | A minimal OSLC server that uses the oslc-service and ldp-service and can be accessed using a browser REST client. An instance of this server is deployed to IBM Bluemix in order to provide a platform for OSLC experimentation and testing. | [Wiki](https://github.com/OSLC/oslc-server/wiki) 23 | [LDP App](https://github.com/OSLC/ldp-app) | A sample [Linked Data Platform](https://www.w3.org/TR/2015/REC-ldp-20150226/) (LDP) Web application that uses the LDP Service and supports CRUD operations and a graph of linked data. | [Wiki](https://github.com/OSLC/ldp-app/wiki) 24 | [LDP Service](https://github.com/OSLC/ldp-service) | Express middleware providing LDP capabilities to Web apps, with storage of JSON-DL in MongoDB. | [Wiki](https://github.com/OSLC/ldp-service/wiki)
[npm package](https://www.npmjs.com/package/ldp-service) 25 | -------------------------------------------------------------------------------- /_harp/sample-applications-and-code.md: -------------------------------------------------------------------------------- 1 | ## Sample applications 2 | 3 | Having done the [tutorials](./tutorials), if you'd like to explore some existing code, there are a variety of samples and existing applications available to be inspired from. 4 | 5 | * [OSLC 2020 Reference Implementation](https://github.com/oslc-op/refimpl) 6 | * The [iotp-adaptor](./iotp-adaptor-sample) is an OSLC adapter for IBM Watson IoT Platform. This sample provides a thourough user guide, as well as a developer guide covering many topics such as authentication, TRS, using [Lyo Designer](./eclipse_lyo/eclipse-lyo#lyo-designer), etc. 7 | * [Lyo Client sample code](https://github.com/OSLC/lyo-samples) - A Github repository that includes sample code to demonstrates how to use the oslc4j-client in Lyo SDK to interact with OSLC Service Providers in various ways. It addresses a variety of common OSLC use cases including login, OAuth, service discovery, and queries. See the [README.md](https://github.com/OSLC/lyo-samples/blob/master/README.md) file in the repository for further pointers. 8 | * [JIRA OSLC Plugin](https://github.com/Ericsson/jira-oslc-plugin) - is a Lyo-based implementation of an OSLC Server and Client, realized as an OSGI (JIRA) plugin. 9 | * [Hansoft OSLC Adaptor](https://github.com/Ericsson/hansoft-oslc-adapter) - is a Lyo-based implementation of an OSLC adaptor for the product planning tool Hansoft. 10 | * [SharePoint](https://wiki.eclipse.org/Lyo/SharepointAdapter) - This SharePoint adapter looks through the sharepoint OData collections for collections where the ContentType is defined as "Document". For each SharePoint library that contains documents, an OSLC service provider is created with the basic services for OSLC Delegated dialogs for selection and creation as well as listing the documents with a UI preview. 11 | * The [Hudson and Jenkins](https://wiki.eclipse.org/Lyo/JenkinsPlugin) adapor implements the OSLC Automation specification. 12 | * [Simulink](https://wiki.eclipse.org/Lyo/Simulink) 13 | * [MagicDraw](https://wiki.eclipse.org/Lyo/MagicDraw) 14 | * The [Lyo LDP reference implementation](https://wiki.eclipse.org/Lyo/BuildLDPSample) - is a sample Java implementation of the W3C Linked Data Platform 1.0 Candidate Recommendation using JAX-RS (Apache CXF) and Jena TDB. 15 | 16 | 17 | 18 | * The Communications Workgroup has [a list of **Open Source OSLC projects**](https://archive.open-services.net/wiki/communications/Open-source-software-and-tools/) (along with their licenses). 19 | * If you'd like to explore a basic application that provides OSLC Service Provider resources and UI previews, Vijay Kalangumvathakkal of developerWorks [has some simple applications available to download and try out](https://www.ibm.com/developerworks/mydeveloperworks/blogs/69ec672c-dd6b-443d-add8-bb9a9a490eba/entry/build_your_own_serviceprovider_that_provides_resource_preview_based_on_oslc_specifications_in_no_time4?lang=en). 20 | 21 | The [OSLC4Net](https://github.com/OSLC/oslc4net) project includes sample applications if you favor .NET/C#. 22 | -------------------------------------------------------------------------------- /_harp/services-resources-and-design-patterns.md: -------------------------------------------------------------------------------- 1 | The [OSLC Core specification](https://archive.open-services.net/bin/view/Main/OslcCoreSpecification) defines the basic patterns and protocols that any OSLC software must implement. The other workgroups define additional resources or extend existing ones, but they do not add new protocols. 2 | 3 | Here are the major resources defined in the [OSLC Core specification](https://archive.open-services.net/bin/view/Main/OslcCoreSpecification): 4 | 5 | | Resource or Pattern | Description | More information | 6 | | ------------------- | ----------- | ---------------- | 7 | | Service Provider | A resource that describes a collection of resources and tells you how to create new resources, find existing resources, or expose a user interface to do either | [OSLC Primer: Service Provider](https://open-services.net/resources/oslc-primer/#serviceprovider) | 8 | | Resource Paging | A pattern to break long lists of resources into smaller pages, and provide a URL for the next page | [OSLC Primer: Resource Paging](https://open-services.net/resources/oslc-primer/#resource-paging) | 9 | | Queries | Standard query string patterns to retrieve a subset of resources or properties | [OSLC Primer: Query mechanisms](https://open-services.net/resources/oslc-primer/#query-mechanisms) | 10 | | Resource Shapes | Documents that define and describe the properties a resources should have, including acceptable values, cardinality, and whether or not those properties are required | [OSLC Primer: Resource Shapes](https://open-services.net/resources/oslc-primer/#resourceshapes) | 11 | | Creation Factory | A service that creates new resources and (via HTTP `POST`) and may also provide the Resource Shape for new resources | [Core 2.0: Creation Factories](https://archive.open-services.net/bin/view/Main/OslcCoreSpecification#Creation_Factories) 12 | | Service Provider Catalog | A resources that lists a set of ServiceProviders | [OSLC Primer: ServiceProvider](https://open-services.net/resources/oslc-primer/#serviceprovider) | 13 | | Delegated User Interface (UI) dialogs | A method for embedding an interface to create or find resources inside another tool | [OSLC Primer: Delegated UI dialogs](https://open-services.net/resources/oslc-primer/#delegated-user-interface-dialogs) | 14 | | UI Previews | A method for discovering and displaying a preview of a resource in another tool | [OSLC Primer: UI Preview](https://open-services.net/resources/oslc-primer/#ui-preview) | 15 | 16 | 17 | To explore some of our other specifications, the OSLC Core Workgroup maintains [a list of OSLC vocabularies and specifications](https://archive.open-services.net/wiki/core/Vocabulary-index/) that includes relationship diagrams. 18 | -------------------------------------------------------------------------------- /_harp/technical-foundations.md: -------------------------------------------------------------------------------- 1 | To build software that supports OSLC, you should be familiar with the following concepts: 2 | 3 | ### Linked data 4 | 5 | [Linked data](http://www.w3.org/DesignIssues/LinkedData.html) is the main technical foundation of all of our specifications. The video below provides a brief overview of the value of linked data and how we implement it with OSLC: 6 | 7 | 8 | 9 | If you're new to linked data and RDF, we've put together [a playlist of videos](https://archive.open-services.net/resources/videos/linked-data-and-rdf-overview-playlist/) that can help you catch up. 10 | 11 | 12 | ### RESTful web architecture and HTTP 13 | 14 | You should be familiar with designing [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer#Architectural_constraints) applications. 15 | 16 | For a quick primer, we recommend [“Learn REST” by Dr. M. Elkstein](http://rest.elkstein.org/), particularly these sections: 17 | 18 | 1. [What is REST?](http://rest.elkstein.org/2008/02/what-is-rest.html) 19 | 2. [REST as Lightweight Web Services](http://rest.elkstein.org/2008/02/rest-as-lightweight-web-services.html) 20 | 3. [How Simple is REST?](http://rest.elkstein.org/2008/02/how-simple-is-rest.html) 21 | 4. [More Complex REST Requests](http://rest.elkstein.org/2008/02/more-complex-rest-requests.html) 22 | 5. [REST Server Responses](http://rest.elkstein.org/2008/02/rest-server-responses.html) 23 | 24 | For OSLC implementations, you must use [HTTP protocol](http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol). 25 | 26 | 27 | ### RDF, Turtle, JSON, and HTML 28 | 29 | We require services and resources to be represented in [**RDF**](http://www.w3.org/RDF/), but you might prefer to supplement that with a variety of machine-readable and human-readable formats like Turtle, JSON, or HTML. 30 | 31 | Instead of string parsing and regular expressions, you will definitely want to explore using an RDF parser such as [Apache Jena](http://jena.apache.org/). 32 | 33 | 34 | ### OAuth 35 | 36 | OSLC does not require OAuth, but it is the most common approach for managing authentication between clients. 37 | -------------------------------------------------------------------------------- /_harp/tutorials.md: -------------------------------------------------------------------------------- 1 | ## Tutorials 2 | 3 | 1. The [walkthrough tutorial](integrating_products_with_oslc) walks you through a working adapter that adds OSLC Change Management support to Bugzilla and a simple consumer application. You will work with a fully developed adapter, with no need to code. 4 | 5 | 1. The [hands-on tutorial](https://github.com/eclipse/lyo.docs/blob/master/lyo-rest-workshop/Lyo_OSLC_Workshop.pdf) takes you through the incremental programming steps to enable Bugzilla as an OSLC-CM service provider. 6 | -------------------------------------------------------------------------------- /_harp/why-develop-oslc-applications.md: -------------------------------------------------------------------------------- 1 | Integrating software is hard; we want it to be easier. And we need your help. 2 | 3 | [We define standardized ways](https://open-services.net/specifications/) to represent common resources in software development (for example, a defect or a performance test). We also define standardized methods to allow other applications to access, display, preview, find, create, and update those resources. 4 | 5 | With standardized resources and methods, any tool can access and manipulate the data and artifacts from any other compliant tool. So instead of a variety of fragile point-to-point integrations you have **one common way to connect and integrate [many products](https://archive.open-services.net/software/)**. It's not quite plug-and-play, but it's close. 6 | 7 | **We want OSLC to succeed because better and easier integrations will save everyone time and money**. And we think that software with OSLC integration has a competitive advantage. 8 | 9 | Don't just take our word for it. [Icaro Technologies](https://archive.open-services.net/resources/presentations/reducing-system-integration-costs-with-oslc-and-data-federation/) estimated that they could have saved *two million dollars* over two years if they used OSLC standards for a project with more than 10 integrations. And major industry groups like [SPRINT](http://www.sprint-iot.eu/) and [EADS (Airbus)](https://www.airbus.com/en/what-we-do/protect) have decided that OSLC-compliant software can help them collaborate and verify requirements [on highly complex products like commercial airplanes](https://archive.open-services.net/resources/videos/concurrent-engineering-for-systems-based-on-oslc). 10 | 11 | OSLC specifications are *free to adopt*, and we want them to spread. So help us out! 12 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/.nojekyll -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | Learn to develop OSLC applications
-------------------------------------------------------------------------------- /docs/eclipse_lyo/images/CreateMavenAdaptorProject_CodeStructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/CreateMavenAdaptorProject_CodeStructure.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/CreateMavenAdaptorProject_Step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/CreateMavenAdaptorProject_Step1.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/CreateMavenAdaptorProject_Step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/CreateMavenAdaptorProject_Step2.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/CreateMavenAdaptorProject_Step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/CreateMavenAdaptorProject_Step3.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/Lyo-ToolchainModelValidation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/Lyo-ToolchainModelValidation.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoModels-ThreeInOne-P1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoModels-ThreeInOne-P1.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoModels-ThreeInOne-P2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoModels-ThreeInOne-P2.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoModels-ThreeInOne-P3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoModels-ThreeInOne-P3.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoModels-ThreeInOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoModels-ThreeInOne.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoToolchainModel-AdaptorInterfaceDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoToolchainModel-AdaptorInterfaceDiagram.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoToolchainModel-SpecificationDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoToolchainModel-SpecificationDiagram.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/LyoToolchainModel-ToolchainDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/LyoToolchainModel-ToolchainDiagram.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/images/OSLCToolAdaptorMetalModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/eclipse_lyo/images/OSLCToolAdaptorMetalModel.png -------------------------------------------------------------------------------- /docs/eclipse_lyo/lyo-as-osgi-bundles.html: -------------------------------------------------------------------------------- 1 | Learn to develop OSLC applications
-------------------------------------------------------------------------------- /docs/eclipse_lyo/lyo-core-internals.html: -------------------------------------------------------------------------------- 1 | Learn to develop OSLC applications
-------------------------------------------------------------------------------- /docs/img/OSLC4JS-schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/img/OSLC4JS-schematic.png -------------------------------------------------------------------------------- /docs/img/logo-new-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/img/logo-new-big.png -------------------------------------------------------------------------------- /docs/img/logo-new-mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/img/logo-new-mobile.png -------------------------------------------------------------------------------- /docs/img/logo-old-50px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/img/logo-old-50px.png -------------------------------------------------------------------------------- /docs/img/logo-old-big.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/img/logo-old-big.gif -------------------------------------------------------------------------------- /docs/img/logo-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/img/logo-old.png -------------------------------------------------------------------------------- /docs/integrating_products_with_oslc/integrating_with_oslc_tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/integrating_products_with_oslc/integrating_with_oslc_tutorial.pdf -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Bluemix-Domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Bluemix-Domain.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/CE4IoTConnector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/CE4IoTConnector.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/CRUD-Operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/CRUD-Operations.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/CoreDiscovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/CoreDiscovery.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Creation-Dialogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Creation-Dialogs.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Creation-Factories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Creation-Factories.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Device-BasicCapability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Device-BasicCapability.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/DeviceType-Creation-Factory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/DeviceType-Creation-Factory.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Generate-the-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Generate-the-code.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Generated-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Generated-project.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/IoT-Platform-Domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/IoT-Platform-Domain.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/LQE-process-resources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/LQE-process-resources.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Project-Dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Project-Dependencies.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Query-Capability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Query-Capability.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/Selection-Dialogs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/Selection-Dialogs.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/images/authenticating-with-oauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/images/authenticating-with-oauth.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/artifact-container-associations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/artifact-container-associations.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/bluemix-ontology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/bluemix-ontology.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/concepts-detailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/concepts-detailed.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/iot-and-bluemix-packages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/iot-and-bluemix-packages.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/iotp-ontology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/iotp-ontology.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/link-requirement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/link-requirement.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/preview-in-dng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/preview-in-dng.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/sample-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/sample-preview.png -------------------------------------------------------------------------------- /docs/iotp_adaptor/userGuide/images/sample-selection-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSLC/developing-oslc-applications/0f0a0e3442112b3f61f6b15acdca9e9c117361ba/docs/iotp_adaptor/userGuide/images/sample-selection-dialog.png -------------------------------------------------------------------------------- /docs/js/lib/$.js: -------------------------------------------------------------------------------- 1 | // https://github.com/remy/min.js 2 | /*globals Node:true, NodeList:true*/ 3 | $ = (function (document, window, $) { 4 | // Node covers all elements, but also the document objects 5 | var node = Node.prototype, 6 | nodeList = NodeList.prototype, 7 | forEach = 'forEach', 8 | trigger = 'trigger', 9 | each = [][forEach], 10 | // note: createElement requires a string in Firefox 11 | dummy = document.createElement('i'); 12 | 13 | nodeList[forEach] = each; 14 | 15 | // we have to explicitly add a window.on as it's not included 16 | // in the Node object. 17 | window.on = node.on = function (event, fn) { 18 | this.addEventListener(event, fn, false); 19 | 20 | // allow for chaining 21 | return this; 22 | }; 23 | 24 | nodeList.on = function (event, fn) { 25 | this[forEach](function (el) { 26 | el.on(event, fn); 27 | }); 28 | return this; 29 | }; 30 | 31 | // we save a few bytes (but none really in compression) 32 | // by using [trigger] - really it's for consistency in the 33 | // source code. 34 | window[trigger] = node[trigger] = function (type, data) { 35 | // construct an HTML event. This could have 36 | // been a real custom event 37 | var event = document.createEvent('HTMLEvents'); 38 | event.initEvent(type, true, true); 39 | event.data = data || {}; 40 | event.eventName = type; 41 | event.target = this; 42 | this.dispatchEvent(event); 43 | return this; 44 | }; 45 | 46 | nodeList[trigger] = function (event) { 47 | this[forEach](function (el) { 48 | el[trigger](event); 49 | }); 50 | return this; 51 | }; 52 | 53 | $ = function (s) { 54 | // querySelectorAll requires a string with a length 55 | // otherwise it throws an exception 56 | var r = document.querySelectorAll(s || '☺'), 57 | length = r.length; 58 | // if we have a single element, just return that. 59 | // if there's no matched elements, return a nodeList to chain from 60 | // else return the NodeList collection from qSA 61 | return length == 1 ? r[0] : r; 62 | }; 63 | 64 | // $.on and $.trigger allow for pub/sub type global 65 | // custom events. 66 | $.on = node.on.bind(dummy); 67 | $[trigger] = node[trigger].bind(dummy); 68 | 69 | return $; 70 | })(document, this); -------------------------------------------------------------------------------- /docs/js/lib/delegate.js: -------------------------------------------------------------------------------- 1 | // https://github.com/remy/min.js 2 | // usage: $('body').delegate('li > a', 'click', fn); 3 | 4 | Node.prototype.delegate = function (selector, event, fn) { 5 | var matches = this.mozMatchesSelector || this.webkitMatchesSelector || this.oMatchesSelector || this.matchesSelector || (function (selector) { 6 | // support IE10 (basically) 7 | var target = this, 8 | elements = $(selector), 9 | match = false; 10 | if (elements instanceof NodeList) { 11 | elements.forEach(function (el) { 12 | if (el === target) match = true; 13 | }); 14 | } else if (elements === target) { 15 | match = true; 16 | } 17 | 18 | return match; 19 | }); 20 | 21 | this.on(event, function (event) { 22 | if (matches.call(event.target, selector)) { 23 | fn.call(event.target, event); 24 | } 25 | }); 26 | 27 | return this; 28 | }; -------------------------------------------------------------------------------- /docs/js/lib/polyfills/classlist.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Via Remy Sharp's Polyfill project 3 | * https://github.com/remy/polyfills 4 | */ 5 | (function () { 6 | 7 | if (typeof window.Element === "undefined" || "classList" in document.documentElement) return; 8 | 9 | // adds indexOf to Array prototype for IE support 10 | if (!Array.prototype.indexOf) { 11 | Array.prototype.indexOf = function(obj, start) { 12 | for (var i = (start || 0), j = this.length; i < j; i++) { 13 | if (this[i] === obj) { return i; } 14 | } 15 | return -1; 16 | } 17 | } 18 | 19 | var prototype = Array.prototype, 20 | indexOf = prototype.indexOf, 21 | slice = prototype.slice, 22 | push = prototype.push, 23 | splice = prototype.splice, 24 | join = prototype.join; 25 | 26 | function DOMTokenList(el) { 27 | this._element = el; 28 | if (el.className != this._classCache) { 29 | this._classCache = el.className; 30 | 31 | if (!this._classCache) return; 32 | 33 | // The className needs to be trimmed and split on whitespace 34 | // to retrieve a list of classes. 35 | var classes = this._classCache.replace(/^\s+|\s+$/g,'').split(/\s+/), 36 | i; 37 | for (i = 0; i < classes.length; i++) { 38 | push.call(this, classes[i]); 39 | } 40 | } 41 | }; 42 | 43 | function setToClassName(el, classes) { 44 | el.className = classes.join(' '); 45 | } 46 | 47 | DOMTokenList.prototype = { 48 | add: function(token) { 49 | if(this.contains(token)) return; 50 | push.call(this, token); 51 | setToClassName(this._element, slice.call(this, 0)); 52 | }, 53 | contains: function(token) { 54 | return indexOf.call(this, token) !== -1; 55 | }, 56 | item: function(index) { 57 | return this[index] || null; 58 | }, 59 | remove: function(token) { 60 | var i = indexOf.call(this, token); 61 | if (i === -1) { 62 | return; 63 | } 64 | splice.call(this, i, 1); 65 | setToClassName(this._element, slice.call(this, 0)); 66 | }, 67 | toString: function() { 68 | return join.call(this, ' '); 69 | }, 70 | toggle: function(token) { 71 | if (!this.contains(token)) { 72 | this.add(token); 73 | } else { 74 | this.remove(token); 75 | } 76 | 77 | return this.contains(token); 78 | } 79 | }; 80 | 81 | window.DOMTokenList = DOMTokenList; 82 | 83 | function defineElementGetter (obj, prop, getter) { 84 | if (Object.defineProperty) { 85 | Object.defineProperty(obj, prop,{ 86 | get : getter 87 | }) 88 | } else { 89 | obj.__defineGetter__(prop, getter); 90 | } 91 | } 92 | 93 | defineElementGetter(Element.prototype, 'classList', function () { 94 | return new DOMTokenList(this); 95 | }); 96 | 97 | })(); -------------------------------------------------------------------------------- /docs/js/oslc.js: -------------------------------------------------------------------------------- 1 | window.site_url = window.site_url || "/"; 2 | 3 | /** 4 | * Cut the mustard 5 | */ 6 | if ( 7 | "querySelector" in document && 8 | "localStorage" in window && 9 | "addEventListener" in window 10 | ) { 11 | /* Catch console.log errors. You are welcome. */ 12 | if (!window.console) { 13 | window.console = { 14 | log: function () {}, 15 | }; 16 | } 17 | 18 | var OSLC = { 19 | init: function () { 20 | // 21 | // SUPER SIMPLE CLASS TOGGLER 22 | // 23 | // On an element, add data-toggle-class="%class string%" 24 | // Set the target with a CSS selector data-toggle-target="%selector string%" 25 | // 26 | 27 | document.delegate( 28 | "[data-toggle-class], [data-toggle-class] > *", 29 | "click", 30 | function () { 31 | var targetEl = this.getAttribute("data-toggle-class") 32 | ? this 33 | : this.parentElement; 34 | var toggleClass = targetEl.getAttribute("data-toggle-class"); 35 | var toggleTarget = targetEl.getAttribute("data-toggle-target"); 36 | 37 | toggleTarget && $(toggleTarget).classList.toggle(toggleClass); 38 | } 39 | ); 40 | 41 | this.makeFluidVideos(); 42 | }, 43 | 44 | // 45 | // FLUID VIDEOS 46 | // 47 | // Wraps youtube/vimeo iframes in a div.fluid-video class 48 | // 49 | makeFluidVideos: function () { 50 | var videos = document.querySelectorAll( 51 | 'iframe[src*="youtube"], iframe[src*="vimeo"]' 52 | ); 53 | var fluidVidTemplate = _.template( 54 | '
><%= video %>
' 55 | ); 56 | 57 | // Filter out .no-resize videos 58 | videos = _.reject(videos, function (vid) { 59 | return vid.classList.contains("no-resize"); 60 | }); 61 | 62 | _.each(videos, function (vid) { 63 | var data = { 64 | style: 65 | 'style="padding-bottom: ' + (vid.height / vid.width) * 100 + '%;"', 66 | video: vid.outerHTML, 67 | }; 68 | 69 | // Replace the videos HTML with the new template 70 | vid.outerHTML = fluidVidTemplate(data); 71 | }); 72 | }, 73 | }; 74 | 75 | var polyfills = ["classlist"]; 76 | var libraries = ["underscore", "$", "delegate"]; 77 | var load = []; 78 | 79 | polyfills.forEach(function (test) { 80 | Modernizr[test] || 81 | load.push(window.site_url + "js/lib/polyfills/" + test + ".js"); 82 | }); 83 | 84 | libraries.forEach(function (lib) { 85 | load.push(window.site_url + "js/lib/" + lib + ".js"); 86 | }); 87 | 88 | Modernizr.load({ 89 | load: load, 90 | // must .bind to own object, as this will get called in the window context 91 | complete: OSLC.init.bind(OSLC), 92 | }); 93 | } 94 | 95 | // http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ 96 | var anchorForId = function (id) { 97 | var anchor = document.createElement("a"); 98 | anchor.className = "header-link"; 99 | anchor.href = "#" + id; 100 | anchor.innerHTML = ''; 101 | return anchor; 102 | }; 103 | 104 | // https://gist.github.com/codeguy/6684588 105 | var slugify = function (string) { 106 | const a = 107 | "àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;"; 108 | const b = 109 | "aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------"; 110 | const p = new RegExp(a.split("").join("|"), "g"); 111 | 112 | return string 113 | .toString() 114 | .toLowerCase() 115 | .replace(/\s+/g, "-") // Replace spaces with - 116 | .replace(p, (c) => b.charAt(a.indexOf(c))) // Replace special characters 117 | .replace(/&/g, "-and-") // Replace & with 'and' 118 | .replace(/[^\w\-]+/g, "") // Remove all non-word characters 119 | .replace(/\-\-+/g, "-") // Replace multiple - with single - 120 | .replace(/^-+/, "") // Trim - from start of text 121 | .replace(/-+$/, ""); // Trim - from end of text 122 | }; 123 | 124 | var linkifyAnchors = function (level, containingElement) { 125 | var headers = containingElement.getElementsByTagName("h" + level); 126 | for (var h = 0; h < headers.length; h++) { 127 | var header = headers[h]; 128 | 129 | if (typeof header.id == "undefined" || header.id == "") { 130 | header.id = slugify(header.innerText); 131 | } 132 | header.appendChild(anchorForId(header.id)); 133 | } 134 | }; 135 | 136 | document.onreadystatechange = function () { 137 | if (this.readyState === "complete") { 138 | var contentBlock = document.getElementsByClassName("copy")[0]; 139 | if (!contentBlock) { 140 | return; 141 | } 142 | for (var level = 1; level <= 6; level++) { 143 | linkifyAnchors(level, contentBlock); 144 | } 145 | } 146 | }; 147 | -------------------------------------------------------------------------------- /docs/technical-foundations.html: -------------------------------------------------------------------------------- 1 | Technical foundations
-------------------------------------------------------------------------------- /docs/tutorials.html: -------------------------------------------------------------------------------- 1 | Tutorials
-------------------------------------------------------------------------------- /docs/why-develop-oslc-applications.html: -------------------------------------------------------------------------------- 1 | Why develop OSLC applications?
--------------------------------------------------------------------------------