com.jaxfront.core.dom
Class Document

java.lang.Object
  extended by com.jaxfront.core.dom.Document

public class Document
extends java.lang.Object

Represents a JAXFront Type DOM. Every JAXFront Type refers to an XMLSchema Element and a XUIDefinition defined in the XUI file. The class DOMBuilder acts a a factory for creating JAXFront documents. A JAXFront DOM combines XMLSchema information (meta level), XMLInstance and XUI definitions. To create a JAXFront DOM, the existance of an XMLSchema is a must. Use the serialize method to create an XML OutputStream.

See Also:
DOMBuilder

Field Summary
 boolean _enforcePrefixSerialization
           
static int _instanceCount
           
 long _lastDomUpdateTime
           
static java.lang.String APPLICATION_PROPERTY_CUSTOM_CLASSLOADER
           
static java.lang.String APPLICATION_PROPERTY_DOCUMENT
           
static java.lang.String BUILD_VERSION
           
static java.lang.String CLIENT_PROPERTY_HTTP_PARAM_MAP_INITIAL
           
static java.lang.String CLIENT_PROPERTY_HTTP_REQUEST
           
static java.lang.String DOCUMENT_STATUS
           
static java.lang.String DOM_ARGS
           
static java.lang.String GLOBAL_CODESET_DOC
           
 DoubleKeyHashtable itCache
           
 DoubleKeyHashtable parentCache
           
static java.lang.String RIGHT_HIDDEN
           
static java.lang.String RIGHT_READ
           
static java.lang.String RIGHT_READ_WRITE
           
static java.lang.String RIGHT_READ_WRITE_NOT_NULL
           
static java.lang.String RIGHT_VISIBLE
           
static java.lang.String TARGET_PI
           
 DoubleKeyHashtable xpCache
           
static java.lang.String XUI_VERSION
           
 
Constructor Summary
Document(XMLSchema schema, Type rootType)
          Creates a JAXFront DOM for a specific XMLSchema and root node.
Document(XMLSchema schema, Type rootType, java.util.Hashtable params)
          Creates a JAXFront DOM for a specific XMLSchema and root node.
 
Method Summary
 void addActionPerformListener(ActionPerformListener newListener)
          Register a new listener for receiving JAXFront ActionPerform events.
 void addDirtyChangeListener(DirtyChangeListener newListener)
          Register a new listener for receiving dirty changes.
 void addDOMChangeListener(DOMChangeListener newListener)
          Register a new listener for receiving JAXFront DOM events.
 void addDOMChangeListener(DOMChangeListener newListener, int pos)
          Register a new listener for receiving JAXFront DOM events.
 FormulaExpression addFormula(FormulaExpression formula)
           
 void addNotFiredInitializationRule(Type target, Rule initializationRule)
           
 Type addVarToTypeMapping(java.lang.String varName, Type aType)
           
 void attachUISpecification(org.w3c.dom.Document xuiW3CDOM, boolean reinitializeGlobalDefinitions)
          Attaches the passed XUI Document to the internal ui specification.
 void bind(org.w3c.dom.Document dom)
          Binds the values of the source DOM (W3C DOM) to the JAXFront DOM.
 void bind(org.w3c.dom.Document dom, boolean reinitializeXUI)
          Binds the values of the source DOM (W3C DOM) to the JAXFront DOM.
 void bind(org.w3c.dom.Document dom, boolean reinitializeXUI, java.util.Hashtable processingInstructions)
           
 void cancelInstance()
          Fires a CANCEL-DOM event.
 void checkAutoCreateListItems(Type type)
           
 boolean containsDOMChangeListener(DOMChangeListener listener)
           
 Document copy()
          Copies the current JAXFront-Document and returns it.
 Document copy(boolean withValue, boolean reinitXUI, boolean copyProperties)
           
 void fireActionPerformed(ActionPerformEvent event)
          Informs all ActionPerformListeners about a performing action.
 void fireDirtyChange()
           
 void fireDOMChanged(DOMChangeEvent event)
          Informs all DOMChangeListeners about node changes.
 void fireDOMChanged(DOMChangeEvent event, boolean isTemporary)
          Informs all DOMChangeListeners about node changes (add/remove/cancel).
static java.lang.String generateVarID(Type baseType)
           
 java.lang.String getAppContext()
           
 java.awt.Color getApplicationFieldColor()
          Returns the color that is defined in the XUI-Document for all mandatory application fields.
 java.util.Hashtable getApplicationProperties()
           
 java.lang.Object getApplicationProperty(java.lang.String key)
           
 java.lang.String getAppVersionNo()
          Returns the application version number set in the xui file.
static java.lang.String getBuildVersion()
          Returns the build version of the current JAXFront Engine.
 java.util.Hashtable getClientProperties()
           
 java.lang.Object getClientProperty(java.lang.String key)
           
 ClipBoard getClipBoard()
           
 CodeTables getCodeTables()
          Returns the defined codeTables for this DOM domain (stored per XMLSchema).
 IConnectionManager getConnectionManager()
           
 TypeController getController()
          Returns the TypeController for this DOM.
 long getCreatedTime()
           
 java.lang.ClassLoader getCustomClassloader()
           
 DebugListener getDebugListener()
           
 java.lang.String getDefaultNamespace()
           
 float getDividerLocation()
          Returns the global divider location.
 java.lang.String getDocumentID()
           
 java.util.Map getEditingTypeCache()
           
 EditablePanel getEditor()
          Returns the top level visual editor for this DOM if any, otherwise return null.
 java.lang.String getEncoding()
           
 java.awt.Color getErrorMarkingColor()
          Returns the color which marks errors in a visualizer view.
 java.util.List getFilters()
          Returns the defined search filters.
 FingerPrint getFingerPrint()
          Returns the fingerprint for this DOM.
 java.util.HashMap getFormulas()
           
 GlobalDefinition getGlobalDefinition()
          Returns the global definitions for this DOM (XUI Global definitions).
 float getGlobalLabelIndent()
          Returns the global label indent.
 Rule getGlobalRule(java.lang.Object id)
           
 java.util.Hashtable getGlobalRules()
           
 DoubleKeyHashtable getGlobalXUIDefinitions()
           
 HelpURLResolver getHelpUrlResolver()
           
 java.lang.String getInfo()
           
 java.util.Map getInfos()
           
 KeyKeyRefManager getKeyKeyRefManager()
           
 java.lang.String getLanguage()
          Returns the language that is defined in the XUI-Document
 long getLastDomUpdateTimeStamp()
           
 java.lang.String getLastLoadedNLSLanguage()
           
 SimpleType getLeafType(java.lang.String xpath)
          Returns a simple type (leaf type) according to the given xpath or null.
 java.util.HashSet getLostComponents()
           
 NLS getNLS()
          Returns the NLS for this DOM.
 java.util.Map getNoTargetVars()
           
 java.util.LinkedHashMap getNotFiredInitializationRules()
           
 java.awt.Color getOptionalFieldColor()
          Returns the color that is defined in the XUI-Document for all optional application fields.
 java.util.Hashtable getOriginalXmlHeaderAttributes()
          Start the serialization of this DOM to the passing Stringbuffer.
 java.util.List getProcessingInstructions()
           
 JAXFrontPropertyChangeSupport getPropertyChangeSupport()
          Gets the PropertyChangeSupport helper instance for this type.
 TypeVisualizerFactory getRenderRequestVisualizerFactory()
           
 Type getRootType()
          Returns the root type of the current document.
 XMLSchema getSchema()
          Returns the XML schema for this DOM.
 java.lang.String getSchemaLocation()
           
 java.awt.Color getSchemaRequiredFieldColor()
          Returns the color that is defined in the XUI-Document for all mandatory fields.
 java.awt.Dimension getScreenSize()
          Returns the default screensize or as defined in the XUI-Document.
 SerializationModifier getSerializationModifier()
           
 int getStatus()
           
 java.util.List getTreeRoot()
          Returns the root nodes for visualizing in the navigation tree.
 Type getType(java.lang.String xpath)
          Returns the type that can be found with the given xpath.
 Type getType(java.lang.String xpath, Type baseType)
          Returns the type that can be found with the given xpath.
 java.util.List getTypes(java.lang.String xpath)
          Returns a list of types that can be found with the given xpath.
 java.util.List getTypes(java.lang.String xpath, Type rootType)
           
 java.util.List getTypes(java.lang.String xpath, Type rootType, boolean serializableOnly)
           
 java.lang.String getTypeValue(java.lang.String xpath)
           
 InitUIListener getUIInitListener()
           
 JAXFrontUndoManager getUndoManager()
           
 IUser getUser()
           
 java.util.List<Type> getVarsFor(java.lang.String[] varNames, java.util.List result)
           
 java.util.Map<java.lang.String,Type> getVarToTypeMapping()
           
 int getVerticalScrollBarPolicy()
          Returns the usage of the vertical scrollbar as int.
 Type getViewHolderType(Type smartType)
          Retrieves the right viewHolder (container) type for the given type.
 java.util.Hashtable getXMLNamespaceMappings()
           
 XPathEncoder getXPathEncoder()
           
 Document getXUIDocument()
          Returns the current XUI-Document.
 java.util.Hashtable getXUINamespaceMappings()
           
 java.util.Map getXUIPrefixNamespaceMappings()
           
 Type getXUIRootType()
          Returns the root type of the current XUI-Document.
static java.lang.String getXUIVersionNo()
          Returns the current supported XUI version of the JAXFront Engine.
 boolean hasChanged()
          Returns true if the state of a type within this DOM has changed.
 boolean hasController()
           
 FormulaExpression hasFormula(FormulaExpression formula)
           
 boolean hasVarToTypeMapping()
           
 boolean hasXUI()
           
 void initializeGlobalRules(Type rules)
           
 void initializeNLS(Document uiDoc, FingerPrint fingerprint)
          Initialize the nls for this DOM with the language defined in the xui document.
 void initializeVars(Type xuiRootType)
           
 void initUISpecification(Document uiDoc)
          Initializes the UserInterface-Specification (XUI-Document).
 void initUISpecification(Document uiDoc, boolean releaseOldUISpecification, boolean reinitializeGlobalDefinitions)
          Initializes the UserInterface-Specification (XUI-Document).
 void initUISpecification(Type xuiType)
          Initializes a xui component for all target nodes retrieved by processing the passed xpath statement.
 void initUISpecification(java.net.URL xuiURL)
           
 boolean isAllowingSavingWithErrors()
          Returns whether the document can be saved even if validation errors exist
 boolean isBinding()
           
 boolean isDebugMode()
           
 boolean isEditable()
          Returns whether the document can be modified or not.
 boolean isHistoryMode()
           
 boolean isImmutable()
           
 boolean isOrphan(org.w3c.dom.Node node)
          Check if the supplied node is an orphan, i.e. if its uppermost parent is of type Document (=> not orphaned) or another node (=> orphaned)
 boolean isPasteMode()
           
 boolean isPDFXUIDOM()
           
 boolean isReleaseAfterUnblock()
           
 boolean isReleaseBlocked()
           
 boolean isReleased()
           
 boolean isRuleEngineBlocked()
           
 boolean isRunningInXUIEditor()
          Returns if JAXFront is running as XUIEditor.
 boolean isSCDom()
           
 boolean isSchemaInit()
           
 boolean isSCReleased()
           
 boolean isSerializingDefaults()
          Returns whether the defined defaults in the schema should be serialized or not.
 boolean isShowingTreeListContainer()
          Returns true if a container element (e.q. item(s)) for list types will be shown in the navigation tree.
 boolean isUsingBackwardButton()
          Returns true if the backwardButton in the editor is used or not.
 boolean isUsingButtonBar()
          Returns whether the button bar in the editor is visible or not.
 boolean isUsingDefaultRendering()
           
 boolean isUsingForwardButton()
          Returns true if the forwardButton in the editor is used or not.
 boolean isUsingPlugins()
          Returns whether plug-ins are allowed to use or not.
 boolean isUsingStatusBar()
          Returns whether the status bar is used or not.
 boolean isValid()
           
 boolean isXPathCached()
           
 boolean isXUIDOMInstance()
           
 boolean isXUIDOMInstance(Type rootType)
           
 boolean isXUIInitialized()
           
 boolean keepXUIDOMinMemory()
           
 void keepXUIDOMinMemory(boolean isXuiDom)
           
 void lock(java.lang.String[] fieldsToUnlock)
          Locks the current DOM and all its visualizers.
 void lock(java.lang.String[] fieldsToUnlock, boolean lockGlobal, boolean unlockIfNotNull)
           
 FormulaExpression lookupFormula(Type source, java.lang.String expression)
           
 FormulaExpression lookupFormula(Type source, java.lang.String expression, boolean includeOnlySerializable, TableCell cell)
           
 void maintainLostXUIComponent(Type xuiComponent)
           
 void maintainNoTargetXPathDefinitions(java.util.List definitions)
           
 void markNotEditableTypes(Type type, boolean unmark, boolean handleListItems)
           
 void notifyDebug(int type, java.lang.String message)
           
 void printTypeTree()
          Writes the current DOM tree to the log file.
 void putApplicationProperty(java.lang.String key, java.lang.Object value)
           
 void putClientProperty(java.lang.String key, java.lang.Object value)
           
 void putEditingTypeCache(Type edType)
           
 void reApplyLostComponents()
           
 void refresh(org.w3c.dom.Document dom, Document uiDOM)
          Refreshes the given DOM and reinitialize the XUI definitions.
 void refreshUISpecification(Document uiDOM)
          Refreshes the current DOM with new XUI definitions.
 void reinitializeNLS()
           
 void reinitializeUISpecification()
           
 void reinitializeUISpecification(Type type)
           
 void reinitVars()
           
 void release()
          Releases allocated resources for this DOM including type tree, XUI DOM, properties, visualizer cache, processing-instructions and type controller.
 void releaseController()
          Releases the current type controller.
 void releaseForSchemaCache()
           
 void releaseProperties()
          Releases the current properties.
 void removeActionPerformListener(ActionPerformListener newListener)
          Removes a ActionPerformListener.
 void removeAllFormulas()
           
 java.lang.Object removeApplicationProperty(java.lang.String key)
           
 void removeClientProperty(java.lang.String key)
           
 void removeDirtyChangeListener(DirtyChangeListener listener)
          Remove a listener for receiving dirty changes.
 void removeDOMChangeListener(DOMChangeListener newListener)
          Removes a DOMChangeListener.
 FormulaExpression removeFormula(FormulaExpression formula)
           
 void removeFormulaExpressions(Type forType)
           
 Type removeVarToTypeMapping(java.lang.String varName)
           
 XUIDefinition removeXUIDefinition(Type type)
           
 void saveAs(java.io.File file)
          Saves the current document into a file.
 void saveAsZip(java.io.File file)
           
 java.lang.StringBuffer serialize()
          Serializes the current document into a StringBuffer and returns it.
 java.lang.StringBuffer serialize(boolean makeIndents)
           
 java.lang.StringBuffer serialize(boolean makeIndents, boolean serializeHeader)
          Serializes the current document into a StringBuffer and returns it.
 java.lang.StringBuffer serializeInternal(boolean makeIndents, boolean serializeHeader)
          Start the serialization of this DOM to the passing Stringbuffer.
 byte[] serializeToByteArray()
           
 byte[] serializeToByteArray(java.lang.String encoding)
           
 org.w3c.dom.Document serializeToW3CDocument()
          Serialize the current JAXFront document and creates a new W3C document instance.
 void setAppContext(java.lang.String appContext)
           
 void setCreatedTime(long created)
           
 void setCustomClassloader(java.lang.ClassLoader aClassLoader)
           
 void setDebugListener(DebugListener listener)
           
 void setDefaultNamespace(java.lang.String defaultXMLNamespace)
           
 void setEncoding(java.lang.String encoding)
           
 void setFingerPrint(FingerPrint fingerPrint)
          Sets the fingerprint for this DOM.
 void setGlobalCodeSet(org.w3c.dom.Document codesetDoc)
          Initialize the global Codest for this DOM document.
 void setHelpUrlResolver(HelpURLResolver helpUrlResolver)
           
 void setHistoryMode(java.lang.String logLevel, boolean enabled, boolean logChanges, java.util.Vector fingerprintActions)
           
 void setImmutable(boolean immutable)
           
 void setInitUIListener(InitUIListener listener)
           
 void setIsBinding(boolean isBinding)
           
 void setLanguage(java.lang.String language)
          Sets the language for this and all future DOM's so the defined language within a XUI definition will not be considered again.
 void setNLS(NLS nls)
          Sets the NLS properties to use.
 void setPasteMode(boolean pasting)
           
 void setPID(java.lang.String pid)
           
 void setProcessingInstructions(java.util.List pi)
           
 void setReleaseBlocked(java.lang.String blockOwner, boolean blocked)
           
 void setRenderRequestVisualizerFactory(TypeVisualizerFactory factory)
           
 void setRights(java.lang.String[][] aRights)
           
 void setRuleEngineBlocked(boolean blockRuleEngine)
           
 void setRunningAsXUIEditor(boolean isEditorMode)
           
 void setSchemaLocation(java.lang.String schemaLocation)
           
 void setSerializationModifier(SerializationModifier serializationModifier)
           
 void setStatus(int status)
           
 void setUndoManager(JAXFrontUndoManager undoManager)
           
 void setXMLNamespaceMappings(java.util.Hashtable mapping)
           
 void setXPathCached(boolean cache)
           
 void setXUIDocument(Document xuiDocument)
           
 void setXUINamespaceMappings(java.util.Hashtable mapping)
           
 boolean systemExitOnClose()
          Returns whether the system will exit when the window is closed or not.
 void unlock()
           
 boolean useOptionalCheckBox()
          Returns whether optional check boxes are used or not.
 void validate()
          Validates the current DOM according its XML Schema & the defined XUI rules.
 void validate(boolean isRunningOnServer)
          Validates the current DOM according its XML Schema & the defined XUI rules.
 void validateKeyRefIntegrity(boolean notifyErrorController)
           
 void validateMandatoryAndCardinality(Type type, java.util.List errors, boolean checkValue)
          Checks if all mandatory leaf types derived from the passed type are not empty.
 java.util.Vector validatePageErrors(Type type, int pageIndex)
           
 java.util.Vector validatePageErrors(Type type, int pageIndex, boolean validate)
           
 void validateSchemaConstraints()
          Validates the current DOM according its mandatory fields.
 java.util.Hashtable validateTemporary()
           
 void validateXUIRules(boolean isRunningOnServer)
          Validates the current DOM according its defined save XUI rules.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_enforcePrefixSerialization

public boolean _enforcePrefixSerialization

_instanceCount

public static int _instanceCount

_lastDomUpdateTime

public long _lastDomUpdateTime

APPLICATION_PROPERTY_CUSTOM_CLASSLOADER

public static final java.lang.String APPLICATION_PROPERTY_CUSTOM_CLASSLOADER
See Also:
Constant Field Values

APPLICATION_PROPERTY_DOCUMENT

public static final java.lang.String APPLICATION_PROPERTY_DOCUMENT
See Also:
Constant Field Values

BUILD_VERSION

public static final java.lang.String BUILD_VERSION
See Also:
Constant Field Values

CLIENT_PROPERTY_HTTP_PARAM_MAP_INITIAL

public static final java.lang.String CLIENT_PROPERTY_HTTP_PARAM_MAP_INITIAL
See Also:
Constant Field Values

CLIENT_PROPERTY_HTTP_REQUEST

public static final java.lang.String CLIENT_PROPERTY_HTTP_REQUEST
See Also:
Constant Field Values

DOCUMENT_STATUS

public static final java.lang.String DOCUMENT_STATUS
See Also:
Constant Field Values

DOM_ARGS

public static final java.lang.String DOM_ARGS
See Also:
Constant Field Values

GLOBAL_CODESET_DOC

public static final java.lang.String GLOBAL_CODESET_DOC
See Also:
Constant Field Values

itCache

public DoubleKeyHashtable itCache

parentCache

public DoubleKeyHashtable parentCache

RIGHT_HIDDEN

public static final java.lang.String RIGHT_HIDDEN
See Also:
Constant Field Values

RIGHT_READ

public static final java.lang.String RIGHT_READ
See Also:
Constant Field Values

RIGHT_READ_WRITE

public static final java.lang.String RIGHT_READ_WRITE
See Also:
Constant Field Values

RIGHT_READ_WRITE_NOT_NULL

public static final java.lang.String RIGHT_READ_WRITE_NOT_NULL
See Also:
Constant Field Values

RIGHT_VISIBLE

public static final java.lang.String RIGHT_VISIBLE
See Also:
Constant Field Values

TARGET_PI

public static final java.lang.String TARGET_PI
See Also:
Constant Field Values

xpCache

public DoubleKeyHashtable xpCache

XUI_VERSION

public static final java.lang.String XUI_VERSION
See Also:
Constant Field Values
Constructor Detail

Document

public Document(XMLSchema schema,
                Type rootType)
Creates a JAXFront DOM for a specific XMLSchema and root node.

Parameters:
schema - XML Schema
rootType - root node for this document

Document

public Document(XMLSchema schema,
                Type rootType,
                java.util.Hashtable params)
Creates a JAXFront DOM for a specific XMLSchema and root node.

Parameters:
schema - XML Schema
rootType - root node for this document
Method Detail

addActionPerformListener

public void addActionPerformListener(ActionPerformListener newListener)
Register a new listener for receiving JAXFront ActionPerform events.

Parameters:
newListener - a new listener

addDirtyChangeListener

public void addDirtyChangeListener(DirtyChangeListener newListener)
Register a new listener for receiving dirty changes.

Parameters:
newListener - a new listener

addDOMChangeListener

public void addDOMChangeListener(DOMChangeListener newListener)
Register a new listener for receiving JAXFront DOM events.

Parameters:
newListener - a new listener

addDOMChangeListener

public void addDOMChangeListener(DOMChangeListener newListener,
                                 int pos)
Register a new listener for receiving JAXFront DOM events.

Parameters:
newListener - a new listener

addFormula

public FormulaExpression addFormula(FormulaExpression formula)

addNotFiredInitializationRule

public void addNotFiredInitializationRule(Type target,
                                          Rule initializationRule)

addVarToTypeMapping

public Type addVarToTypeMapping(java.lang.String varName,
                                Type aType)

attachUISpecification

public void attachUISpecification(org.w3c.dom.Document xuiW3CDOM,
                                  boolean reinitializeGlobalDefinitions)
                           throws DocumentCreationException
Attaches the passed XUI Document to the internal ui specification.

Parameters:
xuiW3CDOM - new XUI DOM
reinitializeGlobalDefinitions - defines if global XUI definitions should be reinitialized with the passing XUI definitions
Throws:
DocumentCreationException

bind

public void bind(org.w3c.dom.Document dom)
Binds the values of the source DOM (W3C DOM) to the JAXFront DOM. The name of the root type must match the name of the root node in the passed W3C DOM.

Parameters:
dom - W3C DOM to bind

bind

public void bind(org.w3c.dom.Document dom,
                 boolean reinitializeXUI)
Binds the values of the source DOM (W3C DOM) to the JAXFront DOM. The name of the root type must match the name of the root node in the passed W3C DOM.

Parameters:
dom - W3C DOM to bind
reinitializeXUI - indicates if XUI should be reinitialized

bind

public void bind(org.w3c.dom.Document dom,
                 boolean reinitializeXUI,
                 java.util.Hashtable processingInstructions)

cancelInstance

public void cancelInstance()
Fires a CANCEL-DOM event. Listeners may undo made changes.


checkAutoCreateListItems

public void checkAutoCreateListItems(Type type)

containsDOMChangeListener

public boolean containsDOMChangeListener(DOMChangeListener listener)

copy

public Document copy()
              throws DocumentCreationException
Copies the current JAXFront-Document and returns it.

Returns:
a copy of the current JAXFront-Document
Throws:
DocumentCreationException - if the DOM couldn't be build

copy

public Document copy(boolean withValue,
                     boolean reinitXUI,
                     boolean copyProperties)
              throws DocumentCreationException
Throws:
DocumentCreationException

fireActionPerformed

public void fireActionPerformed(ActionPerformEvent event)
Informs all ActionPerformListeners about a performing action.

Parameters:
event - DOMChangeEvent to fire

fireDirtyChange

public void fireDirtyChange()

fireDOMChanged

public void fireDOMChanged(DOMChangeEvent event)
Informs all DOMChangeListeners about node changes.

Parameters:
event - DOMChangeEvent to fire

fireDOMChanged

public void fireDOMChanged(DOMChangeEvent event,
                           boolean isTemporary)
Informs all DOMChangeListeners about node changes (add/remove/cancel).

Parameters:
event - DOMChangeEvent to fire
isTemporary - true if this event is just temporary

generateVarID

public static java.lang.String generateVarID(Type baseType)

getAppContext

public java.lang.String getAppContext()

getApplicationFieldColor

public java.awt.Color getApplicationFieldColor()
Returns the color that is defined in the XUI-Document for all mandatory application fields.


getApplicationProperties

public java.util.Hashtable getApplicationProperties()

getApplicationProperty

public java.lang.Object getApplicationProperty(java.lang.String key)

getAppVersionNo

public java.lang.String getAppVersionNo()
Returns the application version number set in the xui file. Null if none defined.


getBuildVersion

public static java.lang.String getBuildVersion()
Returns the build version of the current JAXFront Engine.


getClientProperties

public java.util.Hashtable getClientProperties()

getClientProperty

public java.lang.Object getClientProperty(java.lang.String key)

getClipBoard

public ClipBoard getClipBoard()

getCodeTables

public CodeTables getCodeTables()
Returns the defined codeTables for this DOM domain (stored per XMLSchema).


getConnectionManager

public IConnectionManager getConnectionManager()

getController

public TypeController getController()
Returns the TypeController for this DOM.


getCreatedTime

public long getCreatedTime()

getCustomClassloader

public java.lang.ClassLoader getCustomClassloader()

getDebugListener

public DebugListener getDebugListener()

getDefaultNamespace

public java.lang.String getDefaultNamespace()

getDividerLocation

public float getDividerLocation()
Returns the global divider location.


getDocumentID

public java.lang.String getDocumentID()

getEditingTypeCache

public java.util.Map getEditingTypeCache()

getEditor

public EditablePanel getEditor()
Returns the top level visual editor for this DOM if any, otherwise return null.


getEncoding

public java.lang.String getEncoding()

getErrorMarkingColor

public java.awt.Color getErrorMarkingColor()
Returns the color which marks errors in a visualizer view.


getFilters

public java.util.List getFilters()
Returns the defined search filters.


getFingerPrint

public FingerPrint getFingerPrint()
Returns the fingerprint for this DOM. The fingerprint is initialized by the attached XUI document.


getFormulas

public java.util.HashMap getFormulas()

getGlobalDefinition

public GlobalDefinition getGlobalDefinition()
Returns the global definitions for this DOM (XUI Global definitions).


getGlobalLabelIndent

public float getGlobalLabelIndent()
Returns the global label indent.


getGlobalRule

public Rule getGlobalRule(java.lang.Object id)

getGlobalRules

public java.util.Hashtable getGlobalRules()

getGlobalXUIDefinitions

public DoubleKeyHashtable getGlobalXUIDefinitions()

getHelpUrlResolver

public HelpURLResolver getHelpUrlResolver()

getInfo

public java.lang.String getInfo()

getInfos

public java.util.Map getInfos()

getKeyKeyRefManager

public KeyKeyRefManager getKeyKeyRefManager()

getLanguage

public java.lang.String getLanguage()
Returns the language that is defined in the XUI-Document


getLastDomUpdateTimeStamp

public long getLastDomUpdateTimeStamp()

getLastLoadedNLSLanguage

public java.lang.String getLastLoadedNLSLanguage()

getLeafType

public SimpleType getLeafType(java.lang.String xpath)
Returns a simple type (leaf type) according to the given xpath or null.

Parameters:
xpath - to look for a leaf type

getLostComponents

public java.util.HashSet getLostComponents()
Returns:
Returns the _lostComponents.

getNLS

public NLS getNLS()
Returns the NLS for this DOM.


getNoTargetVars

public java.util.Map getNoTargetVars()

getNotFiredInitializationRules

public java.util.LinkedHashMap getNotFiredInitializationRules()

getOptionalFieldColor

public java.awt.Color getOptionalFieldColor()
Returns the color that is defined in the XUI-Document for all optional application fields.


getOriginalXmlHeaderAttributes

public java.util.Hashtable getOriginalXmlHeaderAttributes()
Start the serialization of this DOM to the passing Stringbuffer.

Parameters:
sb - Stringbuffer to serialize DOM into
makeIndents - indicates if indents & carriage returns should be written
serializeHeader - true, if the xml header should be written

getProcessingInstructions

public java.util.List getProcessingInstructions()

getPropertyChangeSupport

public JAXFrontPropertyChangeSupport getPropertyChangeSupport()
Gets the PropertyChangeSupport helper instance for this type.

Returns:
the PropertyChangeSupport helper instance for this type

getRenderRequestVisualizerFactory

public TypeVisualizerFactory getRenderRequestVisualizerFactory()

getRootType

public Type getRootType()
Returns the root type of the current document.

Returns:
the root tpye

getSchema

public XMLSchema getSchema()
Returns the XML schema for this DOM.


getSchemaLocation

public java.lang.String getSchemaLocation()

getSchemaRequiredFieldColor

public java.awt.Color getSchemaRequiredFieldColor()
Returns the color that is defined in the XUI-Document for all mandatory fields.


getScreenSize

public java.awt.Dimension getScreenSize()
Returns the default screensize or as defined in the XUI-Document.

Returns:
the current screenSize

getSerializationModifier

public SerializationModifier getSerializationModifier()

getStatus

public int getStatus()

getTreeRoot

public java.util.List getTreeRoot()
Returns the root nodes for visualizing in the navigation tree.

Returns:
a list of root nodes to visualize in navigation tree

getType

public Type getType(java.lang.String xpath)
Returns the type that can be found with the given xpath.

Parameters:
xpath - xpath of the type that should be accessed
Returns:
a type

getType

public Type getType(java.lang.String xpath,
                    Type baseType)
Returns the type that can be found with the given xpath.

Parameters:
xpath - xpath of the type that should be accessed
Returns:
a type

getTypes

public java.util.List getTypes(java.lang.String xpath)
Returns a list of types that can be found with the given xpath.

Parameters:
xpath - xpath of the type(s) that should be accessed
Returns:
a list of types

getTypes

public java.util.List getTypes(java.lang.String xpath,
                               Type rootType)

getTypes

public java.util.List getTypes(java.lang.String xpath,
                               Type rootType,
                               boolean serializableOnly)

getTypeValue

public java.lang.String getTypeValue(java.lang.String xpath)

getUIInitListener

public InitUIListener getUIInitListener()

getUndoManager

public JAXFrontUndoManager getUndoManager()

getUser

public IUser getUser()
Returns:

getVarsFor

public java.util.List<Type> getVarsFor(java.lang.String[] varNames,
                                       java.util.List result)

getVarToTypeMapping

public java.util.Map<java.lang.String,Type> getVarToTypeMapping()

getVerticalScrollBarPolicy

public int getVerticalScrollBarPolicy()
Returns the usage of the vertical scrollbar as int.

Returns:
the usage of the vertical scrollbar

getViewHolderType

public Type getViewHolderType(Type smartType)
Retrieves the right viewHolder (container) type for the given type.

Parameters:
smartType - a given type

getXMLNamespaceMappings

public java.util.Hashtable getXMLNamespaceMappings()

getXPathEncoder

public XPathEncoder getXPathEncoder()

getXUIDocument

public Document getXUIDocument()
Returns the current XUI-Document.

Returns:
the current XUI-Document

getXUINamespaceMappings

public java.util.Hashtable getXUINamespaceMappings()

getXUIPrefixNamespaceMappings

public java.util.Map getXUIPrefixNamespaceMappings()

getXUIRootType

public Type getXUIRootType()
Returns the root type of the current XUI-Document.

Returns:
the root type of the current XUI-Document

getXUIVersionNo

public static java.lang.String getXUIVersionNo()
Returns the current supported XUI version of the JAXFront Engine.


hasChanged

public boolean hasChanged()
Returns true if the state of a type within this DOM has changed.


hasController

public boolean hasController()

hasFormula

public FormulaExpression hasFormula(FormulaExpression formula)

hasVarToTypeMapping

public boolean hasVarToTypeMapping()

hasXUI

public boolean hasXUI()

initializeGlobalRules

public void initializeGlobalRules(Type rules)

initializeNLS

public void initializeNLS(Document uiDoc,
                          FingerPrint fingerprint)
Initialize the nls for this DOM with the language defined in the xui document. To load an nls file in the desired language, the name of the file must be the same as the provided xui file name followed by the desired language. e.q. XUIFile = po.xui NLSFile = po_de.nls (in case of german) NLSFile = po_fr.nls (in case of french)


initializeVars

public void initializeVars(Type xuiRootType)

initUISpecification

public void initUISpecification(Document uiDoc)
                         throws DocumentCreationException
Initializes the UserInterface-Specification (XUI-Document).

Parameters:
uiDoc - the XUI-Document (JAXFront-Document)
Throws:
DocumentCreationException - if the DOM couldn't be build

initUISpecification

public void initUISpecification(Document uiDoc,
                                boolean releaseOldUISpecification,
                                boolean reinitializeGlobalDefinitions)
                         throws DocumentCreationException
Initializes the UserInterface-Specification (XUI-Document).

Parameters:
uiDoc - the XUI-Document (JAXFront-Document)
releaseOldUISpecification - defines if the old UISpecification should be released
reinitializeGlobalDefinitions - defines if the global definitions sould be reinitialized
Throws:
DocumentCreationException - if the DOM couldn't be build

initUISpecification

public void initUISpecification(Type xuiType)
Initializes a xui component for all target nodes retrieved by processing the passed xpath statement.

Parameters:
xuiType - xui component from the XUI DOM

initUISpecification

public void initUISpecification(java.net.URL xuiURL)
                         throws DocumentCreationException
Throws:
DocumentCreationException

isAllowingSavingWithErrors

public boolean isAllowingSavingWithErrors()
Returns whether the document can be saved even if validation errors exist

Returns:
true if the document can be saved with errors, false otherwise

isBinding

public boolean isBinding()

isDebugMode

public boolean isDebugMode()

isEditable

public boolean isEditable()
Returns whether the document can be modified or not.

Returns:
true if the document can be modified, false otherwise

isHistoryMode

public boolean isHistoryMode()

isImmutable

public boolean isImmutable()

isOrphan

public boolean isOrphan(org.w3c.dom.Node node)
Check if the supplied node is an orphan, i.e. if its uppermost parent is of type Document (=> not orphaned) or another node (=> orphaned)

Parameters:
node - the node that should be checked
Returns:
true if the node is an orphan, false otherwise

isPasteMode

public boolean isPasteMode()

isPDFXUIDOM

public boolean isPDFXUIDOM()

isReleaseAfterUnblock

public boolean isReleaseAfterUnblock()

isReleaseBlocked

public boolean isReleaseBlocked()

isReleased

public boolean isReleased()

isRuleEngineBlocked

public boolean isRuleEngineBlocked()

isRunningInXUIEditor

public boolean isRunningInXUIEditor()
Returns if JAXFront is running as XUIEditor.

Returns:
true, if JAXFront is running as XUIEditor, false otherwise

isSCDom

public boolean isSCDom()

isSchemaInit

public boolean isSchemaInit()

isSCReleased

public boolean isSCReleased()

isSerializingDefaults

public boolean isSerializingDefaults()
Returns whether the defined defaults in the schema should be serialized or not.


isShowingTreeListContainer

public boolean isShowingTreeListContainer()
Returns true if a container element (e.q. item(s)) for list types will be shown in the navigation tree.


isUsingBackwardButton

public boolean isUsingBackwardButton()
Returns true if the backwardButton in the editor is used or not.

Returns:
true if the backwardButton is used, false otherwise

isUsingButtonBar

public boolean isUsingButtonBar()
Returns whether the button bar in the editor is visible or not.

Returns:
true if the button bar is used, false otherwise

isUsingDefaultRendering

public boolean isUsingDefaultRendering()

isUsingForwardButton

public boolean isUsingForwardButton()
Returns true if the forwardButton in the editor is used or not.

Returns:
true if the forwardButton is used, false otherwise

isUsingPlugins

public boolean isUsingPlugins()
Returns whether plug-ins are allowed to use or not.

Returns:
true if plug-ins are used, false otherwise

isUsingStatusBar

public boolean isUsingStatusBar()
Returns whether the status bar is used or not.

Returns:
true if the status bar is used, false otherwise

isValid

public boolean isValid()

isXPathCached

public boolean isXPathCached()

isXUIDOMInstance

public boolean isXUIDOMInstance()

isXUIDOMInstance

public boolean isXUIDOMInstance(Type rootType)

isXUIInitialized

public boolean isXUIInitialized()

keepXUIDOMinMemory

public boolean keepXUIDOMinMemory()

keepXUIDOMinMemory

public void keepXUIDOMinMemory(boolean isXuiDom)

lock

public void lock(java.lang.String[] fieldsToUnlock)
Locks the current DOM and all its visualizers. It is not possible to change any value or list item anymore until one unlocks the DOM.

Parameters:
fieldsToUnlock - list of xpath where the corresponding visualizer will still unlocked

lock

public void lock(java.lang.String[] fieldsToUnlock,
                 boolean lockGlobal,
                 boolean unlockIfNotNull)

lookupFormula

public FormulaExpression lookupFormula(Type source,
                                       java.lang.String expression)

lookupFormula

public FormulaExpression lookupFormula(Type source,
                                       java.lang.String expression,
                                       boolean includeOnlySerializable,
                                       TableCell cell)

maintainLostXUIComponent

public void maintainLostXUIComponent(Type xuiComponent)

maintainNoTargetXPathDefinitions

public void maintainNoTargetXPathDefinitions(java.util.List definitions)

markNotEditableTypes

public void markNotEditableTypes(Type type,
                                 boolean unmark,
                                 boolean handleListItems)

notifyDebug

public void notifyDebug(int type,
                        java.lang.String message)

printTypeTree

public void printTypeTree()
Writes the current DOM tree to the log file.


putApplicationProperty

public void putApplicationProperty(java.lang.String key,
                                   java.lang.Object value)

putClientProperty

public void putClientProperty(java.lang.String key,
                              java.lang.Object value)

putEditingTypeCache

public void putEditingTypeCache(Type edType)

reApplyLostComponents

public void reApplyLostComponents()

refresh

public void refresh(org.w3c.dom.Document dom,
                    Document uiDOM)
             throws DocumentCreationException
Refreshes the given DOM and reinitialize the XUI definitions.

Parameters:
dom - a Document (W3C)
uiDOM - a XUI-Document (JAXFront-Document)
Throws:
DocumentCreationException - if the DOM couldn't be build

refreshUISpecification

public void refreshUISpecification(Document uiDOM)
                            throws DocumentCreationException
Refreshes the current DOM with new XUI definitions.

Parameters:
uiDOM - XUIDOM to initialize
Throws:
DocumentCreationException - if the DOM couldn't be build

reinitializeNLS

public void reinitializeNLS()

reinitializeUISpecification

public void reinitializeUISpecification()

reinitializeUISpecification

public void reinitializeUISpecification(Type type)

reinitVars

public void reinitVars()

release

public void release()
Releases allocated resources for this DOM including type tree, XUI DOM, properties, visualizer cache, processing-instructions and type controller.


releaseController

public void releaseController()
Releases the current type controller.


releaseForSchemaCache

public void releaseForSchemaCache()

releaseProperties

public void releaseProperties()
Releases the current properties.


removeActionPerformListener

public void removeActionPerformListener(ActionPerformListener newListener)
Removes a ActionPerformListener.

Parameters:
newListener - an existing ActionPerformListener

removeAllFormulas

public void removeAllFormulas()

removeApplicationProperty

public java.lang.Object removeApplicationProperty(java.lang.String key)

removeClientProperty

public void removeClientProperty(java.lang.String key)

removeDirtyChangeListener

public void removeDirtyChangeListener(DirtyChangeListener listener)
Remove a listener for receiving dirty changes.

Parameters:
listener - a listener

removeDOMChangeListener

public void removeDOMChangeListener(DOMChangeListener newListener)
Removes a DOMChangeListener.

Parameters:
newListener - DOMChangeListener

removeFormula

public FormulaExpression removeFormula(FormulaExpression formula)

removeFormulaExpressions

public void removeFormulaExpressions(Type forType)

removeVarToTypeMapping

public Type removeVarToTypeMapping(java.lang.String varName)

removeXUIDefinition

public XUIDefinition removeXUIDefinition(Type type)

saveAs

public void saveAs(java.io.File file)
            throws ValidationException,
                   java.io.IOException
Saves the current document into a file.

Parameters:
file - File, into which the current document will be saved
Throws:
ValidationException - if the file couldn't be saved
java.io.IOException

saveAsZip

public void saveAsZip(java.io.File file)
               throws ValidationException,
                      java.io.IOException
Throws:
ValidationException
java.io.IOException

serialize

public java.lang.StringBuffer serialize()
                                 throws ValidationException
Serializes the current document into a StringBuffer and returns it.

Returns:
a StringBuffer that contains the serialized DOM
Throws:
ValidationException - if the file couldn't be saved

serialize

public java.lang.StringBuffer serialize(boolean makeIndents)
                                 throws ValidationException
Throws:
ValidationException

serialize

public java.lang.StringBuffer serialize(boolean makeIndents,
                                        boolean serializeHeader)
                                 throws ValidationException
Serializes the current document into a StringBuffer and returns it.

Parameters:
makeIndents - indicates if indents & carriage returns should be written
serializeHeader - true, if the xml header should be written
Returns:
a StringBuffer that contains the serialized DOM
Throws:
ValidationException - if the file couldn't be saved

serializeInternal

public java.lang.StringBuffer serializeInternal(boolean makeIndents,
                                                boolean serializeHeader)
Start the serialization of this DOM to the passing Stringbuffer.

Parameters:
sb - Stringbuffer to serialize DOM into
makeIndents - indicates if indents & carriage returns should be written
serializeHeader - true, if the xml header should be written

serializeToByteArray

public byte[] serializeToByteArray()
                            throws ValidationException,
                                   java.io.UnsupportedEncodingException
Throws:
ValidationException
java.io.UnsupportedEncodingException

serializeToByteArray

public byte[] serializeToByteArray(java.lang.String encoding)
                            throws ValidationException,
                                   java.io.UnsupportedEncodingException
Throws:
ValidationException
java.io.UnsupportedEncodingException

serializeToW3CDocument

public org.w3c.dom.Document serializeToW3CDocument()
                                            throws org.apache.xerces.xni.parser.XMLParseException,
                                                   org.xml.sax.SAXException,
                                                   java.io.IOException,
                                                   ValidationException
Serialize the current JAXFront document and creates a new W3C document instance.

Returns:
a new W3C Document
Throws:
org.apache.xerces.xni.parser.XMLParseException
org.xml.sax.SAXException
java.io.IOException
ValidationException

setAppContext

public void setAppContext(java.lang.String appContext)

setCreatedTime

public void setCreatedTime(long created)

setCustomClassloader

public void setCustomClassloader(java.lang.ClassLoader aClassLoader)

setDebugListener

public void setDebugListener(DebugListener listener)

setDefaultNamespace

public void setDefaultNamespace(java.lang.String defaultXMLNamespace)

setEncoding

public void setEncoding(java.lang.String encoding)

setFingerPrint

public void setFingerPrint(FingerPrint fingerPrint)
Sets the fingerprint for this DOM.

Parameters:
fingerPrint -

setGlobalCodeSet

public void setGlobalCodeSet(org.w3c.dom.Document codesetDoc)
Initialize the global Codest for this DOM document. If a CodeSet url in the xui definition is null then the global CodeSet will be used. The search path for the CodeSet is first globalCodesetUrl itself, second location of the xsd file.


setHelpUrlResolver

public void setHelpUrlResolver(HelpURLResolver helpUrlResolver)

setHistoryMode

public void setHistoryMode(java.lang.String logLevel,
                           boolean enabled,
                           boolean logChanges,
                           java.util.Vector fingerprintActions)

setImmutable

public void setImmutable(boolean immutable)

setInitUIListener

public void setInitUIListener(InitUIListener listener)

setIsBinding

public void setIsBinding(boolean isBinding)

setLanguage

public void setLanguage(java.lang.String language)
Sets the language for this and all future DOM's so the defined language within a XUI definition will not be considered again.

Parameters:
language - language for all DOM's to use

setNLS

public void setNLS(NLS nls)
Sets the NLS properties to use.

Parameters:
nls - NLS properties

setPasteMode

public void setPasteMode(boolean pasting)

setPID

public void setPID(java.lang.String pid)

setProcessingInstructions

public void setProcessingInstructions(java.util.List pi)

setReleaseBlocked

public void setReleaseBlocked(java.lang.String blockOwner,
                              boolean blocked)

setRenderRequestVisualizerFactory

public void setRenderRequestVisualizerFactory(TypeVisualizerFactory factory)

setRights

public void setRights(java.lang.String[][] aRights)
Parameters:
aRights -

setRuleEngineBlocked

public void setRuleEngineBlocked(boolean blockRuleEngine)

setRunningAsXUIEditor

public void setRunningAsXUIEditor(boolean isEditorMode)

setSchemaLocation

public void setSchemaLocation(java.lang.String schemaLocation)

setSerializationModifier

public void setSerializationModifier(SerializationModifier serializationModifier)

setStatus

public void setStatus(int status)

setUndoManager

public void setUndoManager(JAXFrontUndoManager undoManager)

setXMLNamespaceMappings

public void setXMLNamespaceMappings(java.util.Hashtable mapping)

setXPathCached

public void setXPathCached(boolean cache)

setXUIDocument

public void setXUIDocument(Document xuiDocument)

setXUINamespaceMappings

public void setXUINamespaceMappings(java.util.Hashtable mapping)

systemExitOnClose

public boolean systemExitOnClose()
Returns whether the system will exit when the window is closed or not.

Returns:
true if the system will exit when the window is closed, false otherwise

unlock

public void unlock()

useOptionalCheckBox

public boolean useOptionalCheckBox()
Returns whether optional check boxes are used or not.

Returns:
true if optional check boxes are used, false otherwise

validate

public void validate()
Validates the current DOM according its XML Schema & the defined XUI rules.


validate

public void validate(boolean isRunningOnServer)
Validates the current DOM according its XML Schema & the defined XUI rules.


validateKeyRefIntegrity

public void validateKeyRefIntegrity(boolean notifyErrorController)

validateMandatoryAndCardinality

public void validateMandatoryAndCardinality(Type type,
                                            java.util.List errors,
                                            boolean checkValue)
Checks if all mandatory leaf types derived from the passed type are not empty. Also ensures that the cardinality of the list types are not violated.

Parameters:
type - type to check

validatePageErrors

public java.util.Vector validatePageErrors(Type type,
                                           int pageIndex)

validatePageErrors

public java.util.Vector validatePageErrors(Type type,
                                           int pageIndex,
                                           boolean validate)

validateSchemaConstraints

public void validateSchemaConstraints()
Validates the current DOM according its mandatory fields. This validate only checks XML Schema cardinalitiy constraints. ValidationErrors will be thrown for any empty mandatory leaf type.


validateTemporary

public java.util.Hashtable validateTemporary()

validateXUIRules

public void validateXUIRules(boolean isRunningOnServer)
Validates the current DOM according its defined save XUI rules.