Class ViewImpl<NativeQueryType>
java.lang.Object
fr.inria.rules.integraal.model.data.readable.query.AbstractAtomicPattern
fr.inria.rules.integraal.views.view.ViewImpl<NativeQueryType>
- Type Parameters:
NativeQueryType- the native query representation used by the view
- All Implemented Interfaces:
AtomicPattern, View<NativeQueryType>
public class ViewImpl<NativeQueryType>
extends AbstractAtomicPattern
implements View<NativeQueryType>
Default implementation of a view-backed atomic pattern.
-
Constructor Summary
ConstructorsConstructorDescriptionViewImpl(Predicate predicate, Map<Integer, Class<? extends Term>> termConstraints, ViewParameters<NativeQueryType> viewParameters) Constructs an AtomicPattern with specific constraints. -
Method Summary
Modifier and TypeMethodDescriptioncreateQueries(Map<Integer, Term> positionsAssignation) Creates basic queries compatible with this atom.Returns the sets of positions that can be indexed together.Returns the parameters used to query the underlying native view.Methods inherited from class AbstractAtomicPattern
getMandatoryPositions, getPredicate, getTermConstraint, hasAssignedMandatoryParameters, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AtomicPattern
getMandatoryPositions, getPredicate, getTermConstraint, hasAssignedMandatoryParameters
-
Constructor Details
-
ViewImpl
public ViewImpl(Predicate predicate, Map<Integer, Class<? extends Term>> termConstraints, ViewParameters<NativeQueryType> viewParameters) Constructs an AtomicPattern with specific constraints.- Parameters:
predicate- The predicate associated with this pattern.termConstraints- A map associating positions (0-based index) with allowed term types.viewParameters- the native-query parameters associated with the view
-
-
Method Details
-
getIndexablePatterns
Description copied from interface:AtomicPatternReturns the sets of positions that can be indexed together.- Specified by:
getIndexablePatternsin interfaceAtomicPattern- Returns:
- An unmodifiable set of indexable position patterns.
-
createQueries
Description copied from interface:AtomicPatternCreates basic queries compatible with this atom.The result can be empty if it is not possible to build a Basic Query
- Specified by:
createQueriesin interfaceAtomicPattern- Parameters:
positionsAssignation- the assignation of the positions- Returns:
- A stream containing the BasicQueries compatible with this termSequence.
-
getViewParameters
Description copied from interface:ViewReturns the parameters used to query the underlying native view.- Specified by:
getViewParametersin interfaceView<NativeQueryType>- Returns:
- the view parameters
-