com.japisoft.xmlpad.helper
Class SchemaHelperManager

java.lang.Object
  extended bycom.japisoft.xmlpad.helper.SchemaHelperManager
All Implemented Interfaces:
ErrorListener

public class SchemaHelperManager
extends java.lang.Object
implements ErrorListener

This classe is a method factory for finding helper for the current XMLPad context usage. This is for tags, attributes or entities.

Version:
1.2
Author:
(c) 2003 JAPISOFT

Field Summary
static java.lang.String ENTITY_TYPE
           
static java.lang.String SCHEMA_ATTRIBUTE_VALUES
           
static java.lang.String SCHEMA_ATTRIBUTES
           
static java.lang.String SCHEMA_ELEMENTS
           
static java.lang.String SCHEMA_ENTITIES
           
 
Constructor Summary
SchemaHelperManager(ErrorManager manager, HelperManager hm)
           
 
Method Summary
 void dispose()
           
 void initErrorProcessing()
          This is called once before checking the whole document
 void notifyError(java.lang.Object context, boolean localError, java.lang.String sourceLocation, int line, int col, int offset, java.lang.String message, boolean onTheFly)
          Notify an XML error found while parsing
 void notifyNoError(boolean onTheFly)
          Notify the document is correct
 void setDefaultNamespace(java.lang.String namespace)
          Reset a default namespace for the content assistant
 void setDTDContent(java.lang.String rootElement, SchemaLocator locator)
          Reset the local DTD
 void setDTDContent(java.lang.String rootElement, java.lang.String dtdContent, int dtdDeclarationLine)
          Add support for completion using the DTD content
 void setDTDLocation(java.lang.String currentDocument, java.lang.String location, java.lang.String rootElement, int dtdDeclarationLine)
          Reset the current DTD location
 void setExternalDTDCommentFile(java.lang.String comment)
          Special case for specifying an external DTD file comment.
 void setForcePrefix(java.lang.String prefix)
           
 void setRelaxNGLocation(SchemaLocator locator)
          Reset the current RelaxNGLocation
 void setSchemaLocation(java.lang.String currentDocument, java.lang.String[] namespaces, java.lang.String[] locations, java.lang.String rootElement, int documentLineForLocation)
          Reset the current Schema location
 void stopErrorProcessing()
          This is called once after checking the whole document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA_ENTITIES

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

SCHEMA_ATTRIBUTES

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

SCHEMA_ATTRIBUTE_VALUES

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

SCHEMA_ELEMENTS

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

ENTITY_TYPE

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

SchemaHelperManager

public SchemaHelperManager(ErrorManager manager,
                           HelperManager hm)
Method Detail

initErrorProcessing

public void initErrorProcessing()
Description copied from interface: ErrorListener
This is called once before checking the whole document

Specified by:
initErrorProcessing in interface ErrorListener

notifyError

public void notifyError(java.lang.Object context,
                        boolean localError,
                        java.lang.String sourceLocation,
                        int line,
                        int col,
                        int offset,
                        java.lang.String message,
                        boolean onTheFly)
Description copied from interface: ErrorListener
Notify an XML error found while parsing

Specified by:
notifyError in interface ErrorListener
Parameters:
context - the error context, it can be null and may be ignored
localError - a flag for knowing if the error is inside the current document (sometimes this is inside a DTD or a W3C Schema)
sourceLocation - The document location
line - The error line
col - The error column
offset - The error offset
message - The error message
onTheFly - Flag for informing if this is while the user inserts or no

notifyNoError

public void notifyNoError(boolean onTheFly)
Description copied from interface: ErrorListener
Notify the document is correct

Specified by:
notifyNoError in interface ErrorListener
Parameters:
onTheFly - for informing if this is while inserting characters

stopErrorProcessing

public void stopErrorProcessing()
Description copied from interface: ErrorListener
This is called once after checking the whole document

Specified by:
stopErrorProcessing in interface ErrorListener

dispose

public void dispose()

setRelaxNGLocation

public void setRelaxNGLocation(SchemaLocator locator)
Reset the current RelaxNGLocation


setSchemaLocation

public void setSchemaLocation(java.lang.String currentDocument,
                              java.lang.String[] namespaces,
                              java.lang.String[] locations,
                              java.lang.String rootElement,
                              int documentLineForLocation)
Reset the current Schema location


setDTDContent

public void setDTDContent(java.lang.String rootElement,
                          java.lang.String dtdContent,
                          int dtdDeclarationLine)
Add support for completion using the DTD content


setDTDContent

public void setDTDContent(java.lang.String rootElement,
                          SchemaLocator locator)
Reset the local DTD


setDTDLocation

public void setDTDLocation(java.lang.String currentDocument,
                           java.lang.String location,
                           java.lang.String rootElement,
                           int dtdDeclarationLine)
Reset the current DTD location


setForcePrefix

public void setForcePrefix(java.lang.String prefix)

setDefaultNamespace

public void setDefaultNamespace(java.lang.String namespace)
Reset a default namespace for the content assistant


setExternalDTDCommentFile

public void setExternalDTDCommentFile(java.lang.String comment)
Special case for specifying an external DTD file comment. Shouldn't be used



Copyright © 2006 JAPISoft. All Rights Reserved.