summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-19 16:03:41 +0200
committerNoel Grandin <noel@peralex.com>2015-01-05 08:23:29 +0200
commit43cc8ad33e815522e2b23ac87a4a9c4526cd85c9 (patch)
treeb042266508f8b084bc7bbe9cc57250a971311099 /reportbuilder
parentcfcbe2e44e33f4a60e70006ff5e1cbb9aa2adceb (diff)
java: remove dead code
found by UCDetector Change-Id: I6b0f49529379072da566e927b86815f173e7a90b
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/Jar_reportbuilder.mk4
-rw-r--r--reportbuilder/java/org/libreoffice/report/DataSourceException.java29
-rw-r--r--reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java36
-rw-r--r--reportbuilder/java/org/libreoffice/report/SOImageService.java13
-rw-r--r--reportbuilder/java/org/libreoffice/report/StorageRepository.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java45
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java34
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java39
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java19
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java69
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java14
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java7
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java12
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java4
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java4
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java11
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java21
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java5
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java20
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java20
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java1
-rw-r--r--reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java57
-rw-r--r--reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java54
-rw-r--r--reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java113
37 files changed, 7 insertions, 680 deletions
diff --git a/reportbuilder/Jar_reportbuilder.mk b/reportbuilder/Jar_reportbuilder.mk
index 325a1029f897..36deed8832a6 100644
--- a/reportbuilder/Jar_reportbuilder.mk
+++ b/reportbuilder/Jar_reportbuilder.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/ReportEngineMetaData \
reportbuilder/java/org/libreoffice/report/ReportEngineParameterNames \
reportbuilder/java/org/libreoffice/report/ReportExecutionException \
- reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData \
reportbuilder/java/org/libreoffice/report/ReportJob \
reportbuilder/java/org/libreoffice/report/ReportJobDefinition \
reportbuilder/java/org/libreoffice/report/ReportJobFactory \
@@ -69,7 +68,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/pentaho/DefaultNameGenerator \
reportbuilder/java/org/libreoffice/report/pentaho/OfficeNamespaces \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoFormulaContext \
- reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData \
reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob \
@@ -83,7 +81,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/pentaho/StarReportDataFactory \
reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule \
reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression \
- reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData \
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/AbstractReportElementLayoutController \
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FixedTextLayoutController \
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility \
@@ -226,7 +223,6 @@ $(eval $(call gb_Jar_add_sourcefiles,reportbuilder,\
reportbuilder/java/org/libreoffice/report/util/DefaultJobProperties \
reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap \
reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition \
- reportbuilder/java/org/libreoffice/report/util/ManifestWriter \
))
$(eval $(call gb_Jar_add_packagefiles,reportbuilder,,\
diff --git a/reportbuilder/java/org/libreoffice/report/DataSourceException.java b/reportbuilder/java/org/libreoffice/report/DataSourceException.java
index 06c1ef9c6a7f..5990b030f623 100644
--- a/reportbuilder/java/org/libreoffice/report/DataSourceException.java
+++ b/reportbuilder/java/org/libreoffice/report/DataSourceException.java
@@ -36,19 +36,6 @@ public class DataSourceException extends Exception
}
/**
- * Constructs a new exception with the specified detail message. The cause is
- * not initialized, and may subsequently be initialized by a call to {@link
- * #initCause}.
- *
- * @param message the detail message. The detail message is saved for later
- * retrieval by the {@link #getMessage()} method.
- */
- public DataSourceException(String message)
- {
- super(message);
- }
-
- /**
* Constructs a new exception with the specified detail message and cause.
* <p>Note that the detail message associated with <code>cause</code> is
* <i>not</i> automatically incorporated in this exception's detail message.
@@ -65,20 +52,4 @@ public class DataSourceException extends Exception
super(message, cause);
}
- /**
- * Constructs a new exception with the specified cause and a detail message of
- * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains
- * the class and detail message of <tt>cause</tt>). This constructor is useful
- * for exceptions that are little more than wrappers for other throwables (for
- * example, {@link java.security.PrivilegedActionException}).
- *
- * @param cause the cause (which is saved for later retrieval by the {@link
- * #getCause()} method). (A <tt>null</tt> value is permitted,
- * and indicates that the cause is nonexistent or unknown.)
- * @since 1.4
- */
- public DataSourceException(Throwable cause)
- {
- super(cause);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java b/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
deleted file mode 100644
index dd5919c7503d..000000000000
--- a/reportbuilder/java/org/libreoffice/report/ReportExpressionMetaData.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report;
-
-public interface ReportExpressionMetaData
-{
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
diff --git a/reportbuilder/java/org/libreoffice/report/SOImageService.java b/reportbuilder/java/org/libreoffice/report/SOImageService.java
index 7070038bc11d..3cfdf35268a0 100644
--- a/reportbuilder/java/org/libreoffice/report/SOImageService.java
+++ b/reportbuilder/java/org/libreoffice/report/SOImageService.java
@@ -28,12 +28,9 @@ import com.sun.star.io.XInputStream;
import com.sun.star.lang.WrappedTargetException;
import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter;
-import com.sun.star.lib.uno.adapter.InputStreamToXInputStreamAdapter;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
-import java.io.InputStream;
-
public class SOImageService implements ImageService
{
@@ -62,11 +59,6 @@ public class SOImageService implements ImageService
}
}
- public Size getImageSize(final InputStream image) throws ReportExecutionException
- {
- return getImageSize(new InputStreamToXInputStreamAdapter(image));
- }
-
private Size getImageSize(final XInputStream image) throws ReportExecutionException
{
final Size dim = new Size();
@@ -163,11 +155,6 @@ public class SOImageService implements ImageService
return null;
}
- public String getMimeType(final InputStream image) throws ReportExecutionException
- {
- return getMimeType(new InputStreamToXInputStreamAdapter(image));
- }
-
public String getMimeType(final byte[] image) throws ReportExecutionException
{
return getMimeType(new ByteArrayToXInputStreamAdapter(image));
diff --git a/reportbuilder/java/org/libreoffice/report/StorageRepository.java b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
index 1ccfc5253f77..8b6d08c458a2 100644
--- a/reportbuilder/java/org/libreoffice/report/StorageRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
@@ -147,11 +147,6 @@ public class StorageRepository implements InputRepository, OutputRepository
return false;
}
- public boolean isWritable(final String name)
- {
- return true;
- }
-
public Object getId()
{
return "1";
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
deleted file mode 100644
index 0be99672893d..000000000000
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportAddIn.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report.pentaho;
-
-import org.libreoffice.report.ReportExpressionMetaData;
-import org.libreoffice.report.pentaho.expressions.SumExpression;
-
-/**
- * This class is a dummy implementation. Ignore it for now, we may extend this
- * one later.
- */
-public class PentahoReportAddIn
-{
-
- public SumExpression createExpression(final int expression)
- {
- return (expression == 0) ? new SumExpression() : null;
- }
-
- public int getExpressionCount()
- {
- return 1;
- }
-
- public ReportExpressionMetaData getMetaData(final int expression)
- {
- // todo implement me
- return null;
- }
-}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java
index 05fa691273fe..4f5aa81c4b2b 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngine.java
@@ -35,11 +35,6 @@ public class PentahoReportEngine
this.metaData = new PentahoReportEngineMetaData();
}
- public ReportEngineMetaData getMetaData()
- {
- return metaData;
- }
-
public ReportJobDefinition createJobDefinition()
{
return new DefaultReportJobDefinition(metaData);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java
index e73c263cca83..f63617acc15f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportEngineMetaData.java
@@ -92,43 +92,9 @@ public class PentahoReportEngineMetaData
enumerationValues.add(CONTENT_TYPE, PentahoReportEngineMetaData.DEBUG);
}
- public Object[] getEnumerationValues(final String parameter)
- {
- return enumerationValues.toArray(parameter);
- }
-
public Class getParameterType(final String parameter)
{
return parameterTypes.get(parameter);
}
- public boolean isEnumeration(final String parameter)
- {
- return enumerationValues.containsKey(parameter);
- }
-
- /**
- * Checks, whether a certain output type is available. Feed the mime-type of the output
- * type in and you'll get a true or false back.
- *
- * @return true, if the output type is supported; false otherwise.
- */
- public boolean isOutputSupported(final String mimeType)
- {
- return enumerationValues.containsValue(CONTENT_TYPE, mimeType.toLowerCase());
- }
-
- /**
- * Lists all supported output parameters for the given mime-type. This listing can be
- * used to build a generic user interface for configuring a certain output.
- */
- public String[] getOutputParameters(final String mimeType)
- {
- return new String[0];
- }
-
- public boolean isMandatory(final String parameter)
- {
- return mandatoryParameters.contains(parameter);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
index fba3625785a5..9e0e429b0b92 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
@@ -73,7 +73,6 @@ public class PentahoReportJob implements ReportJob
{
private static final Log LOGGER = LogFactory.getLog(PentahoReportJob.class);
- private boolean finished;
private final DataSourceFactory dataSourceFactory;
private final OutputRepository outputRepository;
private final JobProperties jobProperties;
@@ -82,15 +81,9 @@ public class PentahoReportJob implements ReportJob
private final String outputName;
private final ImageService imageService;
private final InputRepository inputRepository;
- private final ReportJobDefinition definition;
private final List masterValues;
private final List detailColumns;
- public ReportJobDefinition getDefinition()
- {
- return definition;
- }
-
public PentahoReportJob(final ReportJobDefinition definition)
throws JobDefinitionException
{
@@ -99,7 +92,6 @@ public class PentahoReportJob implements ReportJob
throw new NullPointerException();
}
- this.definition = definition;
this.jobProperties = definition.getProcessingParameters().copy();
this.dataSourceFactory = (DataSourceFactory) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
@@ -176,37 +168,6 @@ public class PentahoReportJob implements ReportJob
return tempReport;
}
- /**
- * Interrupt the job.
- */
- public void interrupt()
- {
- // hey, not yet ..
- }
-
- /**
- * Queries the jobs result status.
- *
- * @return true, if the job is finished (or has been interrupted), false if the job
- * waits for activation.
- */
- public boolean isFinished()
- {
- return finished;
- }
-
-
-
- /**
- * Queries the jobs execution status.
- *
- * @return true, if the job is currently running, false otherwise.
- */
- public boolean isRunning()
- {
- return !finished;
- }
-
private void collectGroupExpressions(final Node[] nodes, final List<Object[]> expressions, final FormulaParser parser, final Expression reportFunctions[])
{
for (int i = 0; i < nodes.length; i++)
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java
index b54a41baf506..7e26958a8bfd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/StarReportModule.java
@@ -21,6 +21,7 @@ import org.pentaho.reporting.libraries.base.boot.AbstractModule;
import org.pentaho.reporting.libraries.base.boot.ModuleInitializeException;
import org.pentaho.reporting.libraries.base.boot.SubSystem;
+@SuppressWarnings("ucd")
public class StarReportModule extends AbstractModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
index 1ded22876316..531fe440e27f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpression.java
@@ -17,26 +17,7 @@
*/
package org.libreoffice.report.pentaho.expressions;
-import org.libreoffice.report.DataRow;
-
public class SumExpression
{
- private Object[] parameters;
-
- public Object getParameters()
- {
- return parameters;
- }
-
- public Object getValue(final DataRow row)
- {
-
- return null;
- }
-
- public void setParameters(final Object[] parameters)
- {
- this.parameters = parameters;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java b/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java
deleted file mode 100644
index fbfa73c0d168..000000000000
--- a/reportbuilder/java/org/libreoffice/report/pentaho/expressions/SumExpressionMetaData.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report.pentaho.expressions;
-
-import org.libreoffice.report.ReportExpressionMetaData;
-
-import java.util.Locale;
-
-
-public class SumExpressionMetaData implements ReportExpressionMetaData
-{
-
- public String getDescription(final Locale l)
- {
- // todo implement me
- return null;
- }
-
- public String getDisplayName(final Locale l)
- {
- // todo implement me
- return null;
- }
-
- public String getName()
- {
- // todo implement me
- return null;
- }
-
- public int getParameterCount()
- {
- // todo implement me
- return 0;
- }
-
- public String getParameterDescription(final int param, final Locale locale)
- {
- // todo implement me
- return null;
- }
-
- public String getParameterDisplayName(final int param, final Locale locale)
- {
- // todo implement me
- return null;
- }
-
- public String getParameterName(final int param)
- {
- // todo implement me
- return null;
- }
-}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
index 6512d715852c..99888fa00370 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementContext.java
@@ -26,29 +26,15 @@ package org.libreoffice.report.pentaho.layoutprocessor;
public class ImageElementContext
{
- private final int colSpan;
- private final int rowSpan;
private String[] rowStyles;
private String[] colStyles;
public ImageElementContext(final int colSpan, final int rowSpan)
{
- this.colSpan = colSpan;
- this.rowSpan = rowSpan;
this.colStyles = new String[colSpan];
this.rowStyles = new String[rowSpan];
}
- public int getColSpan()
- {
- return colSpan;
- }
-
- public int getRowSpan()
- {
- return rowSpan;
- }
-
public String[] getRowStyles()
{
return rowStyles;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
index 961206a95590..308bcd03bcda 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/VariablesCollection.java
@@ -37,7 +37,6 @@ import java.util.List;
public class VariablesCollection
{
- private VariablesCollection parent;
private String namePrefix;
private List<FormattedTextElement> variables;
@@ -54,15 +53,9 @@ public class VariablesCollection
}
this.namePrefix = namePrefix;
- this.parent = parent;
this.variables = new ArrayList<FormattedTextElement>();
}
- public VariablesCollection getParent()
- {
- return parent;
- }
-
public String getNamePrefix()
{
return namePrefix;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java b/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java
index b6e63d0e3162..b579305023d3 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/loader/InputRepositoryLoader.java
@@ -30,7 +30,6 @@ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
import org.pentaho.reporting.libraries.resourceloader.ResourceLoader;
import org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException;
-import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
import org.pentaho.reporting.libraries.resourceloader.loader.LoaderUtils;
@@ -38,7 +37,6 @@ public class InputRepositoryLoader implements ResourceLoader
{
private final InputRepository inputRepository;
- private ResourceManager resourceManager;
public InputRepositoryLoader(final InputRepository inputRepository)
{
@@ -147,16 +145,6 @@ public class InputRepositoryLoader implements ResourceLoader
return new InputRepositoryResourceData(key, inputRepository);
}
- public void setResourceManager(final ResourceManager manager)
- {
- this.resourceManager = manager;
- }
-
- public ResourceManager getResourceManager()
- {
- return resourceManager;
- }
-
public boolean isSupportedDeserializer(String string)
{
throw new UnsupportedOperationException("Not supported yet.");
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java
index 1158cca7d12e..38b6aada4969 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/DataStyle.java
@@ -34,8 +34,4 @@ public class DataStyle extends Section
return (String) getAttribute(OfficeNamespaces.STYLE_NS, "name");
}
- public void setStyleName(final String name)
- {
- setAttribute(OfficeNamespaces.STYLE_NS, "name", name);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java
index 0f58ef3da68d..93d9399ddcdd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/FontFaceElement.java
@@ -34,8 +34,4 @@ public class FontFaceElement extends Section
return (String) getAttribute(OfficeNamespaces.STYLE_NS, "name");
}
- public void setStyleName(final String name)
- {
- setAttribute(OfficeNamespaces.STYLE_NS, "name", name);
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java
index 46462f838392..fe29bd6f53c9 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/ImageElement.java
@@ -61,11 +61,6 @@ public class ImageElement extends ReportElement
return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, OfficeToken.PRESERVE_IRI));
}
- public void setPreserveIRI(final boolean preserveIRI)
- {
- setAttribute(OfficeNamespaces.OOREPORT_NS, OfficeToken.PRESERVE_IRI, String.valueOf(preserveIRI));
- }
-
public String getImageData()
{
return (String) getAttribute(OfficeNamespaces.FORM_NS, OfficeToken.IMAGE_DATA);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java
index 201381dd69e7..e632cc938435 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java
@@ -17,7 +17,6 @@
*/
package org.libreoffice.report.pentaho.model;
-import org.libreoffice.report.OfficeToken;
import org.libreoffice.report.pentaho.OfficeNamespaces;
import org.jfree.report.JFreeReportInfo;
@@ -33,16 +32,6 @@ import org.jfree.report.structure.Section;
public class OfficeGroup extends Section
{
- public boolean isStartNewColumn()
- {
- return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "start-new-column"));
- }
-
- public boolean isResetPageNumber()
- {
- return OfficeToken.TRUE.equals(getAttribute(OfficeNamespaces.OOREPORT_NS, "reset-page-number"));
- }
-
public OfficeGroupSection getHeader()
{
final OfficeGroupInstanceSection instanceSection =
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java
index c292f1f0f8cf..a20786bbb8b8 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeReport.java
@@ -87,21 +87,11 @@ public class OfficeReport extends Element
return columnHeader;
}
- public void setColumnHeader(final Node columnHeader)
- {
- this.columnHeader = columnHeader;
- }
-
public Node getColumnFooter()
{
return columnFooter;
}
- public void setColumnFooter(final Node columnFooter)
- {
- this.columnFooter = columnFooter;
- }
-
public Node getReportHeader()
{
return reportHeader;
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java
index 2a60c9a8cb32..e5fdf1378aef 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeStyle.java
@@ -87,21 +87,11 @@ public class OfficeStyle extends Section
return findFirstChild(OfficeNamespaces.STYLE_NS, "table-row-properties");
}
- public Element getTableProperties()
- {
- return findFirstChild(OfficeNamespaces.STYLE_NS, "table-properties");
- }
-
public Element getTableColumnProperties()
{
return findFirstChild(OfficeNamespaces.STYLE_NS, "table-column-properties");
}
- public Element getSectionProperties()
- {
- return findFirstChild(OfficeNamespaces.STYLE_NS, "section-properties");
- }
-
public Element getTableCellProperties()
{
return findFirstChild(OfficeNamespaces.STYLE_NS, "table-cell-properties");
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java
index 937f7a40591c..7e60f65998ec 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/AttributeSpecification.java
@@ -20,29 +20,8 @@ package org.libreoffice.report.pentaho.parser;
public final class AttributeSpecification
{
- private final String namespaceUrl;
- private final String attributName;
- private final String mapperImplementation;
-
public AttributeSpecification(String namespaceUrl, String attributName, String mapperImplementation)
{
- this.namespaceUrl = namespaceUrl;
- this.attributName = attributName;
- this.mapperImplementation = mapperImplementation;
}
- public String getAttributName()
- {
- return attributName;
- }
-
- public String getMapperImplementation()
- {
- return mapperImplementation;
- }
-
- public String getNamespaceUrl()
- {
- return namespaceUrl;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
index 55f8cf3804d3..5322e52efddd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeDocumentXmlResourceFactory.java
@@ -27,6 +27,7 @@ import org.jfree.report.modules.factories.report.base.JFreeReportXmlResourceFact
*
* @since 09.03.2007
*/
+@SuppressWarnings("ucd")
public class OfficeDocumentXmlResourceFactory extends JFreeReportXmlResourceFactory
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
index ae05cff7d1ff..8a12da80cf5e 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/OfficeStylesXmlResourceFactory.java
@@ -30,6 +30,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory;
*
* @since 09.03.2007
*/
+@SuppressWarnings("ucd")
public class OfficeStylesXmlResourceFactory extends AbstractXmlResourceFactory
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java
index be7ef7aaf63c..7c7b70533c79 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarStyleXmlFactoryModule.java
@@ -24,6 +24,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo;
import org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule;
import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
+@SuppressWarnings("ucd")
public class StarStyleXmlFactoryModule implements XmlFactoryModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java
index f3a711486677..ef81b23ad50c 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/StarXmlFactoryModule.java
@@ -24,6 +24,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlDocumentInfo;
import org.pentaho.reporting.libraries.xmlns.parser.XmlFactoryModule;
import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
+@SuppressWarnings("ucd")
public class StarXmlFactoryModule implements XmlFactoryModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
index 8f7ae01eb47c..83c5b1f6a5fd 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/FontFaceDeclsReadHandler.java
@@ -52,11 +52,6 @@ public class FontFaceDeclsReadHandler extends ElementReadHandler
this.fontFaceReadHandlers = new ArrayList<FontFaceReadHandler>();
}
- public FontFaceDeclsSection getFontFaceDecls()
- {
- return fontFaceDecls;
- }
-
/**
* Returns the handler for a child element.
*
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java
index 5b0065b94f21..f86cae8e546e 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/MasterStylesReadHandler.java
@@ -53,11 +53,6 @@ public class MasterStylesReadHandler extends ElementReadHandler
this.otherHandlers = new ArrayList<ElementReadHandler>();
}
- public OfficeMasterStyles getMasterStyles()
- {
- return masterStyles;
- }
-
/**
* Returns the handler for a child element.
*
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java
index d9a9ec929af9..e5aa0851f505 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/SubDocumentReadHandler.java
@@ -37,11 +37,6 @@ public class SubDocumentReadHandler extends NoCDATATextContentReadHandler
private final ObjectOleElement element;
private boolean ignore = false;
- public SubDocumentReadHandler(final ObjectOleElement element)
- {
- this.element = element;
- }
-
private SubDocumentReadHandler(final Section section, final ObjectOleElement element)
{
super(section);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java
index 371026905cad..fc0b1481ef0b 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/text/TextContentReadHandler.java
@@ -30,11 +30,6 @@ import org.xml.sax.SAXException;
public class TextContentReadHandler extends NoCDATATextContentReadHandler
{
- public TextContentReadHandler(final Section section, final boolean copyType)
- {
- super(section, copyType);
- }
-
public TextContentReadHandler(final Section section)
{
super(section);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java
index 00a5b5e8f8ad..cadf200c0410 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/xlink/XLinkReadHandler.java
@@ -32,9 +32,6 @@ public class XLinkReadHandler extends AbstractXmlReadHandler
{
private String uri;
- private String type;
- private String show;
- private String actuate;
/**
* Starts parsing.
@@ -46,9 +43,6 @@ public class XLinkReadHandler extends AbstractXmlReadHandler
protected void startParsing(final Attributes attrs) throws SAXException
{
uri = attrs.getValue(OfficeNamespaces.XLINK_NS, "uri");
- type = attrs.getValue(OfficeNamespaces.XLINK_NS, "type");
- show = attrs.getValue(OfficeNamespaces.XLINK_NS, "show");
- actuate = attrs.getValue(OfficeNamespaces.XLINK_NS, "actuate");
}
/**
@@ -68,18 +62,4 @@ public class XLinkReadHandler extends AbstractXmlReadHandler
return uri;
}
- public String getType()
- {
- return type;
- }
-
- public String getShow()
- {
- return show;
- }
-
- public String getActuate()
- {
- return actuate;
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java
index c55cae1eefe0..edf6cb7c8df2 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperKey.java
@@ -52,26 +52,6 @@ public final class StyleMapperKey
this.hashCode = computeHashCode();
}
- public String getElementNamespace()
- {
- return elementNamespace;
- }
-
- public String getElementName()
- {
- return elementName;
- }
-
- public String getAttributeNamespace()
- {
- return attributeNamespace;
- }
-
- public String getAttributeName()
- {
- return attributeName;
- }
-
@Override
public boolean equals(final Object o)
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java
index fd1996866c32..af1b2b8fc544 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlFactoryModule.java
@@ -26,6 +26,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.XmlReadHandler;
*
* @since 12.03.2007
*/
+@SuppressWarnings("ucd")
public class StyleMapperXmlFactoryModule implements XmlFactoryModule
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java
index b3d28c5c5cae..426e2ff61da5 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/styles/StyleMapperXmlResourceFactory.java
@@ -27,6 +27,7 @@ import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory;
*
* @since 12.03.2007
*/
+@SuppressWarnings("ucd")
public class StyleMapperXmlResourceFactory extends AbstractXmlResourceFactory
{
diff --git a/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java b/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java
index 3eca2872be83..b1cd7634303a 100644
--- a/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java
+++ b/reportbuilder/java/org/libreoffice/report/util/DefaultParameterMap.java
@@ -33,11 +33,6 @@ public class DefaultParameterMap implements ParameterMap
backend = new HashMap<String,Object>();
}
- public void clear()
- {
- backend.clear();
- }
-
/**
* Retrieves the value stored for a key in this properties collection.
*
@@ -54,61 +49,9 @@ public class DefaultParameterMap implements ParameterMap
return backend.get(key);
}
- /**
- * Retrieves the value stored for a key in this properties collection, and returning the
- * default value if the key was not stored in this properties collection.
- *
- * @param key the property key.
- * @param defaultValue the default value to be returned when the key is not stored in
- * this properties collection.
- * @return The stored value, or the default value if the key does not exist in this
- * collection.
- */
- public Object get(final String key, final Object defaultValue)
- {
- if (key == null)
- {
- throw new NullPointerException("DefaultParameterMap.get (..): Parameter 'key' must not be null");
- }
- final Object o = this.backend.get(key);
- if (o == null)
- {
- return defaultValue;
- }
- return o;
- }
-
public String[] keys()
{
return this.backend.keySet().toArray(new String[backend.size()]);
}
- /**
- * Adds a property to this properties collection. If a property with the given name
- * exist, the property will be replaced with the new value. If the value is null, the
- * property will be removed.
- *
- * @param key the property key.
- * @param value the property value.
- */
- public void put(final String key, final Object value)
- {
- if (key == null)
- {
- throw new NullPointerException("ReportProperties.put (..): Parameter 'key' must not be null");
- }
- if (value == null)
- {
- this.backend.remove(key);
- }
- else
- {
- this.backend.put(key, value);
- }
- }
-
- public int size()
- {
- return this.backend.size();
- }
}
diff --git a/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java b/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java
index 54dce8e6e039..b3e2e96c6488 100644
--- a/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java
+++ b/reportbuilder/java/org/libreoffice/report/util/DefaultReportJobDefinition.java
@@ -17,14 +17,9 @@
*/
package org.libreoffice.report.util;
-import org.libreoffice.report.DataSourceFactory;
-import org.libreoffice.report.InputRepository;
-import org.libreoffice.report.JobDefinitionException;
import org.libreoffice.report.JobProperties;
-import org.libreoffice.report.OutputRepository;
import org.libreoffice.report.ParameterMap;
import org.libreoffice.report.ReportEngineMetaData;
-import org.libreoffice.report.ReportEngineParameterNames;
import org.libreoffice.report.ReportJobDefinition;
public class DefaultReportJobDefinition implements ReportJobDefinition
@@ -40,39 +35,6 @@ public class DefaultReportJobDefinition implements ReportJobDefinition
this.properties = new DefaultJobProperties(metaData);
}
- public void setDataSourceFactory(final DataSourceFactory dataSourceFactory)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY, dataSourceFactory);
- }
-
- public DataSourceFactory getDataSourceFactory()
- {
- return (DataSourceFactory) this.properties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
- }
-
- public InputRepository getInputRepository()
- {
- return (InputRepository) this.properties.getProperty(ReportEngineParameterNames.INPUT_REPOSITORY);
- }
-
- public void setInputRepository(final InputRepository inputRepository)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.INPUT_REPOSITORY, inputRepository);
- }
-
- public OutputRepository getOutputRepository()
- {
- return (OutputRepository) this.properties.getProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY);
- }
-
- public void setOutputRepository(final OutputRepository outputRepository)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY, outputRepository);
- }
-
/**
* The parameters of the root report definition. The parameters for the subreports are
* defined using mappings, it would not make sense to define them here.
@@ -84,22 +46,6 @@ public class DefaultReportJobDefinition implements ReportJobDefinition
return parameters;
}
- public void setReportDefinitionName(final String reportDefinitionName)
- throws JobDefinitionException
- {
- this.properties.setProperty(ReportEngineParameterNames.INPUT_NAME, reportDefinitionName);
- }
-
- /**
- * The name under which we can load the report definition.
- *
- * @return the report definition's name.
- */
- public String getReportDefinitionName()
- {
- return (String) this.properties.getProperty(ReportEngineParameterNames.INPUT_NAME);
- }
-
public JobProperties getProcessingParameters()
{
return properties;
diff --git a/reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java b/reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java
deleted file mode 100644
index 3be716971158..000000000000
--- a/reportbuilder/java/org/libreoffice/report/util/ManifestWriter.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.libreoffice.report.util;
-
-import org.libreoffice.report.OutputRepository;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.jfree.report.JFreeReportBoot;
-
-import org.pentaho.reporting.libraries.xmlns.common.AttributeList;
-import org.pentaho.reporting.libraries.xmlns.writer.DefaultTagDescription;
-import org.pentaho.reporting.libraries.xmlns.writer.XmlWriter;
-import org.pentaho.reporting.libraries.xmlns.writer.XmlWriterSupport;
-
-
-/**
- * Creation-Date: 24.07.2007, 18:16:52
- *
- */
-public class ManifestWriter
-{
- // need this two strings other it breaks the ooo build :-(
-
- public static final String MANIFEST_NS = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
- public static final String TAG_DEF_PREFIX = "org.libreoffice.report.pentaho.output.";
- private final Map<String,String> entries;
-
- public ManifestWriter()
- {
- entries = new HashMap<String,String>();
- }
-
- public void addEntry(final String fullPath, final String mimeType)
- {
- if (fullPath == null)
- {
- throw new NullPointerException();
- }
- if (mimeType == null)
- {
- throw new NullPointerException();
- }
- if ("META-INF/manifest.xml".equals(fullPath))
- {
- return;
- }
- entries.put(fullPath, mimeType);
- }
-
- public boolean isEmpty()
- {
- return entries.isEmpty();
- }
-
- public void write(final OutputRepository outputRepository) throws IOException
- {
- if (isEmpty())
- {
- return;
- }
-
- final DefaultTagDescription tagDescription = new DefaultTagDescription();
- tagDescription.configure(JFreeReportBoot.getInstance().getGlobalConfig(),
- TAG_DEF_PREFIX);
-
- final OutputStream manifestOutputStream =
- outputRepository.createOutputStream("META-INF/manifest.xml", "text/xml");
-
- final OutputStreamWriter writer = new OutputStreamWriter(manifestOutputStream, "UTF-8");
- final XmlWriter xmlWriter = new XmlWriter(writer, tagDescription);
- xmlWriter.setAlwaysAddNamespace(true);
- xmlWriter.writeXmlDeclaration("UTF-8");
-
- final AttributeList rootAttributes = new AttributeList();
- rootAttributes.addNamespaceDeclaration("manifest", MANIFEST_NS);
- xmlWriter.writeTag(MANIFEST_NS, "manifest", rootAttributes, XmlWriterSupport.OPEN);
-
- final Iterator<Map.Entry<String,String>> iterator = entries.entrySet().iterator();
- while (iterator.hasNext())
- {
- final Map.Entry<String,String> entry = iterator.next();
- final AttributeList entryAttrs = new AttributeList();
- entryAttrs.setAttribute(MANIFEST_NS, "media-type", entry.getValue());
- entryAttrs.setAttribute(MANIFEST_NS, "full-path", entry.getKey());
- xmlWriter.writeTag(MANIFEST_NS, "file-entry", entryAttrs, XmlWriterSupport.CLOSE);
- }
-
- xmlWriter.writeCloseTag();
- xmlWriter.close();
- }
-}