Frequently Asked Questions

Where can I download a launcher?

You can download a launcher from the Maven Repository, learn more here.

Is the RDF API thread-safe?

All MGraphs returned by TcManager are LockableMgraphs, this graphs are thread-safe independently on whether the underlying provider is thread-safe or not. Note however that like the synchronized collections returned by java.util.Collections a ConcurrentModificationException may occur when the TripleCollection is modified while iterating over it. To be sure that no other thread may do any modification while iterating over it, the iterating thread may acquire a ReadLock using the following construct:
Lock l = mGraph.getLock().readLock(); l.lock(); try { Iterator<Triple> iter = mGraph.filter(...); //iterate over triples } finally { l.unlock(); }
Note that single method invocations always lock the TripleCollection, but if you need a lock to span multiple method invocation you need to acquire a (read or write) lock as described above.

I've forgot my admin password, how do I reset it?

On the login-page there is a "Forgot password" link, however this only works if the admin user is configured with an email address and an smtp-server is configured for Clerezza to send mails.
You can reset the password on the Clerezza shell (which is accessible without password on the console on which Clerezza is started) withe the following commands:
zz>import rdf.core.access.TcManager import rdf.core.access.TcManager zz>val tcm = $[TcManager] tcm: org.apache.clerezza.rdf.core.access.TcManager = org.apache.clerezza.rdf.core.access.TcManager@6de35b46 zz>import platform.Constants import platform.Constants zz>val sysGraph = tcm.getMGraph(Constants.SYSTEM_GRAPH_URI) sysGraph: org.apache.clerezza.rdf.core.access.LockableMGraph = org.apache.clerezza.rdf.core.access.LockableMGraphWrapper@39b7e5ee zz>import rdf.core.impl._ import rdf.core.impl._ zz>import rdf.scala.utils.Preamble import rdf.scala.utils.Preamble zz>val p = new Preamble(sysGraph) p: org.apache.clerezza.rdf.scala.utils.Preamble = org.apache.clerezza.rdf.scala.utils.Preamble@670583f6 zz>import p._ import p._ zz>import rdf.scala.utils._ import rdf.scala.utils._ zz>import rdf.ontologies.PLATFORM import rdf.ontologies.PLATFORM zz>val user: RichGraphNode = new PlainLiteralImpl("admin")/-PLATFORM.userName user: org.apache.clerezza.rdf.scala.utils.RichGraphNode = org.apache.clerezza.rdf.jena.commons.JenaBNodeWrapper@957eb29c zz>import rdf.ontologies.PERMISSION import rdf.ontologies.PERMISSION zz>user.deleteProperties(PERMISSION.passwordSha1) zz>user.addPropertyValue(PERMISSION.passwordSha1, "d033e22ae348aeb5660fc2140aec35850c4da997")
The above will set the password of the user admin to "admin". Replace the value of PERMISSION.passwordSha1 to the sha1 sum of the the desired password, which you may compute on a typical unix shell with: echo -n password | sha1sum