GithubHelp home page GithubHelp logo

atomgraph / web-client Goto Github PK

View Code? Open in Web Editor NEW
121.0 22.0 14.0 44.86 MB

Generic Linked Data browser and UX component framework. Apache license.

Home Page: https://hub.docker.com/r/atomgraph/web-client/

License: Apache License 2.0

Java 4.60% XSLT 8.92% CSS 0.28% JavaScript 86.10% Dockerfile 0.03% Shell 0.07%
rdf xslt client linked-data browser ui-components stylesheets generic rich-client ui-kit

web-client's Introduction

AtomGraph Web-Client is a Linked Data web client. If you have a triplestore with RDF data that you want to publish and/or build an end-user application on it, or would like to explore Linked Open Data, Web-Client provides the components you need.

Web-Client renders (X)HTML user interface by transforming "plain" RDF/XML (without nested resource descriptions) using XSLT 3.0 stylesheets.

AtomGraph Web-Client screenshot

Features

What AWC provides for users as out-of-the-box generic features:

  • loading RDF data from remote Linked Data sources
  • multilingual, responsive user interface built with Twitter Bootstrap (currently 2.3.2)
  • multiple RDF rendering modes (currently item/list/table/map)
  • RDF editing mode based on RDF/POST encoding
  • SPARQL endpoint with interactive results

Getting started

For full documentation, see the wiki index.

Usage

Docker

Processor is available from Docker Hub as atomgraph/web-client image. It accepts the following environment variables (that become webapp context parameters):

STYLESHEET
Custom XSLT stylesheet
URI, optional
RESOLVING_UNCACHED
If true, the stylesheet will attempt to resolve (dereference) URI resources in the rendered RDF data to improve the UX
true/false, optional

Run Web-Client with the default XSLT stylesheet like this:

docker run -p 8080:8080 atomgraph/web-client

Web-Client will be available on http://localhost:8080.

Maven

Web-Client is released on Maven central as com.atomgraph:client.

Support

Please report issues if you've encountered a bug or have a feature request.

Commercial AtomGraph consulting, development, and support are available from AtomGraph.

Community

Please join the W3C Declarative Linked Data Apps Community Group to discuss and develop AtomGraph and declarative Linked Data architecture in general.

web-client's People

Contributors

hanecak avatar namedgraph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web-client's Issues

Quick browsing in Input view

Currently the Input view for a container lists all the items in this container, and all the properties that apply to the item and than can be modified.

This results in a very long list, that is not easy to navigate.

Since there is space on the side, a flat list of all the items could be listed on the side. Clicking on an item would scroll to center view to it.

Additionally, for better visibility, the items listed in the center view could be collapsed, until the users clicks on them or select them in this new side list.

http://getbootstrap.com/2.3.2/components.html The side bar could be used for this side list, with a smaller font and line height.

Circular definition of $ont-model

Error on line 117 of Resource.xsl:
XTDE0640: Circular definition of variable ont-model
in variable ont-model (file:///usr/local/apache-tomcat-7.0.26/webapps/ROOT/WEB-INF/Resource.xsl#95)
01:09:00,062 ERROR ResourceXHTMLWriter:139 - XSLT transformation failed
; SystemID: file:///usr/local/apache-tomcat-7.0.26/webapps/ROOT/WEB-INF/Resource.xsl; Line#: 117; Column#: -1
net.sf.saxon.trans.XPathException: Circular definition of variable ont-model
at net.sf.saxon.expr.ErrorExpression.evaluateItem(ErrorExpression.java:58)
at net.sf.saxon.expr.ErrorExpression.iterate(ErrorExpression.java:71)
at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:308)
at net.sf.saxon.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:209)
at net.sf.saxon.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:233)
at net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:480)
at net.sf.saxon.expr.VariableReference.evaluateItem(VariableReference.java:447)
at net.sf.saxon.functions.KeyFn.iterate(KeyFn.java:203)
at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:278)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
at net.sf.saxon.Controller.transformDocument(Controller.java:1807)
at net.sf.saxon.Controller.transform(Controller.java:1621)
at org.graphity.util.XSLTBuilder.transform(XSLTBuilder.java:191)
at org.graphity.browser.provider.xslt.ResourceXHTMLWriter.writeTo(ResourceXHTMLWriter.java:134)
at org.graphity.browser.provider.xslt.ResourceXHTMLWriter.writeTo(ResourceXHTMLWriter.java:49)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1316)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Aug 2, 2012 1:09:00 AM com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: net.sf.saxon.trans.XPathException: Circular definition of variable ont-model
at org.graphity.browser.provider.xslt.ResourceXHTMLWriter.writeTo(ResourceXHTMLWriter.java:140)
at org.graphity.browser.provider.xslt.ResourceXHTMLWriter.writeTo(ResourceXHTMLWriter.java:49)
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1316)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.saxon.trans.XPathException: Circular definition of variable ont-model
at net.sf.saxon.expr.ErrorExpression.evaluateItem(ErrorExpression.java:58)
at net.sf.saxon.expr.ErrorExpression.iterate(ErrorExpression.java:71)
at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:308)
at net.sf.saxon.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:209)
at net.sf.saxon.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:233)
at net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:480)
at net.sf.saxon.expr.VariableReference.evaluateItem(VariableReference.java:447)
at net.sf.saxon.functions.KeyFn.iterate(KeyFn.java:203)
at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:278)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:556)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:296)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:203)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:345)
at net.sf.saxon.Controller.transformDocument(Controller.java:1807)
at net.sf.saxon.Controller.transform(Controller.java:1621)
at org.graphity.util.XSLTBuilder.transform(XSLTBuilder.java:191)
at org.graphity.browser.provider.xslt.ResourceXHTMLWriter.writeTo(ResourceXHTMLWriter.java:134)
... 25 more

gp:cacheControl and lda:uriTemplate

gp:cacheControl, lda:uriTemplate and similar should probably be OWL annotation properties, attached directly to resource classes instead of restrictions. It makes no sense for the actual instance data to contain these properties anyway.

OWL annotations

Search & autocomplete

Create org.graphity.browser.SearchResource (use SPIN API to replace regex() match string as RDF literal)

Pagination on Models

Pagination using QueryBuilder currently works on SPARQL endpoints only.

Apply the same mechanism on Linked Data resources and unify pagination using SPARQL OFFSET/LIMIT either on SPARQL endpoints or Resource Model.

Load sitemap and XSLT from remote Graphity instance

Right now the sitemap and the stylesheet are stored locally and configured in web.xml. They could be advertised via HTTP Link headers and loaded in run-time by the client from a remote Graphity instance, and then used for class matching and transformation as usual. This probably involves changes to OntologyProvider and XSLTBuilderProvider.

ConversionException

com.hp.hpl.jena.ontology.ConversionException: Cannot convert node http://purl.org/linked-data/api/vocab#uriTemplate to OntProperty at com.hp.hpl.jena.ontology.impl.OntPropertyImpl$1.wrap(OntPropertyImpl.java:68) at com.hp.hpl.jena.enhanced.EnhNode.convertTo(EnhNode.java:155) at com.hp.hpl.jena.enhanced.EnhNode.convertTo(EnhNode.java:34) at com.hp.hpl.jena.enhanced.Polymorphic.asInternal(Polymorphic.java:66) at com.hp.hpl.jena.enhanced.EnhNode.as(EnhNode.java:110) at com.hp.hpl.jena.ontology.impl.OntResourceImpl.objectAs(OntResourceImpl.java:1416) at com.hp.hpl.jena.ontology.impl.RestrictionImpl.getOnProperty(RestrictionImpl.java:122) at org.graphity.processor.model.ResourceBase.matchOntClass(ResourceBase.java:526) at org.graphity.processor.model.ResourceBase.matchOntClass(ResourceBase.java:493) at org.graphity.processor.model.ResourceBase.<init>(ResourceBase.java:192) at org.graphity.client.model.ResourceBase.<init>(ResourceBase.java:140) at org.graphity.client.model.ResourceBase.<init>(ResourceBase.java:113) at eu.refstock.ResourceBase.<init>(ResourceBase.java:41)

Remote Turtle resources do not load

At some point Turtle support was removed from LocatorLinkedData and DataManager due to content type constant changes in Jena's WebContent

Load Mode configuration from sitemap

Read properties gc:defaultMode and gc:mode attached to matched sitemap class to configure the layout modes in XSLT (instead of current static configuration in the stylesheet).

Proxy all HTTP methods in client mode

Right now GlobalResourceBase proxies GET method only. The same should be done for POST, PUT, DELETE. HTTP access might have to be refactored on a lower Response level with Jersey Client API instead of current Jena-based DataManager, which works on RDF Model level.

RDFa generation

RDFa markup could be automatically added to the current XHTML output (produced by XSLT transformations)

Cache control config per resource class

Instead of a single value in web.xml, it should be possible to configure different Cache-Control values for resource classes based on URI templates. This can be done by attaching a value restriction to a resource class in the sitemap ontology.

Response EntityTag should depend on format

Right now the EntityTag is generated as a hash of the RDF response Model, which means all serializations, including XHTML, get the same value. This leads to caching issues (wrong response body returned on 304 Not Modified. The solution is to add serialization info to the hash.

Column ordering in g:TableMode

Ordering mechanism needs to be generic -- QueryBuilder must be able to combine ad hoc OPTIONAL and ORDER BY to build a parametrized SPARQL query

javax.servlet.ServletContainerInitializer class cast issues when running standalone client

Tomcat: 8.0.5
Java: 1.8.0_05
OS: Mac OSX 10.8.5
After mvn install graphity-ldp then graphity-browser

Deploy war graphity-browser/target/client-1.0.12-SNAPSHOT.war
Starting webapp gives:
org.apache.catalina.startup.ContextConfig.processServletContainerInitializers Failed to process JAR found at URL [/graphity] for ServletContainerInitializers for context with name [{1}]
java.io.IOException: java.lang.ClassCastException: Cannot cast com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer to javax.servlet.ServletContainerInitializer

Faceted browsing

Implement type filtering on lists by augmenting FILTER on SPIN query of the current Resource

Problems with css loading

Hi,
I've deployed the browser to try to configure over some sparql enpoint .
After deployng the war, when I try to reach the browser page it seems to not load css styleshits. I tried to see if the path is correct (and it seems to be) but no css are loaded at all. So I view only the html parsed from the frontpage.xsl without style.

My graphity-browser URL is: http://localhost:8181/browser-1.0.0/ (as the name of the war)
The URL of referred for the stylesheets is: http://localhost:8181/graphity-browser/static/css/bootstrap.css and for this resource Tomcat tell me "The requested resource (Not Found) is not available."

Tomcat is 6.0.29.

What can I do?

ORDER BY in QueryBuilder can produce invalid queries

Currently it is possible to set an ORDER BY expression in QueryBuilder that uses a variable which is not present in the WHERE pattern. That will result in invalid SPARQL query. Exception should be thrown in this situation.

Map layout mode

Add generic gc:MapMode to XSLT stylesheets. By default it could recognize geo:lat and geo:long in the data and display markers on Google Maps

Serialize Exceptions to RDF

Probably needs a MessageBodyWriter<Exception> that would construct RDF model from exception metadata. It should work with existing ExceptionMappers.

XSLT parameter names as URIs

Change current XSLT stylesheet parameter names such as base-uri into absolute URIs in Graphity namespace, such as gc:BaseURI. They are set in ModelXSLTWriter.

Sitemap validation

Could be implemented as SPIN constraints and run on application startup

406 Not Acceptable

Probably of the default XHTML media type, some browsers (IE, probably Safari) are not displaying the response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.