This wiki is locked. Future workgroup activity and specification development must take place at our new wiki. For more information, see this blog post about the new governance model and this post about changes to the website.

Multi-typed resources


A single resource (single URI) can be considered an oslc-am:Resource and an oslc-rm:Requirement at the same time. We are assuming that domains defining resource types do not associated conflicting semantics with properties that happen to be common (nor cardinalities).

Also assuming a service provider is explicity designed to permit multi-typed resources.

Here is a minimal resource that is both an AM Resource and an RM Requirement:

<rdf:RDF 
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   
  xmlns:dcterms="http://purl.org/dc/terms/"   >

<rdf:Description rdf:about="http://acme.com/oslc-am/resource/1">
   <rdf:type rdf:resource="http://open-services.net/ns/am#Resource" />
   <rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement" />

    <dcterms:title>Admin Login</dcterms:title>

    <!-- system managed properties -->
    <dcterms:identifier>1</dcterms:identifier>

</rdf:Description>

</rdf:RDF>

If each domain adds its own properties the union of these might appear like this:

<rdf:RDF 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"    
   xmlns:dcterms="http://purl.org/dc/terms/"    
   xmlns:oslc_am="http://open-services.net/ns/am#"
   xmlns:uml="http://omg.org/uml2/" 
   xmlns:oslc_rm="http://open-services.net/ns/rm#" >

<rdf:Description rdf:about="http://acme.com/oslc-am/resource/1">
   <rdf:type rdf:resource="http://open-services.net/ns/am#Resource" />
   <rdf:type rdf:resource="http://omg.org/uml2/UseCase" />
   <rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement" />

   <!--  the following are common properties to all types  -->
   <dcterms:title>Admin Login</dcterms:title>
   <dcterms:description>
     The administrator uses a special menu to log in with admin priv.  The system responds
     with the admin menu on succesful login.  The normal user options are not available. 
   </dcterms:description>
    
   <!--  the following are AM resource and UML Use Case properties --> 
   <dcterms:type>Use Case</dcterms:type>
   <dcterms:source rdf:resource="http://acme.com/oslc-am/source/2"/>
   <uml:generalizes rdf:resource="http://acme.com/oslc-am/resource/3"/>

   <!--  the following is an RM property -->
   <oslc_rm:elaboratedBy rdf:resource="http://acme.com/oslc-am/resource/4" />
     
   <!--  system managed properties -->
   <dcterms:identifier>1</dcterms:identifier>

</rdf:Description>

</rdf:RDF>

Issues:

  • when a client GETs the resource, do all the properties (from all the domains) get returned (when no oslc filter is applied)?
  • what should the instance shape look like for multi-typed resources?
  • do we use multiple shapes and types on creation factories and query capablity?
  • when modifying the resource is the client is responsible for also including any property it doesn't understand (this is already stated in the specs).
  • can a client request only the properties associated with one type?
  • when a client asks for an HTML response is there one canonical HTML format for a resource of multiple types? Should we allow different UI look and feels depending on the resource type? How can a client request a specific 'shell' UI when making a HTML representation request?
  • when a client asks for the UI preview, what information is to go into it. Clearly depending on the type of the resource the information in the compact rendering could be completely different.

Bleeding Edge Scenarios

  • Can a service provider manage a multi-typed resource where the types share a property, but the value or range is different (one type allowing multiple values the other only allowing one)? If so what is a client expecting only the one type (which allows for a single value) and it gets returned multiple values?

.

Topic revision: r2 - 21 Dec 2010 - 15:30:16 - JimConallen
 
This site is powered by the TWiki collaboration platform Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use
Ideas, requests, problems regarding this site? Send feedback