Oxygen XML Editor 15.0 Author API

ro.sync.ecss.extensions.docbook
Class DocbookSchemaAwareEditingHandler

java.lang.Object
  extended by ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter
      extended by ro.sync.ecss.extensions.docbook.DocbookSchemaAwareEditingHandler
All Implemented Interfaces:
ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler
Direct Known Subclasses:
Docbook5SchemaAwareEditingHandler

@API(type=INTERNAL,
     src=PUBLIC)
public class DocbookSchemaAwareEditingHandler
extends AuthorSchemaAwareEditingHandlerAdapter

Specific editing support for Docbook documents. Handles typing and paste events inside itemizedlist, orderlist (a listitem with a para will be created and the typing/paste content be put inside it) and tables.


Field Summary
protected  java.lang.String documentNamespace
          For Docbook 5 http://docbook.org/ns/docbook, for Docbook 4 an empty string.
protected static java.lang.String INFO_SUFIX
          Docbook info element name suffix.
protected static java.lang.String PARA
          Docbook HTML para element name.
protected static java.lang.String TITLE
          Docbook HTML title element name.
 
Fields inherited from class ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter
lastHandlerResult
 
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler
ACTION_ID_BACKSPACE, ACTION_ID_CUT, ACTION_ID_DELETE, ACTION_ID_DND, ACTION_ID_INSERT_FRAGMENT, ACTION_ID_PASTE, ACTION_ID_TYPING, CREATE_FRAGMENT_PURPOSE_COPY, CREATE_FRAGMENT_PURPOSE_CUT, CREATE_FRAGMENT_PURPOSE_DND_COPY, CREATE_FRAGMENT_PURPOSE_DND_MOVE
 
Constructor Summary
DocbookSchemaAwareEditingHandler(java.lang.String documentNamespace)
          Constructor.
 
Method Summary
protected  java.lang.String getInfoElementChildOfSect(java.lang.String sectElementName)
          Get the info child element name of to the given sect element name.
 boolean handlePasteFragment(int offset, AuthorDocumentFragment[] fragmentsToInsert, int actionId, AuthorAccess authorAccess)
           
 boolean handleTyping(int offset, char ch, AuthorAccess authorAccess)
           
 boolean handleTypingFallback(int offset, char ch, AuthorAccess authorAccess)
           
protected  boolean isElementWithNameAndNamespace(AuthorNode node, java.lang.String elementLocalName)
           
protected  void pushContextElement(ro.sync.contentcompletion.xml.WhatElementsCanGoHereContext context, java.lang.String elementName)
          Derive the given context by adding the given element.
 
Methods inherited from class ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter
getLastResult, handleCreateDocumentFragment, handleDelete, handleDeleteElementTags, handleDeleteNodes, handleDeleteSelection, handleJoinElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentNamespace

protected final java.lang.String documentNamespace
For Docbook 5 http://docbook.org/ns/docbook, for Docbook 4 an empty string.


PARA

protected static final java.lang.String PARA
Docbook HTML para element name.

See Also:
Constant Field Values

TITLE

protected static final java.lang.String TITLE
Docbook HTML title element name.

See Also:
Constant Field Values

INFO_SUFIX

protected static final java.lang.String INFO_SUFIX
Docbook info element name suffix.

See Also:
Constant Field Values
Constructor Detail

DocbookSchemaAwareEditingHandler

public DocbookSchemaAwareEditingHandler(java.lang.String documentNamespace)
Constructor.

Parameters:
documentNamespace - The document namespace, for different versions of Docbook.
Method Detail

handleTyping

public boolean handleTyping(int offset,
                            char ch,
                            AuthorAccess authorAccess)
                     throws InvalidEditException
Specified by:
handleTyping in interface ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler
Overrides:
handleTyping in class AuthorSchemaAwareEditingHandlerAdapter
Throws:
InvalidEditException
See Also:
AuthorSchemaAwareEditingHandlerAdapter.handleTyping(int, char, ro.sync.ecss.extensions.api.AuthorAccess)

handleTypingFallback

public boolean handleTypingFallback(int offset,
                                    char ch,
                                    AuthorAccess authorAccess)
                             throws InvalidEditException
Specified by:
handleTypingFallback in interface ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler
Overrides:
handleTypingFallback in class AuthorSchemaAwareEditingHandlerAdapter
Throws:
InvalidEditException
See Also:
AuthorSchemaAwareEditingHandlerAdapter.handleTypingFallback(int, char, ro.sync.ecss.extensions.api.AuthorAccess)

handlePasteFragment

public boolean handlePasteFragment(int offset,
                                   AuthorDocumentFragment[] fragmentsToInsert,
                                   int actionId,
                                   AuthorAccess authorAccess)
                            throws InvalidEditException
Specified by:
handlePasteFragment in interface ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandler
Overrides:
handlePasteFragment in class AuthorSchemaAwareEditingHandlerAdapter
Throws:
InvalidEditException
See Also:
AuthorSchemaAwareEditingHandlerAdapter.handlePasteFragment(int, ro.sync.ecss.extensions.api.node.AuthorDocumentFragment[], int, ro.sync.ecss.extensions.api.AuthorAccess)

getInfoElementChildOfSect

protected java.lang.String getInfoElementChildOfSect(java.lang.String sectElementName)
Get the info child element name of to the given sect element name.

Parameters:
sectElementName - The sect element name.
Returns:
The info child element name.

pushContextElement

protected void pushContextElement(ro.sync.contentcompletion.xml.WhatElementsCanGoHereContext context,
                                  java.lang.String elementName)
Derive the given context by adding the given element.


isElementWithNameAndNamespace

protected boolean isElementWithNameAndNamespace(AuthorNode node,
                                                java.lang.String elementLocalName)
Returns:
true if the given node is an element with the given local name and from the Docbook namespace.

Oxygen XML Editor 15.0 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.