Package com._1c.g5.v8.dt.xdto.resource
Class XdtoAdditionalIndexInformationHelper
java.lang.Object
com._1c.g5.v8.dt.xdto.resource.XdtoAdditionalIndexInformationHelper
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:
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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.xtext.naming.IQualifiedNameConverterprotected org.eclipse.xtext.naming.IQualifiedNameProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFill additional information forObjectTypeindex element.createAdditionalPackageIndexInformation(Package xdtoPackage) Create additional index information forPackageFill additional information forPropertyindex element.Fill additional information forValueTypeindex element.createQNameFormString(String value) CreatesQNamefrom string presentationvoidfillBaseTypeAdditionalIndexInformation(Type type, Map<String, String> userData) Fill additional information forTypeindex element.getBaseType(org.eclipse.xtext.resource.IEObjectDescription item) GetsQNameof base type for index elementgetItemType(org.eclipse.xtext.resource.IEObjectDescription item) Gets item type from index elementgetMemberTypes(org.eclipse.xtext.resource.IEObjectDescription item) Gets merger types from index elementgetPackageDependencies(org.eclipse.xtext.resource.IEObjectDescription item) GetsPackagedependencies uri by its index elementgetPropertyForm(org.eclipse.xtext.resource.IEObjectDescription valueType) GetsFormof index elementgetVariety(org.eclipse.xtext.resource.IEObjectDescription valueType) GetsVarietyof index elementbooleanhasItemType(org.eclipse.xtext.resource.IEObjectDescription item) Checks that index element has information about item typebooleanhasMemeberTypes(org.eclipse.xtext.resource.IEObjectDescription item) Checks that index element has information about merger types
-
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
Create additional index information forPackage- Parameters:
xdtoPackage- actualPackage, can't benull- Returns:
- additional index information, never
null
-
getPackageDependencies
public Collection<String> getPackageDependencies(org.eclipse.xtext.resource.IEObjectDescription item) GetsPackagedependencies uri by its index element -
getBaseType
GetsQNameof base type for index element- Parameters:
item- index element, can't benull- Returns:
QNameof base type for index element ornullif element doesn't have base type
-
fillBaseTypeAdditionalIndexInformation
Fill additional information forTypeindex element. Additional information contains data about base type. Key of information isXdtoIndexUtil.BASE_TYPE. Format: <name of base type>,<ns uri of the type>- Parameters:
type- indexingType, can't benulluserData- creating additional indexing data, can't benull
-
createAdditionalObjectPackageIndexInformation
Fill additional information forObjectTypeindex element. Additional information contains data about base type (see {@link #fillBaseTypeAdditionalIndexInformation(Type, Map)).- Parameters:
type- indexingObjectType, can't benull- Returns:
- creating additional indexing data, never
null
-
createAdditionalValuePackageIndexInformation
Fill additional information forValueTypeindex 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: <name of item type>,<ns uri of item type>
Format for merger types:
Key of information isXdtoIndexUtil.MEMBER_TYPES. Format: <name of merger type>,<ns uri of merger type>XdtoIndexUtil.IMPORT_DELIMITER, - Parameters:
type- indexingValueType, can't benull- 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 benull- Returns:
trueif index element has information about item type,falseotherwise
-
getItemType
Gets item type from index element- Parameters:
item- index element, can't benull- Returns:
QNameof item type ornullif 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 benull- Returns:
trueif index element has information about merger types,falseotherwise
-
getMemberTypes
Gets merger types from index element- Parameters:
item- index element, can't benull- Returns:
- list of
QNameof merger types
-
getVariety
GetsVarietyof index element- Parameters:
item- index element, can't benull- Returns:
- actual
Varietyfor index element. If element doesn't have this informationnullwill be returned
-
createQNameFormString
CreatesQNamefrom string presentation -
createAdditionalPropertyPackageIndexInformation
Fill additional information forPropertyindex element. Additional information contains data aboutForm. Key of information isXdtoIndexUtil.PROPERTY_FORMAT. Format: <name of format>- Parameters:
type- indexingProperty, can't benulluserData- creating additional indexing data, can't benull
-
getPropertyForm
GetsFormof index element- Parameters:
item- index element, can't benull- Returns:
- actual
Formfor index element. If element doesn't have this informationnullwill be returned
-