Class XdtoAdditionalIndexInformationHelper

java.lang.Object
com._1c.g5.v8.dt.xdto.resource.XdtoAdditionalIndexInformationHelper

public class XdtoAdditionalIndexInformationHelper extends Object
Special service for working with additional index data for XDTO packages indexing elements.
Clients can add their special information to the index or change current index information by overriding methods of this class.
This class provides special constants for getting index information. Example:
   public void foo(IEObjectDescription description)
   {
      ...
      //gets information by contants: FOO_CONTANT
      String infromation = description.getUserData(FOO_CONTANT);
      //processing information
      ...
   }
 
  • Field Details

    • qualifiedNameProvider

      @Inject protected org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider
    • qualifiedNameConverter

      @Inject protected org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter
  • Constructor Details

    • XdtoAdditionalIndexInformationHelper

      public XdtoAdditionalIndexInformationHelper()
  • Method Details

    • createAdditionalPackageIndexInformation

      public Map<String,String> createAdditionalPackageIndexInformation(Package xdtoPackage)
      Create additional index information for Package
      Parameters:
      xdtoPackage - actual Package, can't be null
      Returns:
      additional index information, never null
    • getPackageDependencies

      public Collection<String> getPackageDependencies(org.eclipse.xtext.resource.IEObjectDescription item)
      Gets Package dependencies uri by its index element
      Parameters:
      item - index element, can't be null
      Returns:
      collections of the dependencies' uri. Can be empty if Package doesn't have dependencies or item isn't Package index element. Can't be null
    • getBaseType

      public QName getBaseType(org.eclipse.xtext.resource.IEObjectDescription item)
      Gets QName of base type for index element
      Parameters:
      item - index element, can't be null
      Returns:
      QName of base type for index element or null if element doesn't have base type
    • fillBaseTypeAdditionalIndexInformation

      public void fillBaseTypeAdditionalIndexInformation(Type type, Map<String,String> userData)
      Fill additional information for Type index element. Additional information contains data about base type. Key of information is XdtoIndexUtil.BASE_TYPE. Format: &ltname of base type&gt,&ltns uri of the type&gt
      Parameters:
      type - indexing Type, can't be null
      userData - creating additional indexing data, can't be null
    • createAdditionalObjectPackageIndexInformation

      public Map<String,String> createAdditionalObjectPackageIndexInformation(ObjectType valueType)
      Fill additional information for ObjectType index element. Additional information contains data about base type (see {@link #fillBaseTypeAdditionalIndexInformation(Type, Map)).
      Parameters:
      type - indexing ObjectType, can't be null
      Returns:
      creating additional indexing data, never null
    • createAdditionalValuePackageIndexInformation

      public Map<String,String> createAdditionalValuePackageIndexInformation(ValueType valueType)
      Fill additional information for ValueType index element. Additional information contains data about base type (see {@link #fillBaseTypeAdditionalIndexInformation(Type, Map)), information about item list type and information about merger types. <br> Format for list item type:<br> Key of information is {@link XdtoIndexUtil#ITEM_TYPE}. Format: &ltname of item type&gt,&ltns uri of item type&gt
      Format for merger types:
      Key of information is XdtoIndexUtil.MEMBER_TYPES. Format: &ltname of merger type&gt,&ltns uri of merger type&gtXdtoIndexUtil.IMPORT_DELIMITER,
      Parameters:
      type - indexing ValueType, can't be null
      Returns:
      creating additional indexing data, never null
    • hasItemType

      public boolean hasItemType(org.eclipse.xtext.resource.IEObjectDescription item)
      Checks that index element has information about item type
      Parameters:
      item - index element, can't be null
      Returns:
      true if index element has information about item type, false otherwise
    • getItemType

      public QName getItemType(org.eclipse.xtext.resource.IEObjectDescription item)
      Gets item type from index element
      Parameters:
      item - index element, can't be null
      Returns:
      QName of item type or null if index element doesn't have it
    • hasMemeberTypes

      public boolean hasMemeberTypes(org.eclipse.xtext.resource.IEObjectDescription item)
      Checks that index element has information about merger types
      Parameters:
      item - index element, can't be null
      Returns:
      true if index element has information about merger types, false otherwise
    • getMemberTypes

      public List<QName> getMemberTypes(org.eclipse.xtext.resource.IEObjectDescription item)
      Gets merger types from index element
      Parameters:
      item - index element, can't be null
      Returns:
      list of QName of merger types
    • getVariety

      public Variety getVariety(org.eclipse.xtext.resource.IEObjectDescription valueType)
      Gets Variety of index element
      Parameters:
      item - index element, can't be null
      Returns:
      actual Variety for index element. If element doesn't have this information null will be returned
    • createQNameFormString

      public QName createQNameFormString(String value)
      Creates QName from string presentation
      Parameters:
      value - string presentation of QName, can't be null
      Returns:
      creating QName never null
    • createAdditionalPropertyPackageIndexInformation

      public Map<String,String> createAdditionalPropertyPackageIndexInformation(Property property)
      Fill additional information for Property index element. Additional information contains data about Form. Key of information is XdtoIndexUtil.PROPERTY_FORMAT. Format: &ltname of format&gt
      Parameters:
      type - indexing Property, can't be null
      userData - creating additional indexing data, can't be null
    • getPropertyForm

      public Form getPropertyForm(org.eclipse.xtext.resource.IEObjectDescription valueType)
      Gets Form of index element
      Parameters:
      item - index element, can't be null
      Returns:
      actual Form for index element. If element doesn't have this information null will be returned