-
Notifications
You must be signed in to change notification settings - Fork 23
Developer_manual
There are 2 steps:
- abstract form generation
- HTML generation
The first step generates a FormSyntax case class instance. It depends on the TDB database through the
RDFStoreLocalProvider[Rdf, DATASET]
trait.
The second step only depends on the FormSyntax case class.
An example using the API is the /login page in AuthServiceTrait.scala :
- several forms in one HTML page
- the form is a "pure" form, not used for RDF triples to be stored in the SPARQL database
- the form action URI is different from the one used for "normal" RDF data forms, /save
implemented in trait RDFCacheAlgo[Rdf <: RDF, DATASET]
There are several components:
- database TDB3/ for user And Password association
- trait Authentication , a facade for user Authentication management; wraps the TDB database; the signin() function annotates the user graph URI as a foaf:OnlineAccount
- the /login , /authenticate , /register , /register , /logout pages are in AuthServiceTrait.scala
The trait ServiceListener[Rdf <: RDF, DATASET]
is a general callback for HTTP requests, with single abstract function:
def notifyServiceCall(request: HTTPrequest)(implicit userURI: String,
rdfLocalProvider: RDFStoreLocalProvider[Rdf, DATASET]): Unit
It is currently implemented by RDFLinksCounterLoadListenerClass,
which is instanciated at the beginning of trait ApplicationFacadeImpl[Rdf, DATASET]
.
The instanciated implementations are called for page /display in trait WebPages by
callAllServiceListeners(request)
.
They could be called for other pages or services as well.
There is another callback, SaveListener, which is instanciated at the beginning of trait ApplicationFacadeImpl[Rdf, DATASET]
, SaveListener[Rdf]
. The implementations are:
- TimeSeries, which builds the history database in TDB2/ : timestamps for named graphs and user entered triples
- RDFLinksCounterListenerClass, which builds the database of RDF Links Counts in TDB
CSV importer, ...