public abstract class BaseTransform extends AbstractTransform
| Modifier and Type | Field and Description |
|---|---|
protected static Charset |
CS_UTF8 |
protected static Charset |
CS_WIN1252 |
protected String |
type |
protected static String |
UTF8 |
protected static String |
WIN1252 |
mojo| Constructor and Description |
|---|
BaseTransform(BaseMojo mojo,
String type) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
extractAttribute(String name,
String line)
Extracts the value of the named attribute.
|
String |
getTargetPath(IResource resource)
Renames the source files.
|
void |
transform(IResource resource,
OutputStream outputStream) |
protected void |
write(OutputStream outputStream,
String data)
Write data to the output stream without any special formatting.
|
protected void |
write(OutputStream outputStream,
String data,
boolean terminate,
int level)
Write data to the output stream with the specified formatting.
|
protected void |
writeAttribute(OutputStream outputStream,
String name,
String value)
Write the attribute's name/value pair to the output stream.
|
protected void |
writeSetting(OutputStream outputStream,
String name,
Object value,
int level)
Writes a setting's name/value pair to the output stream.
|
transformprotected static final String UTF8
protected static final Charset CS_UTF8
protected static final String WIN1252
protected static final Charset CS_WIN1252
protected final String type
public String getTargetPath(IResource resource)
getTargetPath in class AbstractTransformpublic void transform(IResource resource, OutputStream outputStream) throws Exception
transform in class AbstractTransformExceptionprotected String extractAttribute(String name, String line)
name - The attribute name.line - The source line.protected void writeAttribute(OutputStream outputStream, String name, String value)
outputStream - The output stream.name - The attribute name.value - The attribute value.protected void writeSetting(OutputStream outputStream, String name, Object value, int level) throws IOException
outputStream - The output stream.name - The setting name.value - The setting value.level - The indent level.IOException - Exception while writing to the output stream.protected void write(OutputStream outputStream, String data)
outputStream - The output stream.data - The data to write.protected void write(OutputStream outputStream, String data, boolean terminate, int level)
outputStream - The output stream.data - The data to write.terminate - If true, add a line terminator.level - The indent level.Copyright © 2016 Regenstrief Center for Biomedical Informatics. All rights reserved.