Thank you

I just want to ask I have this ontology in my protege :
http://www.semanticweb.org/untitled-ontology-54

And then I wrote this code in Jena,

public class Testclass {

public static void main(String[] args) {
String ns = "http://www.semanticweb.org/untitled-ontology-54#";;
OntModel model=ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
          Resource light = model.createResource(ns+ "light1");
Property status=model.createProperty(ns+"status");
Literal value=model.createLiteral("On");
light.addProperty(status, value);

*So this light1 resource is added where? And how can I combine/query this
with the resources in my protege ontology?*

*Regards*

On Fri, May 13, 2016 at 7:12 PM, Lorenz buehmann <
[email protected]> wrote:

> There is a documentation for the Jena API[1]
>
> [1] https://jena.apache.org/documentation/ontology/
>
> On 13.05.2016 16:58, kumar rohit wrote:
>
>> Hello
>>
>> How can I add an individual in an existing ontology(in Protege) through
>> Jena code? I have University ontology in protege where I have created
>> Students and Teachers under "Student and Teacher" classes.
>> Now I want to add Assistants through Jena code and some properties like
>> his
>> name, address etc?
>>
>> Also in most tutorials of Jena there is a URI:
>>
>> String personURI = "http://somewhere/JohnSmith";;
>>
>> What does this means? In my case, it will be the URI of my Protege
>> (WWW.semanticweb/myontology/university) and the resource will be added to
>> this ontology?
>>
>> I am sure I am wrong but this what my wild guess is?
>>
>> Regards
>>
>> <
>> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>> >
>> Virus-free.
>> www.avast.com
>> <
>> https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>> >
>> <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>>
>

Reply via email to