public BwProperty findProperty(String name) { return entity.findProperty(name); }
/** Get the single valued named property * * @param name * @return String property value */ public String getProperty(final String name) { BwProperty prop = findProperty(name); if (prop == null) { return null; } return prop.getValue(); }
/** Set the calendar timezone property * * @param val */ public void setTimezone(final String val) { if (val == null) { BwProperty p = findProperty(CaldavTags.calendarTimezone.getLocalPart()); if (p != null) { removeProperty(p); } } else { setProperty(CaldavTags.calendarTimezone.getLocalPart(), val); } }
/** * @param name */ public void removeQproperty(final QName name) { BwProperty p = findProperty(NamespaceAbbrevs.prefixed(name)); if (p != null) { removeProperty(p); } }
/** Set the calendar color property * * @param val */ public void setColor(final String val) { if (Util.checkNull(val) == null) { BwProperty p = findProperty(AppleIcalTags.calendarColor.getLocalPart()); if (p != null) { removeProperty(p); } } else { setProperty(AppleIcalTags.calendarColor.getLocalPart(), val); } }
/** Set the event list * * @param val */ public void setSubscriptionId(final String val) { if (Util.checkNull(val) == null) { BwProperty p = findProperty(subscriptionIdProperty); if (p != null) { removeProperty(p); } } else { setProperty(subscriptionIdProperty, val); } }
/** Set the single valued named property * * @param name * @param val */ public void setProperty(final String name, final String val) { BwProperty prop = findProperty(name); if (prop == null) { if (val != null) { prop = new BwProperty(name, val); addProperty(prop); } } else if (val == null) { removeProperty(prop); } else { prop.setValue(val); } }