Umar; You can read about creating Web services in our FAQ at
www.topquadrant.com/products/TBS_FAQ.html#TBS3. There is also a
section on Web services in the TopBraid Ensemble Application
Development Guide found in the More Information section of
http://www.topquadrant.com/products/TB_Ensemble.html. There is also a
working example at
http://www.topquadrant.com/products/SPARQLMotion_docs/SPARQLMotion_ex_dbpediaCapitals.html
The Web service call would invoke a SPARQLMotion script on the TBL
server. You could design that script to use the
sml:ReturnSPARQLResults module. This will submit a query and return
the results in a **SPARQL endpoint** formats. XML, Turtle, NTriples,
JSON, and other formats are supported. From the client perspective,
you have many choices. One is to use a query such as the following:
SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o .
FILTER (?p = rdfs:subClassOf)
}
This would get all rdfs:subClassOf relationships and your client code
can render the tree. Another is to pass a parameter to the script
representing the root. The client can iterate through the tree,
getting the children of each root and then getting the children of the
resources returned to build the tree. The query in that case would be
(assuming ?root is passed in the Web service call):
SELECT ?child
WHERE
{ ?child rdfs:subClassOf ?root
}
That's about all we can really get into on this forum. Our concern in
this forum is on building a semantic service layer. UI implementation
is a service we provide for our customers through Ensemble, Composer,
Enterprise Vocabulary Network (EVN) and SPARQL Web Pages. Writing the
UI code for rendering trees, etc., goes beyond the scope of this forum
in most cases (a possible exception is if someone wanted to know how
to render a tree in SWP).
-- Scott
On Feb 11, 11:02 am, umar farooq <
umarfarooq...@gmail.com> wrote:
> Dear Scott.
> I am using J2EE and RESTfull web services. but here i just
> need sparql query that return result in N-Triple,XML or JSON format so
> that i can iterate on that on client side .
>
> On Sat, Feb 11, 2012 at 8:01 AM, Scott Henninger <
shennin...@topquadrant.com
>
>
>
>
>
>
>
>
>
> > wrote:
> > Umar; What TopBraid product are you using? If you want to display
> > class structures in a Web application, I'd suggest TopBraid Ensemble.
> > To try this on a desktop, start TBC-ME, which includes a localhost
> > server. Then open a browser tohttp://localhost:8083/tbl, choose
> *Best Regards,
> Umar*