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

org.daisy.pipeline.braille.css.xpath.Style Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
package org.daisy.pipeline.braille.css.xpath;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;

import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

import cz.vutbr.web.css.Term;
import cz.vutbr.web.csskit.TermStringImpl;

import org.daisy.braille.css.BrailleCSSParserFactory.Context;
import org.daisy.pipeline.braille.css.impl.BrailleCssParser;
import org.daisy.pipeline.braille.css.impl.BrailleCssStyle;
import org.daisy.pipeline.braille.css.impl.ContentList;
import org.daisy.pipeline.braille.css.xpath.impl.Declaration;
import org.daisy.pipeline.braille.css.xpath.impl.Stylesheet;
import org.daisy.pipeline.braille.css.xpath.impl.Value;

/**
 * Interface for accessing braille CSS styles from XPath.
 */
public abstract class Style {

	/**
	 * Serialize the style to a string according to the syntax of the
	 * style attribute.
	 */
	public String toString() {
		return toString(null);
	}

	/**
	 * @param relativeTo Include only those declarations that are needed to reconstruct the
	 *                   style with relativeTo as the parent style.
	 */
	public static String toString(Optional