I am sorry but I used model.read method but did not mention it in the code.
I mean the rdf file is readed successfully but still I could not find the
individual when I open the file in Protege.


On Thu, Jun 30, 2016 at 1:51 PM, Andy Seaborne <[email protected]> wrote:

> On 30/06/16 21:43, kumar rohit wrote:
>
>> I have an rdf file on c:/users/desktop/std.rdf. I have the following jena
>> code
>>
>
>
> which does not read the file.
>
>
>> *String personURI = "c://users/desktop/rohit/std.rdf";*
>>
>
> There is no connection between using a URI and a file.  That is just a
> string used as a URI.  If you change it ... you don't get "file not found"
>
> * String fullName = "rohit kumar";*
>> *// create an empty Model*
>> *Model model = ModelFactory.createDefaultModel();*
>>
>
> Empty model.
>
> *// create the resource*
>> *Resource res1 = model.createResource(personURI)..addProperty(VCARD.FN,
>> fullName);*
>>
>> What happens after this code? Is this save "rohit kumar" in the file
>> std.rdf?
>>
>
> No.
>
> read the file into a model (RDFDataMgr or model.read), change it, write it
> out again.
>
> See the tutorials.
>
>
>
>
>> I can not find this resource after running this code and open the file in
>> Protege?
>>
>>
>         Andy
>

Reply via email to