Hi Marco,
On 16/05/11 18:46, Marco Seysse wrote:
While reading the documentation and class diagramms of the Jena OWL
API I figured out to need more information to understand the
context.
My idea is to search in an OWL-DL ontology for related concepts of
one or more given concepts. Since SPARQL just works on RDF level I
see just a chance to achieve this by jumping from concept to concept
via their relations.
Yes, that seems right. Depending on the relationshiops between the
concepts, you may see rdfs:subClassOf relations between URI's denoting
concepts, or SKOS relationships, or other connections you add yourself.
Could you offer me some explanation and/or code examples how it is
possible to make it work?
Code samples for navigating the RDF model, or running sparql queries,
are on the various documentation pages. We'd be happy to make more
specific suggestions, but you'll need to ask a more specific question
first :)
If your concept scheme is using SKOS, you could broaden a concept to get
more results, or narrow it to get fewer, more specific results.
E.g
select ?thing ?concept where {
?base skos:subject ?base-concept.
?base-concept skos:narrower ?concept.
?thing skos:subject ?concpept.
}
You can run this query with ?base pre-bound to the resource you are
interested in (see [1] for one way of doing this)
Or do you know other approaches how to perform semantic searches in
an OWL-DL ontology?
Semantic searching is quite a well-researched area. I advise starting
with the proceedings of the Semantic Search workshops (e.g. [2]) and
seeing which research themes meet your needs.
My second question is about the exact purpose of the “Graph”
interface and its relation to the “Model” interface.
Graph is the more basic internal programming API, where as Model has
more features and is intended for normal use. You are welcome to use
Graph if it meets your needs, but that's typically if you're working on
e.g. Jena extensions or new data source types.
Hth,
Ian
[1]
http://www.ldodds.com/blog/2005/11/parameterised-queries-with-sparql-and-arq/
[2] https://km.aifb.kit.edu/ws/semsearch11
--
____________________________________________________________
Ian Dickinson Epimorphics Ltd, Bristol, UK
mailto:[email protected] http://www.epimorphics.com
cell: +44-7786-850536 landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd. is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
Portishead, Bristol BS20 6PT, UK