You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by neha gupta <ne...@gmail.com> on 2016/10/29 10:49:41 UTC

Two Models handling

I have ontology in which I want to add Team wins and goals. In this
ontology I uses only the current wins using:
team.setPropertyValue() as it over write old data.

I also need to keep track of previous team wins, goals etc so I want to
store it in another owl file and will use
team.addLiteral(). I will use another model for that i-e model2

But I dont know how to write that specific values to second ontology. I
mean I will have team.setPropertyValue() in my main model and will be
stored in my main owl file. But how can I store team.addLiteral() in my
second owl file using model2 ?

my main model to write in file is at the end of code is :
 infmodel.write(writer, "RDF/XML"); //Because I used rules

Re: Two Models handling

Posted by "Lorenz B." <bu...@informatik.uni-leipzig.de>.
What about simply using the second model and add the statement?

https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/ModelCon.html#add-org.apache.jena.rdf.model.Resource-org.apache.jena.rdf.model.Property-java.lang.String-org.apache.jena.datatypes.RDFDatatype-

> I mean my main issue and question is how to write few methods like
> team.addLiteral() to the second model.?
>
> On Sat, Oct 29, 2016 at 1:49 PM, neha gupta <ne...@gmail.com> wrote:
>
>> I have ontology in which I want to add Team wins and goals. In this
>> ontology I uses only the current wins using:
>> team.setPropertyValue() as it over write old data.
>>
>> I also need to keep track of previous team wins, goals etc so I want to
>> store it in another owl file and will use
>> team.addLiteral(). I will use another model for that i-e model2
>>
>> But I dont know how to write that specific values to second ontology. I
>> mean I will have team.setPropertyValue() in my main model and will be
>> stored in my main owl file. But how can I store team.addLiteral() in my
>> second owl file using model2 ?
>>
>> my main model to write in file is at the end of code is :
>>  infmodel.write(writer, "RDF/XML"); //Because I used rules
>>
-- 
Lorenz B�hmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center


Re: Two Models handling

Posted by neha gupta <ne...@gmail.com>.
I mean my main issue and question is how to write few methods like
team.addLiteral() to the second model.?

On Sat, Oct 29, 2016 at 1:49 PM, neha gupta <ne...@gmail.com> wrote:

> I have ontology in which I want to add Team wins and goals. In this
> ontology I uses only the current wins using:
> team.setPropertyValue() as it over write old data.
>
> I also need to keep track of previous team wins, goals etc so I want to
> store it in another owl file and will use
> team.addLiteral(). I will use another model for that i-e model2
>
> But I dont know how to write that specific values to second ontology. I
> mean I will have team.setPropertyValue() in my main model and will be
> stored in my main owl file. But how can I store team.addLiteral() in my
> second owl file using model2 ?
>
> my main model to write in file is at the end of code is :
>  infmodel.write(writer, "RDF/XML"); //Because I used rules
>