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

com.talk2object.plum.view.web.WebTemplatePage Maven / Gradle / Ivy

The newest version!
package com.talk2object.plum.view.web;

import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import com.talk2object.plum.view.component.containers.window.Window;
import com.talk2object.plum.view.web.component.WebComponent;
import com.talk2object.plum.view.web.component.container.window.WebWindow;

/**
 * load DOM from template page.
 * 
 * others clone nodes from this class.
 * 
 * @author jackding
 *
 */
public class WebTemplatePage {

	
	private Document document;

	Element head;
	Element body;

	public WebTemplatePage(String file) {
		InputStream stream = getClass().getResourceAsStream(file);
		try {
			document = Jsoup.parse(stream, "utf-8", "");
		} catch (IOException e) {
			throw new RuntimeException(e);

		}
		head = document.getElementsByTag("head").get(0);
		body = document.getElementsByTag("body").get(0);

	}

	public Document getDocument() {
		return document;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy