|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Transformer
is the interface for converting a set of Zeus
objects from a set of XML-based names
(created by a Zeus Binder
instance) and
identities to another set of Binder
Binding
objects. This second
set of objects is only an intermediate set, which is then used by a
to create Java classes.
Generator
This allows a user to specify a mapping file and thereby transform a set of XML names into another set of names, either for ensuring legal Java names, for using more business-centric names, or any other user desired basis.
Method Summary | |
void |
addValueEnumeration(ValueEnumeration valueEnumeration)
This will add a new to those
available to this Transformer . |
TransformerOptions |
getTransformerOptions()
This returns the current for
this transformer. |
ValueEnumeration |
getValueEnumeration(java.lang.String name)
This will retrieve the for the
supplied name. |
void |
setTransformerOptions(TransformerOptions transformerOptions)
This allows setting of the for
this transformer. |
java.util.List |
transform(java.util.List bindings)
This method performs the work of transforming a set of Zeus objects. |
Method Detail |
public void setTransformerOptions(TransformerOptions transformerOptions)
This allows setting of the
for
this transformer.
TransformerOptions
transformerOptions
- the options for this transformerpublic TransformerOptions getTransformerOptions()
This returns the current
for
this transformer.
TransformerOptions
TransformerOptions
- the options in use for this
transformer.public void addValueEnumeration(ValueEnumeration valueEnumeration)
This will add a new
to those
available to this ValueEnumeration
Transformer
.
valueEnumeration
- the enumeration to add for this transformer.public ValueEnumeration getValueEnumeration(java.lang.String name) throws NoSuchValueEnumerationException
This will retrieve the
for the
supplied name.
ValueEnumeration
If the supplied name is not associated with a
ValueEnumeration
, this is considered an exceptional
condition; any
Transformer
construct looking for a
ValueEnumeration
by name expects to find one,
or the supplied mapping information is in error. Therefore,
in this case, a
is thrown.
NoSuchValueEnumerationException
ValueEnumeration
- the enumeration for the supplied
name.NoSuchValueEnumerationException
- - when an
enumeration with the supplied name cannot be found.public java.util.List transform(java.util.List bindings) throws java.io.IOException, ZeusException
This method performs the work of transforming a set of Zeus
objects. It then returns a new
set of Binding
Binding
objects (in List
form)
with transformed names, types, and values.
When this method is invoked, it attempts to see if parsing of the mapping file has already occurred. If it has not, parsing of that file will occur within this method.
It is important to note that the number of bindings returned from this method may not be the same as the number supplied. This is due to some XML elements/attributes being converted to value objects, while other mapping instructions may actually create new binding objects.
bindings
- List
of bindings to process for
transformation.List
- the transformed bindings.IOException
- - when errors occur in parsing
a mapping configuration file.ZeusException
- - when errors occuring in
transformation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |