The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to store MetaData that descibes IOObject
Hello,
I have a problem with storing my own metadata which describes image. What should I do, to store these metadata.
In SimpleIOObjectEntry class is method for storing:
Or is there another solution?
Thank you in advance for your reply.
Best,
Vaclav
I have a problem with storing my own metadata which describes image. What should I do, to store these metadata.
In SimpleIOObjectEntry class is method for storing:
public void storeData(IOObject data, Operator callingOperator, ProgressListener l) throws RepositoryException {And it calls:
if (l != null) {
l.setTotal(100);
l.setCompleted(10);
}
MetaData md = MetaData.forIOObject(data);
// Serialize Non-ExampleSets as IOO
OutputStream out = null;
...
...
This creates new MD with no reference to IOObject, so fields have default values. Can you change it to:
public static MetaData forIOObject(IOObject ioo, boolean shortened) {
MetaData result;
if (ioo instanceof ExampleSet) {
result = new ExampleSetMetaData((ExampleSet)ioo, shortened);
} else {
result = new MetaData(ioo.getClass());
}
result.annotations = new Annotations(ioo.getAnnotations());
return result;
}
Now I realized, that it won't help.
public static MetaData forIOObject(IOObject ioo, boolean shortened) {
MetaData result;
if (ioo instanceof ExampleSet) {
result = new ExampleSetMetaData((ExampleSet)ioo, shortened);
} else {
result = new MetaData(ioo);
}
result.annotations = new Annotations(ioo.getAnnotations());
return result;
}
Or is there another solution?
Thank you in advance for your reply.
Best,
Vaclav
Tagged:
0
Answers
currently this is not possible. I've created an internal ticket with a proposed fix for this.
If it is accepted it will be possible with the next release (or a up-to-date development version) of RapidMiner.
I will inform you when this is possible.
Best,
Nils
than you very much!
Best wishes,
Vaclav