[ 
http://issues.apache.org/jira/browse/WSCOMMONS-90?page=comments#action_12434618 
] 
            
Eran Chinthaka commented on WSCOMMONS-90:
-----------------------------------------

This can be easily implemented as following.

Whenever you try to add a child to an OMNode, first you check whether they are 
from the same type of factories. If not you can try to convert from one type to 
the other inside the addChild method itself. 
This has one good advantage to the user as he doesn't need to worry about which 
implementation is being used underneath and he will only see AXIOM base api and 
not the implementations. 
You might have to override the addChild method of OMElement and might want to 
check for the derivations of OMNode as, for example the way you import from a 
OMText and from a OMElement is different. 

I hope this will solve the problem :)

> Add importNode(OMNode) method into OMFactory
> --------------------------------------------
>
>                 Key: WSCOMMONS-90
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-90
>             Project: WS-Commons
>          Issue Type: Improvement
>          Components: AXIOM
>            Reporter: Ruchith Udayanga Fernando
>         Assigned To: Ruchith Udayanga Fernando
>            Priority: Blocker
>
> We need to be able to import a node from one OM implementation to another OM 
> implementation. Since an AXIOM object structure must only contain objects 
> from *one* OMFactory.
> Proposed solution:
> Add the following method to OMFactory interface.
> /**
>  * Import the given node as a node of this factory.
>  * @param node The Input node.
>  * @return New node that is created with this factory.
>  */
> public OMNode importNode(OMNode node) ;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to