private void propVal(final BuildState bs, final String val) throws Throwable { bs.getContentHandler().propertyValue(val); }
private void processComponent(final BaseComponentType comp, final BuildState bs) throws Throwable { final ComponentInfoIndex cii = ComponentInfoIndex.fromXmlClass(comp.getClass()); if (cii == null) { throw new Exception("Unknown component " + comp.getClass()); } final String name = cii.getPname(); bs.getContentHandler().startComponent(name); processProperties(comp.getProperties(), bs); processCalcomps(comp, bs); bs.getContentHandler().endComponent(name); }
private void processVcalendar(final JsonParser parser, final BuildState bs) throws ParserException { bs.getContentHandler().startCalendar(); /* Properties first */ processProperties(parser, bs); /* Now components */ processCalcomps(parser, bs); }
private void processComponent(final JsonParser parser, final BuildState bs) throws ParserException { currentArrayStart(parser); final String cname = textField(parser).toUpperCase(); lastComponent = cname; bs.getContentHandler().startComponent(cname); /* Properties first */ processProperties(parser, bs); /* Now components */ processCalcomps(parser, bs); bs.getContentHandler().endComponent(cname); arrayEnd(parser); }
private void processProperty(final Element el, final BuildState bs) throws ParserException { try { bs.getContentHandler().startProperty(el.getLocalName()); for (Element e: XmlUtil.getElements(el)) { if (XmlUtil.nodeMatches(e, XcalTags.parameters)) { for (Element par: XmlUtil.getElements(e)) { bs.getContentHandler().parameter(par.getLocalName(), XmlUtil.getElementContent(par)); } } if (!processValue(e, bs)) { throw new ParserException("Bad property " + el, 0); } } bs.getContentHandler().endProperty(el.getLocalName()); } catch (SAXException e) { throw new ParserException(e.getMessage(), 0, e); } catch (URISyntaxException e) { throw new ParserException(e.getMessage(), 0, e); } }
bs.getContentHandler().startProperty(name); bs.getContentHandler().parameter(parName, getParValue(e.getValue())); bs.getContentHandler().endProperty(name);
private void processComponent(final Element el, final BuildState bs) throws ParserException { try { bs.getContentHandler().startComponent(el.getLocalName().toUpperCase()); for (Element e: XmlUtil.getElements(el)) { if (XmlUtil.nodeMatches(e, XcalTags.properties)) { processProperties(e, bs); } else if (XmlUtil.nodeMatches(e, XcalTags.components)) { for (Element ce: XmlUtil.getElements(e)) { processComponent(ce, bs); } } else { throw new ParserException("Unexpected element: found " + e, 0); } } bs.getContentHandler().endComponent(el.getLocalName().toUpperCase()); } catch (SAXException e) { throw new ParserException(e.getMessage(), 0, e); } }
private void processVcalendar(final VcalendarType vcal, final BuildState bs) throws Throwable { bs.getContentHandler().startCalendar(); processProperties(vcal.getProperties(), bs); processCalcomps(vcal, bs); }
private void processParameter(final JsonParser parser, final BuildState bs) throws ParserException { try { bs.getContentHandler().parameter(currentFieldName(parser), textField(parser)); } catch (Throwable t) { handleException(t, parser); } }
private void processVcalendar(final Element el, final BuildState bs) throws ParserException { bs.getContentHandler().startCalendar();
bs.getContentHandler().propertyValue(sb.toString()); bs.getContentHandler().propertyValue(sb.toString()); bs.getContentHandler().propertyValue(sb.toString()); bs.getContentHandler().propertyValue(String.valueOf( booleanField(parser))); bs.getContentHandler().propertyValue( XcalUtil.getIcalUtcOffset(textField(parser))); bs.getContentHandler().propertyValue(res.toString()); bs.getContentHandler().propertyValue(String.valueOf(intField( parser))); bs.getContentHandler().propertyValue(String.valueOf(intField( parser))); type.equals("date-time") || type.equals("time")) { bs.getContentHandler().propertyValue( XcalUtil.getIcalFormatDateTime(textField(parser))); return true; bs.getContentHandler().propertyValue( XcalUtil.getIcalFormatTime(textField(parser))); return true;
private void processProperty(final JsonParser parser, final BuildState bs) throws ParserException { /* Each individual iCalendar property is represented in jCal by an array with three fixed elements, followed by at one or more additional elements, depending on if the property is a multi-value property as described in Section 3.1.2 of [RFC5545]. The array consists of the following fixed elements: 1. The name of the property as a string, but in lowercase. 2. An object containing the parameters as described in Section 3.5. 3. The type identifier string of the value, in lowercase. The remaining elements of the array are used for the value of the property. For single-value properties, the array MUST have exactly four elements, for multi-valued properties as described in Section 3.4.1.1 there can be any number of additional elements. array start should be current token */ currentArrayStart(parser); final String name = textField(parser); lastProperty = name; bs.getContentHandler().startProperty(name); processParameters(parser, bs); final boolean parseArrayEnd = processValue(parser, bs, textField(parser)); bs.getContentHandler().endProperty(name); if (parseArrayEnd) { arrayEnd(parser); } }
bs.getContentHandler().propertyValue(sb.toString()); XmlUtil.nodeMatches(el, XcalTags.uriVal) || XmlUtil.nodeMatches(el, XcalTags.utcOffsetVal)) { bs.getContentHandler().propertyValue(XmlUtil.getElementContent(el)); return true;
bs.getContentHandler().parameter(Parameter.VALUE, Value.DATE.getValue());