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

org.daisy.common.transform.LazySaxResultProvider Maven / Gradle / Ivy

There is a newer version: 6.1.0
Show newest version
package org.daisy.common.transform;
import javax.xml.transform.Result;
import javax.xml.transform.sax.SAXResult;
import org.daisy.common.base.Provider;

public class LazySaxResultProvider implements Provider{

	private String systemId;


	/**
	 * Constructs a new instance.
	 *
	 * @param systemId The systemId for this instance.
	 */
	public LazySaxResultProvider(String systemId) {
		this.systemId=systemId;
	}


	@Override
	public Result provide() {
		SAXResult src=new ProxiedSAXResult();
		src.setSystemId(this.systemId);
		return src;
	}
	private class ProxiedSAXResult extends SAXResult{

		@Override
		public void setSystemId(String systemId) {
			super.setSystemId(systemId);
			LazySaxResultProvider.this.systemId=systemId;
		}

	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy