Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[january-dev] question about metadata

Howdy,

We've been using the January metadata APIs, and I have some questions. First some code:

We've added new metadata interfaces...e.g.

interface IIdMetadata extends IMetadata {

...

}

And have an implementing class e.g.:

class IdMetadata extends Metadata implements IIdMetadata {

...

}

We add metadata to a dataset:

dataset.addMetadata(new IdMetadata());

Then we access the metadata:

IIdMetadata id = dataset.getFirstMetadata(IIdMetadata.class);

All this works fine.

We have occasions, however, where we would like to be able to do the following:

(redeclaration of above IdMetadata class):

class IdMetadata extends Metadata implements IIdMetadata, SomeOtherMetadata {

...

}

and then

SomeOtherMetadata som = dataset.getFirstMetadata(SomeOtherMetadata.class);

and have it return a non-null object (the instance that implements both IIdMetadata and SomeOtherMetadata).

In my current tests, this does not work. The SomeOtherMetadata.class query returns null. My question: Is this behavior desired/intended?

Thanksinadvance,

Scott




Back to the top