org.enhydra.zeus.binder
Class BaseBinder
- Direct Known Subclasses:
- DTDBinder, SchemaBinder
- public abstract class BaseBinder
- implements Binder
Binder
provides an interface for all constraint
representations to use. It defines the contract for conversion
between an arbitrary constraint representation (XML Schema, DTD,
Relax schema, etc) to a set of Zeus
Binding
s.
This implementation of Binder
handles the
basic functionality of dealing with input so that
other implementations don't have to code these methods.
Thus, XXXBinder
classes should extend
this class, rather than directly implementing
Binder
, and will get this functionality
"for free."
- Author:
- Brett McLaughlin
- Version: 1.0
Method Summary |
abstract List | getBindings()
This is integral portion of the Binder . |
BaseBinder
public BaseBinder(Source source)
This constructor takes in a Source
to read input from and allow generation of the
Binding
s from it.
- Parameters:
- source -
Source
to read input from.
getBindings
public abstract List getBindings()
throws java.io.IOException
This is integral portion of the Binder
. It
is responsible for returning a Zeus representation of
the set of constraints that this binding represents,
resulting from the input representation (which could
be an XML Schema, DTD, Relax schema, etc.).
There is a temptation to implement a lazy-loading mechanism
here, but that should not be done. That's because
the Source
may stay the same but the actual
input (abstracted by the Source
may change
"under the covers." So don't implement lazy-loading here!
- Returns:
List
- the resultant
Binding
s from conversion of
constraints.- Throws:
IOException
- when errors in reading
input occur.
to Class org.enhydra.zeus.Source- The
{@link Source}
to read input from