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.IQualifiedNameConverter
protected org.eclipse.xtext.naming.IQualifiedNameProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFill additional information forObjectType
index element.createAdditionalPackageIndexInformation
(Package xdtoPackage) Create additional index information forPackage
Fill additional information forProperty
index element.Fill additional information forValueType
index element.createQNameFormString
(String value) CreatesQName
from string presentationvoid
fillBaseTypeAdditionalIndexInformation
(Type type, Map<String, String> userData) Fill additional information forType
index element.getBaseType
(org.eclipse.xtext.resource.IEObjectDescription item) GetsQName
of 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) GetsPackage
dependencies uri by its index elementgetPropertyForm
(org.eclipse.xtext.resource.IEObjectDescription valueType) GetsForm
of index elementgetVariety
(org.eclipse.xtext.resource.IEObjectDescription valueType) GetsVariety
of index elementboolean
hasItemType
(org.eclipse.xtext.resource.IEObjectDescription item) Checks that index element has information about item typeboolean
hasMemeberTypes
(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) GetsPackage
dependencies uri by its index element -
getBaseType
GetsQName
of base type for index element- Parameters:
item
- index element, can't benull
- Returns:
QName
of base type for index element ornull
if element doesn't have base type
-
fillBaseTypeAdditionalIndexInformation
Fill additional information forType
index 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 benull
userData
- creating additional indexing data, can't benull
-
createAdditionalObjectPackageIndexInformation
Fill additional information forObjectType
index 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 forValueType
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: <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:
true
if index element has information about item type,false
otherwise
-
getItemType
Gets item type from index element- Parameters:
item
- index element, can't benull
- Returns:
QName
of item type ornull
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 benull
- Returns:
true
if index element has information about merger types,false
otherwise
-
getMemberTypes
Gets merger types from index element- Parameters:
item
- index element, can't benull
- Returns:
- list of
QName
of merger types
-
getVariety
GetsVariety
of index element- Parameters:
item
- index element, can't benull
- Returns:
- actual
Variety
for index element. If element doesn't have this informationnull
will be returned
-
createQNameFormString
CreatesQName
from string presentation -
createAdditionalPropertyPackageIndexInformation
Fill additional information forProperty
index element. Additional information contains data aboutForm
. Key of information isXdtoIndexUtil.PROPERTY_FORMAT
. Format: <name of format>- Parameters:
type
- indexingProperty
, can't benull
userData
- creating additional indexing data, can't benull
-
getPropertyForm
GetsForm
of index element- Parameters:
item
- index element, can't benull
- Returns:
- actual
Form
for index element. If element doesn't have this informationnull
will be returned
-