Package ro.sync.ecss.extensions.docbook
Class DocbookSchemaManagerFilter
java.lang.Object
ro.sync.contentcompletion.xml.SchemaManagerFilterBase
ro.sync.ecss.extensions.docbook.DocbookSchemaManagerFilter
- All Implemented Interfaces:
SchemaManagerFilter,Extension
@API(type=INTERNAL,
src=PUBLIC)
public class DocbookSchemaManagerFilter
extends SchemaManagerFilterBase
Schema manager filter which provides the available condition values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterAttributes(List<CIAttribute> attributes, WhatAttributesCanGoHereContext context) Filters the attributes proposed by the editor content completion schema manager.filterAttributeValues(List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context) Filters the attribute values 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.filterElementValues(List<CIValue> elementValues, Context context) Filters the element values proposed by the editor content completion schema manager.Methods inherited from class ro.sync.contentcompletion.xml.SchemaManagerFilterBase
getAttributeDescription, getElementDescription, invalidate
-
Constructor Details
-
DocbookSchemaManagerFilter
Constructor.- Parameters:
documentTypeName- The document type name
-
-
Method Details
-
filterAttributeValues
public List<CIValue> filterAttributeValues(List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context) Description copied from interface:SchemaManagerFilterFilters the attribute values proposed by the editor content completion schema manager. The original list of attribute values is obtained by examining the current document schema and determining what values are permitted for the current attribute. If the attribute type was an enumeration, then a list with the tokens of the enumeration will be returned for that attribute.- Parameters:
attributeValues- The list of attribute values (CIValue) to be filtered.context- TheWhatPossibleValuesHasAttributeContextwhere the list of attribute values is requested.- Returns:
- The filtered list of
CIValuerepresenting possible values of the attribute ornullif all values are rejected by the filter. - See Also:
-
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:
-
filterElementValues
Description copied from interface:SchemaManagerFilterFilters the element values proposed by the editor content completion schema manager. The original list of element values is obtained by examining the current document schema and determining what values are permitted for the current element. If the element type was an enumeration, then a list with the values of the enumeration will be returned for that element. -
getDescription
- Returns:
- The description of the extension.
- See Also:
-
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:
-