Package jadex.xml.writer
Class AWriteContext
- java.lang.Object
-
- jadex.xml.writer.AWriteContext
-
- All Implemented Interfaces:
IContext
- Direct Known Subclasses:
WriteContextDesktop
public abstract class AWriteContext extends java.lang.Object implements IContext
Context for writing an xml.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ClassLoaderclassloaderThe classloader.protected IObjectWriterHandlerhandlerThe handler.protected intidThe id counter.protected java.util.Map<java.lang.String,Namespace>namespacebypackageThe namespaces.protected intnscntprotected MultiCollection<java.lang.Integer,IPreProcessor>preprocessorsThe pre processors.protected java.lang.ObjectrootobjectThe root object.protected java.util.List<StackElement>stackThe stack.protected java.lang.ObjectusercontextThe user context.protected java.lang.ObjectwriterThe writer.protected java.util.Map<java.lang.Object,java.lang.Object>writtenobsThe written objects.
-
Constructor Summary
Constructors Constructor Description AWriteContext(IObjectWriterHandler handler, java.lang.Object writer, java.lang.Object usercontext, java.lang.Object rootobject, java.lang.ClassLoader classloader)Create a new write context.AWriteContext(IObjectWriterHandler handler, java.lang.Object writer, java.lang.Object usercontext, java.lang.Object rootobject, java.lang.ClassLoader classloader, java.util.Map<java.lang.Object,java.lang.Object> writtenobs, java.util.List<StackElement> stack, MultiCollection<java.lang.Integer,IPreProcessor> preprocessors)Create a new write context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ClassLoadergetClassLoader()Get the classloader.IObjectWriterHandlergetHandler()Get the handler.intgetId()Get the id.NamespacegetNamespace(java.lang.String uri)Get or create a namespace.MultiCollection<java.lang.Integer,IPreProcessor>getPreProcessors()Get the preprocessors.java.lang.ObjectgetRootObject()Get the root object.java.util.List<StackElement>getStack()Get the stack.java.lang.ObjectgetUserContext()Get the callcontext.java.lang.ObjectgetWriter()Get the writer.java.util.Map<java.lang.Object,java.lang.Object>getWrittenObjects()Get the writtenobs.voidsetClassLoader(java.lang.ClassLoader classloader)Set the classloader.voidsetHandler(IObjectWriterHandler handler)Set the handler.voidsetId(int id)Set the id.voidsetPreProcessors(MultiCollection<java.lang.Integer,IPreProcessor> preprocessors)Set the preprocessors.voidsetRootObject(java.lang.Object root)Set the root object.voidsetStack(java.util.List<StackElement> stack)Set the stack.voidsetUserContext(java.lang.Object usercontext)Set the callcontext.voidsetWriter(java.lang.Object writer)Set the writer.voidsetWrittenObjects(java.util.Map<java.lang.Object,java.lang.Object> writtenobs)Set the writtenobs.
-
-
-
Field Detail
-
handler
protected IObjectWriterHandler handler
The handler.
-
writer
protected java.lang.Object writer
The writer.
-
classloader
protected java.lang.ClassLoader classloader
The classloader.
-
rootobject
protected java.lang.Object rootobject
The root object.
-
usercontext
protected java.lang.Object usercontext
The user context.
-
writtenobs
protected java.util.Map<java.lang.Object,java.lang.Object> writtenobs
The written objects.
-
stack
protected java.util.List<StackElement> stack
The stack.
-
preprocessors
protected MultiCollection<java.lang.Integer,IPreProcessor> preprocessors
The pre processors.
-
id
protected int id
The id counter.
-
namespacebypackage
protected java.util.Map<java.lang.String,Namespace> namespacebypackage
The namespaces.
-
nscnt
protected int nscnt
-
-
Constructor Detail
-
AWriteContext
public AWriteContext(IObjectWriterHandler handler, java.lang.Object writer, java.lang.Object usercontext, java.lang.Object rootobject, java.lang.ClassLoader classloader)
Create a new write context.
-
AWriteContext
public AWriteContext(IObjectWriterHandler handler, java.lang.Object writer, java.lang.Object usercontext, java.lang.Object rootobject, java.lang.ClassLoader classloader, java.util.Map<java.lang.Object,java.lang.Object> writtenobs, java.util.List<StackElement> stack, MultiCollection<java.lang.Integer,IPreProcessor> preprocessors)
Create a new write context.
-
-
Method Detail
-
getHandler
public IObjectWriterHandler getHandler()
Get the handler.- Returns:
- the handler.
-
setHandler
public void setHandler(IObjectWriterHandler handler)
Set the handler.- Parameters:
handler- The handler to set.
-
getWriter
public java.lang.Object getWriter()
Get the writer.- Returns:
- The writer.
-
setWriter
public void setWriter(java.lang.Object writer)
Set the writer.- Parameters:
writer- The writer to set.
-
getRootObject
public java.lang.Object getRootObject()
Get the root object.- Specified by:
getRootObjectin interfaceIContext- Returns:
- The root object.
-
setRootObject
public void setRootObject(java.lang.Object root)
Set the root object.- Parameters:
root- The rootobject to set.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Get the classloader.- Specified by:
getClassLoaderin interfaceIContext- Returns:
- The classloader.
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classloader)
Set the classloader.- Parameters:
classloader- The classloader to set.
-
getUserContext
public java.lang.Object getUserContext()
Get the callcontext.- Specified by:
getUserContextin interfaceIContext- Returns:
- The callcontext.
-
setUserContext
public void setUserContext(java.lang.Object usercontext)
Set the callcontext.- Parameters:
callcontext- The callcontext to set.
-
getWrittenObjects
public java.util.Map<java.lang.Object,java.lang.Object> getWrittenObjects()
Get the writtenobs.- Returns:
- The writtenobs.
-
setWrittenObjects
public void setWrittenObjects(java.util.Map<java.lang.Object,java.lang.Object> writtenobs)
Set the writtenobs.- Parameters:
writtenobs- The writtenobs to set.
-
getStack
public java.util.List<StackElement> getStack()
Get the stack.- Returns:
- The stack.
-
setStack
public void setStack(java.util.List<StackElement> stack)
Set the stack.- Parameters:
stack- The stack to set.
-
getPreProcessors
public MultiCollection<java.lang.Integer,IPreProcessor> getPreProcessors()
Get the preprocessors.- Returns:
- The preprocessors.
-
setPreProcessors
public void setPreProcessors(MultiCollection<java.lang.Integer,IPreProcessor> preprocessors)
Set the preprocessors.- Parameters:
preprocessors- The preprocessors to set.
-
getId
public int getId()
Get the id.- Returns:
- the id.
-
setId
public void setId(int id)
Set the id.- Parameters:
id- The id to set.
-
getNamespace
public Namespace getNamespace(java.lang.String uri)
Get or create a namespace.- Parameters:
uri- The namespace uri.
-
-