Package com._1c.g5.v8.dt.qw.ui.utils
Class QuerySchemaBuilder
- java.lang.Object
-
- com._1c.g5.v8.dt.qw.ui.utils.QuerySchemaBuilder
-
public class QuerySchemaBuilder extends Object
QL parser for query wizard. Required for build query schema and resource from text query
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QuerySchemaBuilder.QuerySchemaBuilderException
Exception for query schema builder.
-
Constructor Summary
Constructors Constructor Description QuerySchemaBuilder(org.eclipse.core.resources.IProject project, boolean isDcsMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QuerySchema
buildQuerySchema(String query)
Build query schema from text queryQuerySchema
buildQuerySchema(String query, boolean validateQuerySchema, org.eclipse.core.resources.IProject project)
Build query schema from text querystatic String
checkCharacteristic(CharacteristicCompositionDataQuerySchema characteristic)
Check characteristicList<AvailableTable>
getAvailableTables()
String
getFormatedQueryText(QuerySchema querySchema)
Get formated query text for query schema.String
getQueryText(QuerySchema querySchema)
Get text for query schema without validationString
getQueryText(QueryWizardSource qwSource)
String
getQueryText(QueryWizardSource qwSource, boolean validateQuerySchema)
Get text for query schema with validationorg.eclipse.emf.ecore.resource.Resource
parse(String text)
Gets result of parsingtext
-
-
-
Method Detail
-
checkCharacteristic
public static String checkCharacteristic(CharacteristicCompositionDataQuerySchema characteristic)
Check characteristic- Parameters:
characteristic
- - dcs characteristic- Returns:
- null if no errors, or text with error description
-
buildQuerySchema
public QuerySchema buildQuerySchema(String query)
Build query schema from text query- Parameters:
query
- query text- Returns:
- new query schema
-
buildQuerySchema
public QuerySchema buildQuerySchema(String query, boolean validateQuerySchema, org.eclipse.core.resources.IProject project) throws QuerySchemaBuilder.QuerySchemaBuilderException
Build query schema from text query- Parameters:
query
- query textvalidateQuerySchema
- true if need validate query schemaproject
- - project, if need validation- Returns:
- new query schema
- Throws:
QuerySchemaBuilder.QuerySchemaBuilderException
- if can't parse query text
-
getAvailableTables
public List<AvailableTable> getAvailableTables()
- Returns:
- available tables
-
getQueryText
public String getQueryText(QueryWizardSource qwSource)
- Parameters:
querySchema
-- Returns:
- query text from query schema
-
getQueryText
public String getQueryText(QuerySchema querySchema)
Get text for query schema without validation- Parameters:
querySchema
- query schema- Returns:
- query text from query schema
-
getFormatedQueryText
public String getFormatedQueryText(QuerySchema querySchema)
Get formated query text for query schema. Under query schema must be valid node model.- Returns:
- formated query text
-
getQueryText
public String getQueryText(QueryWizardSource qwSource, boolean validateQuerySchema)
Get text for query schema with validation- Parameters:
qwSource
- query wizard sourcevalidateQuerySchema
- if need make query schema correct (for example supplemented group field)- Returns:
- query text from query schema
-
parse
public org.eclipse.emf.ecore.resource.Resource parse(String text)
Gets result of parsingtext
- Parameters:
text
- parsing text, cannot benull
- Returns:
Resource
with the result of the parsing
-
-