The Octet Molecular Representation Framework v0.8.2

net.sf.octet.xml
Interface FlexMolHandler

All Superinterfaces:
org.xml.sax.ContentHandler
All Known Implementing Classes:
BasicFlexMolHandler

public interface FlexMolHandler
extends org.xml.sax.ContentHandler

A SAX handler with FlexMol-specific extensions. FlexMolHandler can be used in any situation calling for a SAX ContentHandler. A RepresentationBuilder and AtomicSystem need to be set prior to document processing, or a SAXException will be thrown by any XMLReader using the FlexMolHandler.

Content (elements or attributes) not understood by a FlexMolHandler will be ignored and will never result in a thrown exception.

Author:
Richard Apodaca

Method Summary
 AtomicSystem getAtomicSystem()
          Returns the AtomicSystem in use by this FlexMolHandler.
 AtomProxy getAtomProxy(java.lang.String id)
          Returns the AtomProxy associated with id in the FlexMol document being processed.
 java.lang.String getCurrentElement()
          Returns the current element being processed by this FlexMolHandler.
 RepresentationBuilder getRepresentationBuilder()
          Returns the RepresenationBuilder in use by this FlexMolHandler.
 void setAtomicSystem(AtomicSystem system)
          Sets the AtomicSystem to be used by this FlexMolHandler.
 void setRepresentationBuilder(RepresentationBuilder builder)
          Sets the RepresentationBuilder that will be used with this FlexMolHandler.
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 

Method Detail

setRepresentationBuilder

public void setRepresentationBuilder(RepresentationBuilder builder)
Sets the RepresentationBuilder that will be used with this FlexMolHandler. Failure to set a RepresentationBuilder will result in a SAXException being thrown upon invocation of XMLReader.parse.

Parameters:
builder - the RepresenationBuilder that will be used with this FlexMolHandler

getRepresentationBuilder

public RepresentationBuilder getRepresentationBuilder()
Returns the RepresenationBuilder in use by this FlexMolHandler.

Returns:
the RepresenationBuilder in use by this FlexMolHandler

setAtomicSystem

public void setAtomicSystem(AtomicSystem system)
Sets the AtomicSystem to be used by this FlexMolHandler. Failure to set an AtomicSystem will result in a SAXException being thrown upon invocation of XMLReader.parse.

Parameters:
system - the AtomicSystem to be used by this FlexMolHandler

getAtomicSystem

public AtomicSystem getAtomicSystem()
Returns the AtomicSystem in use by this FlexMolHandler.

Returns:
the AtomicSystem in use by this FlexMolHandler

getCurrentElement

public java.lang.String getCurrentElement()
Returns the current element being processed by this FlexMolHandler.

Returns:
the current element being processed by this FlexMolHandler, or "", but not null

getAtomProxy

public AtomProxy getAtomProxy(java.lang.String id)
Returns the AtomProxy associated with id in the FlexMol document being processed.

Parameters:
id - the atom id
Returns:
the AtomProxy associated with id in the FlexMol document being processed, or null if none is found

The Octet Molecular Representation Framework v0.8.2