Package org.geotools.ml

Examples of org.geotools.ml.Envelope


            Map headerObject = (Map) itr.next();
            headers[i++] = new Header((String) headerObject.get("name"),
                    (String) headerObject.get(null));
        }

        return new Envelope(from, to, date, subject, headers);
    }
View Full Code Here


        return new Envelope(from, to, date, subject, headers);
    }
   
    @Override
    public Object getProperty(Object object, QName name) throws Exception {
        Envelope e = (Envelope) object;
       
        if ( "From".equals( name.getLocalPart() ) ) {
            return e.getFrom();
        }
        if ( "To".equals( name.getLocalPart() ) ) {
            return e.getTo();
        }

        return null;
    }
View Full Code Here

     *
     * @generated modifiable
     */
    public Object parse(ElementInstance instance, Node node, Object value)
        throws Exception {
        Envelope envelope = (Envelope) node.getChildValue("envelope");
        String body = (String) node.getChildValue("body");
        BigInteger id = (BigInteger) node.getAttributeValue("id");

        List atts = node.getChildValues("attachment");
        Attachment[] attachments = (Attachment[]) atts.toArray(new Attachment[atts.size()]);
View Full Code Here

import junit.framework.TestCase;

public class EncoderTest extends TestCase {

    public void testIndent() throws Exception {
        Mail ml = new Mail(BigInteger.valueOf(10), "hi", new Envelope("me@me.org", "you@you.org",
            Calendar.getInstance(), "hey", null), null);
        Encoder e = new Encoder(new MLConfiguration());
        //e.setIndenting(true);
        //e.setIndentSize(4);
View Full Code Here

TOP

Related Classes of org.geotools.ml.Envelope

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.