Class CortexRemoteCatalog

  • All Implemented Interfaces:
    com.c12e.cortex.phoenix.Catalog

    public class CortexRemoteCatalog
    extends java.lang.Object
    implements com.c12e.cortex.phoenix.Catalog
    Catalog interface adapter to a graphql phoenix client
    See Also:
    GeneratedPhoenixClient
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.c12e.cortex.phoenix.Catalog

        com.c12e.cortex.phoenix.Catalog.DefaultImpls
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull com.c12e.cortex.phoenix.Connection createConnection​(@NotNull com.c12e.cortex.phoenix.Connection conn)  
      @NotNull com.c12e.cortex.phoenix.DataSource createDataSource​(@NotNull com.c12e.cortex.phoenix.DataSource source)  
      @NotNull com.c12e.cortex.phoenix.ProfileSchema createProfileSchema​(@NotNull com.c12e.cortex.phoenix.ProfileSchema schema)  
      boolean deleteConnection​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      boolean deleteDataSink​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      boolean deleteDataSource​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      boolean deleteFavoriteQuery​(@NotNull java.lang.String id)  
      boolean deleteProfileLinks​(@NotNull com.c12e.cortex.phoenix.ProfileLinkFilter profileLinkFilter)  
      boolean deleteProfileSchema​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      boolean deleteProject​(@NotNull java.lang.String name)  
      protected java.lang.Float doubleToFloat​(java.lang.Double d)  
      @NotNull com.c12e.cortex.phoenix.Connection getConnection​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      @NotNull com.c12e.cortex.phoenix.DataSink getDataSink​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      @NotNull com.c12e.cortex.phoenix.DataSource getDataSource​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      @NotNull com.c12e.cortex.phoenix.DataStreamStatus getDataStreamStatus​(@NotNull java.lang.String project, @NotNull com.c12e.cortex.phoenix.spec.ResourceType resourceType, @NotNull java.lang.String resourceName)  
      @NotNull com.c12e.cortex.phoenix.FavoriteQuery getFavoriteQuery​(@NotNull java.lang.String id)  
      @Nullable java.lang.Iterable<com.c12e.cortex.phoenix.Feature> getFeatureSetBySourceName​(@NotNull java.lang.String project, @NotNull java.lang.String sourceName)  
      protected <T> T getOrDefault​(java.util.function.Supplier<T> function, T defaultValue)  
      @NotNull com.c12e.cortex.phoenix.ProfileLink getProfileLink​(@NotNull com.c12e.cortex.phoenix.ProfileLink profileLink)  
      @NotNull com.c12e.cortex.phoenix.ProfileSchema getProfileSchema​(@NotNull java.lang.String project, @NotNull java.lang.String name)  
      @NotNull com.c12e.cortex.phoenix.Project getProject​(@NotNull java.lang.String name)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.Connection> listConnections​(@NotNull java.lang.String project)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.DataSink> listDataSinks​(@NotNull java.lang.String project)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.DataSource> listDataSources​(@NotNull java.lang.String project)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.FavoriteQuery> listFavoriteQueries​(@NotNull com.c12e.cortex.phoenix.FavoriteQuery favoriteQuery)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.ProfileLink> listProfileLinks​(@NotNull java.lang.String project, @Nullable com.c12e.cortex.phoenix.ProfileLinkFilter profileLinkFilter)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.ProfileSchema> listProfileSchemas​(@NotNull java.lang.String project)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.Project> listProjects​(@Nullable java.lang.String filter, @Nullable java.lang.String limit, @Nullable java.lang.String skip, @Nullable java.lang.String sort)  
      protected com.c12e.cortex.phoenix.Feature localFeatureFromRemote​(com.c12e.cortex.generated.types.Feature fromRemote)  
      protected java.lang.Iterable<com.c12e.cortex.phoenix.Feature> localFeaturesFromRemote​(java.lang.Iterable<com.c12e.cortex.generated.types.Feature> fromRemote)  
      protected com.c12e.cortex.generated.types.AttributeTagInput mapAttributeTag​(com.c12e.cortex.phoenix.spec.AttributeTag tag)  
      protected com.c12e.cortex.generated.types.DataSourceSelectionInput mapDataSourceSelection​(com.c12e.cortex.phoenix.spec.DataSourceSelection dsSelection)  
      protected com.c12e.cortex.generated.types.JoinSourceSelectionInput mapJoins​(com.c12e.cortex.phoenix.spec.JoinSourceSelection join)  
      protected java.util.List<com.c12e.cortex.phoenix.spec.AttributeSpec> mapProfileSchemaAttributes​(com.c12e.cortex.generated.types.ProfileSchema fromRemote)  
      protected com.c12e.cortex.phoenix.spec.AttributeTag mapProfileSchemaAttributeTags​(com.c12e.cortex.generated.types.AttributeTag fromRemote)  
      protected com.c12e.cortex.phoenix.spec.DataSourceSelection mapProfileSchemaDataSourceSelection​(com.c12e.cortex.generated.types.DataSourceSelection fromRemote)  
      protected com.c12e.cortex.phoenix.spec.JoinSourceSelection mapProfileSchemaJoinSourceSelection​(com.c12e.cortex.generated.types.JoinSourceSelection fromRemote)  
      protected com.c12e.cortex.phoenix.spec.ProfileNames mapProfileSchemaNames​(com.c12e.cortex.generated.types.ProfileNames fromRemote)  
      protected com.c12e.cortex.phoenix.spec.TimestampSpec mapProfileSchemaTimestampSpec​(com.c12e.cortex.generated.types.TimestampSpec fromRemote)  
      @NotNull com.c12e.cortex.phoenix.DataSink saveDataSink​(@NotNull com.c12e.cortex.phoenix.DataSink sink)  
      @NotNull com.c12e.cortex.phoenix.DataStreamStatus saveDataStreamStatus​(@NotNull com.c12e.cortex.phoenix.DataStreamStatus dataStreamStatus)  
      @NotNull com.c12e.cortex.phoenix.FavoriteQuery saveFavoriteQuery​(@NotNull com.c12e.cortex.phoenix.FavoriteQuery favoriteQuery)  
      @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.Feature> saveFeatureSet​(@NotNull java.lang.String project, @NotNull java.lang.String sourceName, @NotNull java.util.List<com.c12e.cortex.phoenix.Feature> features)  
      @NotNull com.c12e.cortex.phoenix.ProfileLink saveProfileLink​(@NotNull com.c12e.cortex.phoenix.ProfileLink profileLink)  
      @NotNull com.c12e.cortex.phoenix.Project saveProject​(@NotNull com.c12e.cortex.phoenix.Project project)  
      @NotNull com.c12e.cortex.phoenix.Connection updateConnection​(@NotNull com.c12e.cortex.phoenix.Connection conn)  
      @NotNull com.c12e.cortex.phoenix.DataSource updateDataSource​(@NotNull com.c12e.cortex.phoenix.DataSource source)  
      @NotNull com.c12e.cortex.phoenix.ProfileSchema updateProfileSchema​(@NotNull com.c12e.cortex.phoenix.ProfileSchema schema)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        protected org.slf4j.Logger logger
    • Constructor Detail

    • Method Detail

      • doubleToFloat

        protected java.lang.Float doubleToFloat​(java.lang.Double d)
      • getOrDefault

        protected <T> T getOrDefault​(java.util.function.Supplier<T> function,
                                     T defaultValue)
      • localFeaturesFromRemote

        protected java.lang.Iterable<com.c12e.cortex.phoenix.Feature> localFeaturesFromRemote​(java.lang.Iterable<com.c12e.cortex.generated.types.Feature> fromRemote)
      • localFeatureFromRemote

        protected com.c12e.cortex.phoenix.Feature localFeatureFromRemote​(com.c12e.cortex.generated.types.Feature fromRemote)
      • listProjects

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.Project> listProjects​(@Nullable
                                                                                         @Nullable java.lang.String filter,
                                                                                         @Nullable
                                                                                         @Nullable java.lang.String limit,
                                                                                         @Nullable
                                                                                         @Nullable java.lang.String skip,
                                                                                         @Nullable
                                                                                         @Nullable java.lang.String sort)
        Specified by:
        listProjects in interface com.c12e.cortex.phoenix.Catalog
      • getProject

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.Project getProject​(@NotNull
                                                                   @NotNull java.lang.String name)
        Specified by:
        getProject in interface com.c12e.cortex.phoenix.Catalog
      • saveProject

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.Project saveProject​(@NotNull
                                                                    @NotNull com.c12e.cortex.phoenix.Project project)
        Specified by:
        saveProject in interface com.c12e.cortex.phoenix.Catalog
      • deleteProject

        public boolean deleteProject​(@NotNull
                                     @NotNull java.lang.String name)
        Specified by:
        deleteProject in interface com.c12e.cortex.phoenix.Catalog
      • listDataSources

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.DataSource> listDataSources​(@NotNull
                                                                                               @NotNull java.lang.String project)
        Specified by:
        listDataSources in interface com.c12e.cortex.phoenix.Catalog
      • getDataSource

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataSource getDataSource​(@NotNull
                                                                         @NotNull java.lang.String project,
                                                                         @NotNull
                                                                         @NotNull java.lang.String name)
        Specified by:
        getDataSource in interface com.c12e.cortex.phoenix.Catalog
      • createDataSource

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataSource createDataSource​(@NotNull
                                                                            @NotNull com.c12e.cortex.phoenix.DataSource source)
        Specified by:
        createDataSource in interface com.c12e.cortex.phoenix.Catalog
      • updateDataSource

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataSource updateDataSource​(@NotNull
                                                                            @NotNull com.c12e.cortex.phoenix.DataSource source)
        Specified by:
        updateDataSource in interface com.c12e.cortex.phoenix.Catalog
      • deleteDataSource

        public boolean deleteDataSource​(@NotNull
                                        @NotNull java.lang.String project,
                                        @NotNull
                                        @NotNull java.lang.String name)
        Specified by:
        deleteDataSource in interface com.c12e.cortex.phoenix.Catalog
      • listFavoriteQueries

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.FavoriteQuery> listFavoriteQueries​(@NotNull
                                                                                                      @NotNull com.c12e.cortex.phoenix.FavoriteQuery favoriteQuery)
        Specified by:
        listFavoriteQueries in interface com.c12e.cortex.phoenix.Catalog
      • getFavoriteQuery

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.FavoriteQuery getFavoriteQuery​(@NotNull
                                                                               @NotNull java.lang.String id)
        Specified by:
        getFavoriteQuery in interface com.c12e.cortex.phoenix.Catalog
      • saveFavoriteQuery

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.FavoriteQuery saveFavoriteQuery​(@NotNull
                                                                                @NotNull com.c12e.cortex.phoenix.FavoriteQuery favoriteQuery)
        Specified by:
        saveFavoriteQuery in interface com.c12e.cortex.phoenix.Catalog
      • listProfileLinks

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.ProfileLink> listProfileLinks​(@NotNull
                                                                                                 @NotNull java.lang.String project,
                                                                                                 @Nullable
                                                                                                 @Nullable com.c12e.cortex.phoenix.ProfileLinkFilter profileLinkFilter)
        Specified by:
        listProfileLinks in interface com.c12e.cortex.phoenix.Catalog
      • getProfileLink

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.ProfileLink getProfileLink​(@NotNull
                                                                           @NotNull com.c12e.cortex.phoenix.ProfileLink profileLink)
        Specified by:
        getProfileLink in interface com.c12e.cortex.phoenix.Catalog
      • saveProfileLink

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.ProfileLink saveProfileLink​(@NotNull
                                                                            @NotNull com.c12e.cortex.phoenix.ProfileLink profileLink)
        Specified by:
        saveProfileLink in interface com.c12e.cortex.phoenix.Catalog
      • deleteProfileLinks

        public boolean deleteProfileLinks​(@NotNull
                                          @NotNull com.c12e.cortex.phoenix.ProfileLinkFilter profileLinkFilter)
        Specified by:
        deleteProfileLinks in interface com.c12e.cortex.phoenix.Catalog
      • getDataStreamStatus

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataStreamStatus getDataStreamStatus​(@NotNull
                                                                                     @NotNull java.lang.String project,
                                                                                     @NotNull
                                                                                     @NotNull com.c12e.cortex.phoenix.spec.ResourceType resourceType,
                                                                                     @NotNull
                                                                                     @NotNull java.lang.String resourceName)
        Specified by:
        getDataStreamStatus in interface com.c12e.cortex.phoenix.Catalog
      • saveDataStreamStatus

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataStreamStatus saveDataStreamStatus​(@NotNull
                                                                                      @NotNull com.c12e.cortex.phoenix.DataStreamStatus dataStreamStatus)
        Specified by:
        saveDataStreamStatus in interface com.c12e.cortex.phoenix.Catalog
      • getFeatureSetBySourceName

        @Nullable
        public @Nullable java.lang.Iterable<com.c12e.cortex.phoenix.Feature> getFeatureSetBySourceName​(@NotNull
                                                                                                       @NotNull java.lang.String project,
                                                                                                       @NotNull
                                                                                                       @NotNull java.lang.String sourceName)
        Specified by:
        getFeatureSetBySourceName in interface com.c12e.cortex.phoenix.Catalog
      • saveFeatureSet

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.Feature> saveFeatureSet​(@NotNull
                                                                                           @NotNull java.lang.String project,
                                                                                           @NotNull
                                                                                           @NotNull java.lang.String sourceName,
                                                                                           @NotNull
                                                                                           @NotNull java.util.List<com.c12e.cortex.phoenix.Feature> features)
        Specified by:
        saveFeatureSet in interface com.c12e.cortex.phoenix.Catalog
      • deleteFavoriteQuery

        public boolean deleteFavoriteQuery​(@NotNull
                                           @NotNull java.lang.String id)
        Specified by:
        deleteFavoriteQuery in interface com.c12e.cortex.phoenix.Catalog
      • listDataSinks

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.DataSink> listDataSinks​(@NotNull
                                                                                           @NotNull java.lang.String project)
        Specified by:
        listDataSinks in interface com.c12e.cortex.phoenix.Catalog
      • getDataSink

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataSink getDataSink​(@NotNull
                                                                     @NotNull java.lang.String project,
                                                                     @NotNull
                                                                     @NotNull java.lang.String name)
        Specified by:
        getDataSink in interface com.c12e.cortex.phoenix.Catalog
      • saveDataSink

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.DataSink saveDataSink​(@NotNull
                                                                      @NotNull com.c12e.cortex.phoenix.DataSink sink)
        Specified by:
        saveDataSink in interface com.c12e.cortex.phoenix.Catalog
      • deleteDataSink

        public boolean deleteDataSink​(@NotNull
                                      @NotNull java.lang.String project,
                                      @NotNull
                                      @NotNull java.lang.String name)
        Specified by:
        deleteDataSink in interface com.c12e.cortex.phoenix.Catalog
      • listProfileSchemas

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.ProfileSchema> listProfileSchemas​(@NotNull
                                                                                                     @NotNull java.lang.String project)
        Specified by:
        listProfileSchemas in interface com.c12e.cortex.phoenix.Catalog
      • getProfileSchema

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.ProfileSchema getProfileSchema​(@NotNull
                                                                               @NotNull java.lang.String project,
                                                                               @NotNull
                                                                               @NotNull java.lang.String name)
        Specified by:
        getProfileSchema in interface com.c12e.cortex.phoenix.Catalog
      • mapProfileSchemaAttributes

        protected java.util.List<com.c12e.cortex.phoenix.spec.AttributeSpec> mapProfileSchemaAttributes​(com.c12e.cortex.generated.types.ProfileSchema fromRemote)
      • mapProfileSchemaAttributeTags

        protected com.c12e.cortex.phoenix.spec.AttributeTag mapProfileSchemaAttributeTags​(com.c12e.cortex.generated.types.AttributeTag fromRemote)
      • mapProfileSchemaJoinSourceSelection

        protected com.c12e.cortex.phoenix.spec.JoinSourceSelection mapProfileSchemaJoinSourceSelection​(com.c12e.cortex.generated.types.JoinSourceSelection fromRemote)
      • mapProfileSchemaTimestampSpec

        protected com.c12e.cortex.phoenix.spec.TimestampSpec mapProfileSchemaTimestampSpec​(com.c12e.cortex.generated.types.TimestampSpec fromRemote)
      • mapProfileSchemaDataSourceSelection

        protected com.c12e.cortex.phoenix.spec.DataSourceSelection mapProfileSchemaDataSourceSelection​(com.c12e.cortex.generated.types.DataSourceSelection fromRemote)
      • mapProfileSchemaNames

        protected com.c12e.cortex.phoenix.spec.ProfileNames mapProfileSchemaNames​(com.c12e.cortex.generated.types.ProfileNames fromRemote)
      • mapAttributeTag

        protected com.c12e.cortex.generated.types.AttributeTagInput mapAttributeTag​(com.c12e.cortex.phoenix.spec.AttributeTag tag)
      • mapDataSourceSelection

        protected com.c12e.cortex.generated.types.DataSourceSelectionInput mapDataSourceSelection​(com.c12e.cortex.phoenix.spec.DataSourceSelection dsSelection)
      • mapJoins

        protected com.c12e.cortex.generated.types.JoinSourceSelectionInput mapJoins​(com.c12e.cortex.phoenix.spec.JoinSourceSelection join)
      • createProfileSchema

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.ProfileSchema createProfileSchema​(@NotNull
                                                                                  @NotNull com.c12e.cortex.phoenix.ProfileSchema schema)
        Specified by:
        createProfileSchema in interface com.c12e.cortex.phoenix.Catalog
      • updateProfileSchema

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.ProfileSchema updateProfileSchema​(@NotNull
                                                                                  @NotNull com.c12e.cortex.phoenix.ProfileSchema schema)
        Specified by:
        updateProfileSchema in interface com.c12e.cortex.phoenix.Catalog
      • deleteProfileSchema

        public boolean deleteProfileSchema​(@NotNull
                                           @NotNull java.lang.String project,
                                           @NotNull
                                           @NotNull java.lang.String name)
        Specified by:
        deleteProfileSchema in interface com.c12e.cortex.phoenix.Catalog
      • getConnection

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.Connection getConnection​(@NotNull
                                                                         @NotNull java.lang.String project,
                                                                         @NotNull
                                                                         @NotNull java.lang.String name)
        Specified by:
        getConnection in interface com.c12e.cortex.phoenix.Catalog
      • listConnections

        @NotNull
        public @NotNull java.lang.Iterable<com.c12e.cortex.phoenix.Connection> listConnections​(@NotNull
                                                                                               @NotNull java.lang.String project)
        Specified by:
        listConnections in interface com.c12e.cortex.phoenix.Catalog
      • createConnection

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.Connection createConnection​(@NotNull
                                                                            @NotNull com.c12e.cortex.phoenix.Connection conn)
        Specified by:
        createConnection in interface com.c12e.cortex.phoenix.Catalog
      • updateConnection

        @NotNull
        public @NotNull com.c12e.cortex.phoenix.Connection updateConnection​(@NotNull
                                                                            @NotNull com.c12e.cortex.phoenix.Connection conn)
        Specified by:
        updateConnection in interface com.c12e.cortex.phoenix.Catalog
      • deleteConnection

        public boolean deleteConnection​(@NotNull
                                        @NotNull java.lang.String project,
                                        @NotNull
                                        @NotNull java.lang.String name)
        Specified by:
        deleteConnection in interface com.c12e.cortex.phoenix.Catalog