Hello *,
to create a Mapping from a DOM-Node we extended the Class Mapping.java and added a
Method with the Signature
public void loadMapping( Node pNode ).
Is where a possibility to integrate this Method in future releases of Castor, or would
this make any problems?
Best regards
Michael
===== Diff between the new and the old Mapping Class
70d69
< import org.w3c.dom.Node;
364c363
< loadMappingInternalString( url );
---
> loadMappingInternal( url );
413,426d411
< /**
< * Loads the mapping from the specified input source.
< *
< * @param pNode The input source
< * @throws IOException An error occured when reading the mapping
< * file
< * @throws MappingException The mapping file is invalid
< */
< public void loadMapping( Node pNode )
< throws IOException, MappingException
< {
< loadMappingInternal( pNode );
< }
<
438c423
< private void loadMappingInternalString( String url )
---
> private void loadMappingInternal( String url )
468c453
< private void loadMappingInternal( Object pObject )
---
> private void loadMappingInternal( InputSource source )
492,503c477,478
< if (pObject instanceof InputSource)
< {
< loaded = (MappingRoot) unm.unmarshal((InputSource) pObject);
< }
< else if (pObject instanceof Node)
< {
< loaded = (MappingRoot) unm.unmarshal((Node) pObject);
< }
< else
< {
< throw new IllegalArgumentException("Something's gone wrong, very
wrong!");
< }
---
> loaded = (MappingRoot) unm.unmarshal( source );
>
522c497
< loadMappingInternalString( ( (Include) includes.nextElement()
).getHref() );
---
> loadMappingInternal( ( (Include) includes.nextElement()
>).getHref() );
---
Dr. Michael Spiegler mailto:[EMAIL PROTECTED]
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 Muenchen, Germany
Tel +49 89 63812-936, Fax -490
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev