diff --git a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityMutateProc.java b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityMutateProc.java index 57e7dea9cd..693ce530d6 100644 --- a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityMutateProc.java +++ b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.betweenness; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.centrality.CentralityMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,16 +30,16 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.betweenness.BetweennessCentrality.BETWEENNESS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class BetweennessCentralityMutateProc extends BaseProc { - +public class BetweennessCentralityMutateProc { @Context public GraphDataScience facade; - @Procedure(value = "gds.betweenness.mutate", mode = READ) - @Description(BetweennessCentrality.BETWEENNESS_DESCRIPTION) + @Description(BETWEENNESS_DESCRIPTION) public Stream mutate( @Name(value = "graphName") String graphName, @Name(value = "configuration", defaultValue = "{}") Map configuration @@ -49,12 +48,11 @@ public Stream mutate( } @Procedure(value = "gds.betweenness.mutate.estimate", mode = READ) - @Description(BetweennessCentrality.BETWEENNESS_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.centrality().betweenessCentralityMutateEstimate(graphNameOrConfiguration, algoConfiguration); - } } diff --git a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStatsProc.java b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStatsProc.java index 527f8e9e89..b1cfdb29ff 100644 --- a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStatsProc.java +++ b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.betweenness; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.centrality.CentralityStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,16 +30,16 @@ import java.util.Map; import java.util.stream.Stream; -import static org.neo4j.gds.betweenness.BetweennessCentrality.BETWEENNESS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.STATS_MODE_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class BetweennessCentralityStatsProc extends BaseProc { - +public class BetweennessCentralityStatsProc { @Context public GraphDataScience facade; @Procedure(value = "gds.betweenness.stats", mode = READ) - @Description(BETWEENNESS_DESCRIPTION) + @Description(STATS_MODE_DESCRIPTION) public Stream stats( @Name(value = "graphName") String graphName, @Name(value = "configuration", defaultValue = "{}") Map configuration @@ -49,12 +48,11 @@ public Stream stats( } @Procedure(value = "gds.betweenness.stats.estimate", mode = READ) - @Description(BETWEENNESS_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.centrality().betweenessCentralityStatsEstimate(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStreamProc.java b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStreamProc.java index 4c5de0084e..e93a27d4b8 100644 --- a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStreamProc.java +++ b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.betweenness; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.centrality.CentralityStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,10 +31,10 @@ import java.util.stream.Stream; import static org.neo4j.gds.betweenness.BetweennessCentrality.BETWEENNESS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class BetweennessCentralityStreamProc extends BaseProc { - +public class BetweennessCentralityStreamProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream stream( } @Procedure(value = "gds.betweenness.stream.estimate", mode = READ) - @Description(BETWEENNESS_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityWriteProc.java b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityWriteProc.java index 40fe13e081..2cc44031fb 100644 --- a/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityWriteProc.java +++ b/proc/centrality/src/main/java/org/neo4j/gds/betweenness/BetweennessCentralityWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.betweenness; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.centrality.CentralityWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,11 +31,11 @@ import java.util.stream.Stream; import static org.neo4j.gds.betweenness.BetweennessCentrality.BETWEENNESS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class BetweennessCentralityWriteProc extends BaseProc { - +public class BetweennessCentralityWriteProc { @Context public GraphDataScience facade; @@ -50,12 +49,11 @@ public Stream write( } @Procedure(value = "gds.betweenness.write.estimate", mode = READ) - @Description(BETWEENNESS_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.centrality().betweenessCentralityWriteEstimate(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/approxmaxkcut/ApproxMaxKCutStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/approxmaxkcut/ApproxMaxKCutStreamProc.java index 86332bd374..92fb7dff05 100644 --- a/proc/community/src/main/java/org/neo4j/gds/approxmaxkcut/ApproxMaxKCutStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/approxmaxkcut/ApproxMaxKCutStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.approxmaxkcut; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.approxmaxkcut.ApproxMaxKCutStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -33,12 +32,13 @@ import java.util.stream.Stream; import static org.neo4j.gds.approxmaxkcut.ApproxMaxKCut.APPROX_MAX_K_CUT_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class ApproxMaxKCutStreamProc extends BaseProc { - +public class ApproxMaxKCutStreamProc { @Context public GraphDataScience facade; + @Procedure(value = "gds.maxkcut.stream", mode = READ) @Description(APPROX_MAX_K_CUT_DESCRIPTION) public Stream stream( @@ -49,7 +49,7 @@ public Stream stream( } @Procedure(value = "gds.maxkcut.stream.estimate", mode = READ) - @Description(APPROX_MAX_K_CUT_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -75,7 +75,7 @@ public Stream streamAlpha( @Deprecated @Internal @Procedure(value = "gds.alpha.maxkcut.stream.estimate", mode = READ, deprecatedBy = "gds.maxcut.stream.estimate") - @Description(APPROX_MAX_K_CUT_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateAlpha( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -85,5 +85,4 @@ public Stream estimateAlpha( .warn("Procedure `gds.alpha.maxkcut.stream.estimate` has been deprecated, please use `gds.maxkcut.stream.estimate`."); return estimate(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringMutateProc.java index b3858a9c95..f5e82da449 100644 --- a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringMutateProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.k1coloring.K1ColoringSpecificationHelper.K1_COLORING_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class K1ColoringMutateProc extends BaseProc { @@ -50,7 +51,7 @@ public Stream mutate( } @Procedure(value = "gds.k1coloring.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStatsProc.java index d44d8a1f3f..e86a894848 100644 --- a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStatsProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.k1coloring.K1ColoringSpecificationHelper.K1_COLORING_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class K1ColoringStatsProc extends BaseProc { @@ -50,7 +51,7 @@ public Stream stats( } @Procedure(value = "gds.k1coloring.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStreamProc.java index a3f2d0b32a..94a641944c 100644 --- a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringStreamProc.java @@ -33,12 +33,14 @@ import java.util.stream.Stream; import static org.neo4j.gds.k1coloring.K1ColoringSpecificationHelper.K1_COLORING_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class K1ColoringStreamProc extends BaseProc { @Context public GraphDataScience facade; + @Procedure(name = "gds.k1coloring.stream", mode = READ) @Description(K1_COLORING_DESCRIPTION) public Stream stream( @@ -49,7 +51,7 @@ public Stream stream( } @Procedure(value = "gds.k1coloring.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -73,7 +75,7 @@ public Stream betaStream( } @Procedure(value = "gds.beta.k1coloring.stream.estimate", mode = READ, deprecatedBy = "gds.k1coloring.stream.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) @Internal @Deprecated(forRemoval = true) public Stream betaEstimate( @@ -86,6 +88,4 @@ public Stream betaEstimate( "Procedure `gds.beta.k1coloring.stream.estimate` has been deprecated, please use `gds.k1coloring.stream.estimate`."); return estimate(graphNameOrConfiguration,algoConfiguration); } - - } diff --git a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringWriteProc.java index c93e3bfb50..70888ee22d 100644 --- a/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/k1coloring/K1ColoringWriteProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.k1coloring.K1ColoringSpecificationHelper.K1_COLORING_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -51,7 +52,7 @@ public Stream write( } @Procedure(value = "gds.k1coloring.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionMutateProc.java index ef063478e7..9e1c61c6ba 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.kcore; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.kcore.KCoreDecompositionMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,12 +31,13 @@ import java.util.stream.Stream; import static org.neo4j.gds.kcore.KCoreDecomposition.KCORE_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class KCoreDecompositionMutateProc extends BaseProc { - +public class KCoreDecompositionMutateProc { @Context public GraphDataScience facade; + @Procedure(value = "gds.kcore.mutate", mode = READ) @Description(KCORE_DESCRIPTION) public Stream mutate( @@ -48,12 +48,11 @@ public Stream mutate( } @Procedure(value = "gds.kcore.mutate.estimate", mode = READ) - @Description(KCORE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().kCoreEstimateMutate(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStatsProc.java index 0df887f072..80cdfcd3d2 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.kcore; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.kcore.KCoreDecompositionStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -34,9 +33,10 @@ import static org.neo4j.gds.kcore.KCoreDecomposition.KCORE_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class KCoreDecompositionStatsProc extends BaseProc { +public class KCoreDecompositionStatsProc { @Context public GraphDataScience facade; + @Procedure(value = "gds.kcore.stats", mode = READ) @Description(KCORE_DESCRIPTION) public Stream mutate( @@ -46,7 +46,6 @@ public Stream mutate( return facade.community().kCoreStats(graphName, configuration); } - @Procedure(value = "gds.kcore.stats.estimate", mode = READ) @Description(KCORE_DESCRIPTION) public Stream estimate( @@ -54,7 +53,5 @@ public Stream estimate( @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().kCoreEstimateStats(graphNameOrConfiguration, algoConfiguration); - } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStreamProc.java index 7242448f68..275eecc036 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kcore/KCoreDecompositionStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.kcore; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.kcore.KCoreDecompositionStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,9 +31,10 @@ import java.util.stream.Stream; import static org.neo4j.gds.kcore.KCoreDecomposition.KCORE_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class KCoreDecompositionStreamProc extends BaseProc { +public class KCoreDecompositionStreamProc { @Context public GraphDataScience facade; @@ -47,13 +47,11 @@ public Stream stream( return facade.community().kCoreStream(graphName, configuration); } @Procedure(value = "gds.kcore.stream.estimate", mode = READ) - @Description(KCORE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().kCoreEstimateStream(graphNameOrConfiguration, algoConfiguration); - } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansMutateProc.java index c738d632d3..3ae8e18895 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansMutateProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.kmeans.Kmeans.KMEANS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class KmeansMutateProc extends BaseProc { @@ -63,7 +64,7 @@ public Stream betaMutate( } @Procedure(value = "gds.kmeans.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration @@ -75,7 +76,7 @@ public Stream estimate( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.kmeans.mutate.estimate", mode = READ, deprecatedBy = "gds.kmeans.mutate.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream betaEstimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStatsProc.java index fbaea022a0..e4f1b0b083 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStatsProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.kmeans.Kmeans.KMEANS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class KmeansStatsProc extends BaseProc { @@ -64,7 +65,7 @@ public Stream betaStats( } @Procedure(value = "gds.kmeans.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration @@ -75,7 +76,7 @@ public Stream estimate( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.kmeans.stats.estimate", mode = READ, deprecatedBy = "gds.kmeans.stats.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream betaEstimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStreamProc.java index b651e2ee22..53fdbadbda 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.kmeans; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.kmeans.KmeansStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,9 +31,10 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class KmeansStreamProc extends BaseProc { +public class KmeansStreamProc { @Context public GraphDataScience facade; @@ -61,20 +61,18 @@ public Stream betaStream( } @Procedure(value = "gds.kmeans.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration ) { - var spec = new KmeansStreamSpec(); - return facade.community().kmeansEstimateStream(graphName, configuration); } @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.kmeans.stream.estimate", mode = READ, deprecatedBy = "gds.kmeans.stream.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream betaEstimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansWriteProc.java index 110cb44118..7ddf82427e 100644 --- a/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/kmeans/KmeansWriteProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.kmeans.Kmeans.KMEANS_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -62,7 +63,7 @@ public Stream betaWrite( } @Procedure(value = "gds.kmeans.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration @@ -73,7 +74,7 @@ public Stream estimate( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.kmeans.write.estimate", mode = READ, deprecatedBy = "gds.kmeans.write.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream betaEstimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationMutateProc.java index f456dd9788..07cc1c8823 100644 --- a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationMutateProc.java @@ -32,6 +32,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.labelpropagation.LabelPropagation.LABEL_PROPAGATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class LabelPropagationMutateProc extends BaseProc { @@ -49,12 +50,11 @@ public Stream mutate( } @Procedure(value = "gds.labelPropagation.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().labelPropagationEstimateMutate(graphNameOrConfiguration, algoConfiguration); - } } diff --git a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStatsProc.java index 34fb2d5f00..273d4dfedc 100644 --- a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.labelpropagation; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.labelpropagation.LabelPropagationStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,11 +31,13 @@ import java.util.stream.Stream; import static org.neo4j.gds.labelpropagation.LabelPropagation.LABEL_PROPAGATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LabelPropagationStatsProc extends BaseProc { +public class LabelPropagationStatsProc { @Context public GraphDataScience facade; + @Procedure(value = "gds.labelPropagation.stats", mode = READ) @Description(LABEL_PROPAGATION_DESCRIPTION) public Stream stats( @@ -47,7 +48,7 @@ public Stream stats( } @Procedure(value = "gds.labelPropagation.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStreamProc.java index 85a4e14d88..5ed3eca876 100644 --- a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.labelpropagation; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.labelpropagation.LabelPropagationStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,10 +31,10 @@ import java.util.stream.Stream; import static org.neo4j.gds.labelpropagation.LabelPropagation.LABEL_PROPAGATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LabelPropagationStreamProc extends BaseProc { - +public class LabelPropagationStreamProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream stream( } @Procedure(value = "gds.labelPropagation.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationWriteProc.java index 79613da472..4dbaba2b30 100644 --- a/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/labelpropagation/LabelPropagationWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.labelpropagation; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.labelpropagation.LabelPropagationWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,11 +31,11 @@ import java.util.stream.Stream; import static org.neo4j.gds.labelpropagation.LabelPropagation.LABEL_PROPAGATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class LabelPropagationWriteProc extends BaseProc { - +public class LabelPropagationWriteProc { @Context public GraphDataScience facade; @@ -50,7 +49,7 @@ public Stream write( } @Procedure(value = "gds.labelPropagation.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenMutateProc.java index 0fe86e28f5..6fc689c46a 100644 --- a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenMutateProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.leiden.LeidenStreamProc.DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class LeidenMutateProc extends BaseProc { @@ -49,7 +50,7 @@ public Stream mutate( } @Procedure(value = "gds.leiden.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration @@ -75,7 +76,7 @@ public Stream mutateBeta( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.leiden.mutate.estimate", mode = READ, deprecatedBy = "gds.leiden.mutate.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateBeta( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStatsProc.java index 1a2ed0689e..f20821d73e 100644 --- a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStatsProc.java @@ -32,6 +32,8 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.STATS_MODE_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class LeidenStatsProc extends BaseProc { @@ -39,7 +41,7 @@ public class LeidenStatsProc extends BaseProc { @Context public GraphDataScience facade; @Procedure(value = "gds.leiden.stats", mode = READ) - @Description(STATS_DESCRIPTION) + @Description(STATS_MODE_DESCRIPTION) public Stream stats( @Name(value = "graphName") String graphName, @Name(value = "configuration", defaultValue = "{}") Map configuration @@ -48,7 +50,7 @@ public Stream stats( } @Procedure(value = "gds.leiden.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration @@ -61,7 +63,7 @@ public Stream estimate( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.leiden.stats", mode = READ, deprecatedBy = "gds.leiden.stats") - @Description(STATS_DESCRIPTION) + @Description(STATS_MODE_DESCRIPTION) public Stream statsBeta( @Name(value = "graphName") String graphName, @Name(value = "configuration", defaultValue = "{}") Map configuration @@ -76,7 +78,7 @@ public Stream statsBeta( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.leiden.stats.estimate", mode = READ, deprecatedBy = "gds.leiden.stats.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateBeta( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStreamProc.java index 570d32e4a4..30b09f0473 100644 --- a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenStreamProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class LeidenStreamProc extends BaseProc { @@ -51,7 +52,7 @@ public Stream stream( } @Procedure(value = "gds.leiden.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenWriteProc.java index 5b2b6dcad2..c2da571ad4 100644 --- a/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/leiden/LeidenWriteProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.leiden.LeidenStreamProc.DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -51,7 +52,7 @@ public Stream write( } @Procedure(value = "gds.leiden.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration @@ -77,7 +78,7 @@ public Stream writeBeta( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.leiden.write.estimate", mode = READ, deprecatedBy = "gds.leiden.write.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateBeta( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainMutateProc.java index 00dfea2ffc..326e9a571e 100644 --- a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.louvain; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.louvain.LouvainMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,9 +31,10 @@ import java.util.stream.Stream; import static org.neo4j.gds.louvain.LouvainConstants.DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LouvainMutateProc extends BaseProc { +public class LouvainMutateProc { @Context public GraphDataScience facade; @@ -48,7 +48,7 @@ public Stream mutate( } @Procedure(value = "gds.louvain.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStatsProc.java index a7bceac80f..19beb4118c 100644 --- a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.louvain; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.louvain.LouvainStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,15 +30,16 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.STATS_MODE_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LouvainStatsProc extends BaseProc { - +public class LouvainStatsProc { @Context public GraphDataScience facade; @Procedure(value = "gds.louvain.stats", mode = READ) - @Description(STATS_DESCRIPTION) + @Description(STATS_MODE_DESCRIPTION) public Stream stats( @Name(value = "graphName") String graphName, @Name(value = "configuration", defaultValue = "{}") Map configuration @@ -48,7 +48,7 @@ public Stream stats( } @Procedure(value = "gds.louvain.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStreamProc.java index ef592fde5c..1959e3c612 100644 --- a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.louvain; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.louvain.LouvainStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,9 +31,10 @@ import java.util.stream.Stream; import static org.neo4j.gds.louvain.LouvainConstants.DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LouvainStreamProc extends BaseProc { +public class LouvainStreamProc { @Context public GraphDataScience facade; @@ -48,7 +48,7 @@ public Stream stream( } @Procedure(value = "gds.louvain.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainWriteProc.java index da0dbd1b2c..f77d9018b3 100644 --- a/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/louvain/LouvainWriteProc.java @@ -34,6 +34,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.louvain.LouvainConstants.DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -55,7 +56,7 @@ public Stream write( } @Procedure(value = "gds.louvain.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphName, @Name(value = "algoConfiguration") Map configuration diff --git a/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStatsProc.java index 320d8b03c5..26dd341a2d 100644 --- a/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStatsProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.modularity.ModularityStreamProc.DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class ModularityStatsProc extends BaseProc { @@ -49,7 +50,7 @@ public Stream stats( } @Procedure(value = "gds.modularity.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStreamProc.java index 3aef1b4922..9891119e31 100644 --- a/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/modularity/ModularityStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.modularity; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.modularity.ModularityStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,10 +31,10 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class ModularityStreamProc extends BaseProc { - +public class ModularityStreamProc { static final String DESCRIPTION = "The Modularity procedure computes the modularity scores for a given set of communities/"; @Context @@ -51,7 +50,7 @@ public Stream stream( } @Procedure(value = "gds.modularity.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -72,7 +71,5 @@ public Stream streamAlpha( .warn("Procedure `gds.alpha.modularity.stream` has been deprecated, please use `gds.modularity.stream`."); return stream(graphName, configuration); - } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationMutateProc.java index 5dd254ef24..9c4ddb7ac9 100644 --- a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationMutateProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.modularityoptimization.ModularityOptimizationSpecificationHelper.MODULARITY_OPTIMIZATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class ModularityOptimizationMutateProc extends BaseProc { @@ -50,7 +51,7 @@ public Stream mutate( } @Procedure(value = "gds.modularityOptimization.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -76,7 +77,7 @@ public Stream mutateBeta( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.modularityOptimization.mutate.estimate", mode = READ, deprecatedBy = "gds.modularityOptimization.mutate.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateBeta( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStatsProc.java index 541c4bae48..590070b590 100644 --- a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.modularityoptimization; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.modularityoptimization.ModularityOptimizationStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,10 +31,10 @@ import java.util.stream.Stream; import static org.neo4j.gds.modularityoptimization.ModularityOptimizationSpecificationHelper.MODULARITY_OPTIMIZATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class ModularityOptimizationStatsProc extends BaseProc { - +public class ModularityOptimizationStatsProc { @Context public GraphDataScience facade; @@ -49,12 +48,11 @@ public Stream mutate( } @Procedure(value = "gds.modularityOptimization.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().modularityOptimizationEstimateStats(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStreamProc.java index 85b53573c1..84cedf1556 100644 --- a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationStreamProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.modularityoptimization.ModularityOptimizationSpecificationHelper.MODULARITY_OPTIMIZATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class ModularityOptimizationStreamProc extends BaseProc { @@ -54,7 +55,7 @@ public Stream stream( } @Procedure(value = "gds.modularityOptimization.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -80,7 +81,7 @@ public Stream streamBeta( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.modularityOptimization.stream.estimate", mode = READ, deprecatedBy = "gds.modularityOptimization.stream.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateBeta( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationWriteProc.java index 485d6344be..05c9bfa511 100644 --- a/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/modularityoptimization/ModularityOptimizationWriteProc.java @@ -33,6 +33,7 @@ import java.util.stream.Stream; import static org.neo4j.gds.modularityoptimization.ModularityOptimizationSpecificationHelper.MODULARITY_OPTIMIZATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -51,7 +52,7 @@ public Stream write( } @Procedure(value = "gds.modularityOptimization.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -77,7 +78,7 @@ public Stream writeBeta( @Deprecated(forRemoval = true) @Internal @Procedure(value = "gds.beta.modularityOptimization.write.estimate", mode = READ, deprecatedBy = "gds.modularityOptimization.write.estimate") - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimateBeta( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/scc/SccMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/scc/SccMutateProc.java index 3f11b24e7f..fb2c003056 100644 --- a/proc/community/src/main/java/org/neo4j/gds/scc/SccMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/scc/SccMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.scc; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.scc.SccMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.scc.Scc.SCC_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class SccMutateProc extends BaseProc { - +public class SccMutateProc { @Context public GraphDataScience facade; @@ -49,14 +48,11 @@ public Stream mutate( } @Procedure(value = "gds.scc.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().sccEstimateMutate(graphNameOrConfiguration, algoConfiguration); } - - } - diff --git a/proc/community/src/main/java/org/neo4j/gds/scc/SccStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/scc/SccStatsProc.java index 29f8962d3f..1a6ffe50b3 100644 --- a/proc/community/src/main/java/org/neo4j/gds/scc/SccStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/scc/SccStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.scc; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.scc.SccStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.scc.Scc.SCC_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class SccStatsProc extends BaseProc { - +public class SccStatsProc { @Context public GraphDataScience facade; @@ -49,13 +48,11 @@ public Stream stats( } @Procedure(value = "gds.scc.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().sccEstimateStats(graphNameOrConfiguration, algoConfiguration); } - } - diff --git a/proc/community/src/main/java/org/neo4j/gds/scc/SccWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/scc/SccWriteProc.java index cc5ad28fb9..ba4effb363 100644 --- a/proc/community/src/main/java/org/neo4j/gds/scc/SccWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/scc/SccWriteProc.java @@ -33,6 +33,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.scc.Scc.SCC_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -52,7 +53,7 @@ public Stream write( } @Procedure(value = "gds.scc.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientMutateProc.java index 3753d8b8aa..7891715276 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.triangle; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangle.LocalClusteringCoefficientMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.triangle.LocalClusteringCoefficientCompanion.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LocalClusteringCoefficientMutateProc extends BaseProc { - +public class LocalClusteringCoefficientMutateProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream write( } @Procedure(value = "gds.localClusteringCoefficient.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStatsProc.java index 246198f708..3347617f6a 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStatsProc.java @@ -19,8 +19,6 @@ */ package org.neo4j.gds.triangle; - -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangle.LocalClusteringCoefficientStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,15 +30,16 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; +import static org.neo4j.gds.procedures.ProcedureConstants.STATS_MODE_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LocalClusteringCoefficientStatsProc extends BaseProc { - +public class LocalClusteringCoefficientStatsProc { @Context public GraphDataScience facade; @Procedure(value = "gds.localClusteringCoefficient.stats", mode = READ) - @Description(STATS_DESCRIPTION) + @Description(STATS_MODE_DESCRIPTION) public Stream stats( @Name(value = "graphName") String graphName, @Name(value = "configuration", defaultValue = "{}") Map configuration @@ -49,13 +48,11 @@ public Stream stats( } @Procedure(value = "gds.localClusteringCoefficient.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().localClusteringCoefficientEstimateStats(graphNameOrConfiguration, algoConfiguration); } - - } diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStreamProc.java index 832db94c52..0aa8f28d68 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientStreamProc.java @@ -19,8 +19,6 @@ */ package org.neo4j.gds.triangle; - -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangle.LocalClusteringCoefficientStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.triangle.LocalClusteringCoefficientCompanion.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class LocalClusteringCoefficientStreamProc extends BaseProc { - +public class LocalClusteringCoefficientStreamProc { @Context public GraphDataScience facade; @@ -50,12 +48,11 @@ public Stream stream( } @Procedure(value = "gds.localClusteringCoefficient.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().localClusteringCoefficientEstimateStream(graphNameOrConfiguration, algoConfiguration); - } } diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientWriteProc.java index bbf1da7807..c315d105e3 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/LocalClusteringCoefficientWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.triangle; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangle.LocalClusteringCoefficientWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,12 +30,12 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.triangle.LocalClusteringCoefficientCompanion.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class LocalClusteringCoefficientWriteProc extends BaseProc { - +public class LocalClusteringCoefficientWriteProc { @Context public GraphDataScience facade; @@ -47,16 +46,14 @@ public Stream write( @Name(value = "configuration", defaultValue = "{}") Map configuration ) { return facade.community().localClusteringCoefficientWrite(graphName, configuration); - } @Procedure(value = "gds.localClusteringCoefficient.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().localClusteringCoefficientEstimateWrite(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountMutateProc.java index e754ef448c..c1b0dbb713 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.triangle; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangleCount.TriangleCountMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.triangle.TriangleCountCompanion.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class TriangleCountMutateProc extends BaseProc { - +public class TriangleCountMutateProc { @Context public GraphDataScience facade; @@ -49,13 +48,11 @@ public Stream write( } @Procedure(value = "gds.triangleCount.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().triangleCountEstimateMutate(graphNameOrConfiguration, algoConfiguration); } - - } diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStatsProc.java index 1e8fb192bd..72f69cfbf0 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.triangle; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangleCount.TriangleCountStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,13 +30,13 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class TriangleCountStatsProc extends BaseProc { - - +public class TriangleCountStatsProc { @Context public GraphDataScience facade; + @Procedure(value = "gds.triangleCount.stats", mode = READ) @Description(TriangleCountCompanion.DESCRIPTION) public Stream stats( @@ -48,15 +47,11 @@ public Stream stats( } @Procedure(value = "gds.triangleCount.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { - return facade.community().triangleCountEstimateStats(graphNameOrConfiguration, algoConfiguration); - } - - } diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStreamProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStreamProc.java index b817bd537e..b65a9bbd5e 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStreamProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.triangle; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangleCount.TriangleCountStreamResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,10 +31,10 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class TriangleCountStreamProc extends BaseProc { - +public class TriangleCountStreamProc { @Context public GraphDataScience facade; @@ -49,14 +48,11 @@ public Stream stream( } @Procedure(value = "gds.triangleCount.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().triangleCountEstimateStream(graphNameOrConfiguration, algoConfiguration); - } - - } diff --git a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountWriteProc.java index 6966ce9c8f..24e0f0f311 100644 --- a/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/triangle/TriangleCountWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.triangle; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.community.triangleCount.TriangleCountWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,13 +30,15 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.triangle.TriangleCountCompanion.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class TriangleCountWriteProc extends BaseProc { +public class TriangleCountWriteProc { @Context public GraphDataScience facade; + @Procedure(value = "gds.triangleCount.write", mode = WRITE) @Description(DESCRIPTION) public Stream write( @@ -48,12 +49,11 @@ public Stream write( } @Procedure(value = "gds.triangleCount.write.estimate", mode = READ) - @Description(DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().triangleCountEstimateWrite(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/community/src/main/java/org/neo4j/gds/wcc/WccMutateProc.java b/proc/community/src/main/java/org/neo4j/gds/wcc/WccMutateProc.java index 79c1033610..f2ca04ef03 100644 --- a/proc/community/src/main/java/org/neo4j/gds/wcc/WccMutateProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/wcc/WccMutateProc.java @@ -31,6 +31,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.wcc.WccSpecification.WCC_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; @@ -48,7 +49,7 @@ public Stream mutate( } @Procedure(value = "gds.wcc.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/wcc/WccStatsProc.java b/proc/community/src/main/java/org/neo4j/gds/wcc/WccStatsProc.java index 2a4d65825e..1a7d8abe58 100644 --- a/proc/community/src/main/java/org/neo4j/gds/wcc/WccStatsProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/wcc/WccStatsProc.java @@ -31,6 +31,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.wcc.WccSpecification.WCC_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; @@ -49,7 +50,7 @@ public Stream stats( } @Procedure(value = "gds.wcc.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/community/src/main/java/org/neo4j/gds/wcc/WccWriteProc.java b/proc/community/src/main/java/org/neo4j/gds/wcc/WccWriteProc.java index 554ca903f4..6da2f5e898 100644 --- a/proc/community/src/main/java/org/neo4j/gds/wcc/WccWriteProc.java +++ b/proc/community/src/main/java/org/neo4j/gds/wcc/WccWriteProc.java @@ -31,6 +31,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.wcc.WccSpecification.WCC_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -49,12 +50,11 @@ public Stream write( } @Procedure(value = "gds.wcc.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.community().wccEstimateWrite(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnMutateProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnMutateProc.java index d9b1646249..cd275b4e49 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnMutateProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnMutateProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class FilteredKnnMutateProc extends BaseProc { @@ -48,7 +49,7 @@ public Stream mutate( } @Procedure(value = "gds.knn.filtered.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStatsProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStatsProc.java index e0c2537bda..8b9d746393 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStatsProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStatsProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.filteredknn.FilteredKnnConstants.PROCEDURE_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; @@ -50,7 +51,7 @@ public Stream stats( } @Procedure(value = "gds.knn.filtered.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStreamProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStreamProc.java index 9f4465b42a..78996ebb10 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStreamProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnStreamProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class FilteredKnnStreamProc extends BaseProc { @@ -49,7 +50,7 @@ public Stream stream( } @Procedure(value = "gds.knn.filtered.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnWriteProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnWriteProc.java index fd5b78e02b..172d761405 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnWriteProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filteredknn/FilteredKnnWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.filteredknn; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.knn.KnnWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -32,11 +31,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class FilteredKnnWriteProc extends BaseProc { - +public class FilteredKnnWriteProc { @Context public GraphDataScience facade; @@ -50,7 +49,7 @@ public Stream write( } @Procedure(value = "gds.knn.filtered.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -68,5 +67,4 @@ public Stream alphaWrite( ) { return write(graphName, configuration); } - } diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityMutateProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityMutateProc.java index f5e0c035ac..d856a58643 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityMutateProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityMutateProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.filterednodesim.FilteredNodeSimilarityStreamProc.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; @@ -50,7 +51,7 @@ public Stream mutate( } @Procedure(name = "gds.nodeSimilarity.filtered.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStatsProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStatsProc.java index c9bbce0455..60a9cf40ef 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStatsProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStatsProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.filterednodesim.FilteredNodeSimilarityStreamProc.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; @@ -50,7 +51,7 @@ public Stream stats( } @Procedure(value = "gds.nodeSimilarity.filtered.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStreamProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStreamProc.java index 2aceca7ec9..826e57f78f 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStreamProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityStreamProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; public class FilteredNodeSimilarityStreamProc extends BaseProc { @@ -56,7 +57,7 @@ public Stream stream( } @Procedure(value = "gds.nodeSimilarity.filtered.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityWriteProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityWriteProc.java index ff5861d273..30b4be72b9 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityWriteProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/filterednodesim/FilteredNodeSimilarityWriteProc.java @@ -32,6 +32,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.filterednodesim.FilteredNodeSimilarityStreamProc.DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; @@ -51,7 +52,7 @@ public Stream write( } @Procedure(value = "gds.nodeSimilarity.filtered.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnMutateProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnMutateProc.java index 95fdcb2379..f442016af5 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnMutateProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.knn; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.knn.KnnMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.knn.KnnProc.KNN_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class KnnMutateProc extends BaseProc { - +public class KnnMutateProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream mutate( } @Procedure(value = "gds.knn.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStatsProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStatsProc.java index 4527c9bdf4..b97e6cda91 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStatsProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.knn; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.knn.KnnStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.knn.KnnProc.KNN_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public final class KnnStatsProc extends BaseProc { - +public final class KnnStatsProc { @Context public GraphDataScience facade; @@ -46,11 +45,10 @@ public Stream stats( @Name(value = "configuration", defaultValue = "{}") Map configuration ) { return facade.similarity().knnStats(graphName, configuration); - } @Procedure(value = "gds.knn.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStreamProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStreamProc.java index bbf30c1d15..56b26ad22f 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStreamProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.knn; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.results.MemoryEstimateResult; import org.neo4j.gds.similarity.SimilarityResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.knn.KnnProc.KNN_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class KnnStreamProc extends BaseProc { - +public class KnnStreamProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream stream( } @Procedure(value = "gds.knn.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnWriteProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnWriteProc.java index 7147e098ff..394f5556a1 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnWriteProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/knn/KnnWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.knn; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.knn.KnnWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,12 +30,12 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.knn.KnnProc.KNN_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class KnnWriteProc extends BaseProc { - +public class KnnWriteProc { @Context public GraphDataScience facade; @@ -50,13 +49,11 @@ public Stream write( } @Procedure(value = "gds.knn.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration ) { return facade.similarity().knnWriteEstimate(graphNameOrConfiguration, algoConfiguration); - } - } diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityMutateProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityMutateProc.java index c2c5473798..13de5e2888 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityMutateProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityMutateProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.nodesim; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.SimilarityMutateResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.nodesim.NodeSimilarityProc.NODE_SIMILARITY_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class NodeSimilarityMutateProc extends BaseProc { - +public class NodeSimilarityMutateProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream mutate( } @Procedure(value = "gds.nodeSimilarity.mutate.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStatsProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStatsProc.java index d29deb4b72..30a971e73e 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStatsProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStatsProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.nodesim; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.SimilarityStatsResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,11 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.nodesim.NodeSimilarityProc.NODE_SIMILARITY_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class NodeSimilarityStatsProc extends BaseProc { - +public class NodeSimilarityStatsProc { @Context public GraphDataScience facade; @@ -49,7 +48,7 @@ public Stream stats( } @Procedure(value = "gds.nodeSimilarity.stats.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStreamProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStreamProc.java index 5ea1911cb2..9878873bd3 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStreamProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityStreamProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.nodesim; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.results.MemoryEstimateResult; import org.neo4j.gds.similarity.SimilarityResult; @@ -31,10 +30,11 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.nodesim.NodeSimilarityProc.NODE_SIMILARITY_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; -public class NodeSimilarityStreamProc extends BaseProc { +public class NodeSimilarityStreamProc { @Context public GraphDataScience facade; @@ -51,7 +51,7 @@ public Stream stream( } @Procedure(value = "gds.nodeSimilarity.stream.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration diff --git a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityWriteProc.java b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityWriteProc.java index 529eabbedf..a8c91cf33c 100644 --- a/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityWriteProc.java +++ b/proc/similarity/src/main/java/org/neo4j/gds/similarity/nodesim/NodeSimilarityWriteProc.java @@ -19,7 +19,6 @@ */ package org.neo4j.gds.similarity.nodesim; -import org.neo4j.gds.BaseProc; import org.neo4j.gds.procedures.GraphDataScience; import org.neo4j.gds.procedures.similarity.SimilarityWriteResult; import org.neo4j.gds.results.MemoryEstimateResult; @@ -31,12 +30,12 @@ import java.util.Map; import java.util.stream.Stream; +import static org.neo4j.gds.procedures.ProcedureConstants.MEMORY_ESTIMATION_DESCRIPTION; import static org.neo4j.gds.similarity.nodesim.NodeSimilarityProc.NODE_SIMILARITY_DESCRIPTION; import static org.neo4j.procedure.Mode.READ; import static org.neo4j.procedure.Mode.WRITE; -public class NodeSimilarityWriteProc extends BaseProc { - +public class NodeSimilarityWriteProc { @Context public GraphDataScience facade; @@ -50,7 +49,7 @@ public Stream write( } @Procedure(value = "gds.nodeSimilarity.write.estimate", mode = READ) - @Description(ESTIMATE_DESCRIPTION) + @Description(MEMORY_ESTIMATION_DESCRIPTION) public Stream estimate( @Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration, @Name(value = "algoConfiguration") Map algoConfiguration @@ -58,5 +57,4 @@ public Stream estimate( return facade.similarity().nodeSimilarityEstimateWrite(graphNameOrConfiguration, algoConfiguration); } - } diff --git a/procedures/facade/src/main/java/org/neo4j/gds/procedures/ProcedureConstants.java b/procedures/facade/src/main/java/org/neo4j/gds/procedures/ProcedureConstants.java new file mode 100644 index 0000000000..ee9063444d --- /dev/null +++ b/procedures/facade/src/main/java/org/neo4j/gds/procedures/ProcedureConstants.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) "Neo4j" + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Neo4j is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.neo4j.gds.procedures; + +public final class ProcedureConstants { + public static final String MEMORY_ESTIMATION_DESCRIPTION = "Returns an estimation of the memory consumption for that procedure."; + public static final String STATS_MODE_DESCRIPTION = "Executes the algorithm and returns result statistics without writing the result."; + + private ProcedureConstants() {} +}