org.apache.fop.fonts.apps
Class AbstractFontReader
java.lang.Object
org.apache.fop.fonts.apps.AbstractFontReader
public abstract class AbstractFontReader
extends java.lang.Object
Abstract base class for the PFM and TTF Reader command-line applications.
protected static Log | log - Logger instance
|
protected static void | determineLogLevel(Map options) - Determines the log level based of the options from the command-line.
|
protected static String[] | parseArguments(Map options, String[] args) - Parse commandline arguments.
|
protected static void | setLogLevel(String level) - Sets the logging level.
|
void | writeFontXML(org.w3c.dom.Document doc, File target) - Writes the generated DOM Document to a file.
|
void | writeFontXML(org.w3c.dom.Document doc, String target) - Writes the generated DOM Document to a file.
|
log
protected static Log log
Logger instance
AbstractFontReader
protected AbstractFontReader()
Main constructor.
determineLogLevel
protected static void determineLogLevel(Map options)
Determines the log level based of the options from the command-line.
options
- the command-line options
parseArguments
protected static String[] parseArguments(Map options,
String[] args)
Parse commandline arguments. put options in the HashMap and return
arguments in the String array
the arguments: -fn Perpetua,Bold -cn PerpetuaBold per.ttf Perpetua.xml
returns a String[] with the per.ttf and Perpetua.xml. The hash
will have the (key, value) pairs: (-fn, Perpetua) and (-cn, PerpetuaBold)
options
- Map that will receive optionsargs
- the command-line arguments
setLogLevel
protected static void setLogLevel(String level)
Sets the logging level.
level
- the logging level ("debug", "info", "error" etc., see Jakarta Commons Logging)
writeFontXML
public void writeFontXML(org.w3c.dom.Document doc,
File target)
throws TransformerException
Writes the generated DOM Document to a file.
doc
- The DOM Document to save.target
- The target file for the XML file.
writeFontXML
public void writeFontXML(org.w3c.dom.Document doc,
String target)
throws TransformerException
Writes the generated DOM Document to a file.
doc
- The DOM Document to save.target
- The target filename for the XML file.
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.