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.ClassLoader
classloader
The classloader.protected IObjectWriterHandler
handler
The handler.protected int
id
The id counter.protected java.util.Map<java.lang.String,Namespace>
namespacebypackage
The namespaces.protected int
nscnt
protected MultiCollection<java.lang.Integer,IPreProcessor>
preprocessors
The pre processors.protected java.lang.Object
rootobject
The root object.protected java.util.List<StackElement>
stack
The stack.protected java.lang.Object
usercontext
The user context.protected java.lang.Object
writer
The writer.protected java.util.Map<java.lang.Object,java.lang.Object>
writtenobs
The 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.ClassLoader
getClassLoader()
Get the classloader.IObjectWriterHandler
getHandler()
Get the handler.int
getId()
Get the id.Namespace
getNamespace(java.lang.String uri)
Get or create a namespace.MultiCollection<java.lang.Integer,IPreProcessor>
getPreProcessors()
Get the preprocessors.java.lang.Object
getRootObject()
Get the root object.java.util.List<StackElement>
getStack()
Get the stack.java.lang.Object
getUserContext()
Get the callcontext.java.lang.Object
getWriter()
Get the writer.java.util.Map<java.lang.Object,java.lang.Object>
getWrittenObjects()
Get the writtenobs.void
setClassLoader(java.lang.ClassLoader classloader)
Set the classloader.void
setHandler(IObjectWriterHandler handler)
Set the handler.void
setId(int id)
Set the id.void
setPreProcessors(MultiCollection<java.lang.Integer,IPreProcessor> preprocessors)
Set the preprocessors.void
setRootObject(java.lang.Object root)
Set the root object.void
setStack(java.util.List<StackElement> stack)
Set the stack.void
setUserContext(java.lang.Object usercontext)
Set the callcontext.void
setWriter(java.lang.Object writer)
Set the writer.void
setWrittenObjects(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:
getRootObject
in 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:
getClassLoader
in 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:
getUserContext
in 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.
-
-