*
* It remains for any related variables defined in this class to be set.
*
- * @exception org.apache.fop.fo.FOPException
+ * @exception FOPException
*/
static void initOptions() throws FOPException {
Boolean bool = null;
* Load the standard configuration file and the user-defined configuration
* file if one has been defined. The definition can occur in either the
* standard file or as a command line argument.
- * @exception org.apache.fop.fo.FOPException
+ * @exception FOPException
*/
private static void loadConfigFiles() throws FOPException {
String str = null;
* Convenience class for common functionality required by the config
* files.
* @param fname the configuration file name.
- * @param classobj the <tt>Class</tt> object of requesting class.
+ * @param classob the requesting class
* @return an <tt>InputStream</tt> generated through a call to
* <tt>getResourceAsStream</tt> on the context <tt>ClassLoader</tt>
* or the <tt>ClassLoader</tt> for the conf class provided as an argument.
* class loader are asked in turn to <code>getResourceAsStream</code>
* on <i>fname</i> from a directory called <i>conf</i>.
* @param fname the name of the configuration file to load.
- * @exception org.apache.fop.fo.FOPException if the configuration file
+ * @exception FOPException if the configuration file
* cannot be discovered.
*/
public static void loadConfiguration(String fname)
* source. If this fails, an attempt is made to load the file using
* <code>loadConfiguration</code>.
* @param userConfigFileName the name of the user configuration file.
- * @exception org.apache.fop.fo.FOPException thrown when the file cannot
- * be located.
*/
- public static void loadUserConfiguration(String userConfigFileName)
- throws FOPException {
+ public static void loadUserConfiguration(String userConfigFileName) {
// read user configuration file
boolean readOk = true;
userConfigFile = new File(userConfigFileName);
}
}
- public static CommandLineStarter getStarter() throws FOPException {
+ public static CommandLineStarter getStarter() {
switch (outputmode) {
default:
package org.apache.fop.tools;
-import java.io.IOException;
-
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.AttributesImpl;
* <p>Implementors are free (and encouraged) to invent their own features,
* using names built on their own URIs.</p>
*
- * @param name The feature name, which is a fully-qualified URI.
- * @return The current state of the feature (true or false).
- * @exception org.xml.sax.SAXNotRecognizedException When the
- * XMLReader does not recognize the feature name.
- * @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the feature name but
- * cannot determine its value at this time.
- * @see #setFeature
+ * @param name of the feature, which is a fully-qualified URI
+ * @return the current state of the feature (true or false)
+ * @exception org.xml.sax.SAXNotRecognizedException thrown when the
+ * XMLReader does not recognize the feature name
*/
public boolean getFeature(String name)
- throws SAXNotRecognizedException, SAXNotSupportedException {
+ throws SAXNotRecognizedException {
if ("http://xml.org/sax/features/namespaces".equals(name)) {
return _namespaces;
} else if ("http://xml.org/sax/features/namespace-prefixes".equals(name)) {
* in specific contexts, such as before, during, or after
* a parse.</p>
*
- * @param name The feature name, which is a fully-qualified URI.
- * @param state The requested state of the feature (true or false).
- * @exception org.xml.sax.SAXNotRecognizedException When the
- * XMLReader does not recognize the feature name.
- * @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the feature name but
- * cannot set the requested value.
- * @see #getFeature
+ * @param name of the feature, which is a fully-qualified URI
+ * @param value of the requested state of the feature (true or false)
+ * @exception org.xml.sax.SAXNotRecognizedException thrown when the
+ * XMLReader does not recognize the feature name
*/
public void setFeature(String name, boolean value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
+ throws SAXNotRecognizedException {
if ("http://xml.org/sax/features/namespaces".equals(name)) {
_namespaces = value;
- } else if ("http://xml.org/sax/features/namespace-prefixes".equals(name)) {
+ } else
+ if ("http://xml.org/sax/features/namespace-prefixes".equals(name)) {
_namespace_prefixes = value;
} else {
throw new SAXNotRecognizedException("Feature '" + name
- + "' not recognized or supported by Document2SAXAdapter");
+ + "' not recognized or supported by Document2SAXAdapter");
}
}
* <p>Implementors are free (and encouraged) to invent their own properties,
* using names built on their own URIs.</p>
*
- * @param name The property name, which is a fully-qualified URI.
- * @return The current value of the property.
- * @exception org.xml.sax.SAXNotRecognizedException When the
- * XMLReader does not recognize the property name.
- * @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
- * cannot determine its value at this time.
- * @see #setProperty
+ * @param name of the property, which is a fully-qualified URI
+ * @return the current value of the property
+ * @exception org.xml.sax.SAXNotRecognizedException thrown when the
+ * XMLReader does not recognize the property name
*/
public Object getProperty(String name)
- throws SAXNotRecognizedException, SAXNotSupportedException {
+ throws SAXNotRecognizedException {
throw new SAXNotRecognizedException("Property '" + name
- + "' not recognized or supported by Document2SAXAdapter");
+ + "' not recognized or supported by Document2SAXAdapter");
}
* <p>This method is also the standard mechanism for setting
* extended handlers.</p>
*
- * @param name The property name, which is a fully-qualified URI.
- * @param state The requested value for the property.
- * @exception org.xml.sax.SAXNotRecognizedException When the
- * XMLReader does not recognize the property name.
- * @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
- * cannot set the requested value.
+ * @param name of the property, which is a fully-qualified URI
+ * @param value the requested value for the property
+ * @exception org.xml.sax.SAXNotRecognizedException thrown when the
+ * XMLReader does not recognize the property name
*/
public void setProperty(String name, Object value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
+ throws SAXNotRecognizedException {
throw new SAXNotRecognizedException("Property '" + name
- + "' not recognized or supported by Document2SAXAdapter");
+ + "' not recognized or supported by Document2SAXAdapter");
}
* @param resolver The entity resolver.
* @exception java.lang.NullPointerException If the resolver
* argument is null.
- * @see #getEntityResolver
*/
public void setEntityResolver(EntityResolver resolver) {
_entityResolver = resolver;
*
* @return The current entity resolver, or null if none
* has been registered.
- * @see #setEntityResolver
*/
public EntityResolver getEntityResolver() {
return _entityResolver;
* @param handler The DTD handler.
* @exception java.lang.NullPointerException If the handler
* argument is null.
- * @see #getDTDHandler
*/
public void setDTDHandler(DTDHandler handler) {
_dtdHandler = handler;
*
* @return The current DTD handler, or null if none
* has been registered.
- * @see #setDTDHandler
*/
public DTDHandler getDTDHandler() {
return _dtdHandler;
* @param handler The content handler.
* @exception java.lang.NullPointerException If the handler
* argument is null.
- * @see #getContentHandler
- */
+ */
public void setContentHandler(ContentHandler handler) {
_contentHandler = handler;
}
*
* @return The current content handler, or null if none
* has been registered.
- * @see #setContentHandler
*/
public ContentHandler getContentHandler() {
return _contentHandler;
* @param handler The error handler.
* @exception java.lang.NullPointerException If the handler
* argument is null.
- * @see #getErrorHandler
*/
public void setErrorHandler(ErrorHandler handler) {
_errorHandler = handler;
*
* @return The current error handler, or null if none
* has been registered.
- * @see #setErrorHandler
*/
public ErrorHandler getErrorHandler() {
return _errorHandler;
*
*
*
- * @param source The input source for the top-level of the
- * XML document.
+ * @param input the source for the top-level of the
+ * XML document
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
- * @exception java.io.IOException An IO exception from the parser,
- * possibly from a byte stream or character stream
* supplied by the application.
* @see org.xml.sax.InputSource
* @see #parse(java.lang.String)
- * @see #setEntityResolver
- * @see #setDTDHandler
- * @see #setContentHandler
- * @see #setErrorHandler
*/
- public void parse(InputSource input) throws IOException, SAXException {
+ public void parse(InputSource input) throws SAXException {
if (input instanceof DocumentInputSource) {
Document document = ((DocumentInputSource)input).getDocument();
if (_contentHandler == null) {
* @param systemId The system identifier (URI).
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
- * @exception java.io.IOException An IO exception from the parser,
- * possibly from a byte stream or character stream
* supplied by the application.
* @see #parse(org.xml.sax.InputSource)
*/
- public void parse(String systemId) throws IOException, SAXException {
+ public void parse(String systemId) throws SAXException {
throw new SAXException("DocumentReader only supports parsing of a DocumentInputSource");
}