Class TransformerBase
java.lang.Object
org.exoplatform.services.xml.transform.impl.TransformerBase
- All Implemented Interfaces:
AbstractTransformer
- Direct Known Subclasses:
TRAXTransformerImpl
Created by The eXo Platform SAS .
- Version:
- $Id: TransformerBase.java 5799 2006-05-28 17:55:42Z geaz $
- Author:
- Alexander Kravchuk
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.exoplatform.services.log.Logprotected XMLResolvingServiceprotected SAXTransformerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidoverride when need some operation after initialization result in transformerprotected Resultstatic XMLReaderTODO change.final voidinitResult(Result result) Initialize a result of transformationprotected abstract voidinternalTransform(Source src) protected booleanisResultSupported(Result result) protected booleanisSourceSupported(Source source) voidprotected InputStreamsourceAsInputStream(Source source) Transform javax.xml.transform.Source to java.io.InputStream if can't transform throw exceptionfinal voidTransform source data to resultvoidtransformInputStream2Result(InputStream input, Result result) Tranform InputStream to specified result, according to type of resultprotected voidwriteTofile(byte[] bytes, String postfix) Deprecated.see Warning
-
Field Details
-
LOG
protected static final org.exoplatform.services.log.Log LOG -
tSAXFactory
-
resolvingService
-
-
Constructor Details
-
TransformerBase
public TransformerBase()
-
-
Method Details
-
getXMLReader
TODO change. Must no use explicit parser class name- Throws:
SAXException
-
setResolvingService
-
afterInitResult
protected void afterInitResult()override when need some operation after initialization result in transformer -
initResult
Description copied from interface:AbstractTransformerInitialize a result of transformation- Specified by:
initResultin interfaceAbstractTransformer- Parameters:
result- Result- Throws:
NotSupportedIOTypeException- if try to initialize with not supported implementation of Result
-
getResult
-
isSourceSupported
-
isResultSupported
-
internalTransform
protected abstract void internalTransform(Source src) throws NotSupportedIOTypeException, TransformerException, IllegalStateException -
transform
public final void transform(Source source) throws NotSupportedIOTypeException, TransformerException, IllegalStateException Description copied from interface:AbstractTransformerTransform source data to result- Specified by:
transformin interfaceAbstractTransformer- Parameters:
source- Source - input of transformation- Throws:
NotSupportedIOTypeException- if not supported implementation of SourceTransformerException- if error occurred on transformation processIllegalStateException- if result not initialized by initResult
-
transformInputStream2Result
public void transformInputStream2Result(InputStream input, Result result) throws TransformerException Tranform InputStream to specified result, according to type of result- Parameters:
input- InputStreamresult- Result- Throws:
TransformerException
-
sourceAsInputStream
Transform javax.xml.transform.Source to java.io.InputStream if can't transform throw exception- Parameters:
source- Source- Returns:
- InputStream
- Throws:
NotSupportedIOTypeException
-
writeTofile
Deprecated.see WarningTODO REMOVE!!!! For debug only!!!
-