Application

An application to export the cpg to a neo4j database.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class Exclusive

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun buildJsonGraph(newNodeBuilders: List<DefaultNodeBuilder>?, newRelationshipBuilders: List<DefaultRelationshipBuilder>?): JsonGraph

Use the provided node and relationship builders to create list of nodes and edges

Link copied to clipboard
open override fun call(): Int

The entrypoint of the cpg-vis-neo4j.

Link copied to clipboard
fun connect(): Pair<Session, SessionFactory>

Connects to the neo4j db.

Link copied to clipboard
fun exportToJson(translationResult: TranslationResult, path: File)

Exports the TranslationResult to json. Serialization is done via the Neo4j OGM.

Link copied to clipboard
fun printSchema(filenames: Collection<String>, format: Schema.Format)
Link copied to clipboard
fun pushToNeo4j(translationResult: TranslationResult)

Pushes the whole translationResult to the neo4j db.

Link copied to clipboard

Parse the file paths to analyze and set up the translationConfiguration with these paths.

Link copied to clipboard
fun translateCPGToOGMBuilders(translationResult: TranslationResult): Pair<List<DefaultNodeBuilder>?, List<DefaultRelationshipBuilder>?>

Create node and relationship builders to map the cpg via OGM. This method is not a public API of the OGM, thus we use reflection to access the related methods.