%@ page info="Simple Demo: OBSERVER execution" language="java" import="observer.ontServer.*,observer.ontServer.mapTrans.*,observer.ontServer.wrappers.*,observer.observer.*,java.util.*,java.io.*" %>
Query:
[Name Location Price] of (AND hotel (FILLS 200 price))
Mapping Query <% Mapping map= os.getMapping( "[Name Location Price] for (AND Hotel (FILLS Price \"200\"))", "hotels", ObserverCONST.LOG_ONTOLOGY_SERVER, this); %>
<%=map%>
Multi-Repository to Mono-Repository Queries
<% Hashtable ht = os.getMonoRepositoryPlans( "[Name Location Price] for (AND Hotel (FILLS Price \"200\"))", "hotels", ObserverCONST.LOG_ONTOLOGY_SERVER, this); Enumeration enum =ht.keys(); %>
ALIAS | REPOSITORY | MAPPING |
---|---|---|
<%=key%> | <%=((MappingTree)value).getRepository(0)%> |
<%
try{
ByteArrayInputStream input = new ByteArrayInputStream(
((MappingTree)value).toMapping().getBytes() );
ViewMapping g = new ViewMapping(input);
g.setLevel(0);
String s = g.relation();
%>
<%=s%> |
Local Query Languaje for each repository involved in the query
Result of the above query: <% try{ Table t= os.getExtension( "[Name Location Price] for (AND Hotel (FILLS Price \"200\"))", "hotels", ObserverCONST.LOG_ONTOLOGY_SERVER, this); %>
<%=h.colName%>
<%
}
Vector tuples = t.getAllTuples();
for (int i=0; i |
---|