[Developers] Querying schema + instances
Eynard, Davide
davide.eynard at hp.com
Tue Aug 19 00:49:46 UTC 2008
Hi all,
I'm trying to query all the topics which contain one
"/common/webpage" in their schemas for some given URL,
but I'm not having much success. My problem is that,
given a URL, I'd like to find the topics that refer
to that URL: however, they could refer to it as a
normal weblink (as in /common/topic), as an IMDB film
page (as in /film/film), as an artist page (as in
/music/artist) and so on.
I can easily get the list of types which contain one
property that points to a /common/webpage:
[
{
"id" : null,
"name" : null,
"properties" : [
{
"expected_type" : "/common/webpage",
"id" : null,
"name" : null
}
],
"type" : "/type/type"
}
]
So the basic approach I thought about was to try to
build up a query based on this information. I have
the type, the name of the property whose type is
a webpage, so it should not be impossible to build an
MQL query which will automatically adapt for any
future schema. However, I was wondering if there was
a way to do this only in MQL, without the need to
pass though an external app.
Any hints? :)
Cheers,
da
More information about the Developers
mailing list