Search in sources :

Example 1 with SubjectTerm

use of jakarta.mail.search.SubjectTerm in project exist by eXist-db.

the class MessageListFunctions method parseSubjectTerm.

private SearchTerm parseSubjectTerm(Node terms) throws XPathException {
    SearchTerm st = null;
    String pattern = ((Element) terms).getAttribute("pattern");
    if (pattern != null && !pattern.isEmpty()) {
        st = new SubjectTerm(pattern);
    } else {
        throw (new XPathException(this, "Pattern attribute must be specified for term with type: " + ((Element) terms).getAttribute("type")));
    }
    return (st);
}
Also used : XPathException(org.exist.xquery.XPathException) Element(org.w3c.dom.Element) SearchTerm(jakarta.mail.search.SearchTerm) SubjectTerm(jakarta.mail.search.SubjectTerm)

Aggregations

SearchTerm (jakarta.mail.search.SearchTerm)1 SubjectTerm (jakarta.mail.search.SubjectTerm)1 XPathException (org.exist.xquery.XPathException)1 Element (org.w3c.dom.Element)1