cancel
Showing results for 
Search instead for 
Did you mean: 

Support multiple schemas in drag and drop import with metadata

schambon_
Champ on-the-rise
Champ on-the-rise

Hi,

My documents use multiple schemas (quite a typical case I think, with dublincore + custom schema). I want to customize the "intelligent import" form to show items from these multiple schemas - rather like the "create" form without drag and drop.

I have found this question which shows how to customize the form, unfortunately this only supports a single schema so I have to pick between dc and (one of) my custom schema(s).

Apart from hacking DndFormActionBean, is there any way to work around this limitation?

Cheers,

1 REPLY 1

schambon_
Champ on-the-rise
Champ on-the-rise

I finally overrode the DndFormActionBean with the following:

public List<String> getSchema() {
    if (schema != null && !schema.isEmpty()) {
        String[] schemas = schema.split(",");
        currentSchema = new ArrayList<String>(schemas.length);
        Collections.addAll(currentSchema, schemas);
    }
    return currentSchema;
}

(...)

@Factory(value = "dataCollector", scope = ScopeType.PAGE)
public Map<String, Map<String, Serializable>> getCollector() {
    if (metadataCollector == null) {
        metadataCollector = new HashMap<String, Map<String, Serializable>>();
        for (String schema : getSchema()) {
            metadataCollector.put(schema,
                new HashMap<String, Serializable>());
        }
    }
    return metadataCollector;
} 

This supports a comma-separated list of schemas in the action link parameters. It seems to work.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.