There is no need to parse RDF model for each
application/execution of application.
Example:
1 to run database
1 run
rmiregistry
2 run
java JenaQueryServer
the
RMI RDF Query Facility will be operating on rmi://yourcomputerIP:1099/JQF
2 to load RDF model:
A from Interactive Client
1 run "java JQFClient",
then in prompt
connect
127.0.0.1:1099
load
http://yourRDFfileaddress
B from
any application
connect
to RDF Query Facility: IJenaQueryFacility jqf = (IJenaQueryFacility)Naming.lookup("rmi://yourserverIP:1099/JQF");
load
model:
if (jqf.getState().equals(IJenaQueryFacility.state_loaded)){
// model is already loaded
} else {
try {
jqf.loadModel(modelURL);
// model loaded
} catch (Exception e) {
// exception handling
}
3 to
query database
A from
interactive client
1 run "java JQFClient",
then in prompt
connect
rdfserverIP:1099
select ...
now in client select
should be in small letters and all query in one paragrah. will be solved soon
B from application
ArrayList results = jqf.query(command);
// command is RDQL
string
// Array list is array
list of rows of result set, each row is ArrayList of values