Package org.jibx.runtime.impl

Examples of org.jibx.runtime.impl.MarshallingContext


public class NullBindingFactory implements IBindingFactory {

    private static final String[] EMPTY_STRINGS = new String[0];

    public IMarshallingContext createMarshallingContext() throws JiBXException {
        return new MarshallingContext(EMPTY_STRINGS, EMPTY_STRINGS, EMPTY_STRINGS, this);
    }
View Full Code Here


public class NullBindingFactory implements IBindingFactory {
   
    private static final String[] EMPTY_STRINGS = new String[0];
   
    public IMarshallingContext createMarshallingContext() throws JiBXException {
        return new MarshallingContext(EMPTY_STRINGS, EMPTY_STRINGS, EMPTY_STRINGS, this);
    }
View Full Code Here

  }

  @Override
  protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
    try {
      MarshallingContext marshallingContext = (MarshallingContext) createMarshallingContext();
      IXMLWriter xmlWriter = new StAXWriter(marshallingContext.getNamespaces(), streamWriter);
      marshallingContext.setXmlWriter(xmlWriter);
      marshallingContext.marshalDocument(graph);
    }
    catch (JiBXException ex) {
      throw convertJibxException(ex, false);
    }
  }
View Full Code Here

        if (!(obj instanceof Properties))
            throw new JiBXException("Invalid object type for marshaller");
        if (!(ictx instanceof MarshallingContext))
            throw new JiBXException("Invalid object type for marshaller");

        MarshallingContext ctx = (MarshallingContext) ictx;
        Properties map = (Properties) obj;
        MarshallingContext mContext = ctx.startTagAttributes(marshallIndex, marshallName);
        mContext.attribute(marshallIndex, SIZE_ATTRIBUTE_NAME, map.size()).closeStartContent();

        Iterator<Map.Entry<String, String>> iter = map.entrySet().iterator();
        while (iter.hasNext()) {
            Map.Entry<String, String> entry = iter.next();
            String key = entry.getKey().toString();
View Full Code Here

public class NullBindingFactory implements IBindingFactory {

    private static final String[] EMPTY_STRINGS = new String[0];

    public IMarshallingContext createMarshallingContext() throws JiBXException {
        return new MarshallingContext(EMPTY_STRINGS, EMPTY_STRINGS, EMPTY_STRINGS, this);
    }
View Full Code Here

TOP

Related Classes of org.jibx.runtime.impl.MarshallingContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.