com.japisoft.xmlpad.helper.handler.schema
Class AbstractTagHandler

java.lang.Object
  extended bycom.japisoft.xmlpad.helper.handler.AbstractHelperHandler
      extended bycom.japisoft.xmlpad.helper.handler.schema.AbstractTagHandler
Direct Known Subclasses:
DTDTagHandler, RelaxNGTagHelperHandler, W3cTagHandler

public abstract class AbstractTagHandler
extends AbstractHelperHandler

Common handler for tag handlers


Field Summary
 boolean addedSystemTag
           
protected  int currentDocumentLocation
           
protected  SimpleNode currentDocumentNode
           
protected  java.lang.String lastLocation
           
protected  java.lang.String location
           
protected  java.lang.String[] locationPath
           
protected  java.lang.String namespace
           
 
Fields inherited from class com.japisoft.xmlpad.helper.handler.AbstractHelperHandler
descriptors
 
Constructor Summary
AbstractTagHandler()
           
 
Method Summary
protected  boolean addSystemTag()
           
 TagDescriptor addTag(java.lang.String name, AttDescriptor[] att, boolean empty)
           
 TagDescriptor addTagDescriptor(TagDescriptor tag)
           
protected  void completeContentForElementWithoutPrefix()
          Particular case with DTD and namespace
 void dispose()
           
 void fillList(SimpleNode node, javax.swing.DefaultListModel model)
           
protected  void flush()
          Reset all tags
protected  java.lang.String getActivatorSequence()
           
 AttributeHelper getAttributeHelperForNode(SimpleNode node)
           
protected  java.lang.String getLostCharacter()
           
 java.lang.String getName()
           
 java.lang.String getNamespace()
           
 int getPriority()
          Here a way to change the order of the handler
 java.lang.String getSource()
           
abstract  TagDescriptor getTag(SimpleNode node)
           
 TagDescriptor[] getTags()
           
 java.lang.String getTitle()
           
 boolean hasElements()
           
 boolean haveDescriptors(SimpleNode currentNode, XMLDocument document, boolean insertBefore, int offset, java.lang.String activatorString)
           
protected  void installDescriptors(XMLDocument document, int offset, java.lang.String activatorString)
           
 boolean mustBeJobSynchronized()
          If the assistant must be called a a job for being synchronized with parsing...
protected  void notifyLocation()
          Prepare for tag list for the current location
 void setLocation(SimpleNode locatedNode, int offset)
          Set the current location
 void setNamespace(java.lang.String namespace)
           
 void setSource(java.lang.String source)
          Reset the schema initial source
protected  SimpleNode translateNode(SimpleNode located)
           
 
Methods inherited from class com.japisoft.xmlpad.helper.handler.AbstractHelperHandler
addDescriptor, flushDescriptors, getDefaultIcon, getType, hasDelegateForInsertingResult, insertResult, isEnabled, match, removeDescriptor, resolveContentAssistant, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespace

protected java.lang.String namespace

locationPath

protected java.lang.String[] locationPath

location

protected java.lang.String location

lastLocation

protected java.lang.String lastLocation

currentDocumentNode

protected SimpleNode currentDocumentNode

currentDocumentLocation

protected int currentDocumentLocation

addedSystemTag

public boolean addedSystemTag
Constructor Detail

AbstractTagHandler

public AbstractTagHandler()
Method Detail

getActivatorSequence

protected java.lang.String getActivatorSequence()
Specified by:
getActivatorSequence in class AbstractHelperHandler

dispose

public void dispose()
Overrides:
dispose in class AbstractHelperHandler

getPriority

public int getPriority()
Description copied from class: AbstractHelperHandler
Here a way to change the order of the handler

Overrides:
getPriority in class AbstractHelperHandler

haveDescriptors

public boolean haveDescriptors(SimpleNode currentNode,
                               XMLDocument document,
                               boolean insertBefore,
                               int offset,
                               java.lang.String activatorString)
Specified by:
haveDescriptors in class AbstractHelperHandler

installDescriptors

protected void installDescriptors(XMLDocument document,
                                  int offset,
                                  java.lang.String activatorString)
Overrides:
installDescriptors in class AbstractHelperHandler

getName

public java.lang.String getName()
Overrides:
getName in class AbstractHelperHandler

mustBeJobSynchronized

public boolean mustBeJobSynchronized()
Description copied from class: AbstractHelperHandler
If the assistant must be called a a job for being synchronized with parsing...

Overrides:
mustBeJobSynchronized in class AbstractHelperHandler

setNamespace

public void setNamespace(java.lang.String namespace)

getNamespace

public java.lang.String getNamespace()

addTag

public TagDescriptor addTag(java.lang.String name,
                            AttDescriptor[] att,
                            boolean empty)

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in class AbstractHelperHandler

getTag

public abstract TagDescriptor getTag(SimpleNode node)

translateNode

protected SimpleNode translateNode(SimpleNode located)

setLocation

public void setLocation(SimpleNode locatedNode,
                        int offset)
Set the current location


completeContentForElementWithoutPrefix

protected void completeContentForElementWithoutPrefix()
Particular case with DTD and namespace


notifyLocation

protected void notifyLocation()
Prepare for tag list for the current location


getAttributeHelperForNode

public AttributeHelper getAttributeHelperForNode(SimpleNode node)
Returns:
the attribute helper for this node

addTagDescriptor

public TagDescriptor addTagDescriptor(TagDescriptor tag)

flush

protected void flush()
Reset all tags


hasElements

public boolean hasElements()

getTags

public TagDescriptor[] getTags()

addSystemTag

protected boolean addSystemTag()

fillList

public void fillList(SimpleNode node,
                     javax.swing.DefaultListModel model)

getLostCharacter

protected java.lang.String getLostCharacter()

setSource

public void setSource(java.lang.String source)
Reset the schema initial source


getSource

public java.lang.String getSource()
Returns:
the schema initial source


Copyright © 2006 JAPISoft. All Rights Reserved.