[Yanel-commits] rev 40378 -
public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Tue Dec 9 16:15:36 CET 2008
Author: michi
Date: 2008-12-09 16:15:36 +0100 (Tue, 09 Dec 2008)
New Revision: 40378
Modified:
public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java
Log:
obsolete else and imports removed
Modified: public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java 2008-12-09 15:15:09 UTC (rev 40377)
+++ public/yanel/trunk/src/contributions/resources/pdf/src/java/org/wyona/yanel/impl/resources/PDFResource.java 2008-12-09 15:15:36 UTC (rev 40378)
@@ -23,22 +23,15 @@
import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
import org.wyona.yanel.core.source.SourceResolver;
-import org.wyona.yarep.core.RepositoryException;
import org.wyona.yarep.core.Repository;
-
import org.wyona.yanel.core.util.WildcardReplacerHelper;
-
import org.apache.log4j.Category;
-
import org.apache.fop.apps.FopFactory;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import java.io.File;
import java.io.InputStream;
-import java.util.Iterator;
-import java.util.Map;
-
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Source;
@@ -150,9 +143,8 @@
if (yanelPath.startsWith("yanelrepo:") || yanelPath.startsWith("yanelresource:")) {
log.warn("Not implemented yet!");
return true;
- } else {
- return repo.existsNode(yanelPath);
- }
+ }
+ return repo.existsNode(yanelPath);
}
/**
@@ -168,14 +160,12 @@
*/
private StreamSource getXSLTStreamSource(String path, Repository repo) throws Exception {
String xsltPath = getXSLTPath(path);
- if(xsltPath != null) {
+ if(xsltPath != null)
return new StreamSource(repo.getInputStream(new Path(xsltPath)));
- } else {
- File xsltFile = org.wyona.commons.io.FileUtil.file(
- rtd.getConfigFile().getParentFile().getAbsolutePath(), "xslt" + File.separator + "xml2fo.xsl");
+ File xsltFile = org.wyona.commons.io.FileUtil.file( rtd.getConfigFile().getParentFile().getAbsolutePath(), "xslt" + File.separator + "xml2fo.xsl");
+ if( log.isDebugEnabled() )
log.debug("XSLT file: " + xsltFile);
- return new StreamSource(xsltFile);
- }
+ return new StreamSource(xsltFile);
}
/**
More information about the Yanel-commits
mailing list