You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by "Kurapati, Rama" <Ra...@labbook.com> on 2001/01/08 22:08:00 UTC
Metadata ?
Yep , it wotks with hSQL.
How the metadata is stored in the data base, i.e Can we query it or it is
only for within slide use.
How can we retrieve the metadata?
Rama
>You can use the JDBC store. Right now, it appears it has problems with some
>databases like mySQL (some fields are too big). I think there's a sample
>which uses hSQL commented out in the default configuration.
>Remy
Re: Metadata ?
Posted by Remy Maucherat <re...@betaversion.org>.
Quoting "Kurapati, Rama" <Ra...@labbook.com>:
> Yep , it wotks with hSQL.
> How the metadata is stored in the data base, i.e Can we query it or it
> is
> only for within slide use.
Most it is not very relevant outside Slide, but it uses a relational database
schema and text fields (no object serialization to a field, if that was your
question), so you can access and manipulate everything from the outside.
Some small modifications will be necessary to make the store compatible with
other databases, like mySQL (reducing the field lengths and using some extra
blob fields).
> How can we retrieve the metadata?
You should look at the source code of the JDBC store, as I have no written
documentation describing the database schema. The source includes a lot of
query samples.
For example, this code retrieves all the properties of a revision of an object,
and puts them into a Hashtable :
s = "select * from property where uri='" + uri + "' and number='"
+ revisionNumber + "'";
statement.execute(s);
res = statement.getResultSet();
while (res.next()) {
String propertyName = res.getString(PROPERTY_NAME);
String propertyNamespace = res.getString(PROPERTY_NAMESPACE);
NodeProperty property =
new NodeProperty(propertyName,
res.getString(PROPERTY_VALUE),
propertyNamespace,
res.getString(PROPERTY_TYPE),
(res.getInt(PROPERTY_PROTECTED) == 1));
properties.put(propertyNamespace + propertyName, property);
}
Remy