Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Template vocabulary"

(Classes)
(authority)
 
(174 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#eclipseproject:technology.higgins|eclipse_custom_style.css}} [[Image:Higgins logo 76Wx100H.jpg|right]]
+
{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}
  
 
Vocabulary to describe a Template Context. Contains information necessary to dynamically instantiate regular contexts. Part of the [[Persona Data Model 2.0]].  
 
Vocabulary to describe a Template Context. Contains information necessary to dynamically instantiate regular contexts. Part of the [[Persona Data Model 2.0]].  
  
=== Files ===
+
== Files ==
 
* Most recently [http://www.eclipse.org/higgins/ontologies/2010/6/template published]
 
* Most recently [http://www.eclipse.org/higgins/ontologies/2010/6/template published]
 
* SVN source: [https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/H2/org.eclipse.higgins.ontology/template.owl template.owl]
 
* SVN source: [https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/H2/org.eclipse.higgins.ontology/template.owl template.owl]
Line 9: Line 9:
 
==UML Overview ==
 
==UML Overview ==
  
[[Image:Template 2.0.104.png|center]]
+
[[Image:Template-2.0.122.png|center]]
 +
 
 +
==Overview==
 +
TemplateContexts are used to instantiate both regular contexts and connector contexts mentioned here: [[Persona Data Model 2.0]]. The AppTemplate subclass of TemplateContext (itself a subclass of ctxt:Context) is used to describe the former, and the ConnectionTemplate subclass of TemplateContext, the latter. TemplateContexts have an optional policy attribute whose value is an an instance of DataPolicy.
 +
 
 +
=== AppTemplate ===
 +
 
 +
An AppTemplate is a template for an app. An app is a PDS add-on. Apps run within a PDS-provided runtime environment. Apps have read (and potentially write) access to a specific set of attributes within the PDS. An AppTemplate is a TemplateContext subclass with a ContextPrototype instance that describes a context to be used to support an app.
 +
* subClassOf TemplateContext
 +
* 1..1 app App
 +
 
 +
====App====
 +
Abstract class. A prototype of a context instance that holds app-specific data (e.g. Person entity) if any. Subclasses reference active content (aka code).
 +
* subclass of ContextPrototype
 +
* 1..1 description--human friendly text that describes this app/view/context
 +
* 0..1 viewRoot (inherited) - value is a structure created using the [[View-builder vocabulary]] that describes how to dynamically construct a UI to view and/or edit the attributes of this context.
 +
* 0..1 settingsViewRoot (inherited) - value is a structure created using the [[View-builder vocabulary]] that describes how to dynamically construct a UI to view and/or edit administrative settings related to the JavaScript app (if present)
 +
 
 +
The instantiated context of an AppTemplate TemplateContext is a place where the JavaScript of the app can persist new attributes if needed. Apps use an API that may update the values of attributes in other contexts.
 +
 
 +
=== ConnectionTemplate ===
 +
 
 +
A TemplateContext containing two ContextPrototypes instances that describe connector context(s) in a relationship. In some cases only a single ''Participant'' context is instantiated, in others a ''Participant/Definer'' pair is instantiated.
 +
 
 +
The '''Definer''' ContextPrototype instance has the following attributes:
 +
* 0..1 viewRoot - value is a structure created using the [[View-builder vocabulary]] that describes how to dynamically construct a UI to view and/or edit the attributes of this context.
 +
* 0..1 settingsViewRoot - value is a structure created using the [[View-builder vocabulary]] that describes how to dynamically construct a UI to view and/or edit administrative settings related to the JavaScript app (if present)
 +
 
 +
The '''Participant''' ContextPrototype instance has the following attributes:
 +
* 0..1 templateRole - value is a default Role to assign to the new p:Person instance in the newly instantiated context
 +
in the relationship for which the participant is authoritative and may optionally decide to provide
 +
* 0..1 viewRoot - value is a structure created using the [[View-builder vocabulary]] that describes how to dynamically construct a UI to view and/or edit the attributes of this context.
 +
* 0..1 settingsViewRoot - value is a structure created using the [[View-builder vocabulary]] that describes how to dynamically construct a UI to view and/or edit administrative settings related to the JavaScript app (if present)
 +
 
 +
====Example====
 +
Below is an example of a ConnectionTemplate. See ([https://dev.eclipse.org/svnroot/technology/org.eclipse.higgins/trunk/H2/org.eclipse.higgins.ontology/templates/nytimes.com.n3 nytimes.com.n3] for details):
 +
 
 +
Here is the ConnectionTemplate (Note: the image value is truncated):
 +
 
 +
  <http://www.eclipse.org/higgins/ontologies/examples/nytimes.com>
 +
      a      template:ConnectionTemplate , owl:Ontology ;
 +
      template:participant
 +
              :WebsiteFacade_1 ;
 +
      template:proxyClass proxy:WebLogin ;
 +
      proxy:connectionType proxy:News ;
 +
      proxy:domain "nytimes.com"^^xsd:string ;
 +
      proxy:externalResource
 +
              "http://nytimes.com"^^xsd:anyURI ;
 +
      proxy:image "329849238457234523453454"^^xsd:base64Binary ;
 +
      proxy:imageType "JPG"^^xsd:string ;
 +
      owl:imports <http://www.eclipse.org/higgins/ontologies/2011/2/view-builder> ,
 +
      <http://www.eclipse.org/higgins/ontologies/2010/6/fp> ,
 +
      <http://www.eclipse.org/higgins/ontologies/2010/6/template> ;
 +
      skos:prefLabel "NYTimes ConnectionTemplate"^^xsd:string .
 +
 
 +
 
 +
Here is the definer WebsiteFacade:Participant (Note: the actual code of the JavaScript has been omitted). See [[App-data vocabulary]] for a complete example of a WebsiteFacade object:
 +
 
 +
  :WebsiteFacade_1
 +
      rdf:type app-data:WebsiteFacade ;
 +
      app-data:script :Login_1 ;
 +
      template:contextClass
 +
              <http://www.eclipse.org/higgins/ontologies/2011/6/context#ConnectionContext> .
 +
 
 +
Here is its Login CDEScript:
 +
  :Login_1
 +
      a      app-data:Login ;
 +
      app-data:data "<JSON script goes here>"^^xsd:string ;
 +
      app-data:version "1.0"^^xsd:string ;
 +
      skos:prefLabel "Script to auto-login to the New York Times website."^^xsd:string .
  
 
==Classes==
 
==Classes==
 +
 +
===App===
 +
Abstract class. A prototype of a context instance that holds app-specific data (e.g. Person entity) if any. Subclasses reference active content (aka code).
 +
* subClassOf ContextPrototype
 +
* 1..1 appURI
 +
* 1..1 description
 +
 +
===AppTemplate===
 +
An AppTemplate is a template for an app. An app is a PDS add-on. Apps run within a PDS-provided runtime environment. Apps have read (and potentially write) access to a specific set of attributes within the PDS. An AppTemplate is a TemplateContext subclass with a ContextPrototype instance that describes a context to be used to support an app.
 +
* 1..1 app
 +
 +
 +
 +
===ConnectionTemplate===
 +
A TemplateContext containing two ContextPrototypes instances that describe the participant context or the participant and definer connector contexts in a relationship. The ''proxy:externalResource'' is the URI of the external site (e.g. http://groupon.com). The ''proxy:connectionType'' (and the ''proxy:externalResource'') are used to instantiate proxy:Proxy instances.
 +
* subClassOf: TemplateContext
 +
* 0..1 definer
 +
* 1..1 participant
 +
* 1..1 proxy:connectionType - e.g. "business"
 +
* 1..1 proxy:externalResource - e.g. http://nytimes.com
 +
* 1..1 proxy:domain - e.g. nytimes.com
 +
 +
===ContextPrototype===
 +
Abstract class. A prototype of an Context instance including, potentially, active code to be executed. The attributes of the prototype are copied into a Context instance.
 +
* 0..1 viewRoot
 +
* 0..1 contextSettingsClass
 +
 +
 +
 +
===Definer===
 +
A prototype of a context that is one side of a connector context pair. The Definer side is a context managed by the same party that created the TemplateContext--the party that defines the overall parameters of the connector relationship. In a person-to-business connector. Definer would typically be the business as it is the business that defines the relationship including the set of attributes that will go back and forth.
 +
* subClassOf: Connector
 +
 +
===HBXApp===
 +
An App that consists of an ''app-data:Overlay'' that is loaded by the HBX and executed in the foreground--i.e. as an overlay to the current page.
 +
* subClassOf App
 +
* 1..1 overlay
 +
 +
===Participant===
 +
A prototype of a context that is one side of a connector context pair. The Participant side is a context managed by the other party--not the party that created the TemplateContext that defines the overall parameters of the connector relationship. In a person-to-business connector. Participant would be the person (the PDS owner/user)
 +
* subClassOf: Connector
 +
* 0..1 overlayCode
 +
 +
===PortalApp===
 +
A kind of App that loads HTML/JS from ''appURI'' and displays it within the portal. The appURI may be within the PDS operator's domain or external to it.
 +
* subClassOf App
 +
* 1..1 appURI
  
 
===TemplateContext===
 
===TemplateContext===
May contain a view-builder:viewRoot attribute; may contain a subclass of person:Person (which in turn may have mapping rules). Superclass of RCardTemplateContext
+
A TemplateContext is an abstract class for a context whose attributes act analogous to a "class" for regular context "instances".
 
* subclassOf ctxt:Context (see [[Context vocabulary]])
 
* subclassOf ctxt:Context (see [[Context vocabulary]])
* 0..1 templateRole
+
* 0..1 proxy:image
* 0..1 view-builder:viewRoot (see [[View-builder vocabulary]])
+
* 0..1 proxy:imageType
 +
* 0..1 proxy:imageURL
 +
* 0..1 proxy:description
 +
* 1..1 proxy:displayName
 +
* 1..1 proxyClass
  
 
==Attributes==
 
==Attributes==
  
===authNMaterialsType===
+
===app===
* domain: RCardTemplateContext
+
AppContext ContextPrototype
* value: one of ("urn:udi:authnmaterials:.0.:usernamePassword")
+
* domain: AppTemplate
 +
* value: App
  
===contextType===
+
===appURI===
The type of context endpoint to instantiate from this template. This corresponds to the value of the <Type> element in XRDS resolution (see http://www.azigo.com/udi/udi-resolution.html).
+
App UI page
* domain: RCardTemplateContext
+
* domain: App
* value: string, one of {"$context$sparql" , "$context$xdi"}
+
* value: xsd:anyURI
  
===<code>templateRole</code>===
 
The default role that p:Person nodes should inherit when dynamically created with contexts controlled by on this template
 
* domain: TemplateContext
 
* value: persona:Role
 
  
===<code>udiMetadata</code>===
 
UDIMetadata instance
 
* domain: RCardTemplateContext
 
* value: UDIMetadata
 
  
==Example==
+
===contextClass===
 +
Type (as in rdf:type) of ctxt:Context to instantiate  (e.g. ctxt:ConnectionContext, ctxt:InboxContext, etc.). If not present then ctxt:Context is used.
 +
* domain: ContextPrototype
 +
* value: owl:Class
  
Here is a sample RCardTemplateContext. It contains all of the metadata necessary to dynamically create the UDI service endpoint shown in this [http://www.azigo.com/udi/udi-resolution.html#anchor3 sample] XRDS discovery document.
+
===contextSettingsClass===
 +
The subclass of ctxt:Settings to instantiate when creating a new context instance from this context prototype. If not present then ctxt:Settings is used.
 +
* domain: ContextPrototype
 +
* value: owl:Class
  
<http://org.eclipse.higgins.ontology.examples/template-example>
+
===definer===
      rdf:type owl:Ontology , template:RCardTemplateContext ;
+
Definer context within a pair of Participant/Definer connector contexts.
      app-data:appData :AppData_1 ;
+
* domain: ConnectionTemplate
      higgins:vocabulary <http://www.eclipse.org/higgins/ontologies/2010/6/persona> ;
+
* value: Definer
      template:authNMaterialsType
+
              "urn:udi:authnmaterials:1.0:usernamePassword"^^xsd:string ;
+
      template:contextType
+
              "$context$xdi"^^xsd:string ;
+
      template:udiMetadata
+
              :UDIMetadata_1 ;
+
      owl:imports <http://www.eclipse.org/higgins/ontologies/2010/6/persona> .
+
+
:AppData_1
+
      rdf:type app-data:AppData ;
+
      app-data:appId "1024"^^xsd:string ;
+
      app-data:description
+
              "A wonderful app"^^xsd:string ;
+
      app-data:serviceType
+
              "kynetx"^^xsd:string ;
+
      app-data:serviceURL "http://kynetx.com/appServer"^^xsd:anyURI ;
+
      app-data:version "2.4"^^xsd:string .
+
+
:UDIMetadata_1
+
      rdf:type template:UDIMetadata ;
+
      :address "ldap://ldap.company.net:389"^^xsd:string ;
+
      :connectionType "LDAP"^^xsd:string .
+
+
:address
+
      rdf:type owl:DatatypeProperty ;
+
      rdfs:domain template:UDIMetadata ;
+
      rdfs:range xsd:string .
+
+
:connectionType
+
      rdf:type owl:DatatypeProperty ;
+
      rdfs:domain template:UDIMetadata ;
+
      rdfs:range xsd:string .
+
  
 +
===overlay===
 +
JavaScript code that provides web augmentation/overlay to the user's current webpage in the browser.
 +
* domain: Participant or HBXApp
 +
* value: app-data:Overlay
 +
 +
===participant===
 +
Participant context within a pair of Participant/Definer connector contexts.
 +
* domain: ConnectionTemplate
 +
* value: Participant
 +
 +
===proxyClass===
 +
Subclass of proxy:Proxy to instantiate in the root context.
 +
* domain: TemplateContext
 +
* value: owl:Class
 +
 +
===role===
 +
Default role played by new Person entity instances in contexts instantiated from this Participant prototype
 +
* domain: Participant
 +
* value: persona:Role
 +
 +
===settingsViewRoot===
 +
Root of a tree of ViewNodes that describe the UI for the settings control panel for this context.
 +
* domain: ContextPrototype
 +
* value: view-builder:ViewNode
 +
 +
===role===
 +
Default role played by new Person entity instances in contexts instantiated from this Participant prototype
 +
* domain: Participant
 +
* value: persona:Role
  
Or visually:
+
===viewRoot===
[[Image:Revised-template.png|center]]
+
Root of a tree of ViewNodes that describe the UI for this context.
 +
* domain: ContextPrototype
 +
* value: view-builder:ViewNode
  
 
== Links ==
 
== Links ==
 +
* [[App-data vocabulary]]
 
* [[Persona Data Model 2.0]]
 
* [[Persona Data Model 2.0]]
  
 
[[Category:Higgins 2 Vocabularies]]
 
[[Category:Higgins 2 Vocabularies]]

Latest revision as of 22:39, 16 May 2012

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}

Vocabulary to describe a Template Context. Contains information necessary to dynamically instantiate regular contexts. Part of the Persona Data Model 2.0.

Files

UML Overview

Template-2.0.122.png

Overview

TemplateContexts are used to instantiate both regular contexts and connector contexts mentioned here: Persona Data Model 2.0. The AppTemplate subclass of TemplateContext (itself a subclass of ctxt:Context) is used to describe the former, and the ConnectionTemplate subclass of TemplateContext, the latter. TemplateContexts have an optional policy attribute whose value is an an instance of DataPolicy.

AppTemplate

An AppTemplate is a template for an app. An app is a PDS add-on. Apps run within a PDS-provided runtime environment. Apps have read (and potentially write) access to a specific set of attributes within the PDS. An AppTemplate is a TemplateContext subclass with a ContextPrototype instance that describes a context to be used to support an app.

  • subClassOf TemplateContext
  • 1..1 app App

App

Abstract class. A prototype of a context instance that holds app-specific data (e.g. Person entity) if any. Subclasses reference active content (aka code).

  • subclass of ContextPrototype
  • 1..1 description--human friendly text that describes this app/view/context
  • 0..1 viewRoot (inherited) - value is a structure created using the View-builder vocabulary that describes how to dynamically construct a UI to view and/or edit the attributes of this context.
  • 0..1 settingsViewRoot (inherited) - value is a structure created using the View-builder vocabulary that describes how to dynamically construct a UI to view and/or edit administrative settings related to the JavaScript app (if present)

The instantiated context of an AppTemplate TemplateContext is a place where the JavaScript of the app can persist new attributes if needed. Apps use an API that may update the values of attributes in other contexts.

ConnectionTemplate

A TemplateContext containing two ContextPrototypes instances that describe connector context(s) in a relationship. In some cases only a single Participant context is instantiated, in others a Participant/Definer pair is instantiated.

The Definer ContextPrototype instance has the following attributes:

  • 0..1 viewRoot - value is a structure created using the View-builder vocabulary that describes how to dynamically construct a UI to view and/or edit the attributes of this context.
  • 0..1 settingsViewRoot - value is a structure created using the View-builder vocabulary that describes how to dynamically construct a UI to view and/or edit administrative settings related to the JavaScript app (if present)

The Participant ContextPrototype instance has the following attributes:

  • 0..1 templateRole - value is a default Role to assign to the new p:Person instance in the newly instantiated context

in the relationship for which the participant is authoritative and may optionally decide to provide

  • 0..1 viewRoot - value is a structure created using the View-builder vocabulary that describes how to dynamically construct a UI to view and/or edit the attributes of this context.
  • 0..1 settingsViewRoot - value is a structure created using the View-builder vocabulary that describes how to dynamically construct a UI to view and/or edit administrative settings related to the JavaScript app (if present)

Example

Below is an example of a ConnectionTemplate. See (nytimes.com.n3 for details):

Here is the ConnectionTemplate (Note: the image value is truncated):

 <http://www.eclipse.org/higgins/ontologies/examples/nytimes.com>
     a       template:ConnectionTemplate , owl:Ontology ;
     template:participant
             :WebsiteFacade_1 ;
     template:proxyClass proxy:WebLogin ;
     proxy:connectionType proxy:News ;
     proxy:domain "nytimes.com"^^xsd:string ;
     proxy:externalResource
             "http://nytimes.com"^^xsd:anyURI ;
     proxy:image "329849238457234523453454"^^xsd:base64Binary ;
     proxy:imageType "JPG"^^xsd:string ;
     owl:imports <http://www.eclipse.org/higgins/ontologies/2011/2/view-builder> , 
     <http://www.eclipse.org/higgins/ontologies/2010/6/fp> ,
     <http://www.eclipse.org/higgins/ontologies/2010/6/template> ;
     skos:prefLabel "NYTimes ConnectionTemplate"^^xsd:string .


Here is the definer WebsiteFacade:Participant (Note: the actual code of the JavaScript has been omitted). See App-data vocabulary for a complete example of a WebsiteFacade object:

 :WebsiteFacade_1
     rdf:type app-data:WebsiteFacade ;
     app-data:script :Login_1 ;
     template:contextClass
             <http://www.eclipse.org/higgins/ontologies/2011/6/context#ConnectionContext> .

Here is its Login CDEScript:

 :Login_1
     a       app-data:Login ;
     app-data:data "<JSON script goes here>"^^xsd:string ;
     app-data:version "1.0"^^xsd:string ;
     skos:prefLabel "Script to auto-login to the New York Times website."^^xsd:string .

Classes

App

Abstract class. A prototype of a context instance that holds app-specific data (e.g. Person entity) if any. Subclasses reference active content (aka code).

  • subClassOf ContextPrototype
  • 1..1 appURI
  • 1..1 description

AppTemplate

An AppTemplate is a template for an app. An app is a PDS add-on. Apps run within a PDS-provided runtime environment. Apps have read (and potentially write) access to a specific set of attributes within the PDS. An AppTemplate is a TemplateContext subclass with a ContextPrototype instance that describes a context to be used to support an app.

  • 1..1 app


ConnectionTemplate

A TemplateContext containing two ContextPrototypes instances that describe the participant context or the participant and definer connector contexts in a relationship. The proxy:externalResource is the URI of the external site (e.g. http://groupon.com). The proxy:connectionType (and the proxy:externalResource) are used to instantiate proxy:Proxy instances.

  • subClassOf: TemplateContext
  • 0..1 definer
  • 1..1 participant
  • 1..1 proxy:connectionType - e.g. "business"
  • 1..1 proxy:externalResource - e.g. http://nytimes.com
  • 1..1 proxy:domain - e.g. nytimes.com

ContextPrototype

Abstract class. A prototype of an Context instance including, potentially, active code to be executed. The attributes of the prototype are copied into a Context instance.

  • 0..1 viewRoot
  • 0..1 contextSettingsClass


Definer

A prototype of a context that is one side of a connector context pair. The Definer side is a context managed by the same party that created the TemplateContext--the party that defines the overall parameters of the connector relationship. In a person-to-business connector. Definer would typically be the business as it is the business that defines the relationship including the set of attributes that will go back and forth.

  • subClassOf: Connector

HBXApp

An App that consists of an app-data:Overlay that is loaded by the HBX and executed in the foreground--i.e. as an overlay to the current page.

  • subClassOf App
  • 1..1 overlay

Participant

A prototype of a context that is one side of a connector context pair. The Participant side is a context managed by the other party--not the party that created the TemplateContext that defines the overall parameters of the connector relationship. In a person-to-business connector. Participant would be the person (the PDS owner/user)

  • subClassOf: Connector
  • 0..1 overlayCode

PortalApp

A kind of App that loads HTML/JS from appURI and displays it within the portal. The appURI may be within the PDS operator's domain or external to it.

  • subClassOf App
  • 1..1 appURI

TemplateContext

A TemplateContext is an abstract class for a context whose attributes act analogous to a "class" for regular context "instances".

  • subclassOf ctxt:Context (see Context vocabulary)
  • 0..1 proxy:image
  • 0..1 proxy:imageType
  • 0..1 proxy:imageURL
  • 0..1 proxy:description
  • 1..1 proxy:displayName
  • 1..1 proxyClass

Attributes

app

AppContext ContextPrototype

  • domain: AppTemplate
  • value: App

appURI

App UI page

  • domain: App
  • value: xsd:anyURI


contextClass

Type (as in rdf:type) of ctxt:Context to instantiate (e.g. ctxt:ConnectionContext, ctxt:InboxContext, etc.). If not present then ctxt:Context is used.

  • domain: ContextPrototype
  • value: owl:Class

contextSettingsClass

The subclass of ctxt:Settings to instantiate when creating a new context instance from this context prototype. If not present then ctxt:Settings is used.

  • domain: ContextPrototype
  • value: owl:Class

definer

Definer context within a pair of Participant/Definer connector contexts.

  • domain: ConnectionTemplate
  • value: Definer

overlay

JavaScript code that provides web augmentation/overlay to the user's current webpage in the browser.

  • domain: Participant or HBXApp
  • value: app-data:Overlay

participant

Participant context within a pair of Participant/Definer connector contexts.

  • domain: ConnectionTemplate
  • value: Participant

proxyClass

Subclass of proxy:Proxy to instantiate in the root context.

  • domain: TemplateContext
  • value: owl:Class

role

Default role played by new Person entity instances in contexts instantiated from this Participant prototype

  • domain: Participant
  • value: persona:Role

settingsViewRoot

Root of a tree of ViewNodes that describe the UI for the settings control panel for this context.

  • domain: ContextPrototype
  • value: view-builder:ViewNode

role

Default role played by new Person entity instances in contexts instantiated from this Participant prototype

  • domain: Participant
  • value: persona:Role

viewRoot

Root of a tree of ViewNodes that describe the UI for this context.

  • domain: ContextPrototype
  • value: view-builder:ViewNode

Links

Back to the top