Topaz Frequently Asked Questions
This contains information beneficial to users and developers of Topaz.
FAQ
What is Topaz?
Topaz can refer to either the legal non-profit entity or the software platform being actively developed. Hopefully the context will make the reference clear.
What is OTM?
Abbreviation for Object to Triples Mapping. The basic idea came from Hibernate and ORM. The core of Topaz is the OTM engine that allows applications to map objects to graphs (triple is the smallest graph).
Which triple-stores does Topaz support?
Current Topaz only supports Mulgara.
Does Topaz support SPARQL?
Short answer, no. Longer answer is that we make use of two aspects of TQL in mulgara not currently available in SPARQL.
What is OQL?
Object Query Language is a query language that work with OTM and in spirit is similar to Hibernate HQL. Details on the language are available here.
Is there a sample 'hello world' application available?
There is a very simple Topaz application available which will not require you to download and build the entire source tree. To download, build and execute the sample application via command line please do the following:
svn co http://svn.topazproject.org/svn/head/topaz/samples cd samples mvn clean install mvn -Psample1
I am trying to construct an OQL query:
select a.id id,a.created from Annotations a where a.annotated="<targetDOI>"
The DOI has periods in it. Should I be using Query q.setUri or q.literal for this?
Whether the doi (or any other value) has periods or other special characters doesn't really matter in choosing whether to put the values in the query string directly or to use parameters - either can be used in both cases.
However, what parameters give you are three things:
- It can make for a more readable query string
- It can make for a reusable query string
- It does escaping and quoting for you (e.g. if you have a literal it will escape the quotes before inserting it into the query), and if you use the setParameter(String, Object) method it figures out whether it should be a uri or a literal and also serializes the value for you (e.g. a Date object is will get turned into a properly formatted date string).
So, we recommend using the parameters as they provide more checking (e.g. you'll get warnings if use setUri() where a literal is expected) and automatic conversions from (java) objects to their appropriate lexical representation.
