/** * Generates the atom output for an entry using the given xml writer and * extension profile. */ public static void generateAtom(XmlWriter writer, IEntry entry, ExtensionProfile extProfile) throws IOException { if (entry instanceof BaseEntry) { ((BaseEntry<?>) entry).generateAtom(writer, extProfile); } else { } }
/** * Generates the atom output for an entry using the given xml writer and * extension profile. */ public static void generateAtom(XmlWriter writer, IEntry entry, ExtensionProfile extProfile) throws IOException { if (entry instanceof BaseEntry) { ((BaseEntry<?>) entry).generateAtom(writer, extProfile); } else { } }
/** * Generates the atom output for an entry using the given xml writer and * extension profile. */ public static void generateAtom(XmlWriter writer, IEntry entry, ExtensionProfile extProfile) throws IOException { if (entry instanceof BaseEntry) { ((BaseEntry<?>) entry).generateAtom(writer, extProfile); } else { } }
@Override public void generate(XmlWriter w, ExtensionProfile p) throws IOException { generateAtom(w, p); }
@Override public void generate(XmlWriter w, ExtensionProfile p) throws IOException { generateAtom(w, p); }
@Override public void generate(XmlWriter w, ExtensionProfile p) throws IOException { generateAtom(w, p); }
/** * Override generateAtom() method to change the default namespace to kml. */ @Override public void generateAtom(XmlWriter w, ExtensionProfile extProfile) throws IOException { if (isKmlDefault) { w.setDefaultNamespace(DataConstants.KML_NAMESPACE); } super.generateAtom(w, extProfile); }
/** * Override generateAtom() method to change the default namespace to kml. */ @Override public void generateAtom(XmlWriter w, ExtensionProfile extProfile) throws IOException { if (isKmlDefault) { w.setDefaultNamespace(DataConstants.KML_NAMESPACE); } super.generateAtom(w, extProfile); }
private void generateEntries(XmlWriter w, ExtensionProfile extProfile) throws IOException { // Generate all entries w.startRepeatingElement(); for (E entry : entries) { entry.generateAtom(w, extProfile); } w.endRepeatingElement(); }
private void generateEntries(XmlWriter w, ExtensionProfile extProfile) throws IOException { // Generate all entries w.startRepeatingElement(); for (E entry : entries) { entry.generateAtom(w, extProfile); } w.endRepeatingElement(); }
private void generateEntries(XmlWriter w, ExtensionProfile extProfile) throws IOException { // Generate all entries w.startRepeatingElement(); for (E entry : entries) { entry.generateAtom(w, extProfile); } w.endRepeatingElement(); }
@Override public void generateXml(XmlWriter xw, OutputProperties outProps, IAtom source) throws IOException { xw.setDefaultNamespace(Namespaces.atomNs); ExtensionProfile extProfile = outProps.getExtensionProfile(); if (source instanceof IFeed) { IFeed feed = (IFeed) source; if (feed instanceof BaseFeed) { ((BaseFeed<?, ?>) feed).generateAtom(xw, extProfile); } else { throw new IllegalArgumentException("Feed was not an instance of data.BaseFeed"); } } else if (source instanceof IEntry) { IEntry entry = (IEntry) source; if (entry instanceof BaseEntry) { ((BaseEntry<?>) entry).generateAtom(xw, extProfile); } else { throw new IllegalArgumentException("Entry was not an instance of data.BaseEntry"); } } else if (source != null) { // This case is to handle case that may return Atom content but might // also return no data (like DELETE) throw new IllegalStateException("Unexpected source type: " + source.getClass()); } } }
@Override public void generateXml(XmlWriter xw, OutputProperties outProps, IAtom source) throws IOException { xw.setDefaultNamespace(Namespaces.atomNs); ExtensionProfile extProfile = outProps.getExtensionProfile(); if (source instanceof IFeed) { IFeed feed = (IFeed) source; if (feed instanceof BaseFeed) { ((BaseFeed<?, ?>) feed).generateAtom(xw, extProfile); } else { throw new IllegalArgumentException("Feed was not an instance of data.BaseFeed"); } } else if (source instanceof IEntry) { IEntry entry = (IEntry) source; if (entry instanceof BaseEntry) { ((BaseEntry<?>) entry).generateAtom(xw, extProfile); } else { throw new IllegalArgumentException("Entry was not an instance of data.BaseEntry"); } } else if (source != null) { // This case is to handle case that may return Atom content but might // also return no data (like DELETE) throw new IllegalStateException("Unexpected source type: " + source.getClass()); } } }
@Override public void generateXml(XmlWriter xw, OutputProperties outProps, IAtom source) throws IOException { xw.setDefaultNamespace(Namespaces.atomNs); ExtensionProfile extProfile = outProps.getExtensionProfile(); if (source instanceof IFeed) { IFeed feed = (IFeed) source; if (feed instanceof BaseFeed) { ((BaseFeed<?, ?>) feed).generateAtom(xw, extProfile); } else { throw new IllegalArgumentException("Feed was not an instance of data.BaseFeed"); } } else if (source instanceof IEntry) { IEntry entry = (IEntry) source; if (entry instanceof BaseEntry) { ((BaseEntry<?>) entry).generateAtom(xw, extProfile); } else { throw new IllegalArgumentException("Entry was not an instance of data.BaseEntry"); } } else if (source != null) { // This case is to handle case that may return Atom content but might // also return no data (like DELETE) throw new IllegalStateException("Unexpected source type: " + source.getClass()); } } }
@Override public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { ArrayList<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>(); if (rel != null) { attrs.add(new XmlWriter.Attribute("rel", rel)); } if (href != null) { attrs.add(new XmlWriter.Attribute("href", href)); } if (readOnly) { attrs.add(new XmlWriter.Attribute("readOnly", "true")); } generateStartElement(w, Namespaces.gNs, "entryLink", attrs, null); if (entry != null) { ExtensionProfile nestedExtProfile = extProfile.getEntryLinkProfile(); if (nestedExtProfile == null) { nestedExtProfile = extProfile; } entry.generateAtom(w, nestedExtProfile); } // Invoke ExtensionPoint. generateExtensions(w, extProfile); w.endElement(Namespaces.gNs, "entryLink"); }
@Override public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { ArrayList<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>(); if (rel != null) { attrs.add(new XmlWriter.Attribute("rel", rel)); } if (href != null) { attrs.add(new XmlWriter.Attribute("href", href)); } if (readOnly) { attrs.add(new XmlWriter.Attribute("readOnly", "true")); } generateStartElement(w, Namespaces.gNs, "entryLink", attrs, null); if (entry != null) { ExtensionProfile nestedExtProfile = extProfile.getEntryLinkProfile(); if (nestedExtProfile == null) { nestedExtProfile = extProfile; } entry.generateAtom(w, nestedExtProfile); } // Invoke ExtensionPoint. generateExtensions(w, extProfile); w.endElement(Namespaces.gNs, "entryLink"); }
@Override public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { ArrayList<XmlWriter.Attribute> attrs = new ArrayList<XmlWriter.Attribute>(); if (rel != null) { attrs.add(new XmlWriter.Attribute("rel", rel)); } if (href != null) { attrs.add(new XmlWriter.Attribute("href", href)); } if (readOnly) { attrs.add(new XmlWriter.Attribute("readOnly", "true")); } generateStartElement(w, Namespaces.gNs, "entryLink", attrs, null); if (entry != null) { ExtensionProfile nestedExtProfile = extProfile.getEntryLinkProfile(); if (nestedExtProfile == null) { nestedExtProfile = extProfile; } entry.generateAtom(w, nestedExtProfile); } // Invoke ExtensionPoint. generateExtensions(w, extProfile); w.endElement(Namespaces.gNs, "entryLink"); }