Search in sources :

Example 1 with FromStringTerm

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

the class MessageListFunctions method parseFromTerm.

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

Aggregations

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