On Tue, 13 Apr 2004, Stefan Sayk wrote:

> I've a problem access data in repository.xml. Is it possible get the
> documentation infos 'xxx' and 'yyy' by the
> 
> org.apache.ojb.broker.metadata.MetadataManager

I'm afraid, that is not possible. The documentation subtags are skipped in
the xml parsing.
If you want to store some data in the repository descriptor file which you
then later access in your program, then you should use attributes for
this, e.g.

  <class-descriptor class="ClassA" table="CL_A">
    ...
    <attribute attribute-name="someName" attribute-value="someValue"/>
  </class-descriptor>

(check the DTD for the correct placement of the attribute subtags; usually
they come last).
You can then access these attributes from the ClassDescriptor (actually
from all descriptors that are subclasses of AttributeContainter) via the
getAttribute methods, like

    ClassDescriptor classDesc;

    ...
    String value = classDesc.getAttribute("someName", "someDefaultValue");


Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to