javax.xml.bind.annotation.DomHandler Java Examples

The following examples show how to use javax.xml.bind.annotation.DomHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SingleReferenceNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #2
Source File: SingleReferenceNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #3
Source File: ArrayReferenceNodeProperty.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #4
Source File: SingleReferenceNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #5
Source File: ArrayReferenceNodeProperty.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #6
Source File: SingleReferenceNodeProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #7
Source File: ArrayReferenceNodeProperty.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #8
Source File: SingleReferenceNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #9
Source File: ArrayReferenceNodeProperty.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #10
Source File: SingleReferenceNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #11
Source File: ArrayReferenceNodeProperty.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #12
Source File: SingleReferenceNodeProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #13
Source File: ArrayReferenceNodeProperty.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #14
Source File: ArrayReferenceNodeProperty.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #15
Source File: ArrayReferenceNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
    super(p, prop, prop.getXmlName(), prop.isCollectionNillable());

    for (RuntimeElement e : prop.getElements()) {
        JaxBeanInfo bi = p.getOrCreate(e);
        expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
    }

    isMixed = prop.isMixed();

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #16
Source File: SingleReferenceNodeProperty.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
    super(context,prop);
    acc = prop.getAccessor().optimize(context);

    for (RuntimeElement e : prop.getElements()) {
        expectedElements.put( e.getElementName(), context.getOrCreate(e) );
    }

    if(prop.getWildcard()!=null) {
        domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
        wcMode = prop.getWildcard();
    } else {
        domHandler = null;
        wcMode = null;
    }
}
 
Example #17
Source File: XMLSerializer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #18
Source File: XMLSerializer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #19
Source File: XMLSerializer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #20
Source File: XMLSerializer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #21
Source File: XMLSerializer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #22
Source File: XMLSerializer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #23
Source File: XMLSerializer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #24
Source File: XMLSerializer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
    Source source = domHandler.marshal(element,this);
    if(contentHandlerAdapter==null)
        contentHandlerAdapter = new ContentHandlerAdaptor(this);
    try {
        getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
    } catch (TransformerException e) {
        reportError(fieldName,e);
    }
}
 
Example #25
Source File: DomLoader.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public DomLoader(DomHandler<?, ResultT> dom) {
    super(true);
    this.dom = dom;
}
 
Example #26
Source File: WildcardLoader.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public WildcardLoader(DomHandler dom, WildcardMode mode) {
    this.dom = new DomLoader(dom);
    this.mode = mode;
}
 
Example #27
Source File: DomLoader.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public DomLoader(DomHandler<?, ResultT> dom) {
    super(true);
    this.dom = dom;
}
 
Example #28
Source File: DomLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public DomLoader(DomHandler<?, ResultT> dom) {
    super(true);
    this.dom = dom;
}
 
Example #29
Source File: WildcardLoader.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public WildcardLoader(DomHandler dom, WildcardMode mode) {
    this.dom = new DomLoader(dom);
    this.mode = mode;
}
 
Example #30
Source File: WildcardLoader.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public WildcardLoader(DomHandler dom, WildcardMode mode) {
    this.dom = new DomLoader(dom);
    this.mode = mode;
}