From 1519992bb39906e5703db2d16a9a02eeb4c1d215 Mon Sep 17 00:00:00 2001 From: Thorsten Vitt <thorsten.vitt@uni-wuerzburg.de> Date: Fri, 17 Jan 2014 16:52:34 +0100 Subject: [PATCH] Moved generic stuff out of HTML package --- .../services/aggregator/{html => }/AbstractExporter.java | 5 +---- .../services/aggregator/{html => }/CorpusBasedExporter.java | 4 +--- .../services/aggregator/{html => }/StylesheetManager.java | 6 +++--- .../java/info/textgrid/services/aggregator/html/HTML.java | 1 + .../info/textgrid/services/aggregator/html/HTMLWriter.java | 3 +++ 5 files changed, 9 insertions(+), 10 deletions(-) rename src/main/java/info/textgrid/services/aggregator/{html => }/AbstractExporter.java (98%) rename src/main/java/info/textgrid/services/aggregator/{html => }/CorpusBasedExporter.java (96%) rename src/main/java/info/textgrid/services/aggregator/{html => }/StylesheetManager.java (97%) diff --git a/src/main/java/info/textgrid/services/aggregator/html/AbstractExporter.java b/src/main/java/info/textgrid/services/aggregator/AbstractExporter.java similarity index 98% rename from src/main/java/info/textgrid/services/aggregator/html/AbstractExporter.java rename to src/main/java/info/textgrid/services/aggregator/AbstractExporter.java index 4a03038..9052ded 100644 --- a/src/main/java/info/textgrid/services/aggregator/html/AbstractExporter.java +++ b/src/main/java/info/textgrid/services/aggregator/AbstractExporter.java @@ -1,4 +1,4 @@ -package info.textgrid.services.aggregator.html; +package info.textgrid.services.aggregator; import info.textgrid.namespaces.metadata.core._2010.ObjectType; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.AuthFault; @@ -6,10 +6,7 @@ import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.MetadataParseFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ObjectNotFoundFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ProtocolNotImplementedFault; -import info.textgrid.services.aggregator.ArgUtils; -import info.textgrid.services.aggregator.ITextGridRep; import info.textgrid.services.aggregator.ITextGridRep.TGOSupplier; -import info.textgrid.services.aggregator.RESTUtils; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/info/textgrid/services/aggregator/html/CorpusBasedExporter.java b/src/main/java/info/textgrid/services/aggregator/CorpusBasedExporter.java similarity index 96% rename from src/main/java/info/textgrid/services/aggregator/html/CorpusBasedExporter.java rename to src/main/java/info/textgrid/services/aggregator/CorpusBasedExporter.java index 406a944..77231c7 100644 --- a/src/main/java/info/textgrid/services/aggregator/html/CorpusBasedExporter.java +++ b/src/main/java/info/textgrid/services/aggregator/CorpusBasedExporter.java @@ -1,4 +1,4 @@ -package info.textgrid.services.aggregator.html; +package info.textgrid.services.aggregator; import info.textgrid.namespaces.metadata.core._2010.ObjectType; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.AuthFault; @@ -6,8 +6,6 @@ import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.MetadataParseFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ObjectNotFoundFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ProtocolNotImplementedFault; -import info.textgrid.services.aggregator.GenericExceptionMapper; -import info.textgrid.services.aggregator.ITextGridRep; import info.textgrid.services.aggregator.teicorpus.TEICorpusSerializer; import java.io.IOException; diff --git a/src/main/java/info/textgrid/services/aggregator/html/StylesheetManager.java b/src/main/java/info/textgrid/services/aggregator/StylesheetManager.java similarity index 97% rename from src/main/java/info/textgrid/services/aggregator/html/StylesheetManager.java rename to src/main/java/info/textgrid/services/aggregator/StylesheetManager.java index 6658b6f..7eab22a 100644 --- a/src/main/java/info/textgrid/services/aggregator/html/StylesheetManager.java +++ b/src/main/java/info/textgrid/services/aggregator/StylesheetManager.java @@ -1,8 +1,8 @@ -package info.textgrid.services.aggregator.html; +package info.textgrid.services.aggregator; import info.textgrid.namespaces.metadata.core._2010.ObjectType; -import info.textgrid.services.aggregator.ITextGridRep; import info.textgrid.services.aggregator.ITextGridRep.TGOSupplier; +import info.textgrid.services.aggregator.html.TGUriResolver; import java.io.IOException; import java.io.InputStream; @@ -128,7 +128,7 @@ public XsltExecutable load(final URI url) throws Exception { * @throws SaxonApiException * if saxon fails to compile the stylesheet. */ - protected XsltExecutable getStylesheet(final URI uri, + public XsltExecutable getStylesheet(final URI uri, final Optional<String> sid, final boolean forceLoad, final boolean frequentlyUsed) throws SaxonApiException, IOException { XsltExecutable executable = null; diff --git a/src/main/java/info/textgrid/services/aggregator/html/HTML.java b/src/main/java/info/textgrid/services/aggregator/html/HTML.java index 78358f7..6f6324f 100644 --- a/src/main/java/info/textgrid/services/aggregator/html/HTML.java +++ b/src/main/java/info/textgrid/services/aggregator/html/HTML.java @@ -6,6 +6,7 @@ import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ObjectNotFoundFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ProtocolNotImplementedFault; import info.textgrid.services.aggregator.ITextGridRep; +import info.textgrid.services.aggregator.StylesheetManager; import info.textgrid.services.aggregator.TextGridRepProvider; import java.io.IOException; diff --git a/src/main/java/info/textgrid/services/aggregator/html/HTMLWriter.java b/src/main/java/info/textgrid/services/aggregator/html/HTMLWriter.java index a2010b6..aa3fc0d 100644 --- a/src/main/java/info/textgrid/services/aggregator/html/HTMLWriter.java +++ b/src/main/java/info/textgrid/services/aggregator/html/HTMLWriter.java @@ -6,7 +6,10 @@ import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.MetadataParseFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ObjectNotFoundFault; import info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.ProtocolNotImplementedFault; +import info.textgrid.services.aggregator.AbstractExporter; +import info.textgrid.services.aggregator.CorpusBasedExporter; import info.textgrid.services.aggregator.ITextGridRep; +import info.textgrid.services.aggregator.StylesheetManager; import java.io.IOException; import java.io.OutputStream; -- GitLab