rdfs:label

35 views
Skip to first unread message

Sonali Deo

unread,
Nov 27, 2012, 5:41:36 PM11/27/12
to skos...@googlegroups.com
Hello,
I need to generate the following - how to add the rdfs:label to skos:ConceptScheme

<skos:ConceptScheme rdf:about="#conceptScheme1">
        <rdfs:label>concept schema 1</rdfs:label>
    </skos:ConceptScheme>

Thanks for the help

Simon Jupp

unread,
Nov 29, 2012, 6:01:10 AM11/29/12
to skos-dev
HI Sonali, 

You can add a rdfs:label to a concept scheme like this:

SKOSConceptScheme conceptScheme1 = df.getSKOSConceptScheme(URI.create("http://your#onceptScheme"));
SKOSAnnotationAssertion annotationAssertion = df.getSKOSAnnotationAssertion( conceptScheme1, df.getSKOSAnnotation(OWLRDFVocabulary.RDFS_LABEL.getIRI().toURI(), "label"));

Let me know if you need any more info. 
Cheers
Simon


--
You received this message because you are subscribed to the Google Groups "skos-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/skos-dev/-/2tmSjez7mtgJ.
To post to this group, send email to skos...@googlegroups.com.
To unsubscribe from this group, send email to skos-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/skos-dev?hl=en.

Sonali Deo

unread,
Nov 30, 2012, 12:13:07 PM11/30/12
to skos...@googlegroups.com
Further I tried replacing ".getIRI()" by  ".getURI()" - which does not work either.
Please suggest,
Thanks,
Sonali

Simon Jupp

unread,
Dec 3, 2012, 9:18:04 AM12/3/12
to skos-dev
Hi, 
You could just create the URI for the label yourself like

URI rdfsLabelUri = URI.create("http://www.w3.org/2000/01/rdf-schema#label");

and then do 
SKOSAnnotationAssertion annotationAssertion = df.getSKOSAnnotationAssertion( conceptScheme1, df.getSKOSAnnotation(rdfsLabelUri, "label"));


To view this discussion on the web visit https://groups.google.com/d/msg/skos-dev/-/gHoSpbhxR3sJ.
Reply all
Reply to author
Forward
0 new messages