Package ro.sync.contentcompletion.xml
Class StyleGuideSchemaManagerFilterBase
java.lang.Object
ro.sync.contentcompletion.xml.SchemaManagerFilterBase
ro.sync.contentcompletion.xml.StyleGuideSchemaManagerFilterBase
- All Implemented Interfaces:
SchemaManagerFilter,Extension
@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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ro.sync.i18n.MessageBundleThe messages resource bundle. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.StyleGuideSchemaManagerFilterBase(String locationOfMappingFile) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfilterAttributes(List<CIAttribute> attributes, WhatAttributesCanGoHereContext context) Filters the attributes proposed by the editor content completion schema manager.filterElements(List<CIElement> elements, WhatElementsCanGoHereContext context) Filters the elements proposed by the editor content completion schema manager.getAttributeDescription(CIAttribute attribute, WhatPossibleValuesHasAttributeContext ctxt) Get an element's description in a certain context.getElementDescription(CIElement element, Context ctxt) Get element description, contributes HTML annotation to it..protected StringgetMappingFileLocation(Context context) Get the location for the mapping between elements name and their documentation.voidInvalidates any cached data.protected booleanIftruewill redirect all links through the Oxygen web site.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescriptionMethods inherited from interface ro.sync.contentcompletion.xml.SchemaManagerFilter
filterAttributeValues, filterElementValues
-
Field Details
-
messages
protected static final ro.sync.i18n.MessageBundle messagesThe messages resource bundle.
-
-
Constructor Details
-
StyleGuideSchemaManagerFilterBase
public StyleGuideSchemaManagerFilterBase()Constructor. -
StyleGuideSchemaManagerFilterBase
Constructor.- Parameters:
locationOfMappingFile- Location of the mapping file.
-
-
Method Details
-
filterElements
public List<CIElement> filterElements(List<CIElement> elements, WhatElementsCanGoHereContext context) Description copied from interface:SchemaManagerFilterFilters 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 ifpersonis the currentCIElement, and the list of children contains the elementsnameandaddress, the result of choosing the person entry from the content completion window will be the insertion of the following sequence:
Given this example, the original<person> <name>...</name> <address>...</address> </person>nameCIElement can be replaced by a new one which returns a list with two new CIElements,firstNameandlastName, on theCIElement.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- TheWhatElementsCanGoHereContextwhere the list of elements is requested. Ifnullthen the given list of content completion elements contains global elements.- Returns:
- The filtered list of
CIElementornullif all elements are rejected by the filter. - See Also:
-
getMappingFileLocation
Get the location for the mapping between elements name and their documentation.- Parameters:
context- The current elements context.- Returns:
- The styles guide mapping location.
-
filterAttributes
public List<CIAttribute> filterAttributes(List<CIAttribute> attributes, WhatAttributesCanGoHereContext context) Description copied from interface:SchemaManagerFilterFilters 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 NULLcontext- TheWhatAttributesCanGoHereContextwhere the list of attributes is requested.- Returns:
- The filtered list of
CIAttributeornullif all attributes are rejected by the filter. - See Also:
-
getElementDescription
Get element description, contributes HTML annotation to it..- Overrides:
getElementDescriptionin classSchemaManagerFilterBase- Parameters:
element- The CIElementctxt- The context.- Returns:
- The modified CIElement with HTML annotation.
-
getAttributeDescription
public CIAttribute getAttributeDescription(CIAttribute attribute, WhatPossibleValuesHasAttributeContext ctxt) Description copied from class:SchemaManagerFilterBaseGet an element's description in a certain context.- Overrides:
getAttributeDescriptionin classSchemaManagerFilterBase- Parameters:
attribute- The attribute description which has been computed in the context by the default schema manager implementation.ctxt- The context.- Returns:
- The attribute description which could be changed by this implementation or the same description.
- See Also:
-
invalidate
public void invalidate()Description copied from class:SchemaManagerFilterBaseInvalidates any cached data.- Overrides:
invalidatein classSchemaManagerFilterBase- See Also:
-
shouldRedirectThroughOxygenWebSite
protected boolean shouldRedirectThroughOxygenWebSite()Iftruewill redirect all links through the Oxygen web site.- Returns:
trueif the filter will redirect all links through the Oxygen web site.
-