From aaec1b1d6c7e830e37cf80db7104998376443a9a Mon Sep 17 00:00:00 2001 From: caobaoyu Date: Mon, 19 Aug 2024 19:07:56 +0800 Subject: [PATCH] chore: update Node, MoneCodeParserTest, Relationship, and RelationshipDetail files with no content changes --- .../src/main/java/run/mone/neo4j/Node.java | 34 +++++++++++++++++++ .../java/run/mone/neo4j/Relationship.java | 20 +++++++++++ .../run/mone/neo4j/RelationshipDetail.java | 18 ++++++++++ .../mone/neo4j/test/MoneCodeParserTest.java | 4 ++- 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Node.java create mode 100644 jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Relationship.java create mode 100644 jcommon/ai/neo4j/src/main/java/run/mone/neo4j/RelationshipDetail.java diff --git a/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Node.java b/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Node.java new file mode 100644 index 000000000..12412710e --- /dev/null +++ b/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Node.java @@ -0,0 +1,34 @@ +package run.mone.neo4j; + +import lombok.Data; + +/** + * @author caobaoyu + * @description: + * @date 2024-08-19 17:25 + */ +@Data +public class Node { + private String fullName; + + private String packageName; + + // todo 枚举 + private Object label; + + // todo 枚举 + private Object type; + + // 元数据 + private String meta; + + private String desc; + + private String md5; + + private Float[] embedding; + + private String path; + + private String language; +} diff --git a/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Relationship.java b/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Relationship.java new file mode 100644 index 000000000..93c194246 --- /dev/null +++ b/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Relationship.java @@ -0,0 +1,20 @@ +package run.mone.neo4j; + +import lombok.Data; + +import java.util.List; + +/** + * @author caobaoyu + * @description: + * @date 2024-08-19 17:29 + */ +@Data +public class Relationship { + + private String fullName; + + private List relationshipDetails; + + +} diff --git a/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/RelationshipDetail.java b/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/RelationshipDetail.java new file mode 100644 index 000000000..d9685e52e --- /dev/null +++ b/jcommon/ai/neo4j/src/main/java/run/mone/neo4j/RelationshipDetail.java @@ -0,0 +1,18 @@ +package run.mone.neo4j; + +import lombok.Data; + +/** + * @author caobaoyu + * @description: + * @date 2024-08-19 19:07 + */ +@Data +public class RelationshipDetail { + + private Object label; + + private String next; + + private String desc; +} diff --git a/jcommon/ai/neo4j/src/test/java/run/mone/neo4j/test/MoneCodeParserTest.java b/jcommon/ai/neo4j/src/test/java/run/mone/neo4j/test/MoneCodeParserTest.java index 0c83cb788..001e59148 100644 --- a/jcommon/ai/neo4j/src/test/java/run/mone/neo4j/test/MoneCodeParserTest.java +++ b/jcommon/ai/neo4j/src/test/java/run/mone/neo4j/test/MoneCodeParserTest.java @@ -12,7 +12,9 @@ public class MoneCodeParserTest { @Test public void testWriteCatServiceToNeo4j() { - new MoneCodeParser().writeJavaFilesToNeo4j("/Users/zhangzhiyong/IdeaProjects/ai/m78/m78-service/src/main/java/run/mone/m78/service"); + MoneCodeParser moneCodeParser = new MoneCodeParser(); + moneCodeParser.setNEO4J_PASSWORD("password"); + moneCodeParser.writeJavaFilesToNeo4j("/Users/hoho/IdeaProjects/mone/private-knowledge/private-knowledge-service"); // MoneCodeParser.writeJavaFilesToNeo4j("/Users/zhangzhiyong/IdeaProjects/ai/m78/m78-service/src/main/java/run/mone/m78/service/database"); // MoneCodeParser.writeJavaFilesToNeo4j("/Users/zhangzhiyong/IdeaProjects/ai/m78/m78-service/src/main/java/run/mone/m78/service/database/SqlParseUtil.java"); // new MoneCodeParser().writeJavaFilesToNeo4j("/Users/zhangzhiyong/IdeaProjects/goodjava/mone/jcommon/ai/neo4j/src/test/java/run/mone/neo4j/test/A.java");