Search in sources :

Example 1 with MultipleElementSelector

use of org.asqatasun.rules.elementselector.MultipleElementSelector in project Asqatasun by Asqatasun.

the class Rgaa22Rule07081 method select.

@Override
protected void select(SSPHandler sspHandler) {
    super.select(sspHandler);
    // retrieve element from the nomenclature
    Nomenclature deprecatedHtmlTags = nomenclatureLoaderService.loadByCode(PRESENTATION_TAG_NOM);
    // add each element of the nomenclature to the selector
    MultipleElementSelector mes = new MultipleElementSelector();
    for (String deprecatedTag : deprecatedHtmlTags.getValueList()) {
        mes.addCssQuery(deprecatedTag.toLowerCase());
    }
    mes.selectElements(sspHandler, deprecatedElementHandler);
    // retrieve element from the nomenclature
    Nomenclature deprecatedHtmlAttr = nomenclatureLoaderService.loadByCode(PRESENTATION_ATTR_NOM);
    for (String deprecatedAttr : deprecatedHtmlAttr.getValueList()) {
        SimpleElementSelector sec = new SimpleElementSelector(buildQuery(deprecatedAttr));
        ElementHandler eh = new ElementHandlerImpl();
        sec.selectElements(sspHandler, eh);
        attrElementHandlerMap.put(deprecatedAttr, eh);
    }
}
Also used : Nomenclature(org.asqatasun.entity.reference.Nomenclature) ElementHandlerImpl(org.asqatasun.ruleimplementation.ElementHandlerImpl) SimpleElementSelector(org.asqatasun.rules.elementselector.SimpleElementSelector) ElementHandler(org.asqatasun.ruleimplementation.ElementHandler) MultipleElementSelector(org.asqatasun.rules.elementselector.MultipleElementSelector)

Example 2 with MultipleElementSelector

use of org.asqatasun.rules.elementselector.MultipleElementSelector in project Asqatasun by Asqatasun.

the class Aw22Rule10011 method select.

@Override
protected void select(SSPHandler sspHandler) {
    // retrieve element from the nomenclature
    Nomenclature deprecatedHtmlTags = nomenclatureLoaderService.loadByCode(DEPREC_TAG_NOM);
    // add each element of the nomenclature to the selector
    MultipleElementSelector mes = (MultipleElementSelector) getElementSelector();
    for (String deprecatedTag : deprecatedHtmlTags.getValueList()) {
        mes.addCssQuery(deprecatedTag.toLowerCase());
    }
    totalNumberOfElements = sspHandler.getTotalNumberOfElements();
    super.select(sspHandler);
}
Also used : Nomenclature(org.asqatasun.entity.reference.Nomenclature) MultipleElementSelector(org.asqatasun.rules.elementselector.MultipleElementSelector)

Example 3 with MultipleElementSelector

use of org.asqatasun.rules.elementselector.MultipleElementSelector in project Asqatasun by Asqatasun.

the class Rgaa30Rule100101 method select.

@Override
protected void select(SSPHandler sspHandler) {
    // retrieve element from the nomenclature
    Nomenclature deprecatedHtmlTags = nomenclatureLoaderService.loadByCode(DEPREC_TAG_NOM);
    // add each element of the nomenclature to the selector
    MultipleElementSelector mes = (MultipleElementSelector) getElementSelector();
    for (String deprecatedTag : deprecatedHtmlTags.getValueList()) {
        mes.addCssQuery(deprecatedTag.toLowerCase());
    }
    totalNumberOfElements = sspHandler.getTotalNumberOfElements();
    super.select(sspHandler);
}
Also used : Nomenclature(org.asqatasun.entity.reference.Nomenclature) MultipleElementSelector(org.asqatasun.rules.elementselector.MultipleElementSelector)

Example 4 with MultipleElementSelector

use of org.asqatasun.rules.elementselector.MultipleElementSelector in project Asqatasun by Asqatasun.

the class Rgaa32016Rule100101 method select.

@Override
protected void select(SSPHandler sspHandler) {
    // retrieve element from the nomenclature
    Nomenclature deprecatedHtmlTags = nomenclatureLoaderService.loadByCode(DEPREC_TAG_NOM);
    // add each element of the nomenclature to the selector
    MultipleElementSelector mes = (MultipleElementSelector) getElementSelector();
    for (String deprecatedTag : deprecatedHtmlTags.getValueList()) {
        mes.addCssQuery(deprecatedTag.toLowerCase());
    }
    totalNumberOfElements = sspHandler.getTotalNumberOfElements();
    super.select(sspHandler);
}
Also used : Nomenclature(org.asqatasun.entity.reference.Nomenclature) MultipleElementSelector(org.asqatasun.rules.elementselector.MultipleElementSelector)

Aggregations

Nomenclature (org.asqatasun.entity.reference.Nomenclature)4 MultipleElementSelector (org.asqatasun.rules.elementselector.MultipleElementSelector)4 ElementHandler (org.asqatasun.ruleimplementation.ElementHandler)1 ElementHandlerImpl (org.asqatasun.ruleimplementation.ElementHandlerImpl)1 SimpleElementSelector (org.asqatasun.rules.elementselector.SimpleElementSelector)1