|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.presentation.DefaultContext
public class DefaultContext
The parsing context hausing class.
Provides the stackable container of current parsing context. Implemented according toThread-Specific Storage pattern
, which allow multiple threads to use one logical access point to
retrieve thread local data without incurring locking overhead for each access. The parsing context is hausing the
data that is relevant to current parsing context, so its typical lifecycle is limited by the
start
and
end element
SAX events. The nested elements
causes the stacking of context. Client is prohibited to change the designed behavior, but it is entitled to
save the current context
for the continuos restoring
in
case when it is needed to beyond from the current parsing context on a while (i.e. before the end element SAX event)
and return back after.
Method Summary | |
---|---|
void |
addFailure(String reason)
Sets the failure reason for current context data parsing. |
protected String |
computeCurrentPath()
|
protected void |
foundAny()
Signals about new ANY found in this context. |
static DefaultContext |
getContext()
Returns the current parsing context. |
String |
getCurrentPath()
|
QName |
getElementName()
Returns the FQ name of elemnet owned by this context. |
ParserException |
getFailure()
Returns the first parsing failure reason if any. |
Locator |
getLocator()
|
Logger |
getLog()
|
protected boolean |
isAllowedAny(AnyElement element)
|
boolean |
isFailed()
Checks whether the current context data is failed to parse. |
void |
resetFailure()
Resets the failure reason list. |
String |
resolvePrefixBy(String uri)
The prefix by URI resolver. |
String |
resolveUriBy(String prefix)
The URI by prefix resolver. |
static void |
setContext(DefaultContext ctx)
Sets the current parsing context. |
void |
setLogger(Logger logger)
|
protected void |
updateTarget(ComplexDataObject object)
This method do not check the parent since it ALWAYS has it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DefaultContext getContext()
public static void setContext(DefaultContext ctx)
public QName getElementName()
null
.public String resolveUriBy(String prefix)
prefix
- the prefix of requested namespace URI.
public String resolvePrefixBy(String uri)
uri
- the requested namespace URI.
public Locator getLocator()
public boolean isFailed()
public ParserException getFailure()
public void addFailure(String reason)
reason
- the failure reason.public Logger getLog()
public void setLogger(Logger logger)
public String getCurrentPath()
public void resetFailure()
protected void updateTarget(ComplexDataObject object)
object
- the CDO that should be updated before popping out.DocumentContext#updateTarget(biz.c24.io.api.data.ComplexDataObject)
protected String computeCurrentPath()
protected void foundAny()
isAllowedAny(biz.c24.io.api.data.AnyElement)
protected boolean isAllowedAny(AnyElement element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |