Search in sources :

Example 1 with CssDeclaration

use of org.freud.analysed.css.rule.declaration.CssDeclaration in project freud by LMAX-Exchange.

the class CssRuleJdom method parseDeclarations.

@SuppressWarnings("unchecked")
private void parseDeclarations() {
    cssDeclarationList = new ArrayList<CssDeclaration>();
    JXPathContext context = JXPathContext.newContext(ruleElement);
    List<Element> cssSelectorElementList = (List<Element>) context.selectNodes("/" + CssTokenType.PROPERTY.name());
    for (Element element : cssSelectorElementList) {
        cssDeclarationList.add(new CssDeclarationJdom(this, element));
    }
}
Also used : CssDeclaration(org.freud.analysed.css.rule.declaration.CssDeclaration) JXPathContext(org.apache.commons.jxpath.JXPathContext) Element(org.jdom.Element) List(java.util.List) LinkedList(java.util.LinkedList) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 JXPathContext (org.apache.commons.jxpath.JXPathContext)1 CssDeclaration (org.freud.analysed.css.rule.declaration.CssDeclaration)1 Element (org.jdom.Element)1