Package org.orcateam.report

Examples of org.orcateam.report.OrcaReportMetadata


            metadataString = StringUtils.trim(metadataString);
            String definitions[] = StringUtils.split(metadataString, ";");
            for (String def : definitions) {
                def = StringUtils.trim(def);
                String components[] = StringUtils.split(def, ":");
                OrcaReportMetadata metaData = new OrcaReportMetadata();
                metaData.setKey(StringUtils.trim(components[0]));
                if (components.length > 1) {
                    String valDef = StringUtils.trim(components[1]);
                    metaData.setValue(valDef);
                    if (StringUtils.contains(valDef, " as ")) {
                        valDef = StringUtils.replace(valDef, " as ", " => ");
                        String split[] = StringUtils.split(valDef, "=>");
                        metaData.setVar(StringUtils.deleteWhitespace(split[1]));
                        metaData.setValue(StringUtils.deleteWhitespace(split[0]));
                    }
                }
                metaDataList.add(metaData);
            }
        }
View Full Code Here


    public static Boolean checkRendered(String metaText, OrcaReport orcaReport, Map<String, Object> elementContext) throws Exception {
        List<OrcaReportMetadata> metadataList = MetadataUtil.parse(metaText);
        if (metadataList.size() != 1) {
            throw new OrcaExpressionInvalidFormatException();
        }
        OrcaReportMetadata metadata = metadataList.get(0);
        return (Boolean) ELUtil.invoke(metadata.getValue(), mergeContext(orcaReport, elementContext));
    }
View Full Code Here

            putMetadata(metaData.getKey(), metaData);
        }

        rowData = getMetadata("table");
        columnData = getMetadata("column");
        OrcaReportMetadata colStart = getMetadata("colstart");
        OrcaReportMetadata rowStart = getMetadata("rowstart");

        //init data source
        if (rowData != null && rowData.getValue() != null) {
            rowDataList = (List<Object>) ELUtil.invoke(rowData.getValue(), tableContext);
        }

        //init column source
        if (columnData != null && columnData.getValue() != null) {
            columnDataList = (List<Object>) ELUtil.invoke(columnData.getValue(), tableContext);
        }

        //init colStart value
        if (colStart != null) {
            dynamicColumnIndex = Integer.parseInt(colStart.getValue());
        } else {
            dynamicColumnIndex = getTable().getRow(getTable().getNumberOfRows() - 1).getTableCells().size() - 1;
        }

        //init rowStart value
        if (rowStart != null) {
            dynamicRowIndex = Integer.parseInt(rowStart.getValue());
        } else {
            dynamicRowIndex = getTable().getNumberOfRows() - 1;
        }

    }
View Full Code Here

TOP

Related Classes of org.orcateam.report.OrcaReportMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.