OpenLink Software Server 4.5 Manual Do Utilizador

Página de 28
Virtuoso 4.5 Application and Integration Reviewers Guide  
Copyright ©2006 OpenLink Software 
 
 
17 
Figure 16 – Demo Table BOOK_VIEW_DETAILS 
 
Figure 17 – Schema Object BOOK_VIEW_DETAILS Definitions 
 
New types can be further derived producing sub-types. User-defined types can include 
methods and constructors to create any potentially complicated system to house data as 
exactly required. Virtuoso automatically handles the mapping between the SQL type 
system and hosted language native types
.   
Now that we have seen how to define types the examples below will show how they can 
be used to hosts a Java VM or C# and allow manipulation of classes through the SQL 
user defined types. 
Note 3 - At install time, you must select the runtime hosting option for Java and the CLR on 
Windows and Java and Mono/CLR as the interfaces require Mono/CLR and Java extension servers.  
In addition, All Java classes have to be in the CLASSPATH of the hosted Java VM. 
3.3.2.1 Runtime Hosting using C# and Java objects to extend 
Virtuoso via User Defined Types 
3.3.2.1.1 
User Defined Types and CLR  
 
The examples in this section show hosting a distance calculation written C# hosted by 
Virtuoso.   In the steps, we will define a class point written in both Java and C#, which 
can be found in the bin directory under Virtuoso 4.5 which are automatically installed.  
For example on Windows C:/Program Files/OpenLink/Virtuoso 4.5/bin.