Search in sources :

Example 1 with DocstructElement

use of org.goobi.production.importer.DocstructElement in project goobi-workflow by intranda.

the class MassImportForm method getHasNextPage.

public boolean getHasNextPage() {
    java.lang.reflect.Method method;
    try {
        method = this.plugin.getClass().getMethod("getCurrentDocStructs");
        Object o = method.invoke(this.plugin);
        @SuppressWarnings("unchecked") List<? extends DocstructElement> list = (List<? extends DocstructElement>) o;
        if (this.plugin != null && list != null) {
            return true;
        }
    } catch (Exception e) {
    }
    try {
        method = this.plugin.getClass().getMethod("getProperties");
        Object o = method.invoke(this.plugin);
        @SuppressWarnings("unchecked") List<ImportProperty> list = (List<ImportProperty>) o;
        if (this.plugin != null && list.size() > 0) {
            return true;
        }
    } catch (Exception e) {
    }
    return false;
}
Also used : ImportProperty(org.goobi.production.properties.ImportProperty) ImportObject(org.goobi.production.importer.ImportObject) List(java.util.List) ArrayList(java.util.ArrayList) DocstructElement(org.goobi.production.importer.DocstructElement) JDOMException(org.jdom2.JDOMException) IOException(java.io.IOException)

Example 2 with DocstructElement

use of org.goobi.production.importer.DocstructElement in project goobi-workflow by intranda.

the class MassImportForm method nextPage.

public String nextPage() {
    if (!testForData()) {
        Helper.setFehlerMeldung("missingData");
        return "";
    }
    java.lang.reflect.Method method;
    try {
        method = this.plugin.getClass().getMethod("getCurrentDocStructs");
        Object o = method.invoke(this.plugin);
        @SuppressWarnings("unchecked") List<? extends DocstructElement> list = (List<? extends DocstructElement>) o;
        if (this.plugin != null && list != null) {
            return "process_import_2_mass";
        }
    } catch (Exception e) {
    }
    return "process_import_2";
}
Also used : ImportObject(org.goobi.production.importer.ImportObject) List(java.util.List) ArrayList(java.util.ArrayList) DocstructElement(org.goobi.production.importer.DocstructElement) JDOMException(org.jdom2.JDOMException) IOException(java.io.IOException)

Example 3 with DocstructElement

use of org.goobi.production.importer.DocstructElement in project goobi-workflow by intranda.

the class MassImportForm method getDocstructs.

public List<? extends DocstructElement> getDocstructs() {
    java.lang.reflect.Method method;
    try {
        method = this.plugin.getClass().getMethod("getCurrentDocStructs");
        Object o = method.invoke(this.plugin);
        @SuppressWarnings("unchecked") List<? extends DocstructElement> list = (List<? extends DocstructElement>) o;
        if (this.plugin != null && list != null) {
            return list;
        }
    } catch (Exception e) {
    }
    return new ArrayList<>();
}
Also used : ArrayList(java.util.ArrayList) ImportObject(org.goobi.production.importer.ImportObject) List(java.util.List) ArrayList(java.util.ArrayList) DocstructElement(org.goobi.production.importer.DocstructElement) JDOMException(org.jdom2.JDOMException) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 DocstructElement (org.goobi.production.importer.DocstructElement)3 ImportObject (org.goobi.production.importer.ImportObject)3 JDOMException (org.jdom2.JDOMException)3 ImportProperty (org.goobi.production.properties.ImportProperty)1