public class ODTAnnotationParsingHelper
extends java.lang.Object
Created on 2018-07-06
| Constructor and Description |
|---|
ODTAnnotationParsingHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(java.lang.String value)
Append new string into annotation content.
|
java.lang.String |
getAfter()
Returns "after" part of annotation content.
|
java.lang.String |
getBefore()
Returns "before" part of annotation content.
|
java.util.List<java.lang.String> |
getParents()
Return type of parrents which are itrable using point-annotation.
|
java.lang.String |
getReplacement()
Returns "replacement" part of annotation content.
|
boolean |
hasAfter()
Check if annotation has "after" part.
|
boolean |
hasBefore()
Check if annotation has "before" part.
|
boolean |
hasReplacement()
Check if annotation has "replacement" part.
|
boolean |
isNotReplacedYet()
Check if in case of range annotation replacement has been already done.
|
boolean |
isParsing()
The annotation tag is parsing now.
|
boolean |
isRangeAnnotation()
Check if this anotation is "point" or "range" anotation.
|
boolean |
isTheSameBlock(int currentElementIndex)
Check if index of current element shows we are in the same block like
anotation is.
|
boolean |
resetRangeAnnotation(java.lang.String name,
boolean force)
Close range annotation.
|
void |
setCurrentElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
Inform this helper which component is parsed now.
|
void |
setParsingBegin(java.lang.String name,
int index)
Set the helper in the state of parsing annotation tag content.
|
void |
setParsingEnd() |
void |
setReplacementDone()
Should be executed, when range annotation replacemen is done.
|
public boolean isParsing()
true if annotation tag is parsing now,
false otherwisepublic void setCurrentElement(java.lang.String uri,
java.lang.String localName,
java.lang.String name)
uri - localName - name - public void setParsingBegin(java.lang.String name,
int index)
name - the name of the annotation. Not null
when annotation has end element somewere in documentindex - index of the annotation element. It is used to close
replacement block in proper place (replacement block is not allowed
to span over the end of enclosed tag)public void setParsingEnd()
public boolean resetRangeAnnotation(java.lang.String name,
boolean force)
name - the name of the range annotationforce - if true block will be closed even if name
does not matchtrue if the name is the name of the first oppened
annotation, false otherwisepublic void append(java.lang.String value)
value - the value being appendedpublic java.util.List<java.lang.String> getParents()
public boolean hasBefore()
true if annotation has "before" part, false
otherwisepublic java.lang.String getBefore()
public boolean hasAfter()
true if annotation has "after" part, false
otherwisepublic java.lang.String getAfter()
public boolean hasReplacement()
true if annotation has "replacement" part,
false otherwisepublic java.lang.String getReplacement()
public boolean isRangeAnnotation()
true if this is range annotation, false
otherwisepublic boolean isTheSameBlock(int currentElementIndex)
currentElementIndex - the index of current tagtrue if current tag is the same container like
anotation is, false otherwisepublic boolean isNotReplacedYet()
true when replacement has been already performed,
false otherwisepublic void setReplacementDone()
Copyright © 2019. All Rights Reserved.