Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.openfuxml.addon.wiki.emitter;
 
 import java.util.Map;
 
 
public class BookEmitter extends SimpleMappingEmitter
	private String bookTitle;
	{
		super(ef,"book");
	}
	public boolean localStart(XMLStreamWriter writerString htmlElementNameAttributes attsthrows XMLStreamException
	{
		boolean ok = super.localStart(writerhtmlElementNameatts);
		if (ok &&  != null)
		{
			writer.writeStartElement("title");
		}
		return ok;
	}
	protected boolean localEnd(XMLStreamWriter writerString htmlElementNamethrows XMLStreamException
	{
		//TODO Quick Hack
		HashMap<StringStringacronyms = new HashMap<StringString>();
		if (!acronyms.isEmpty())
		{
			writer.writeStartElement("appendix");
			writer.writeAttribute("id""glossary");
			writer.writeStartElement("title");
			writer.writeAttribute("id""glossary-end");
			writer.writeCharacters("Glossary");
			writer.writeEndElement(); // title
			writer.writeStartElement("glosslist");
			for (Map.Entry<StringStringglossEntry : new TreeMap<StringString>(acronyms).entrySet()) {
				writer.writeStartElement("glossentry");
				writer.writeStartElement("glossterm");
				writer.writeCharacters(glossEntry.getKey());
				writer.writeEndElement(); // glossterm
				writer.writeStartElement("glossdef");
				writer.writeStartElement("para");
				writer.writeCharacters(glossEntry.getValue());
				writer.writeEndElement(); // para
				writer.writeEndElement(); // glossdef
				writer.writeEndElement(); // glossentry
			}
			writer.writeEndElement(); // glosslist
			writer.writeEndElement(); // appendix
		}
		return super.localEnd(writerhtmlElementName);
	}
	public String getBookTitle() {return ;}
	public void setBookTitle(String bookTitle) {this. = bookTitle;}
	protected boolean permitsMultipleNexting() {return true;}
New to GrepCode? Check out our FAQ X