Riassunto e traduzione della reference ufficiale del W3C del linguaggio per il tagging semantico di documenti WSDL (linguaggio per la descrizione di servizi)
Northquest is an innovative solutions management company that provides managed service solutions to businesses and governments to improve critical infrastructure and reduce costs. They finance assets like IT equipment, software, and office fit outs to help clients upgrade without large upfront capital outlays. Northquest also helped finance a new $2.4 million fleet management system for aged care provider ACH Group over 5 years with no upfront costs and minimal input required from ACH Group.
This document discusses the evolution of marketing campaigns and web presentation from traditional to modern digital formats. It introduces ADAcard as a new type of digital business card that functions as a mobile app, allowing users to include multimedia content like photos, videos and documents. ADAcard aims to improve on existing QR codes and mobile action codes by being dialable and not requiring smartphones or additional apps. The document outlines the features and benefits of ADAcard for businesses, and provides an example of what an ADAcard might look like.
The document discusses the results of a study on the effects of exercise on memory and thinking abilities in older adults. The study found that regular exercise can help reduce the decline in thinking abilities that often occurs with age. Specifically, aerobic exercise was shown to improve executive function and memory in the study participants between the ages of 60-75 who exercised at least 30 minutes per day for 6 months.
Formato de clase 2012 4th-5th future tenseEvelin Peña
The document is an English lesson plan about future plans. It discusses different ways to express the future tense in English using will and be going to. It provides examples of their uses and differences. The lesson includes exercises for students to practice using will and be going to. It also includes a role-playing activity where students interview famous people and discuss their future plans.
Presented at Catania GTUG. This presentation is about the integration between openid and opensocial. Openid specification are described and the presentation involves in realization of a provider openid, a relying party a container opensocial and some gadgets.
Are described technologies like communityid, poidsy, shindig, pigeon, m4p2 and some others...
Northquest is an innovative solutions management company that provides managed service solutions to businesses and governments to improve critical infrastructure and reduce costs. They finance assets like IT equipment, software, and office fit outs to help clients upgrade without large upfront capital outlays. Northquest also helped finance a new $2.4 million fleet management system for aged care provider ACH Group over 5 years with no upfront costs and minimal input required from ACH Group.
This document discusses the evolution of marketing campaigns and web presentation from traditional to modern digital formats. It introduces ADAcard as a new type of digital business card that functions as a mobile app, allowing users to include multimedia content like photos, videos and documents. ADAcard aims to improve on existing QR codes and mobile action codes by being dialable and not requiring smartphones or additional apps. The document outlines the features and benefits of ADAcard for businesses, and provides an example of what an ADAcard might look like.
The document discusses the results of a study on the effects of exercise on memory and thinking abilities in older adults. The study found that regular exercise can help reduce the decline in thinking abilities that often occurs with age. Specifically, aerobic exercise was shown to improve executive function and memory in the study participants between the ages of 60-75 who exercised at least 30 minutes per day for 6 months.
Formato de clase 2012 4th-5th future tenseEvelin Peña
The document is an English lesson plan about future plans. It discusses different ways to express the future tense in English using will and be going to. It provides examples of their uses and differences. The lesson includes exercises for students to practice using will and be going to. It also includes a role-playing activity where students interview famous people and discuss their future plans.
Presented at Catania GTUG. This presentation is about the integration between openid and opensocial. Openid specification are described and the presentation involves in realization of a provider openid, a relying party a container opensocial and some gadgets.
Are described technologies like communityid, poidsy, shindig, pigeon, m4p2 and some others...
The document discusses four generations of time management and introduces a sixth-step process for effective time management. The first generation involves simple notes and checklists while the second adds planning and preparation. The third generation connects goals to values but can lead to imbalance. The fourth generation prioritizes people over schedules and vision over tasks. It advocates using the best aspects of the prior generations along with a process involving connecting to one's mission, identifying roles and goals, organizing the week, exercising integrity, and evaluating progress.
This document discusses tips for successful user experience (UX) design. It recommends exploring abstract concepts to push boundaries. It also suggests listening to users like an orchestra musician listens to other musicians to understand their needs. Finally, it advises acting like an owner who is invested in the product's success. The goal is to design products and services that users value by understanding them and continuously improving based on their feedback.
Formato plano 7th week4_simpl_pasrvspastcontEvelin Peña
The document provides lesson plans for a 7th grade English class focusing on teaching the simple past and past continuous tenses. It includes examples of how to form and use these tenses, practice exercises for students, and a reading assignment. The goal is for students to be able to use the simple past and past continuous to talk about past actions.
Human Resources services provides high quality, specialized recruitment services to help companies fill positions. They specialize in executive and managerial roles and can source candidates for almost any role. Their selection process involves publishing openings, interviews, evaluations, reference checks, and preparing candidate files for clients to review and make final hiring decisions. Using their database of over 5,000 profiles and experience in the market, they aim to quickly provide several strong candidates for clients to choose from.
O documento descreve um centro educacional universitário de teologia e filosofia que oferece um curso de formação teológica de dois anos dividido em seis módulos com disciplinas como Antigo e Novo Testamento, Teologia Sistemática e Introdução ao Grego. O curso tem matrículas abertas e aulas semanais para proporcionar acesso ao ensino superior.
La niña participa emocionadamente en un juego interactivo donde debe identificar figuras geométricas como cuadrados grandes y rectángulos haciendo clic en ellas. El sistema le da retroalimentación cuando acierta o falla para que aprenda a distinguir las figuras, y al finalizar le desea que haya aprendido de la lección.
The document provides guidance on using "should" and "shouldn't" to give advice about healthy behaviors for weight loss, such as eating more fruits and vegetables, drinking water, exercising, and avoiding fatty, sugary, or greasy foods. It also models giving this advice through examples of telling patients they "should" engage in good behaviors and "shouldn't" engage in bad behaviors. The document concludes by having the reader repeat the advice to practice being a doctor providing guidance on healthy habits.
Souk06 is about adapting passion into a lifestyle. Developing both the technical and creative elements to allow richer interaction for both the creator and the user. This lifestyle compliments itself simply by the inspirational individuals and creative environments that are within.
“Your greatest resource is your imagination."
This document is from a Spanish language school in Cartagena, Colombia. It is about a lesson on colloquial English vocabulary used in songs. The lesson introduces common slang terms and their standard English translations. It then discusses the use of acronyms in text messages and asks students to complete example text messages using appropriate acronyms. Students are also asked to transform a sample conversation into a text message chat using acronyms and omitting unnecessary grammar.
The document is a lesson plan for a 6th grade English class about future simple tenses and future plans. It includes an indicator of achievement stating that students will be able to talk about future plans. It provides an overview of the future simple tense, explaining that it is used to talk about predictions for the future using will or be going to. It notes that be going to is used when a plan is already in place, while will can show willingness or talk about immediate future plans without prior arrangement. Comparisons are made between will and be going to. The lesson plan continues for 5 pages with sections on exploration, conceptualization, production, modeling, workshop, and evaluation.
Riassunto e traduzione della reference ufficiale del W3C del linguaggio per il tagging semantico di documenti WSDL (linguaggio per la descrizione di servizi)
The document discusses four generations of time management and introduces a sixth-step process for effective time management. The first generation involves simple notes and checklists while the second adds planning and preparation. The third generation connects goals to values but can lead to imbalance. The fourth generation prioritizes people over schedules and vision over tasks. It advocates using the best aspects of the prior generations along with a process involving connecting to one's mission, identifying roles and goals, organizing the week, exercising integrity, and evaluating progress.
This document discusses tips for successful user experience (UX) design. It recommends exploring abstract concepts to push boundaries. It also suggests listening to users like an orchestra musician listens to other musicians to understand their needs. Finally, it advises acting like an owner who is invested in the product's success. The goal is to design products and services that users value by understanding them and continuously improving based on their feedback.
Formato plano 7th week4_simpl_pasrvspastcontEvelin Peña
The document provides lesson plans for a 7th grade English class focusing on teaching the simple past and past continuous tenses. It includes examples of how to form and use these tenses, practice exercises for students, and a reading assignment. The goal is for students to be able to use the simple past and past continuous to talk about past actions.
Human Resources services provides high quality, specialized recruitment services to help companies fill positions. They specialize in executive and managerial roles and can source candidates for almost any role. Their selection process involves publishing openings, interviews, evaluations, reference checks, and preparing candidate files for clients to review and make final hiring decisions. Using their database of over 5,000 profiles and experience in the market, they aim to quickly provide several strong candidates for clients to choose from.
O documento descreve um centro educacional universitário de teologia e filosofia que oferece um curso de formação teológica de dois anos dividido em seis módulos com disciplinas como Antigo e Novo Testamento, Teologia Sistemática e Introdução ao Grego. O curso tem matrículas abertas e aulas semanais para proporcionar acesso ao ensino superior.
La niña participa emocionadamente en un juego interactivo donde debe identificar figuras geométricas como cuadrados grandes y rectángulos haciendo clic en ellas. El sistema le da retroalimentación cuando acierta o falla para que aprenda a distinguir las figuras, y al finalizar le desea que haya aprendido de la lección.
The document provides guidance on using "should" and "shouldn't" to give advice about healthy behaviors for weight loss, such as eating more fruits and vegetables, drinking water, exercising, and avoiding fatty, sugary, or greasy foods. It also models giving this advice through examples of telling patients they "should" engage in good behaviors and "shouldn't" engage in bad behaviors. The document concludes by having the reader repeat the advice to practice being a doctor providing guidance on healthy habits.
Souk06 is about adapting passion into a lifestyle. Developing both the technical and creative elements to allow richer interaction for both the creator and the user. This lifestyle compliments itself simply by the inspirational individuals and creative environments that are within.
“Your greatest resource is your imagination."
This document is from a Spanish language school in Cartagena, Colombia. It is about a lesson on colloquial English vocabulary used in songs. The lesson introduces common slang terms and their standard English translations. It then discusses the use of acronyms in text messages and asks students to complete example text messages using appropriate acronyms. Students are also asked to transform a sample conversation into a text message chat using acronyms and omitting unnecessary grammar.
The document is a lesson plan for a 6th grade English class about future simple tenses and future plans. It includes an indicator of achievement stating that students will be able to talk about future plans. It provides an overview of the future simple tense, explaining that it is used to talk about predictions for the future using will or be going to. It notes that be going to is used when a plan is already in place, while will can show willingness or talk about immediate future plans without prior arrangement. Comparisons are made between will and be going to. The lesson plan continues for 5 pages with sections on exploration, conceptualization, production, modeling, workshop, and evaluation.
Riassunto e traduzione della reference ufficiale del W3C del linguaggio per il tagging semantico di documenti WSDL (linguaggio per la descrizione di servizi)
How create a single page apps using html5 and javascript Stefano Marchisio
Create a html5/javascript apps with mvc/ajax using knockout.js/mvvm. Javascript to IQueryable is a framework that allows you to write a simple query in javascript client side and then execute it server side with EntityFramework or a linq provider that implement IQueryable. On the server is used "Dynamic Expressions and Queries in LINQ by Microsoft" to compose dynamically your query. In this way you can create a grid with filter, paging and sort functions. There is also support for: mvc3 unobtrusive jquery validation and jquery mobile/phonegap. - http://Javascriptiqueryable.codeplex.com - http://www.youtube.com/watch?v=qjwyKwsXHKs - http://www.linqitalia.com/articoli/entity-framework/sfruttare-javascript-eseguire-query-linq-server-tramite-dynamic-iqueryable.aspx
A prima vista, MVC “is all about the presentation layer”. In realtà, per trarre il massimo giovamento da questo toolkit è necessario progettare l’intera soluzione utilizzando criteri ad hoc.
XeDotNet meeting del 5 Marzo 2013
In questa sessione vedremo come Knockout.js permetta di scrivere codice JavaScript in modo pulito e organizzato, semplificando la scrittura del codice e la sua manutenzione. Come lo si utilizza KO? Quali vantaggi ci offre? Quali librerie ci vengono in aiuto? Quali sarebbe meglio evitare?
Asp.Net MVC 3 - Il Model View Controller secondo MicrosoftStefano Benedetti
Il pattern architetturale MVC (Model View Controller) favorisce la manutenzione delle applicazioni web tramite una architettura elegante ed una chiara ed esplicita separazione delle competenze, l'impiego dei più diffusi pattern di software engineering, il controllo completo dell'HTML generato e degli URL, la testabilità ed estendibilità.
In questa sessione vedremo le novità principali di Asp.Net MVC in versione 3.
La sessione è stata tenuta a SMAU Business Bologna il 9 giugno 2011
Con l'avvento su scala globale di HTML5 le tecnologie web si sono evolute cercando di offrire all'utente una migliore esperienza applicativa sempre più simile a quella desktop. Sul piano tecnico questo viene realizzato spostando la logica di presentazione sul browser client facendo leva su Javascript e CSS3. In questa sessione vedremo come KnockoutJS, un presentation framework Javascript basato sul pattern Model-View-ViewModel, permette di sviluppare Rich Internet Application (RIA) analizzando le sue caratteristiche implementative e mostrando esempi di casi reali anche in ambito mobile.
Presentation that introduces that concepts of STUPID code and SOLID code.
Also if this two acronyms have been covered multiple times in Software Engineering history that are still sometimes not well known. It is always worth the spread the word!
Slide riferite alla terza lezione del corso. Trattano dell'utilizzo della shell in generale e dei comandi in essa utilizzabili. Si parlerà anche delle soluzioni ad eventuali problemi di configurazione del sistema ed inoltre delle più comuni tecniche di virtualizzazione ed emulazione o l'utilizzo di wine.
This document provides a comparative table of software alternatives available on Linux as compared to Windows. It lists popular Windows applications and their Linux equivalents. Some of the recommended Linux alternatives highlighted include GIMP as an alternative to Photoshop, OpenOffice as an alternative to Microsoft Office, Firefox as an alternative to Internet Explorer, and VLC or MPlayer as media players comparable to Windows Media Player. This table can serve as a practical tool for finding Windows software alternatives on Linux.
Slide di supporto alla seconda lezione. Vengono in queste slide mostrate le maggiori tecniche di utilizzo di un ambiente sfruttante ambiente grafico GNOME ed i relativi software consigliati per l'uso.
Seconda lezione del corso. Vengono qui introdotti i maggiori sistemi operativi alternativi a Windows. Viene brevemente illustrata la storia delle distribuzioni Linux (con maggiore accento all'ascendenza di Ubuntu). Vengono, infine, mostrate le possibilità di scelta, su un sistema linux, in merito ad ambienti grafici.
Supporto alla prima lezione del corso. Viene qui mostrata in semplici passi l'installazione di un Sistema Operativo Ubuntu. Vengono altresì fornite informazioni su cosa sia una partizione e sul partizionamento in generale.
Introduzione al software Open Source ed al software libero. Notizie a proposito degli enti (Open Source Software) più importanti e delle licenze più utilizzate.
1. SAWSDL // Restricted!
Liberamente estratto e sintetizzato da
Semantic Annotations for WSDL and XML Schema - Usage Guide (http://www.w3.org/TR/sawsdl-guide/)
Per la presentazione di SAWSDL ci si avvarrà di due esempi:
Listato 1.2-1
<wsdl:description
targetNamespace="http://org1.example.com/wsdl/CheckAvailabilityRequestService/"
xmlns="http://org1.example.com/wsdl/CheckAvailabilityRequestService/"
xmlns:wsdl="http://www.w3.org/ns/wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema
targetNamespace="http://org1.example.com/wsdl/CheckAvailabilityRequestService">
<xsd:element name="CheckAvailabilityRequestServiceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="itemCode" type="xsd:string"/>
<xsd:element name="date" type="xsd:string"/>
<xsd:element name="qty" type="xsd:float"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CheckAvailabilityRequestServiceResponse"
type="itemConfirmation"/>
<xsd:simpleType name="itemConfirmation">
<xsd:restriction base="xsd:boolean"/>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
<wsdl:interface name="CheckAvailabilityRequestService">
<wsdl:operation name="CheckAvailabilityRequestOperation"
pattern="http://www.w3.org/ns/wsdl/in-out">
<wsdl:input element="CheckAvailabilityRequestServiceRequest"/>
<wsdl:output element="CheckAvailabilityRequestServiceResponse"/>
</wsdl:operation>
</wsdl:interface>
</wsdl:description>
Listato 1.2-2
<wsdl:description
targetNamespace="http://org2.example.com/wsdl/CheckInventoryService/"
xmlns="http://org2.example.com/wsdl/CheckInventoryService/"
xmlns:wsdl="http://www.w3.org/ns/wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema
targetNamespace="http://org2.example.com/wsdl/CheckInventoryService">
<xsd:element name="CheckInventoryServiceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SKU" type="xsd:string"/>
<xsd:element name="deliveryDate" type="xsd:string"/>
<xsd:element name="numBundles" type="xsd:float"/>
</xsd:sequence>
2. </xsd:complexType>
</xsd:element>
<xsd:element name="CheckInventoryServiceResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="conf" type="xsd:boolean"/>
<xsd:element name="numBundles_available" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:interface name="CheckInventoryService">
<wsdl:operation name="checkInventoryService"
pattern="http://www.w3.org/ns/wsdl/in-out">
<wsdl:input element="CheckInventoryServiceRequest"/>
<wsdl:output element="CheckInventoryServiceResponse"/>
</wsdl:operation>
</wsdl:interface>
</wsdl:description>
Definire le annotazioni per la pubblicazione di un Web Service
Un web service può essere corredato di annotazioni semantiche al fine di fornirne una
categorizzazione. Il meccanismo di estensione SAWSDL chiamato modelReference può essere usato
per aggiungere queste informazioni sulla categorizzazione al servizio.
Aggiungere le informazioni di categorizzazione come URI di categoria
Se esiste già un modello semantico di categorizzazione (per esempio una tassonomia) un elemento
modelReference potrebbe essere associato ad un'interfaccia o ad un'operazione di un servizio in
modo tale da puntare a una particolare categoria nella tassonomia.
Aggiunge le informazioni di categorizzazione come Identificatori di categoria
Alcune tassonomie non forniscono direttamente URI per le rispettive categorie e potrebbero
richiedere più porzioni di informazione per identificare le categorie.In tal caso, gli utenti possono
definire tali informazioni secondo le esigenze e associare un modelReference a tali informazioni
tassonomiche definite dall'utente.
Definire le annotazioni per usarle nel matching e nella composizione di
servizi
Una delle più grandi motivazioni per cui SAWSDL è stato introdotto è la necessità di provvedere un
meccanismo per inserire annotazioni semantiche nella descrizione WSDL per facilità la
composizione e la scoperta di web service.
Matching delle interfacce dei Web Service usando un'ontologia condivisa
Consideriamo i listati dei due esempi. Il primo rappresenta una richiesta di un servizio mentre il
secondo mostra il servizio effettivamente fornito. Un matching ad alto livello tra richiesta e servizio
fornirebbe un risultato positivo. Un matching engine tradizionale non ha gli strumenti per capire che
SKU e itemCode si riferiscono entrambe ad un codice univoco di un oggetto o che qty e
numBundles riguardano sempre un concetto di quantità. In questo senso delle annotazioni
semantiche associate alla descrizione WSDL permetterebbero un match tra la richiesta ed il
servizio. Nel seguente esempio le annotazioni semantiche sono aggiunte usando l'attributo di
estensibilità del modelReference di SAWSDL.
<wsdl:description
targetNamespace="http://org1.example.com/wsdl/CheckAvailabilityRequestService/"
xmlns="http://org1.example.com/wsdl/CheckAvailabilityRequestService/"
xmlns:wsdl="http://www.w3.org/ns/wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3. xmlns:sawsdl="http://www.w3.org/ns/sawsdl">
<wsdl:types>
<xsd:schema
targetNamespace="http://org1.example.com/wsdl/CheckAvailabilityRequestService">
<xsd:element name="CheckAvailabilityRequestServiceRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="itemCode" type="xsd:string"
sawsdl:modelReference="http://org1.example.com/ontologies/SampleOnto
logy#PartNumber"/>
<xsd:element name="date" type="xsd:string"
sawsdl:modelReference="http://org1.example.com/ontologies/SampleOnto
logy#DueDate"/>
<xsd:element name="qty" type="xsd:float"
sawsdl:modelReference="http://org1.example.com/ontologies/SampleOnto
logy#Quantity"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CheckAvailabilityRequestServiceResponse"
type="itemConfirmation"/>
<xsd:simpleType name="itemConfirmation"
sawsdl:modelReference="http://org1.example.com/ontologies/SampleOntology#A
vailabilityConfirmation">
<xsd:restriction base="xsd:boolean"/>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
<wsdl:interface name="CheckAvailabilityRequestService">
<wsdl:operation name="checkAvailabilityRequestOperation"
pattern="http://www.w3.org/ns/wsdl/in-out">
<wsdl:input element="CheckAvailabilityRequestServiceRequest"/>
<wsdl:output element="CheckAvailabilityRequestServiceResponse"/>
</wsdl:operation>
</wsdl:interface>
</wsdl:description>
Similmente può essere fatto per il secondo esempio. In entrambi gli esempi, i documenti WSDL
sono stati annotati con concetti presi da una stessa ontologia. Un motore semantico può usare le
relazioni tra i concetti durante il matching delle interfacce ragionando su un modello semantico.
Matching delle interfacce dei Web Service con Mediazione tra ontologia
L'ipotesi fatta precedentemente per cui tutti i concetti usati nelle annotazioni debbano provenire da
una sola ontologia condivisa può non essere sempre vera. E' possibile che si usino due ontologie
diverse dello stesso dominio in due documenti diversi: ad esempio usiamo concetti da una ontologia
per il primo esempio e concetti da un'altra ontologia nel secondo. Se abbiamo una mapping
ontology possiamo usare le relazioni definite in tale ontologia per eseguire il matching.
4. Composizione di Web Service usando il ragionamento sulle Ontologie (Ontology Reasoning)
Supponiamo di avere un servizio checkInventoryService() che prende un UPC ( e non uno SKU):
ovviamente questo servizio non avrò nessun match con la richiesta checkAvailabilityRequest() in
quanto non ci sono relazioni nella mapping ontology tra partNumber e UPC. Supponiamo inoltre di
avere un servizio SKU2UPCLookup() che prende uno SKU e ritorna un UPC. Supponiamo inoltre
che ci siano tre ontologie differenti: una per la richiesta, una per l'advertise e una per il mapping tra
le prime due. La relazione tra SKU e UPC nell'ontologia è mostrata dalla seguente figura.
Un engine semantico estrae l'elemento PartNumeber dal servizio checkAvailabilityRequest() e
l'elemento SKU dal servizio SKU2UPCLookup() e dal punto di vista lessicale si trova che questi
due concetti non ci sono somiglianze. L'engine semantico a questo punto può consultare un
Mapping Ontology per vedere se ci sono relazioni tra PartNumber e SKU: il reasoner riornerà
l'esistenza di una relazione “subClassOf” tra SKU e PartNumber. Questa informazione sarà usata
per comporre SKU2UPCLoolup() con CheckInventoryService().
Matching usando annotazioni multiple
SAWSDL permette annotazioni multiple associate ad uno stesso elemento: queste annotazioni
possono puntare a concetti differenti della stessa ontologia o di ontologie diverse. SAWSDL non
specifica nessun tipo di relazione tra le annotazioni multiple: spetta a chi consulta queste
annotazioni decidere se c'è qualche relazione tra questi concetti consultando l'ontologia ( o le
ontologie di riferimento).
...
<xsd:simpleType name="itemCode"
sawsdl:modelReference="http://org3.example.com/ontologies/SampleOntologyOrg3#PartNumber
http://org3.example.com/ontologies/SampleOntologyOrg3#SKU"/>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
...
Matching usando annotazioni su tipi complessi (Complex Type)
SAWSDL permette l'aggiunta di annotazioni sia al livello di tipo complesso (top level) oppure al
livello degli elementi membro (lower level) oppure ad entrambi i livelli. Nei casi in cui sia il tipo
complesso che i membri del tipo siano forniti di annotazioni, SAWSDL non specifica nessuna
relazione tra i modelReference dei due livelli.
Il motore semantico generalmente usa le annotazioni a livello di tipo complesso per trovare le
relazioni tra i due tipi e poi inizia ad analizzare le possibili relazioni tra gli elementi membro del
tipo complesso in base alle annotazioni espresse a tale livello.
Condizioni di Rappresentazione
L'attributo modelReference può essere usato per rappresentare vincoli comportamentali collegati al
servizio.
5. Definire mappature di schema (Schema Mappings) per abilitare
l'invocazione di Web Service
Supponiamo di avere due dati separati: nome e cognome. Supponiamo ora che un servizio abbia
come ingresso il nome completo: per usare tale servizio è necessario il concatenamento di nome e
cognome. Per facilitare questo tipo di trasformazioni SAWSDL mette a disposizione il meccanismo
delle mappature di schema (Schema Mapping). Uno Schema Mapping permette di specificare una
funzione di trasformazione su elementi WSDL per mappare istanze di dati definiti tramite XML
Schema su dei dati di concetti ontologici definiti in un modello semantico. Questo meccanismo ci
permette anche di definire delle funzioni di trasformazione che mappano i dati concettuali delle
ontologie su istanze di dati definiti tramite XML Schema. Nel primo caso ci si riferisce alle funzioni
di trasformazione usante l'attributo di estensibilità liftingSchemaMapping mentre nel secondo caso
ci si riferisce all'attributo loweringSchemaMapping.
Lifting Schema Mapping
Un liftingSchemaMapping prende come input un dato XML (che aderisce ad un determinato XML
Schema) e produce dati semantici. Supponiamo di avere dei tipi complessi OrderRequest, item e
OrderResponse e che vogliamo specificare un lifting schema mapping su OrderRequest in modo
che un'istanza XML di OrderRequest possa essere mappata su un dato semantico su un grafo RDF.
<wsdl:description>
...
<wsdl:types>
<xsd:schema
targetNamespace="http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/PurchaseOrderSe
rvice#" elementFormDefault="qualified">
<xsd:element name="OrderRequest">
<xsd:complexType
sawsdl:liftingSchemaMapping="http://www.w3.org/2002/ws/sawsdl/spec/examples/mapping/Orde
rRequest2Ont.xslt">
<xsd:sequence>
<xsd:element name="firstName" type="xsd:string"/>
<xsd:element name="lastName" type="xsd:string"/>
<xsd:element name="item" type="item" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="item">
<xsd:all>
<xsd:element name="itemCode" type="xsd:string"/>
<xsd:element name="quantity" type="xsd:float"/>
<xsd:element name="dueDate" type="xsd:string"/>
<xsd:element name="billingInfo" type="xsd:POBilling"/>
</xsd:all>
</xsd:complexType>
<xsd:element name="OrderResponse" type="Confirmation"/>
<xsd:simpleType name="Confirmation">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Confirmed"/>
<xsd:enumeration value="Pending"/>
<xsd:enumeration value="Rejected"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
<wsdl:interface name="Order">
<wsdl:operation name="order" pattern="http://www.w3.org/ns/wsdl/in-out">
<wsdl:input element="OrderRequest"/>
<wsdl:output element="OrderResponse"/>
</wsdl:operation>
6. </wsdl:interface>
</wsdl:description>
...
Vediamo ora l'XLST che mappa gli elementi del tipo complesso OrderRequest su i dati
corrispondeti dell'ontologia.
@prefix xs: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix : <http://org1.example.com/ontologies/PurchaseOrder#> .
<http://org1.example.com/ontologies/PurchaseOrder#> rdf:type owl:Ontology .
:OrderRequest rdf:type owl:Class .
:hasLineItems rdf:type owl:ObjectProperty ;
rdfs:domain :OrderRequest ;
rdfs:range :LineItem .
:LineItem rdf:type owl:Class .
:hasPart rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdfs:domain :LineItem ;
rdfs:range :Part .
:Part rdf:type owl:Class .
:hasPartCode rdf:type owl:ObjectProperty ;
rdfs:domain :Part ;
rdfs:range :PartNum .
:PartNum rdf:type owl:Class .
:hasLexicalRespresentation rdf:type owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:domain
[ rdf:type owl:Class ;
owl:unionOf (:Name :PartNum :Date)
] ;
rdfs:range xs:string .
:hasDueDate rdf:type owl:ObjectProperty ;
rdfs:domain :LineItem ;
rdfs:range :Date .
:Date rdf:type owl:Class .
:hasQuantity rdf:type owl:DatatypeProperty ;
rdfs:domain :LineItem ;
rdfs:range xs:float .
:hasBillingInfo rdf:type owl:DatatypeProperty ;
rdfs:domain :LineItem ;
rdfs:range xs:billingInfo .
:hasCustomer rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdfs:domain :OrderRequest ;
rdfs:range :Customer .
:Customer rdf:type owl:Class .
:hasCustomerName rdf:type owl:ObjectProperty ;
rdfs:domain :Customer ;
rdfs:range :Name .
:Name rdf:type owl:Class .
Vediamo ora un file XML di esempio che contiene dei dati strutturati in base allo schema.
<OrderRequest
xmlns="http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/PurchaseOrderServic
e#">
<firstName>John</firstName>
8. <po:hasDueDate>
<po:Date>
<po:hasLexicalRepresentation>
<xsl:value-of select="order:item/order:dueDate"/>
</po:hasLexicalRepresentation>
</po:Date>
</po:hasDueDate>
<po:hasQuantity rdf:datatype="&xs;float">
<xsl:value-of select="order:item/order:quantity"/>
</po:hasQuantity>
<po:hasBillingInfo rdf:datatype="&xs;POBilling">
<xsl:value-of select="order:item/order:billingInfo"/>
</po:hasBillingInfo>
</po:LineItem>
<xsl:apply-templates select="order:OrderRequest" />
</po:hasLineItems>
</po:OrderRequest>
</rdf:RDF>
</xsl:template>
</xsl:transform>
Lowering Schema Mapping
Iniziamo con l'aggiungere ad una annotazione con un liftingSchemaMapping un loweringSchemaMapping.
<xsd:element name="OrderRequest">
<xsd:complexType
sawsdl:liftingSchemaMapping="http://www.w3.org/2002/ws/sawsdl/spec/examples/mapp
ing/OrderRequest2Ont.xslt
sawsdl:loweringSchemaMapping="http://www.w3.org/2002/ws/sawsdl/spec/ex
amples/mapping/Ont2OrderRequest.lowering">
<xsd:sequence>
<xsd:element name="firstName" type="xsd:integer">John</xsd:element>
<xsd:element name="lastName" type="xsd:integer">Smith</xsd:element>
<xsd:element name="item" type="item" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Un loweringSchemaMapping dovrebbe prendere dei dati semantici ma non è molto chiaro in che
forma questi devono essere presentati: per risolvere questo problema usiamo delle query nel
linguaggio SPARQL per prelevare dei dati semantici dall'ontologia e ottenerne una rappresentazione
XML che poi può essere usata per formulare una trasformazione XSLT.
<lowering>
<sparqlQuery>
PREFIX po: <http://org1.example.com/ontologies/PurchaseOrder#>
SELECT ?name ?partNum ?quantity ?dueDate ?billingInfo
WHERE {
?order po:hasCustomer ?customer .
?customer po:hasCustomerName ?custName .
?custName po:hasLexicalRespresentation ?name .
?order po:hasLineItems ?item .
?item po:hasQuantity ?quantity .
?item po:hasBillingInfo ?billingInfo .
?item po:hasDueDate ?Date .
?date po:hasLexicalRepresentation ?dueDate .
?item po:hasPart ?part .
?part po:hasPartCode ?code .
?code po:hasLexicalRespresentation ?partNum }
</sparqlQuery>
9. Si genera quindi una risposta alla query in formato XML.
<sparql xmlns="http://www.w3.org/2005/sparql-results#">
<head>
<variable name="quantity" />
<variable name="partNum" />
<variable name="name" />
<variable name="dueDate" />
<variable name="billingInfo" />
</head>
<results>
<result>
<binding name="quantity">
<literal>12.0</literal>
</binding>
<binding name="partNum">
<literal>052053811</literal>
</binding>
<binding name="name">
<literal>John Smith</literal>
</binding>
<binding name="billingInfo">
<literal>88 Park Road, Lower Dangan, Galway, Ireland</literal>
</binding>
<binding name="dueDate">
<literal>20061114</literal>
</binding>
</result>
</results>
</sparql>
A questo punto possiamo definire una trasformazione XSLT che ci ritornerà di nuovo il tipo
complesso originale.
<xsl:transform version="2.0"
xmlns:po="http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/PurchaseOrderS
ervice#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sp="http://www.w3.org/2005/sparql-results#">
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes" />
<xsl:template match="/sp:sparql">
<po:OrderRequest>
<xsl:variable name="fullName">
<xsl:value-of
select="sp:results/sp:result[position()=1]/sp:binding[@name='name']/sp:literal"/
>
</xsl:variable>
<po:firstName>
<xsl:value-of select="substring-before($fullName,' ')" />
</po:firstName>
<po:lastName>
10. <xsl:value-of select="substring-after($fullName,' ')" />
</po:lastName>
<xsl:apply-templates select="sp:results/sp:result" />
</po:OrderRequest>
</xsl:template>
<xsl:template match="sp:result">
<po:"item">
<po:itemCode>
<xsl:value-of select="sp:binding[@name='partNum']/sp:literal" />
</po:itemCode>
<po:quantity>
<xsl:value-of select="sp:binding[@name='quantity']/sp:literal" />
</po:quantity>
<po:dueDate>
<xsl:value-of select="sp:binding[@name='dueDate']/sp:literal" />
</po:dueDate>
<po:billingInfo>
<xsl:value-of select="sp:binding[@name='billingInfo']/sp:literal" />
</po:billingInfo>
</po:item>
</xsl:template>
</xsl:transform>
</lowering>
Il risultato della trasformazione è il seguente.
<po:OrderRequest
xmlns:po="http://www.w3.org/2002/ws/sawsdl/spec/examples/wsdl/PurchaseOrderSer
vice#"
xmlns:sp="http://www.w3.org/2005/sparql-results#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<po:firstName>John</po:firstName>
<po:lastName>Smith</po:lastName>
<po:item>
<po:itemCode>052053811</po:itemCode>
<po:quantity>12.0</po:quantity>
<po:dueDate>20061114</po:dueDate>
<po:billingInfo>88 Park Road, Lower Dangan, Galway,
Ireland</po:billingInfo>
</po:item>
</po:OrderRequest>
Come nel caso delle annotazioni multiple, ad uno stesso elemento possiamo associare più di uno
schema mapping. Quando vengono specificati URI multipli in liftingSchemaMapping e
loweringSchemaMapping, SAWSDL specifica che questi schema mapping devono essere
considerati come delle alternative la cui scelta è lasciata alla discrezione del client.