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 "Org.eclipse.higgins.js.pds.client API usage example"

(Staples template)
Line 12: Line 12:
 
[[Image:Pds.client.example 2.0.100a.png]]
 
[[Image:Pds.client.example 2.0.100a.png]]
  
===Staples template===
+
===NYTimes template===
http://azigo.com/sys/templates/nytimes.com
+
  
 +
The template context http://azigo.com/sys/templates/nytimes.com contains (among other things) the following mapping rules:
 +
 +
  :NYTimesPerson
 +
      a      owl:Class ;
 +
      rdfs:subClassOf <http://www.eclipse.org/higgins/ontologies/2010/6/higgins#Person> ;
 +
      map:nameRule
 +
              [ a      map:roleSameAs ;
 +
                map:equivalentAttribute
 +
                        fp:givenName ;
 +
                map:predicate :bFirstName ;
 +
                map:role <http://www.eclipse.org/higgins/ontologies/2010/6/persona#Buyer>
 +
              ] ;
 +
      map:telephoneRule
 +
              [ a      map:roleSameAs ;
 +
                map:equivalentAttribute
 +
                        fp:phone ;
 +
                map:predicate :phone ;
 +
                map:role <http://www.eclipse.org/higgins/ontologies/2010/6/persona#Ecommerce>
 +
              ] .
  
 
== getAttributes() flow ==
 
== getAttributes() flow ==

Revision as of 15:17, 19 September 2011

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

Example call to .pds.client.getAttributes(domain, audience, attributes[], where[], future)

Initial State

Contexts

Pds.client.example 2.0.100a.png

NYTimes template

The template context http://azigo.com/sys/templates/nytimes.com contains (among other things) the following mapping rules:

 :NYTimesPerson
     a       owl:Class ;
     rdfs:subClassOf <http://www.eclipse.org/higgins/ontologies/2010/6/higgins#Person> ;
     map:nameRule
             [ a       map:roleSameAs ;
               map:equivalentAttribute
                       fp:givenName ;
               map:predicate :bFirstName ;
               map:role <http://www.eclipse.org/higgins/ontologies/2010/6/persona#Buyer>
             ] ;
     map:telephoneRule
             [ a       map:roleSameAs ;
               map:equivalentAttribute
                       fp:phone ;
               map:predicate :phone ;
               map:role <http://www.eclipse.org/higgins/ontologies/2010/6/persona#Ecommerce>
             ] .

getAttributes() flow

  • Derive the name of the "connection" context (result: http://azigo.com/ptrevithick/staples.com)
  • Compute rolesAtts[] (result: ((
  • We would now try to read attributes from the branch of person nodes rooted at its #me person
  • However, since this doesn't exist we try to read attributes (call findAttributeValues()) from the root #me node (and on down)


TODO: complete this

Back to the top