Skip to content

Commit

Permalink
Merge pull request #1 from TreasureJade/feat-neo4j
Browse files Browse the repository at this point in the history
chore: update Node, MoneCodeParserTest, Relationship, and Relationshi…
  • Loading branch information
rikaaa0928 authored Aug 19, 2024
2 parents f3cdec0 + aaec1b1 commit c2f3442
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 1 deletion.
34 changes: 34 additions & 0 deletions jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Node.java
Original file line number Diff line number Diff line change
@@ -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;
}
20 changes: 20 additions & 0 deletions jcommon/ai/neo4j/src/main/java/run/mone/neo4j/Relationship.java
Original file line number Diff line number Diff line change
@@ -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<RelationshipDetail> relationshipDetails;


}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit c2f3442

Please sign in to comment.