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

com.globallink.api.pss.rewriters.CompositeRewriter Maven / Gradle / Ivy

Go to download

The newest version!
package com.globallink.api.pss.rewriters;

import java.util.ArrayList;
import java.util.List;

import org.jsoup.nodes.Document;

import com.globallink.api.pss.DownloadedFileInfo;

public class CompositeRewriter implements IFileTagRewriter {
    private List rewriters;

    public CompositeRewriter() {
	rewriters = new ArrayList();
    }

    public void Add(IFileTagRewriter rewriter) {
	rewriters.add(rewriter);
    }

    public void Remove(IFileTagRewriter rewriter) {
	rewriters.remove(rewriter);
    }

    public List RewriteLinks(Document document) {
	List fileInfos = new ArrayList();

	for (IFileTagRewriter rewriter : rewriters) {
	    fileInfos.addAll(rewriter.RewriteLinks(document));
	}

	return fileInfos;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy