Package org.apache.abdera.writer

Examples of org.apache.abdera.writer.StreamWriter.writeElementText()


        writeAttributes(source, objectContext, context, conventions);

        switch (type) {
            case TEXT:
            case HTML:
                sw.writeElementText(toString(contentValue));
                break;
            case XHTML:
                Div div = null;
                if (contentValue instanceof Div)
                    div = (Div)contentValue;
View Full Code Here


        }

        switch (type) {
            case TEXT:
            case HTML:
                sw.writeElementText(toString(contentValue));
                break;
            case XHTML:
                Div div = null;
                if (contentValue instanceof Div)
                    div = (Div)contentValue;
View Full Code Here

                context.serialize(el, new ObjectContext(el));
                break;
            case MEDIA:
                try {
                    if (contentValue instanceof DataHandler)
                        sw.writeElementText((DataHandler)contentValue);
                    else if (contentValue instanceof InputStream)
                        sw.writeElementText((InputStream)contentValue);
                    else
                        sw.writeElementText(toString(contentValue));
                } catch (IOException e) {
View Full Code Here

            case MEDIA:
                try {
                    if (contentValue instanceof DataHandler)
                        sw.writeElementText((DataHandler)contentValue);
                    else if (contentValue instanceof InputStream)
                        sw.writeElementText((InputStream)contentValue);
                    else
                        sw.writeElementText(toString(contentValue));
                } catch (IOException e) {
                    throw new SerializationException(e);
                }
View Full Code Here

                    if (contentValue instanceof DataHandler)
                        sw.writeElementText((DataHandler)contentValue);
                    else if (contentValue instanceof InputStream)
                        sw.writeElementText((InputStream)contentValue);
                    else
                        sw.writeElementText(toString(contentValue));
                } catch (IOException e) {
                    throw new SerializationException(e);
                }
        }
    }
View Full Code Here

        } else if (value instanceof String) {
            date = AtomDate.parse((String)value);
        } else {
            date = AtomDate.parse(value.toString());
        }
        sw.writeElementText(date);
    }
}
View Full Code Here

            } else if (child instanceof ProcessingInstruction) {
                ProcessingInstruction pi = (ProcessingInstruction)child;
                sw.writePI(pi.getText(), pi.getTarget());
            } else if (child instanceof TextValue) {
                TextValue tv = (TextValue)child;
                sw.writeElementText(tv.getText());
            }
        }
        sw.endElement();
    }
View Full Code Here

                    writer.writeId(entry.getId());
                    writer.writeUpdated(entry.getUpdated());
                    writer.writePublished(entry.getPublished());
                    if (predecessor != null) {
                        writer.startElement(Common.PREDECESSOR, Common.NS_URI);
                        writer.writeElementText(predecessor);
                        writer.endElement();
                    }
                    if (options.publicOptions != null) {
                        // these are options that will be publicly visible
                        if (options.publicOptions.status != null) {
View Full Code Here

                            writer.writeSummary(options.publicOptions.body);
                        }
                        if (options.publicOptions.verb != null) {
                            writer.startElement("verb",
                                    "http://activitystrea.ms/spec/1.0/");
                            writer.writeElementText(options.publicOptions.verb);
                            writer.endElement();
                        }
                        if (options.publicOptions.tags != null) {
                            for (String s : options.publicOptions.tags) {
                                writer.writeCategory(s);
View Full Code Here

                        }
                        if (options.publicOptions.mentions != null) {
                            for (String s : options.publicOptions.mentions) {
                                writer.startElement("mention", Common.NS_URI,
                                        "trsst");
                                writer.writeElementText(s);
                                writer.endElement();
                            }
                        }
                    } else {
                        writer.writeTitle(""); // empty title
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.