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

com.altova.text.flex.CommandBlock Maven / Gradle / Ivy

////////////////////////////////////////////////////////////////////////
//
// CommandBlock.java
//
// This file was generated by MapForce 2017sp2.
//
// YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
// OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
//
// Refer to the MapForce Documentation for further details.
// http://www.altova.com/mapforce
//
////////////////////////////////////////////////////////////////////////

package com.altova.text.flex;

import com.altova.text.*;

public class CommandBlock extends Command {
	public CommandBlock(String name) {
		super(name);
	}
	
	public boolean readText(DocumentReader doc) {
		doc.getOutputTree().enterElement(getName(), ITextNode.Group);
		super.readText(doc);
		doc.getOutputTree().leaveElement(getName());
		return true;
	}
	
	public boolean writeText(DocumentWriter doc) {
		TextNodeList children = doc.getCurrentNode().getChildren().filterByName(getName());
		for (int i = 0; i < children.size(); ++i)
		{
			StringBuffer restStr = new StringBuffer();
			DocumentWriter restDoc = new DocumentWriter(children.getAt(i), restStr, doc.getLineEnd());
			super.writeText(restDoc);
			doc.appendText(restStr);
		}
		return true;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy