You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/09/24 11:40:25 UTC

[isis] branch master updated: ISIS-2033: house keeping

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new ed97512  ISIS-2033: house keeping
ed97512 is described below

commit ed97512c0eb1560af9487022166f8b8b8a4b5356
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Sep 24 13:40:18 2020 +0200

    ISIS-2033: house keeping
---
 .../{math/_AdjacencyMatrix.java => graph/_Graph.java}  |  4 ++--
 .../jpa/metamodel/JpaEntityFacetFactory.java           | 18 ++++++++++++++++++
 .../jpa/metamodel/metrics/MetricsServiceForJpa.java    | 18 ++++++++++++++++++
 .../isis/tooling/cli/projdoc/ProjectDocModel.java      |  6 +++---
 4 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/commons/src/main/java/org/apache/isis/commons/internal/math/_AdjacencyMatrix.java b/commons/src/main/java/org/apache/isis/commons/internal/graph/_Graph.java
similarity index 94%
rename from commons/src/main/java/org/apache/isis/commons/internal/math/_AdjacencyMatrix.java
rename to commons/src/main/java/org/apache/isis/commons/internal/graph/_Graph.java
index 8ac7a6d..1c2299d 100644
--- a/commons/src/main/java/org/apache/isis/commons/internal/math/_AdjacencyMatrix.java
+++ b/commons/src/main/java/org/apache/isis/commons/internal/graph/_Graph.java
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.commons.internal.math;
+package org.apache.isis.commons.internal.graph;
 
 import java.util.function.BiPredicate;
 import java.util.stream.Stream;
@@ -38,7 +38,7 @@ import lombok.RequiredArgsConstructor;
  * @since 2.0
  */
 @RequiredArgsConstructor(staticName = "of")
-public class _AdjacencyMatrix<T> {
+public class _Graph<T> {
 
     private final Can<T> nodes;
     private final BiPredicate<T, T> relationPredicate;
diff --git a/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/JpaEntityFacetFactory.java b/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/JpaEntityFacetFactory.java
index 9509a3d..7109173 100644
--- a/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/JpaEntityFacetFactory.java
+++ b/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/JpaEntityFacetFactory.java
@@ -1,3 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
 package org.apache.isis.persistence.jpa.metamodel;
 
 import java.lang.reflect.Method;
diff --git a/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/metrics/MetricsServiceForJpa.java b/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/metrics/MetricsServiceForJpa.java
index 34d8cc0..4c6110f 100644
--- a/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/metrics/MetricsServiceForJpa.java
+++ b/persistence/jpa/model/src/main/java/org/apache/isis/persistence/jpa/metamodel/metrics/MetricsServiceForJpa.java
@@ -1,3 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
 package org.apache.isis.persistence.jpa.metamodel.metrics;
 
 import javax.inject.Named;
diff --git a/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java b/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java
index 9987c88..924116b 100644
--- a/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java
+++ b/tooling/cli/src/main/java/org/apache/isis/tooling/cli/projdoc/ProjectDocModel.java
@@ -38,7 +38,7 @@ import org.asciidoctor.ast.Document;
 import org.apache.isis.commons.collections.Can;
 import org.apache.isis.commons.internal.base._Files;
 import org.apache.isis.commons.internal.base._Strings;
-import org.apache.isis.commons.internal.math._AdjacencyMatrix;
+import org.apache.isis.commons.internal.graph._Graph;
 import org.apache.isis.tooling.c4.C4;
 import org.apache.isis.tooling.cli.CliConfig.ProjectDoc;
 import org.apache.isis.tooling.javamodel.AnalyzerConfigFactory;
@@ -143,8 +143,8 @@ public class ProjectDocModel {
             });
 
             
-            final _AdjacencyMatrix<ProjectAndContainerTuple> adjMatrix = 
-                    _AdjacencyMatrix.of(tuples, (a, b)->a.projectNode.getChildren().contains(b.projectNode));
+            final _Graph<ProjectAndContainerTuple> adjMatrix = 
+                    _Graph.of(tuples, (a, b)->a.projectNode.getChildren().contains(b.projectNode));
 
             tuples.forEach(tuple->{
                 adjMatrix.streamNeighbors(tuple)