Oxygen XML Editor 15.0 Author API

ro.sync.contentcompletion.xml
Class StyleGuideSchemaManagerFilterBase

java.lang.Object
  extended by ro.sync.contentcompletion.xml.SchemaManagerFilterBase
      extended by ro.sync.contentcompletion.xml.StyleGuideSchemaManagerFilterBase
All Implemented Interfaces:
SchemaManagerFilter, ro.sync.ecss.extensions.api.Extension
Direct Known Subclasses:
DITASchemaManagerFilter, DocbookSchemaManagerFilter

@API(type=EXTENDABLE,
     src=PUBLIC)
public abstract class StyleGuideSchemaManagerFilterBase
extends SchemaManagerFilterBase

Style guide schema manager filter base. The default implementation adds annotations to elements and attributes by looking into a mapping file URI which is passed through the XML Catalog system...

Since:
15

*********************************
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.


Field Summary
protected static ro.sync.exml.MessageBundle messages
          The messages resource bundle.
 
Constructor Summary
StyleGuideSchemaManagerFilterBase(java.lang.String locationOfMappingFile)
          Constructor.
 
Method Summary
 java.util.List<ro.sync.contentcompletion.xml.CIAttribute> filterAttributes(java.util.List<ro.sync.contentcompletion.xml.CIAttribute> attributes, ro.sync.contentcompletion.xml.WhatAttributesCanGoHereContext context)
          Filters the attributes proposed by the editor content completion schema manager.
 java.util.List<ro.sync.contentcompletion.xml.CIElement> filterElements(java.util.List<ro.sync.contentcompletion.xml.CIElement> elements, ro.sync.contentcompletion.xml.WhatElementsCanGoHereContext context)
          Filters the elements proposed by the editor content completion schema manager.
 ro.sync.contentcompletion.xml.CIElement getElementDescription(ro.sync.contentcompletion.xml.CIElement element, ro.sync.contentcompletion.xml.Context ctxt)
          Get element description, contributes HTML annotation to it..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ro.sync.contentcompletion.xml.SchemaManagerFilter
filterAttributeValues, filterElementValues
 
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
 

Field Detail

messages

protected static final ro.sync.exml.MessageBundle messages
The messages resource bundle.

Constructor Detail

StyleGuideSchemaManagerFilterBase

public StyleGuideSchemaManagerFilterBase(java.lang.String locationOfMappingFile)
Constructor.

Parameters:
locationOfMappingFile - Location of the mapping file.
Method Detail

filterElements

public java.util.List<ro.sync.contentcompletion.xml.CIElement> filterElements(java.util.List<ro.sync.contentcompletion.xml.CIElement> elements,
                                                                              ro.sync.contentcompletion.xml.WhatElementsCanGoHereContext context)
Description copied from interface: SchemaManagerFilter
Filters the elements proposed by the editor content completion schema manager. The original list of elements is obtained by examining the current document schema and determining what possible elements can be inserted in the current context. For example if person is the current CIElement, and the list of children contains the elements name and address, the result of choosing the person entry from the content completion window will be the insertion of the following sequence:
 <person>
     <name>...</name>
     <address>...</address>
 </person>
 
Given this example, the original name CIElement can be replaced by a new one which returns a list with two new CIElements, firstName and lastName, on the CIElement.getGuessElements() method call. The new generated sequence would be:
 <person>
     <name>
         <firstName>...</firstName>
         <lastName>...</lastName>
     </name>
     <address>...</address>
 </person>
 

Parameters:
elements - The list of elements (CIElement) to be filtered.
context - The WhatElementsCanGoHereContext where the list of elements is requested. If null then the given list of content completion elements contains global elements.
Returns:
The filtered list of CIElement or null if all elements are rejected by the filter.
See Also:
SchemaManagerFilter.filterElements(java.util.List, ro.sync.contentcompletion.xml.WhatElementsCanGoHereContext)

filterAttributes

public java.util.List<ro.sync.contentcompletion.xml.CIAttribute> filterAttributes(java.util.List<ro.sync.contentcompletion.xml.CIAttribute> attributes,
                                                                                  ro.sync.contentcompletion.xml.WhatAttributesCanGoHereContext context)
Description copied from interface: SchemaManagerFilter
Filters the attributes proposed by the editor content completion schema manager. The original list of attributes is obtained by examining the current document schema and determining what attributes can be inserted in the current element and taking into account the list of existing attributes.

Parameters:
attributes - The list of attributes (CIAttribute) to be filtered. Can be NULL
context - The WhatAttributesCanGoHereContext where the list of attributes is requested.
Returns:
The filtered list of CIAttribute or null if all attributes are rejected by the filter.
See Also:
SchemaManagerFilter.filterAttributes(java.util.List, ro.sync.contentcompletion.xml.WhatAttributesCanGoHereContext)

getElementDescription

public ro.sync.contentcompletion.xml.CIElement getElementDescription(ro.sync.contentcompletion.xml.CIElement element,
                                                                     ro.sync.contentcompletion.xml.Context ctxt)
Get element description, contributes HTML annotation to it..

Overrides:
getElementDescription in class SchemaManagerFilterBase
Parameters:
element - The CIElement
ctxt - The context.
Returns:
The modified CIElement with HTML annotation.

Oxygen XML Editor 15.0 Author API

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