Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.dita
Class DITAExternalObjectInsertionHandler

java.lang.Object
  extended by ro.sync.ecss.extensions.api.AuthorExternalObjectInsertionHandler
      extended by ro.sync.ecss.extensions.dita.DITAExternalObjectInsertionHandler
All Implemented Interfaces:
Extension, ExternalObjectInsertionSources

@API(type=INTERNAL,
     src=PUBLIC)
public class DITAExternalObjectInsertionHandler
extends AuthorExternalObjectInsertionHandler

Dropped URLs handler


Field Summary
static java.lang.String ONLY_TEXT_CONTENT_TASK_STYLESHEET
          An XSLT stylesheet for extracting the entire text content (and only the text content) from any input XML, except the text from elements: xhtml:span[contains(@style, 'mso-list:Ignore')]
 
Fields inherited from class ro.sync.ecss.extensions.api.AuthorExternalObjectInsertionHandler
ONLY_TEXT_CONTENT_STYLESHEET
 
Fields inherited from interface ro.sync.ecss.extensions.api.ExternalObjectInsertionSources
DND_DB_TREE, DND_DITA_MAPS_MANAGER, DND_EXTERNAL, DND_IMAGE_PREVIEW, DND_PROJECT_TREE, PASTE
 
Constructor Summary
DITAExternalObjectInsertionHandler()
           
 
Method Summary
protected  boolean checkImportedXHTMLContentIsPreservedEntirely()
          Overwrite this method if you want to check the text data is preserved on paste after applying the conversion XSL stylesheet.
protected  java.lang.String getImporterStylesheetFileName(AuthorAccess authorAccess)
          Get the file name of the main Author paste stylesheet.
protected  java.lang.String getOnlyTextContentStylesheet(AuthorAccess authorAccess)
          Gets an XSLT stylesheet that can extract the entire text content (and only the text content) from any input XML.
 void insertURLs(AuthorAccess authorAccess, java.util.List<java.net.URL> urls, int source)
          A list of URLs need to be inserted at the caret position, probably as links.
 
Methods inherited from class ro.sync.ecss.extensions.api.AuthorExternalObjectInsertionHandler
acceptSource, acceptURLs, containOnlyImages, createImporterStylesheetSource, createListsPreprocessingStylesheet, createSectionsPreprocessingStylesheet, getBaseURLAtCaretPosition, getContextPathNamesAndUris, getDescription, getListsPreprocessingStylesheetFileName, getSectionsPreprocessingStylesheetFileName, insertXHTMLFragment, simpleTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONLY_TEXT_CONTENT_TASK_STYLESHEET

public static final java.lang.String ONLY_TEXT_CONTENT_TASK_STYLESHEET
An XSLT stylesheet for extracting the entire text content (and only the text content) from any input XML, except the text from elements: xhtml:span[contains(@style, 'mso-list:Ignore')]

Since:
14.2

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.

See Also:
Constant Field Values
Constructor Detail

DITAExternalObjectInsertionHandler

public DITAExternalObjectInsertionHandler()
Method Detail

insertURLs

public void insertURLs(AuthorAccess authorAccess,
                       java.util.List<java.net.URL> urls,
                       int source)
                throws AuthorOperationException
Description copied from class: AuthorExternalObjectInsertionHandler
A list of URLs need to be inserted at the caret position, probably as links.
The source of the insertion can be a paste event or a drag and drop event.
This call back is received if AuthorExternalObjectInsertionHandler.acceptURLs(AuthorAccess, List, int) returned true for the same source and urls list.
You can use it to link to those specific files/URLs.

Overrides:
insertURLs in class AuthorExternalObjectInsertionHandler
Parameters:
authorAccess - The author access
urls - The list of URLs.
source - The source of the URLs, one of the AuthorExternalObjectInsertionHandler constants.
Throws:
AuthorOperationException
See Also:
AuthorExternalObjectInsertionHandler.insertURLs(ro.sync.ecss.extensions.api.AuthorAccess, java.util.List, int)

getImporterStylesheetFileName

protected java.lang.String getImporterStylesheetFileName(AuthorAccess authorAccess)
Description copied from class: AuthorExternalObjectInsertionHandler
Get the file name of the main Author paste stylesheet. It will be resolved in the context of the current class loader.

Overrides:
getImporterStylesheetFileName in class AuthorExternalObjectInsertionHandler
Parameters:
authorAccess - The author access API.
Returns:
the file name of the main Author paste stylesheet. It will be resolved in the context of the current class loader.
See Also:
AuthorExternalObjectInsertionHandler.getImporterStylesheetFileName(ro.sync.ecss.extensions.api.AuthorAccess)

checkImportedXHTMLContentIsPreservedEntirely

protected boolean checkImportedXHTMLContentIsPreservedEntirely()
Description copied from class: AuthorExternalObjectInsertionHandler
Overwrite this method if you want to check the text data is preserved on paste after applying the conversion XSL stylesheet. If the data is not preserved the content will be copied without any styling and a warning will appear in the console.

Overrides:
checkImportedXHTMLContentIsPreservedEntirely in class AuthorExternalObjectInsertionHandler
Returns:
false by default.
See Also:
AuthorExternalObjectInsertionHandler.checkImportedXHTMLContentIsPreservedEntirely()

getOnlyTextContentStylesheet

protected java.lang.String getOnlyTextContentStylesheet(AuthorAccess authorAccess)
Gets an XSLT stylesheet that can extract the entire text content (and only the text content) from any input XML.

Overrides:
getOnlyTextContentStylesheet in class AuthorExternalObjectInsertionHandler
Parameters:
authorAccess - The author access
Returns:
The XSLT stylesheet that keeps only the text content of input.

Oxygen XML Editor 14.2 Author API

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