Interface IDependentQuerySchemaProvider


  • public interface IDependentQuerySchemaProvider
    The service allows to load dependent QuerySchema model from source text feature of some object and can hold model mapped to parent object and feature. This prevents to load dependent model multiple times for each purpose of callers.

    As examples, StringLiteral in module contains feature "lines" with text of Query schema which can be parsed by Xtext in separate resource. Also, DCS contains DataSet with query text, as well some other object contains expression text feature that loads into Expression Language object.



    WARNING!
    • This dependent model should be use as read-only model, otherwise the link to parent will be removed and dependent resource will be unloaded.
    • If source text feature or source object has changed the link to dependent model will be removed and dependent resource will be unloaded.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.eclipse.emf.ecore.EObject getParent​(QuerySchema dependent)
      Gets the parent object of the QuerySchema model object.
      org.eclipse.emf.ecore.EStructuralFeature getParentFeature​(QuerySchema dependent)
      Gets the parent containing text feature of the QuerySchema model object.
      QuerySchema getQuerySchema​(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, BiFunction<org.eclipse.emf.ecore.EObject,​org.eclipse.emf.ecore.EStructuralFeature,​String> textProvider, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
      Gets the QuerySchema model by the source object and it's text feature provided.
      QuerySchema getQuerySchema​(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
      Gets the QuerySchema model by the source object and it's text feature.
      void unload​(QuerySchema root)
      Explicitly unload QuerySchema model object from resource and remove linkage to the parent object.
    • Method Detail

      • getQuerySchema

        QuerySchema getQuerySchema​(org.eclipse.emf.ecore.EObject source,
                                   org.eclipse.emf.ecore.EStructuralFeature textFeature,
                                   org.eclipse.xtext.util.CancelIndicator cancelIndicator)
        Gets the QuerySchema model by the source object and it's text feature.
        Parameters:
        source - the source object, cannot be null.
        textFeature - the text feature of the source object, cannot be null.
        cancelIndicator - the cancel indicator, cannot be null.
        Returns:
        the dependent QuerySchema model, may return null if cannot load .
      • getQuerySchema

        QuerySchema getQuerySchema​(org.eclipse.emf.ecore.EObject source,
                                   org.eclipse.emf.ecore.EStructuralFeature textFeature,
                                   BiFunction<org.eclipse.emf.ecore.EObject,​org.eclipse.emf.ecore.EStructuralFeature,​String> textProvider,
                                   org.eclipse.xtext.util.CancelIndicator cancelIndicator)
        Gets the QuerySchema model by the source object and it's text feature provided.
        Parameters:
        source - the source object, cannot be null.
        textFeature - the text feature of the source object, cannot be null.
        textProvider - the text provider of the dependent model, cannot be null.
        cancelIndicator - the cancel indicator, cannot be null.
        Returns:
        the dependent QuerySchema model, may be null.
      • getParent

        org.eclipse.emf.ecore.EObject getParent​(QuerySchema dependent)
        Gets the parent object of the QuerySchema model object.
        Parameters:
        dependent - the dependent QuerySchema model object, cannot be null.
        Returns:
        the parent object of dependent model, may return null if the model is not linked to it's parent.
      • getParentFeature

        org.eclipse.emf.ecore.EStructuralFeature getParentFeature​(QuerySchema dependent)
        Gets the parent containing text feature of the QuerySchema model object.
        Parameters:
        dependent - the dependent model object, cannot be null.
        Returns:
        the parent text feature, may return null if the model is not linked to it's parent.
      • unload

        void unload​(QuerySchema root)
        Explicitly unload QuerySchema model object from resource and remove linkage to the parent object.
        Parameters:
        root - the root of dependent QuerySchema model, cannot be null.