org.bibop.xml.xforge
Class ImportElement

java.lang.Object
  |
  +--org.bibop.xml.xforge.AbstractElement
        |
        +--org.bibop.xml.xforge.ImportElement
All Implemented Interfaces:
org.xml.sax.ContentHandler, Element, org.xml.sax.ext.LexicalHandler, ParametersListener, PrefixesMonitor, XMLConsumer, XMLProducer

public class ImportElement
extends AbstractElement
implements ParametersListener

Include an external x:forge library

Version:
1.0
Author:
Alberto Garoffolo

Nested Class Summary
 class ImportElement.ImportElementContentHandler
           
 
Field Summary
protected  java.lang.String href
           
protected  int levels
           
protected  java.util.Map parameters
           
protected  java.lang.String parse
           
protected  org.xml.sax.XMLReader parser
           
static java.lang.String XFORGE_ATTR_HREF
           
static java.lang.String XFORGE_ATTR_LEVELS
           
static java.lang.String XFORGE_ATTR_PARSE
           
protected  org.xml.sax.InputSource xmlinputsource
           
 
Fields inherited from class org.bibop.xml.xforge.AbstractElement
contentHandler, lexicalHandler, parentPrefixesMonitor, po, saxEvents, xmlCompiler
 
Constructor Summary
ImportElement(org.xml.sax.Attributes attrs, ProcessingOptions aPO)
          Build the object using the Attributes list
 
Method Summary
 void addParameter(java.lang.String name, ParameterValue value)
          Adds an attribute to the element to be built.
protected  void parseDirectory()
           
protected  void parseDirectory(java.io.File dir, int levels)
           
protected  void parseFile()
           
protected  void parseFile(java.lang.String filename, int levels)
           
 void toSax()
          Must be implemented by the extending classes
 
Methods inherited from class org.bibop.xml.xforge.AbstractElement
characters, comment, end, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, flushSAXCache, getActivePrefixes, ignorableWhitespace, output, output, processingInstruction, setConsumer, setContentHandler, setDocumentLocator, setLexicalHandler, setParent, setParentPrefixesMonitor, skippedEntity, start, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XFORGE_ATTR_HREF

public static final java.lang.String XFORGE_ATTR_HREF
See Also:
Constant Field Values

XFORGE_ATTR_PARSE

public static final java.lang.String XFORGE_ATTR_PARSE
See Also:
Constant Field Values

XFORGE_ATTR_LEVELS

public static final java.lang.String XFORGE_ATTR_LEVELS
See Also:
Constant Field Values

href

protected java.lang.String href

parse

protected java.lang.String parse

levels

protected int levels

parser

protected org.xml.sax.XMLReader parser

xmlinputsource

protected org.xml.sax.InputSource xmlinputsource

parameters

protected java.util.Map parameters
Constructor Detail

ImportElement

public ImportElement(org.xml.sax.Attributes attrs,
                     ProcessingOptions aPO)
              throws IllegalElementException
Build the object using the Attributes list

Parameters:
attrs - the Attributes list
Throws:
IllegalElementException - Invalid x:forge element declaration
Method Detail

toSax

public void toSax()
           throws org.xml.sax.SAXException
Description copied from class: AbstractElement
Must be implemented by the extending classes

Specified by:
toSax in interface XMLProducer
Specified by:
toSax in class AbstractElement
Throws:
org.xml.sax.SAXException

parseDirectory

protected void parseDirectory()
                       throws org.xml.sax.SAXException
org.xml.sax.SAXException

parseDirectory

protected void parseDirectory(java.io.File dir,
                              int levels)
                       throws org.xml.sax.SAXException
org.xml.sax.SAXException

parseFile

protected void parseFile()
                  throws org.xml.sax.SAXException
org.xml.sax.SAXException

parseFile

protected void parseFile(java.lang.String filename,
                         int levels)
                  throws org.xml.sax.SAXException
org.xml.sax.SAXException

addParameter

public void addParameter(java.lang.String name,
                         ParameterValue value)
                  throws XForgeException
Adds an attribute to the element to be built. This method is typically called by an ParameterElement object which is responsible for the parameter evaluation

Specified by:
addParameter in interface ParametersListener
Parameters:
name - The name of the parameter
value - The value of the parameter
Throws:
XForgeException - Bad or redeclared name/value


Copyright 2003 Bibop Research International. All Rights Reserved.