Class BasicSelectQueryParser<T,O extends RAOperations<T>>
- java.lang.Object
-
- it.unibz.inf.ontop.spec.sqlparser.BasicSelectQueryParser<T,O>
-
- Direct Known Subclasses:
DefaultSelectQueryAttributeExtractor,SelectQueryParser
public abstract class BasicSelectQueryParser<T,O extends RAOperations<T>> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ExpressionParserexpressionParserprotected QuotedIDFactoryidfacprotected Ooperationsprotected TermFactorytermFactory
-
Constructor Summary
Constructors Modifier Constructor Description protectedBasicSelectQueryParser(MetadataLookup metadata, CoreSingletons coreSingletons, O operations)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Tcreate(NamedRelationDefinition relation)it.unibz.inf.ontop.com.google.common.collect.ImmutableList<Variable>createAttributeVariables(RelationDefinition relation)protected net.sf.jsqlparser.statement.select.PlainSelectgetPlainSelect(net.sf.jsqlparser.statement.select.SelectBody selectBody)protected Tjoin(T left, net.sf.jsqlparser.statement.select.Join join)can be overridden to add additional checksprotected TtranslateJoins(net.sf.jsqlparser.statement.select.FromItem left, List<net.sf.jsqlparser.statement.select.Join> joins)main method for analysing FROM clausesprotected abstract TtranslateSelect(net.sf.jsqlparser.statement.select.SelectBody selectBody, List<net.sf.jsqlparser.statement.select.WithItem> withItemsList)protected voidvalidateFromItem(net.sf.jsqlparser.schema.Table table)
-
-
-
Field Detail
-
expressionParser
protected final ExpressionParser expressionParser
-
termFactory
protected final TermFactory termFactory
-
idfac
protected final QuotedIDFactory idfac
-
operations
protected final O extends RAOperations<T> operations
-
-
Constructor Detail
-
BasicSelectQueryParser
protected BasicSelectQueryParser(MetadataLookup metadata, CoreSingletons coreSingletons, O operations)
-
-
Method Detail
-
create
protected abstract T create(NamedRelationDefinition relation)
-
translateSelect
protected abstract T translateSelect(net.sf.jsqlparser.statement.select.SelectBody selectBody, List<net.sf.jsqlparser.statement.select.WithItem> withItemsList)
-
getPlainSelect
protected net.sf.jsqlparser.statement.select.PlainSelect getPlainSelect(net.sf.jsqlparser.statement.select.SelectBody selectBody)
- Parameters:
selectBody-- Returns:
- Throws:
UnsupportedSelectQueryRuntimeExceptionInvalidSelectQueryRuntimeException
-
translateJoins
protected T translateJoins(net.sf.jsqlparser.statement.select.FromItem left, List<net.sf.jsqlparser.statement.select.Join> joins) throws IllegalJoinException
main method for analysing FROM clauses- Parameters:
left-joins-- Returns:
- Throws:
IllegalJoinException
-
join
protected T join(T left, net.sf.jsqlparser.statement.select.Join join) throws IllegalJoinException
can be overridden to add additional checks- Parameters:
left- expressionjoin- JSQLParser's Join- Returns:
- resulting expression
- Throws:
IllegalJoinException- if incorrect combination of modifiers is used
-
createAttributeVariables
public it.unibz.inf.ontop.com.google.common.collect.ImmutableList<Variable> createAttributeVariables(RelationDefinition relation)
-
validateFromItem
protected void validateFromItem(net.sf.jsqlparser.schema.Table table)
-
-