All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.epubcheck.ctc.css.CSSSelectorCollection Maven / Gradle / Ivy

Go to download

EPUBCheck is a tool to validate the conformance of EPUB publications against the EPUB specifications. EPUBCheck can be run as a standalone command-line tool or used as a Java library.

There is a newer version: 5.1.0
Show newest version
package com.adobe.epubcheck.ctc.css;

import javax.xml.stream.Location;
import java.util.HashMap;

/**
 *  ===  WARNING  ==========================================
* This class is scheduled to be refactored and integrated
* in another package.
* Please keep changes minimal (bug fixes only) until then.
* ========================================================
*/ public class CSSSelectorCollection { private final String name; private final int scopeId; private final Location location; private final HashMap selectors = new HashMap(); public CSSSelectorCollection(String name, Location location, int scopeId) { this.name = name; this.location = location; this.scopeId = scopeId; } public HashMap getSelectors() { return selectors; } public void addSelector(CSSSelector selector) { CSSSelector existing = selectors.get(selector.getName()); if (existing != null) { for (CSSSelectorAttribute attribute : selector.getAttributes().values()) { existing.addAttribute(attribute); } selector = existing; } selectors.put(selector.getName(), selector); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy