/** @return true if at lest one attribute changed */ public boolean attacheAttrs(XMLMapAttr attrs) { if ((attrs == null) || attrs.isEmpty()) { return false; } if (foAttrs == null) { foAttrs = new XMLMapAttr(); } Iterator it = attrs.entrySet().iterator(); boolean ch = false; while (it.hasNext()) { Map.Entry attrEntry = (Map.Entry) it.next(); Object prev = foAttrs.put(attrEntry.getKey(), attrEntry.getValue()); ch |= (prev == null && attrEntry.getValue() != null) || !prev.equals(attrEntry.getValue()); } return ch; }
/** Writes itself to XML * @param pw is PrintWriter */ public void writeToXML(PrintWriter pw) /*throws IOException */ { // list of names Iterator it = new TreeSet(keySet()).iterator(); XMLMapAttr.writeHeading(pw); while (it.hasNext()) { String file = (String) it.next(); XMLMapAttr attr = (XMLMapAttr) get(file); if ((attr != null) && !attr.isEmpty()) { attr.write(pw, file, " "); // NOI18N } } XMLMapAttr.writeEnding(pw); }
boolean isHeadingWr = false; if (isEmpty()) { return;
public void initialize(ResourceElem res) { content = res.getContent(); XMLMapAttr tmp = res.getAttr(false); if ((tmp != null) && !tmp.isEmpty()) { foAttrs = tmp; } isFolder = (byte) (res.isFolder() ? 1 : 0); if (content == null) { content = res.getURI(); } setUrlContext(res.getUrlContext()); }
public void attacheAttrs (XMLMapAttr attrs) { if ( attrs == null || attrs.isEmpty()) { return; } if (foAttrs == null) foAttrs = new XMLMapAttr (); Iterator it = attrs.entrySet ().iterator (); while (it.hasNext()) { Map.Entry attrEntry = (Map.Entry )it.next(); foAttrs.put (attrEntry.getKey(), attrEntry.getValue()); } }
public void attacheAttrs (XMLMapAttr attrs) { if ( attrs == null || attrs.isEmpty()) { return; } if (foAttrs == null) foAttrs = new XMLMapAttr (); Iterator it = attrs.entrySet ().iterator (); while (it.hasNext()) { Map.Entry attrEntry = (Map.Entry )it.next(); foAttrs.put (attrEntry.getKey(), attrEntry.getValue()); } }
/** Writes itself to XML * @param pw is PrintWriter */ public void writeToXML (PrintWriter pw) /*throws IOException */{ // list of names Iterator it = new TreeSet(keySet()).iterator(); XMLMapAttr.writeHeading(pw); while (it.hasNext ()) { String file = (String)it.next (); XMLMapAttr attr = (XMLMapAttr)get (file); if (attr != null && !attr.isEmpty ()) { attr.write(pw, file, " ");// NOI18N } } XMLMapAttr.writeEnding(pw); }
/** Writes itself to XML * @param pw is PrintWriter */ public void writeToXML (PrintWriter pw) /*throws IOException */{ // list of names Iterator it = new TreeSet(keySet()).iterator(); XMLMapAttr.writeHeading(pw); while (it.hasNext ()) { String file = (String)it.next (); XMLMapAttr attr = (XMLMapAttr)get (file); if (attr != null && !attr.isEmpty ()) { attr.write(pw, file, " ");// NOI18N } } XMLMapAttr.writeEnding(pw); }
public void initialize (ResourceElem res) { content = res.getContent (); XMLMapAttr tmp = res.getAttr (false); if (tmp != null && !tmp.isEmpty()) { foAttrs = tmp; } isFolder = (byte)(res.isFolder ()?1:0); if (content == null) content = res.getURI (); setUrlContext (res.getUrlContext ()); }
public void initialize (ResourceElem res) { content = res.getContent (); XMLMapAttr tmp = res.getAttr (false); if (tmp != null && !tmp.isEmpty()) { foAttrs = tmp; } isFolder = (byte)(res.isFolder ()?1:0); if (content == null) content = res.getURI (); setUrlContext (res.getUrlContext ()); }