use of org.bedework.util.indexing.IndexException in project bw-calendar-engine by Bedework.
the class DocBuilder method indexAttendees.
private void indexAttendees(final Set<BwAttendee> atts, final boolean vpoll) throws CalFacadeException {
try {
if (Util.isEmpty(atts)) {
return;
}
if (vpoll) {
startArray(getJname(PropertyInfoIndex.VOTER));
} else {
startArray(getJname(PropertyInfoIndex.ATTENDEE));
}
for (final BwAttendee val : atts) {
startObject();
startObject("pars");
if (val.getRsvp()) {
makeField(ParameterInfoIndex.RSVP.getJname(), val.getRsvp());
}
if (vpoll && val.getStayInformed()) {
makeField(ParameterInfoIndex.STAY_INFORMED.getJname(), val.getStayInformed());
}
makeField(ParameterInfoIndex.CN.getJname(), val.getCn());
String temp = val.getPartstat();
if (temp == null) {
temp = IcalDefs.partstatValNeedsAction;
}
makeField(ParameterInfoIndex.PARTSTAT.getJname(), temp);
makeField(ParameterInfoIndex.SCHEDULE_STATUS.getJname(), val.getScheduleStatus());
makeField(ParameterInfoIndex.CUTYPE.getJname(), val.getCuType());
makeField(ParameterInfoIndex.DELEGATED_FROM.getJname(), val.getDelegatedFrom());
makeField(ParameterInfoIndex.DELEGATED_TO.getJname(), val.getDelegatedTo());
makeField(ParameterInfoIndex.DIR.getJname(), val.getDir());
makeField(ParameterInfoIndex.LANGUAGE.getJname(), val.getLanguage());
makeField(ParameterInfoIndex.MEMBER.getJname(), val.getMember());
makeField(ParameterInfoIndex.ROLE.getJname(), val.getRole());
makeField(ParameterInfoIndex.SENT_BY.getJname(), val.getSentBy());
endObject();
makeField("uri", val.getAttendeeUri());
endObject();
}
endArray();
} catch (final IndexException e) {
throw new CalFacadeException(e);
}
}
use of org.bedework.util.indexing.IndexException in project bw-calendar-engine by Bedework.
the class DocBuilder method makeField.
private void makeField(final PropertyInfoIndex pi, final Collection<String> vals) throws CalFacadeException {
try {
if (Util.isEmpty(vals)) {
return;
}
startArray(getJname(pi));
for (final String s : vals) {
value(s);
}
endArray();
} catch (final IndexException e) {
throw new CalFacadeException(e);
}
}
use of org.bedework.util.indexing.IndexException in project bw-calendar-engine by Bedework.
the class DocBuilder method indexCategories.
private void indexCategories(final Collection<BwCategory> cats) throws CalFacadeException {
if (cats == null) {
return;
}
try {
startArray(getJname(PropertyInfoIndex.CATEGORIES));
for (final BwCategory cat : cats) {
startObject();
cat.fixNames(basicSysprops, principal);
makeField(PropertyInfoIndex.UID, cat.getUid());
makeField(PropertyInfoIndex.HREF, cat.getHref());
startArray(getJname(PropertyInfoIndex.VALUE));
// Eventually may be more of these
makeField((PropertyInfoIndex) null, cat.getWord());
endArray();
endObject();
}
endArray();
} catch (final IndexException e) {
throw new CalFacadeException(e);
}
}
use of org.bedework.util.indexing.IndexException in project bw-calendar-engine by Bedework.
the class DocBuilder method makeField.
private void makeField(final PropertyInfoIndex pi, final BwStringBase val) throws CalFacadeException {
if (val == null) {
return;
}
try {
if (pi == null) {
startObject();
} else {
startObject(getJname(pi));
}
makeField(PropertyInfoIndex.LANG, val.getLang());
makeField(PropertyInfoIndex.VALUE, val.getValue());
endObject();
} catch (final IndexException e) {
throw new CalFacadeException(e);
}
}
use of org.bedework.util.indexing.IndexException in project bw-calendar-engine by Bedework.
the class DocBuilder method indexRelatedTo.
private void indexRelatedTo(final BwRelatedTo val) throws CalFacadeException {
try {
if (val == null) {
return;
}
startObject(getJname(PropertyInfoIndex.RELATED_TO));
makeField(ParameterInfoIndex.RELTYPE.getJname(), val.getRelType());
makeField(getJname(PropertyInfoIndex.VALUE), val.getValue());
endObject();
} catch (final IndexException e) {
throw new CalFacadeException(e);
}
}
Aggregations