Package com._1c.g5.v8.dt.xdto.resource
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 Summary
Fields Modifier and Type Field Description protected org.eclipse.xtext.naming.IQualifiedNameConverter
qualifiedNameConverter
protected org.eclipse.xtext.naming.IQualifiedNameProvider
qualifiedNameProvider
-
Constructor Summary
Constructors Constructor Description XdtoAdditionalIndexInformationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
createAdditionalObjectPackageIndexInformation(ObjectType valueType)
Fill additional information forObjectType
index element.Map<String,String>
createAdditionalPackageIndexInformation(Package xdtoPackage)
Create additional index information forPackage
Map<String,String>
createAdditionalPropertyPackageIndexInformation(Property property)
Fill additional information forProperty
index element.Map<String,String>
createAdditionalValuePackageIndexInformation(ValueType valueType)
Fill additional information forValueType
index element.QName
createQNameFormString(String value)
CreatesQName
from string presentationvoid
fillBaseTypeAdditionalIndexInformation(Type type, Map<String,String> userData)
Fill additional information forType
index element.QName
getBaseType(org.eclipse.xtext.resource.IEObjectDescription item)
GetsQName
of base type for index elementQName
getItemType(org.eclipse.xtext.resource.IEObjectDescription item)
Gets item type from index elementList<QName>
getMemberTypes(org.eclipse.xtext.resource.IEObjectDescription item)
Gets merger types from index elementCollection<String>
getPackageDependencies(org.eclipse.xtext.resource.IEObjectDescription item)
GetsPackage
dependencies uri by its index elementForm
getPropertyForm(org.eclipse.xtext.resource.IEObjectDescription valueType)
GetsForm
of index elementVariety
getVariety(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
-
-
-
Method Detail
-
createAdditionalPackageIndexInformation
public Map<String,String> createAdditionalPackageIndexInformation(Package xdtoPackage)
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
public QName getBaseType(org.eclipse.xtext.resource.IEObjectDescription item)
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
public void fillBaseTypeAdditionalIndexInformation(Type type, Map<String,String> userData)
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
public Map<String,String> createAdditionalObjectPackageIndexInformation(ObjectType valueType)
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
public Map<String,String> createAdditionalValuePackageIndexInformation(ValueType valueType)
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.
Format for list item type:
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
public QName getItemType(org.eclipse.xtext.resource.IEObjectDescription item)
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
public List<QName> getMemberTypes(org.eclipse.xtext.resource.IEObjectDescription item)
Gets merger types from index element- Parameters:
item
- index element, can't benull
- Returns:
- list of
QName
of merger types
-
getVariety
public Variety getVariety(org.eclipse.xtext.resource.IEObjectDescription valueType)
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
public QName createQNameFormString(String value)
CreatesQName
from string presentation
-
createAdditionalPropertyPackageIndexInformation
public Map<String,String> createAdditionalPropertyPackageIndexInformation(Property property)
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
-
-