Topic
  • 5 replies
  • Latest Post - ‏2012-09-06T12:39:06Z by josha
KraichoKraichev
KraichoKraichev
1 Post

Pinned topic OSDP TIP + RDF/XML Portlet Suggestion

‏2012-05-10T13:06:20Z |
Hello,

I would like to share our experience with OSDP, in particular using TIP to display HTML UI Components, the URLs for which are returned in RDF/XML payload by either the Registry itself or another RESTful service. The URLs being stored this way allow us to just change the XML/RDF payload whenever we want to switch the HTML UI Components with different ones.
Our idea was to place the different UI Components in one page allowing easy access in TIP. In order to do that we found that the portlet we need is Web Widget, which only allows to display a fixed URL. That leaves us with two options:
1. Use Web Widgets pointing directly to our current URLs, completely skipping over the Registry/RESTful service that manages them
2. Create additional RESTful Web Services that parse RDF/XML content from the Registry/RESTful service, extract the appropriate URL and return its content

This made us think that maybe having a way to directly integrate TIP with the Registry, such as a portlet that allows extracting useful resources from RDF/XML content and making them available for use in other portlets would be a nice thing to have.
Updated on 2012-09-06T12:39:06Z at 2012-09-06T12:39:06Z by josha
  • kparz
    kparz
    2 Posts

    Re: OSDP TIP + RDF/XML Portlet Suggestion

    ‏2012-05-17T19:55:24Z  
    Hello,

    Would you mind expanding a bit on what you mean by the URLs to show your HTML components? Are you referring to the resource URIs, OSLC UI Previews, or some other URL being stored in the RDF? For example, is the URL a property of the resources you are registering in the registry? I'm trying to get a better idea of how that URL is changing.

    Thank you!
  • IvanIliev
    IvanIliev
    4 Posts

    Re: OSDP TIP + RDF/XML Portlet Suggestion

    ‏2012-06-15T08:35:04Z  
    • kparz
    • ‏2012-05-17T19:55:24Z
    Hello,

    Would you mind expanding a bit on what you mean by the URLs to show your HTML components? Are you referring to the resource URIs, OSLC UI Previews, or some other URL being stored in the RDF? For example, is the URL a property of the resources you are registering in the registry? I'm trying to get a better idea of how that URL is changing.

    Thank you!
    Hello,

    Sorry for the very late response, I just did not realize you replied until we talked on monday.
    Anyway, I hope this can shed some light on how thing were done. Short answer is yes we did use OSLC UI Previews, but we also used URLs stored in the RDF to generate our Compact XML payload. More detailed explanation:

    1. We have Registration Records with the rr:sourceRecord property set to the URL of our UI components.
    2. We have another service which uses these records to extract the appropriate UI HTML files and expose as them and also generates OSLC UI Preview Compact XML that points to the newly exposed HTML files.

    So if we want to plug TIP after point 1. we'd have to extract the sourceRecord URLs from the RDFs and display them.
    If we want to plug TIP after point 2. we'd have to extract the small or largePreview URLs from the Compact XMLs and display them.

    I guess one could either have only step 1 or step 2 instead of both as we currently do.

    Hope this clears it up, if not I'll monitor this thread and try to answer any other questions you may have.

    Have a nice day :)
  • kparz
    kparz
    2 Posts

    Re: OSDP TIP + RDF/XML Portlet Suggestion

    ‏2012-06-15T18:53:09Z  
    • IvanIliev
    • ‏2012-06-15T08:35:04Z
    Hello,

    Sorry for the very late response, I just did not realize you replied until we talked on monday.
    Anyway, I hope this can shed some light on how thing were done. Short answer is yes we did use OSLC UI Previews, but we also used URLs stored in the RDF to generate our Compact XML payload. More detailed explanation:

    1. We have Registration Records with the rr:sourceRecord property set to the URL of our UI components.
    2. We have another service which uses these records to extract the appropriate UI HTML files and expose as them and also generates OSLC UI Preview Compact XML that points to the newly exposed HTML files.

    So if we want to plug TIP after point 1. we'd have to extract the sourceRecord URLs from the RDFs and display them.
    If we want to plug TIP after point 2. we'd have to extract the small or largePreview URLs from the Compact XMLs and display them.

    I guess one could either have only step 1 or step 2 instead of both as we currently do.

    Hope this clears it up, if not I'll monitor this thread and try to answer any other questions you may have.

    Have a nice day :)
    Hi,

    Thanks for the response. OK, I do have some more questions on your details. :)

    When you said:
    >So if we want to plug TIP after point 1. we'd have to extract the sourceRecord URLs from the RDFs and display them.
    I'm assuming the sourceRecord represents some resource, and you use the sourceRecord URL to issue an HTTP GET using the accept header "application/x-oslc-compact+xml" to lookup the Compact XML?

    In the first post, when you said:
    >a portlet that allows extracting useful resources from RDF/XML content
    Are you envisioning a navigator that allows navigation of Registration Records from the Registry service? Is your thought that it would extract all the sourceRecords that may be in the Registration Record and send them to other portlets on the page?

    Have a great weekend!
  • IvanIliev
    IvanIliev
    4 Posts

    Re: OSDP TIP + RDF/XML Portlet Suggestion

    ‏2012-06-18T08:12:26Z  
    • kparz
    • ‏2012-06-15T18:53:09Z
    Hi,

    Thanks for the response. OK, I do have some more questions on your details. :)

    When you said:
    >So if we want to plug TIP after point 1. we'd have to extract the sourceRecord URLs from the RDFs and display them.
    I'm assuming the sourceRecord represents some resource, and you use the sourceRecord URL to issue an HTTP GET using the accept header "application/x-oslc-compact+xml" to lookup the Compact XML?

    In the first post, when you said:
    >a portlet that allows extracting useful resources from RDF/XML content
    Are you envisioning a navigator that allows navigation of Registration Records from the Registry service? Is your thought that it would extract all the sourceRecords that may be in the Registration Record and send them to other portlets on the page?

    Have a great weekend!
    Hi,

    The sourceRecord, currently in our setup, is just an URL pointing to a service that returns payload containing the HTML for smallPreview and largePreview. But in the general sense of the suggestion we consider that it links directly to an HTML UI Component.

    What we were thinking is something similar to the web widget that can be configured by specifying resource record urls(maybe even allowing oslc queries) and in which XML/RDF element to look for the HTML UI Component URL to display.

    Of course this was just a rough idea and a suggestion that crossed our mind. I think once you get a complete understanding of what we meant you guys can figure out the best way to design such a portlet or decide if such a use case is relevant enough to be considered.

    Have a nice day!
  • josha
    josha
    1 Post

    Re: OSDP TIP + RDF/XML Portlet Suggestion

    ‏2012-09-06T12:39:06Z  
    • IvanIliev
    • ‏2012-06-18T08:12:26Z
    Hi,

    The sourceRecord, currently in our setup, is just an URL pointing to a service that returns payload containing the HTML for smallPreview and largePreview. But in the general sense of the suggestion we consider that it links directly to an HTML UI Component.

    What we were thinking is something similar to the web widget that can be configured by specifying resource record urls(maybe even allowing oslc queries) and in which XML/RDF element to look for the HTML UI Component URL to display.

    Of course this was just a rough idea and a suggestion that crossed our mind. I think once you get a complete understanding of what we meant you guys can figure out the best way to design such a portlet or decide if such a use case is relevant enough to be considered.

    Have a nice day!
    In the latest drop of Jazz for Service Management, the Web Widget has been updated to allow for dynamic URL substitution. This may allow you to achieve your goals. Below is the information for configuring custom UI's in TIP which can be updated based on context from other portlets.

    1) Create a page in TIP, and add a Web Widget to it.
    2) Edit the settings for the Web Widget and configure it to a URL that displays information contextually.
    The URL can contain substitutable parameters. For example:
    http://myhost:8080/myPage.jsp?city=%%City%%

    In this example, %%City%% is substituted at runtime based on context received via an event from another portlet.

    3) Add another portlet, such as the List, to the page that can send context to the web page displayed by the Web Widget.
    4) Click on an entry in the List and the Web Widget will update.

    Several widgets can send context, such as the List widget, Charts, etc. You can configure the List to show information from a data provider, such as TBSM, or custom data using Tivoli Directory Integrator. The names of the columns used to show data will be sent in the event when the user clicks on the item in the list. It is up to the data set providing the data and the web page displayed in the Web Widget to make sure that the parameter names match. In this case, the parameter name is City, supplied by the data set to the List portlet. When you click on an item in the List, the value of the selected City is sent to the Web Widget and the URL displayed by the Web Widget gets %%City%% subsituted with the real value.

    In your JSP, you can retrieve the context with some markup, such as the following:

    Welcome to City: <%=request.getParameter("city")%>