Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Node, MoneCodeParserTest, Relationship, and Relationshi… #1

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading