% Test 002 Jena 2.0 Toolkit
% prova_jena.bat or prova_jena.sh must be used to run this code.
% Jena packages should be in ./lib/jena.

% The example demonstrates how
%   - a model can be read from a file in RDF;
%   - recover all Subjects with a given Property
:- eval(test031()).

test031() :-
	println(["==========test031=========="]),
	Model = com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel(),
	IS = java.io.FileInputStream("vc-db-1.rdf"),
	ISR = java.io.InputStreamReader(IS),
	Model.read(ISR,""),
	Iter = Model.listSubjectsWithProperty(com.hp.hpl.jena.vocabulary.VCARD.FN),
	element(Res,Iter),
	println(["Res=",Res]).
