protected void parse(String icalString, IcalSchema schema)
            throws ParseException {

        String paramText;
        String content;
        {
            String unfolded = IcalParseUtil.unfoldIcal(icalString);
            Matcher m = CONTENT_LINE_RE.matcher(unfolded);
            if (!m.matches()) {
                schema.badContent(icalString);
            }

            setName(m.group(1).toUpperCase());
            paramText = m.group(2);
            if (null == paramText) {
                paramText = "";
            }
            content = m.group(3);
        }

        // parse parameters
        Map<String, String> params = new HashMap<String, String>();
        String rest = paramText;
        while (!"".equals(rest)) {
            Matcher m = PARAM_RE.matcher(rest);
            if (!m.find()) {
                schema.badPart(rest, null);
            }
            rest = rest.substring(m.end(0));
            String k = m.group(1).toUpperCase();
            String v = m.group(2);
            if (null == v) {
                v = m.group(3);
            }
            if (params.containsKey(k)) {
                schema.dupePart(k);
            }
            params.put(k, v);
        }
        // parse the content and individual attribute values
        schema.applyObjectSchema(this.name, params, content, this);
    }
protected void parse ( String icalString , IcalSchema schema ) throws ParseException { String paramText ; String content ; { String unfolded = IcalParseUtil . unfoldIcal ( icalString ) ; Matcher m = CONTENT_LINE_RE . matcher ( unfolded ) ; if ( ! m . matches ( ) ) { schema . badContent ( icalString ) ; } setName ( m . group ( 1 ) . toUpperCase ( ) ) ; paramText = m . group ( 2 ) ; if ( null == paramText ) { paramText = "" ; } content = m . group ( 3 ) ; } Map < String , String > params = new HashMap < String , String > ( ) ; String rest = paramText ; while ( ! "" . equals ( rest ) ) { Matcher m = PARAM_RE . matcher ( rest ) ; if ( ! m . find ( ) ) { schema . badPart ( rest , null ) ; } rest = rest . substring ( m . end ( 0 ) ) ; String k = m . group ( 1 ) . toUpperCase ( ) ; String v = m . group ( 2 ) ; if ( null == v ) { v = m . group ( 3 ) ; } if ( params . containsKey ( k ) ) { schema . dupePart ( k ) ; } params . put ( k , v ) ; } schema . applyObjectSchema ( this . name , params , content , this ) ; }
parse the ical object from the given ical content using the given schema.
Modifies the current object in place.

@param schema rules for processing individual parameters and body content.