Re: Faceted Search

Sebastian Samaruga <[email protected]> Wed, 2 Dec 2015 16:20:34 -0300
Newsgroups gmane.org.w3c.semantic-web,gmane.text.xml.xtm.general
Message-ID <CAFnmbpWqRcciWwU2ggHHfeUXLiyL4p6kKHHKvYp39preXGVpXA@mail.gmail.com>
--001a113ecf321e32350525ef2bc7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Martynas,

Happy you replied my message. I've been watching Graphity and it is
awesome. But, although our scopes seems to be similar I think there are
huge differences at implementation level and at presentation level.

What I would like to have built is a 'semantic' browser focused in analysis
and mining for business intelligence and for building indexes and process
flows definitions. I use forms for that and I also use XSL but for data
coming from my metamodel, serialized from JAXB beans. My metamodel is a
completely normalized scheme in which 'tables', 'columns' and 'values' are
interchangeable entities aggregated into 'rows' (Mappings). It comes from a
variety of sources, including but not just RDF. The metamodel has a notion
of triples regarding the application state and I use them when triple
exchange is needed.

I'm aiming to be able, for example, to build queries with analysis metadata
from the URIs given to a REST service. Being this service a HATEOAS
service, a client could browse through the use cases / contexts only with
metadata. Loaders from multiple sources (JDBC, RDF, XML, JSON, CSV, SPARQL,
etc) exist to populate the mappings layer. The browser UI aggregates
'tables' (metaclasses), once a metaclass is selected it shows its 'columns'
(roles) and selecting a 'column' shows the column values. If I select one
'row' while navigating (instances) the values shown will be only the ones
of that instance (Mapping).

You can check it in Sourceforge http://sourceforge.net/projects/cognescent/

The WAR file downloadable there shows examples with a sample load data
form. Modify datasources.xml in the src root to test other datasources. The
XSL templates (Resumen button in the browser) only outputs the raw XML.
Once the stylesheets are developed they'll bring a cleaner knowledge view.

A sample URI to check in the REST interface would be like (dummy):
http://localhost:8080/CognescentSBI/resources/data/metaId:instId[predAxisId=
]/instId:instId[predAxisId]/instId:instId[predAxisId]

To test the REST service go to:
[your_server:your:port]/CognescentSBI/resources/sbi/data

The predicate axis IDs (predAxisId) will be for the implementation of the
Analyzer component so it can aggregate instances due to this predicates
values. The URI is parsed to build the faceted queries.

Best,
Sebastian.


On Wed, Nov 18, 2015 at 1:29 PM, Martynas Jusevi=C4=8Dius <martynas@graphit=
y.org>
wrote:

> Sebastian,
>
> there was little traffic on this list so far, yet your message went
> unnoticed. Sorry for that!
>
> You can view the webpage for your data as an (X)HTML representation of
> RDF. It can be completely data-driven and simply a function that
> transforms the RDF response into an (X)THML response. You could do it
> in a number of ways: using an imperative language such as Java, or
> various template engines.
>
> From a declarative perspective, XSLT (2.0) is probably the best tool
> for this. The RDF/XML syntax is admittedly not straightforward, but
> XSLT is a functional and Turing-complete language that can handle it
> effectively and transform it to (X)HTML or other formats.
> Graphity Client includes a number of predefined generic XSLT
> stylesheets that can be imported, extended, customized etc:
>
> https://github.com/Graphity/graphity-client/tree/master/src/main/webapp/s=
tatic/org/graphity/client/xsl
>
> The facets part is more complicated. If you are using SPARQL to
> retrieve RDF results, you can modify the query on the fly, to narrow
> down matches based on the facet selections. That is what we did in
> this project: http://dedanskeaviser.dk/newspapers
> If not, then it depends on the API you are using to access RDF.
>
> I am not familiar with DCI or its concept of actors/roles/contexts.
> Maybe it would be easier if you explained your goals. If you are
> looking for a functional implementation of data-driven applications
> that uses REST and HATEOS and builds interactive forms and other
> navigation items, it is exactly what we provide:
> http://graphityhq.com/technology
>
> We would be happy to this topic discuss further.
>
>
> Martynas
> graphityhq.com
>
> On Mon, Oct 12, 2015 at 10:26 PM, Sebastian Samaruga
> <[email protected]> wrote:
> > Sorry if this is not the right list. I've came here from a reply in a
> > previous post.
> >
> > I don't know if this is something new, it just seems it was useful for
> the
> > kind of interface I was looking for. I was just wondering what would be
> the
> > best way to facilitate browsing and search in the application demo I'm
> > building that renders RDF / Semantic Web contents. I've figured out the=
re
> > must be a tree hierarchy of categories, roles and instances of data to
> which
> > adhere the incoming data parsing so having a common denominator for
> > different input structures.
> >
> > Having this structures, browsing through the tree of data, an item
> (leave or
> > node) could be 'picked up' as a facet. For example, if the scenario is
> "Car
> > Rental" as a category, "Car Model" and "Rental City" as roles and many
> > models of cars and many cities as instances, what if I could pick a car
> > model, a city or both and press "Aggregate" and this resulting in root
> > categories for each specific car rental ("Car Rental 1", "Car Rental 2"=
,
> > etc) with its roles populated with the corresponding criteria values (t=
he
> > city corresponding to "Car Rental 1" given its car, etc).
> >
> > Maybe this sounds dumb. But the question is: how difficult would be to
> build
> > such a filter criteria using only RDF datasources. RDF statement
> resources
> > are not individualized by their occurrences. An RDF resource is the sam=
e
> > regardless which statements it occurs. And, although I've found a way t=
o
> > individualize occurrences of, for example, Car Rental(s), I can't find
> the
> > way yet to correlate this instances with the instances of their roles.
> >
> > Also, I'm restricting my mappings (ontology processing output) to three
> > levels depth, which seems arbitrary. I could not restrict the graph to
> any
> > depth. But I'll keep trying a while with this arrangements. It seems
> > attractive the correlation of categories, roles and instances with some
> of
> > the concepts in the DCI programming model
> > (https://en.wikipedia.org/wiki/Data,_context_and_interaction) which
> could
> > allow for a model driven focused approach of building the client
> > application, again with the ontology 'common factors' concept in mind.
> >
> > And the concept of actors, roles and contexts seems as an ideal case fo=
r
> a
> > functional language implementation of what could be a runtime environme=
nt
> > for data driven applications (think of a REST-HATEOAS client that
> > interactively builds forms and other navigation items simply by content
> > negotiation with a functional data-state-based endpoint).
> >
> > Source, examples and the demo web application are available in the
> project
> > web page:
> >
> > http://cognescent.blogspot.com
> > http://sourceforge.net/projects/cognescent/
> >
> > Regards,
> > Sebastian
>

--001a113ecf321e32350525ef2bc7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div>Martynas,<br><br></div>Happy you =
replied my message. I&#39;ve been watching Graphity and it is awesome. But,=
 although our scopes seems to be similar I think there are huge differences=
 at implementation level and at presentation level.<br><br></div>What I wou=
ld like to have built is a &#39;semantic&#39; browser focused in analysis a=
nd mining for business intelligence and for building indexes and process fl=
ows definitions. I use forms for that and I also use XSL but for data comin=
g from my metamodel, serialized from JAXB beans. My metamodel is a complete=
ly normalized scheme in which &#39;tables&#39;, &#39;columns&#39; and &#39;=
values&#39; are interchangeable entities aggregated into &#39;rows&#39; (Ma=
ppings). It comes from a variety of sources, including but not just RDF. Th=
e metamodel has a notion of triples regarding the application state and I u=
se them when triple exchange is needed.<br><br></div>I&#39;m aiming to be a=
ble, for example, to build queries with analysis metadata from the URIs giv=
en to a REST service. Being this service a HATEOAS service, a client could =
browse through the use cases / contexts only with metadata. Loaders from mu=
ltiple sources (JDBC, RDF, XML, JSON, CSV, SPARQL, etc) exist to populate t=
he mappings layer. The browser UI aggregates &#39;tables&#39; (metaclasses)=
, once a metaclass is selected it shows its &#39;columns&#39; (roles) and s=
electing a &#39;column&#39; shows the column values. If I select one &#39;r=
ow&#39; while navigating (instances) the values shown will be only the ones=
 of that instance (Mapping).<br><br></div>You can check it in Sourceforge <=
a href=3D"http://sourceforge.net/projects/cognescent/" target=3D"_blank">ht=
tp://sourceforge.net/projects/cognescent/</a><br><br></div><div>The WAR fil=
e downloadable there shows examples with a sample load data form. Modify da=
tasources.xml in the src root to test other datasources. The XSL templates =
(Resumen button in the browser) only outputs the raw XML. Once the styleshe=
ets are developed they&#39;ll bring a cleaner knowledge view.<br></div><div=
><br></div><div>A sample URI to check in the REST interface would be like (=
dummy):<br></div><div><a href=3D"http://localhost:8080/CognescentSBI/resour=
ces/data/metaId:instId%5BpredAxisId%5D/instId:instId%5BpredAxisId%5D/instId=
:instId%5BpredAxisId%5D" target=3D"_blank">http://localhost:8080/Cognescent=
SBI/resources/data/metaId:instId[predAxisId]/instId:instId[predAxisId]/inst=
Id:instId[predAxisId]</a></div><div><br></div><div>To test the REST service=
 go to: [your_server:your:port]/CognescentSBI/resources/sbi/data<br></div><=
div><br></div><div>The predicate axis IDs (predAxisId) will be for the impl=
ementation of the Analyzer component so it can aggregate instances due to t=
his predicates values. The URI is parsed to build the faceted queries.<br><=
br></div><div>Best,<br></div><div>Sebastian.<br></div><div><br></div></div>=
<div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Nov 18, 2=
015 at 1:29 PM, Martynas Jusevi=C4=8Dius <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:[email protected]" target=3D"_blank">[email protected]</a>&gt=
;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
..8ex;border-left:1px #ccc solid;padding-left:1ex">Sebastian,<br>
<br>
there was little traffic on this list so far, yet your message went<br>
unnoticed. Sorry for that!<br>
<br>
You can view the webpage for your data as an (X)HTML representation of<br>
RDF. It can be completely data-driven and simply a function that<br>
transforms the RDF response into an (X)THML response. You could do it<br>
in a number of ways: using an imperative language such as Java, or<br>
various template engines.<br>
<br>
>From a declarative perspective, XSLT (2.0) is probably the best tool<br>
for this. The RDF/XML syntax is admittedly not straightforward, but<br>
XSLT is a functional and Turing-complete language that can handle it<br>
effectively and transform it to (X)HTML or other formats.<br>
Graphity Client includes a number of predefined generic XSLT<br>
stylesheets that can be imported, extended, customized etc:<br>
<a href=3D"https://github.com/Graphity/graphity-client/tree/master/src/main=
/webapp/static/org/graphity/client/xsl" rel=3D"noreferrer" target=3D"_blank=
">https://github.com/Graphity/graphity-client/tree/master/src/main/webapp/s=
tatic/org/graphity/client/xsl</a><br>
<br>
The facets part is more complicated. If you are using SPARQL to<br>
retrieve RDF results, you can modify the query on the fly, to narrow<br>
down matches based on the facet selections. That is what we did in<br>
this project: <a href=3D"http://dedanskeaviser.dk/newspapers" rel=3D"norefe=
rrer" target=3D"_blank">http://dedanskeaviser.dk/newspapers</a><br>
If not, then it depends on the API you are using to access RDF.<br>
<br>
I am not familiar with DCI or its concept of actors/roles/contexts.<br>
Maybe it would be easier if you explained your goals. If you are<br>
looking for a functional implementation of data-driven applications<br>
that uses REST and HATEOS and builds interactive forms and other<br>
navigation items, it is exactly what we provide:<br>
<a href=3D"http://graphityhq.com/technology" rel=3D"noreferrer" target=3D"_=
blank">http://graphityhq.com/technology</a><br>
<br>
We would be happy to this topic discuss further.<br>
<br>
<br>
Martynas<br>
<a href=3D"http://graphityhq.com" rel=3D"noreferrer" target=3D"_blank">grap=
hityhq.com</a><br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
On Mon, Oct 12, 2015 at 10:26 PM, Sebastian Samaruga<br>
&lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wr=
ote:<br>
&gt; Sorry if this is not the right list. I&#39;ve came here from a reply i=
n a<br>
&gt; previous post.<br>
&gt;<br>
&gt; I don&#39;t know if this is something new, it just seems it was useful=
 for the<br>
&gt; kind of interface I was looking for. I was just wondering what would b=
e the<br>
&gt; best way to facilitate browsing and search in the application demo I&#=
39;m<br>
&gt; building that renders RDF / Semantic Web contents. I&#39;ve figured ou=
t there<br>
&gt; must be a tree hierarchy of categories, roles and instances of data to=
 which<br>
&gt; adhere the incoming data parsing so having a common denominator for<br=
>
&gt; different input structures.<br>
&gt;<br>
&gt; Having this structures, browsing through the tree of data, an item (le=
ave or<br>
&gt; node) could be &#39;picked up&#39; as a facet. For example, if the sce=
nario is &quot;Car<br>
&gt; Rental&quot; as a category, &quot;Car Model&quot; and &quot;Rental Cit=
y&quot; as roles and many<br>
&gt; models of cars and many cities as instances, what if I could pick a ca=
r<br>
&gt; model, a city or both and press &quot;Aggregate&quot; and this resulti=
ng in root<br>
&gt; categories for each specific car rental (&quot;Car Rental 1&quot;, &qu=
ot;Car Rental 2&quot;,<br>
&gt; etc) with its roles populated with the corresponding criteria values (=
the<br>
&gt; city corresponding to &quot;Car Rental 1&quot; given its car, etc).<br=
>
&gt;<br>
&gt; Maybe this sounds dumb. But the question is: how difficult would be to=
 build<br>
&gt; such a filter criteria using only RDF datasources. RDF statement resou=
rces<br>
&gt; are not individualized by their occurrences. An RDF resource is the sa=
me<br>
&gt; regardless which statements it occurs. And, although I&#39;ve found a =
way to<br>
&gt; individualize occurrences of, for example, Car Rental(s), I can&#39;t =
find the<br>
&gt; way yet to correlate this instances with the instances of their roles.=
<br>
&gt;<br>
&gt; Also, I&#39;m restricting my mappings (ontology processing output) to =
three<br>
&gt; levels depth, which seems arbitrary. I could not restrict the graph to=
 any<br>
&gt; depth. But I&#39;ll keep trying a while with this arrangements. It see=
ms<br>
&gt; attractive the correlation of categories, roles and instances with som=
e of<br>
&gt; the concepts in the DCI programming model<br>
&gt; (<a href=3D"https://en.wikipedia.org/wiki/Data,_context_and_interactio=
n" rel=3D"noreferrer" target=3D"_blank">https://en.wikipedia.org/wiki/Data,=
_context_and_interaction</a>) which could<br>
&gt; allow for a model driven focused approach of building the client<br>
&gt; application, again with the ontology &#39;common factors&#39; concept =
in mind.<br>
&gt;<br>
&gt; And the concept of actors, roles and contexts seems as an ideal case f=
or a<br>
&gt; functional language implementation of what could be a runtime environm=
ent<br>
&gt; for data driven applications (think of a REST-HATEOAS client that<br>
&gt; interactively builds forms and other navigation items simply by conten=
t<br>
&gt; negotiation with a functional data-state-based endpoint).<br>
&gt;<br>
&gt; Source, examples and the demo web application are available in the pro=
ject<br>
&gt; web page:<br>
&gt;<br>
&gt; <a href=3D"http://cognescent.blogspot.com" rel=3D"noreferrer" target=
=3D"_blank">http://cognescent.blogspot.com</a><br>
&gt; <a href=3D"http://sourceforge.net/projects/cognescent/" rel=3D"norefer=
rer" target=3D"_blank">http://sourceforge.net/projects/cognescent/</a><br>
&gt;<br>
&gt; Regards,<br>
&gt; Sebastian<br>
</div></div></blockquote></div><br></div>

--001a113ecf321e32350525ef2bc7--