public void write(java.io.Writer w, Object inst) throws IOException { w.write( "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + XMLSettingsSupport.LINE_SEPARATOR); // NOI18N w.write("<!DOCTYPE properties PUBLIC \""); // NOI18N FileObject foEntity = Env.findEntityRegistration(providerFO); if (foEntity == null) foEntity = providerFO; Object publicId = foEntity.getAttribute(Env.EA_PUBLICID); if (publicId == null || !(publicId instanceof String)) { throw new IOException( "missing or invalid attribute: " + // NOI18N Env.EA_PUBLICID + ", provider: " + foEntity); // NOI18N } w.write((String) publicId); w.write( "\" \"http://www.netbeans.org/dtds/properties-1_0.dtd\">" + XMLSettingsSupport.LINE_SEPARATOR); // NOI18N w.write("<properties>" + XMLSettingsSupport.LINE_SEPARATOR); // NOI18N Properties p = getProperties(inst); if (p != null && !p.isEmpty()) writeProperties(w, p); w.write("</properties>" + XMLSettingsSupport.LINE_SEPARATOR); // NOI18N }
/** filtering of Property Change Events */ private boolean ignoreChange(java.beans.PropertyChangeEvent pce) { if (pce == null || pce.getPropertyName() == null) return true; if (ignoreProperites == null) { ignoreProperites = Env.parseAttribute(providerFO.getAttribute(EA_IGNORE_CHANGES)); } if (ignoreProperites.contains(pce.getPropertyName())) return true; return ignoreProperites.contains("all"); // NOI18N }