public class ICMLContext extends Object
| Constructor and Description |
|---|
ICMLContext(boolean isReferent,
Node topNode)
Create a new context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCode(Code code) |
void |
addCode(Node node) |
void |
addContent(Element elem)
Adds a Content element to the text unit.
|
void |
addEndTag(Element elem) |
void |
addReference(String key,
net.sf.okapi.filters.icml.NodeReference ref) |
void |
addStartTag(Element elem) |
boolean |
addToQueue(List<Event> queue,
boolean evenIfEmpty)
Adds the text unit to the given queue.
|
String |
buildEndTag(Element elem) |
String |
buildStartTag(Element elem)
If the tag has no contents, it will return a self closing tag.
|
String |
buildStartTag(Element elem,
boolean selfClosing) |
void |
enterScope(Node scopeNode,
String tuId) |
Node |
getScopeNode() |
ICMLSkeleton |
getSkeleton() |
Node |
getTopNode() |
boolean |
inScope() |
void |
leaveScope() |
public ICMLContext(boolean isReferent,
Node topNode)
rootNode - Node when starting embedded context. Should be null for the top-level context.public Node getTopNode()
public Node getScopeNode()
public ICMLSkeleton getSkeleton()
public void leaveScope()
public boolean inScope()
public boolean addToQueue(List<Event> queue, boolean evenIfEmpty)
queue - the event queue where to add the event.evenIfEmpty - true to create a TU event with empty content.public void addContent(Element elem)
elem - the Content element node.public void addCode(Code code)
public void addCode(Node node)
public void addReference(String key, net.sf.okapi.filters.icml.NodeReference ref)
public void addStartTag(Element elem)
public void addEndTag(Element elem)
public String buildStartTag(Element elem)
Copyright © 2022. All rights reserved.