You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Mik Lernout <mi...@futurestreet.org> on 2004/09/10 12:21:03 UTC

XsObjectFactory

Hey guys,

Imagine that I would like to override the default XsObjectFactoryImpl 
with my own implementation.
How and where would I introduce this as clean as possible?

Mik

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: XsObjectFactory

Posted by Jochen Wiedmann <jo...@freenet.de>.
Mik Lernout wrote:

> Oops, should RTFC first :-)
                ^^^^

I've got to learn something new every day, only knew RTFM. :-)


-- 
http://lilypie.com/baby1/050423/1/5/1/+1

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: XsObjectFactory

Posted by Mik Lernout <mi...@futurestreet.org>.
Oops, should RTFC first :-)

Mik

Jochen Wiedmann wrote:

> Mik Lernout wrote:
>
>> Imagine that I would like to override the default XsObjectFactoryImpl 
>> with my own implementation.
>> How and where would I introduce this as clean as possible?
>
>
>
> public class JAXBParser extends XSParser {
>   public static final XSObjectFactory JAXB_OBJECT_FACTORY = new 
> JAXBObjectFactoryImpl();
>   public static final JAXBXsObjectFactory JAXB_XS_OBJECT_FACTORY = new 
> JAXBXsObjectFactoryImpl();
>
>   /** <p>The JAXB Schema URI: 
> <code>http://java.sun.com/xml/ns/jaxb</code></p>
>    */
>   public static final String JAXB_SCHEMA_URI = 
> "http://java.sun.com/xml/ns/jaxb";
>
>   /** <p>The XJC Schema URI: 
> <code>http://java.sun.com/xml/ns/jaxb/xjc</code></p>
>    */
>   public static final String XJC_SCHEMA_URI = 
> "http://java.sun.com/xml/ns/jaxb/xjc";
>
>   public JAXBParser() {
>     XSContext data = getContext();
>     data.setXsObjectFactory(JAXB_XS_OBJECT_FACTORY);
>     data.setXSObjectFactory(JAXB_OBJECT_FACTORY);
>   }
> }
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: XsObjectFactory

Posted by Jochen Wiedmann <jo...@freenet.de>.
Mik Lernout wrote:

> Imagine that I would like to override the default XsObjectFactoryImpl 
> with my own implementation.
> How and where would I introduce this as clean as possible?


public class JAXBParser extends XSParser {
   public static final XSObjectFactory JAXB_OBJECT_FACTORY = new 
JAXBObjectFactoryImpl();
   public static final JAXBXsObjectFactory JAXB_XS_OBJECT_FACTORY = new 
JAXBXsObjectFactoryImpl();

   /** <p>The JAXB Schema URI: 
<code>http://java.sun.com/xml/ns/jaxb</code></p>
    */
   public static final String JAXB_SCHEMA_URI = 
"http://java.sun.com/xml/ns/jaxb";

   /** <p>The XJC Schema URI: 
<code>http://java.sun.com/xml/ns/jaxb/xjc</code></p>
    */
   public static final String XJC_SCHEMA_URI = 
"http://java.sun.com/xml/ns/jaxb/xjc";

   public JAXBParser() {
     XSContext data = getContext();
     data.setXsObjectFactory(JAXB_XS_OBJECT_FACTORY);
     data.setXSObjectFactory(JAXB_OBJECT_FACTORY);
   }
}


-- 
http://lilypie.com/baby1/050423/1/5/1/+1

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org