Documentation ¶
Index ¶
- func AddDocument(conn bolt.Conn, document structures.Document, urlStartDoc string)
- func AddDocumentBasic_MA(conn bolt.Conn, document structures.MADocument, URLStartDoc string, ...)
- func AddDocument_MA(conn bolt.Conn, document structures.MADocument, URLStartDoc string)
- func AlreadyExplored(conn bolt.Conn, URL string, graphNumber int) bool
- func CleanAll(conn bolt.Conn)
- func CleanAllDocument(conn bolt.Conn)
- func CreateDocumentsRelations(conn bolt.Conn)
- func CreateFieldsRelations(conn bolt.Conn)
- func CreateNewFields(conn bolt.Conn)
- func DeleteGraph(conn bolt.Conn, graphNumber int) bool
- func DoesDocumentHaveField(conn bolt.Conn, title, fieldName string, graphNumber int) bool
- func FieldsRanking(conn bolt.Conn, numFields, graphNumber int, print bool) map[string]int
- func GetGraphDocuments(conn bolt.Conn, graphNumber int) []structures.CiteRelation
- func GetGraphFields(conn bolt.Conn) []structures.CiteRelation
- func GetResearchNumber(conn bolt.Conn) int
- func PrepareDBForDotFileFields()
- func StartNeo4j() bolt.Conn
- func StartPoolNeo4j(connectionNumber int) []bolt.Conn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDocument ¶
func AddDocument(conn bolt.Conn, document structures.Document, urlStartDoc string)
Aggiungo il documento, gli autori che lo hanno scritto (con le relative relazioni) urlStartDoc e' l'URL del documento che viene citato da doc: se e' "" allora doc e' il documento da cui e' partita l'esplorazione
func AddDocumentBasic_MA ¶
func AddDocumentBasic_MA(conn bolt.Conn, document structures.MADocument, URLStartDoc string, graphNumber int)
Crea un nodo che ha solo: titolo, numCitazioni e linkCitazioni. Niente autori, ne sources
func AddDocument_MA ¶
func AddDocument_MA(conn bolt.Conn, document structures.MADocument, URLStartDoc string)
Aggiungo il documento, gli autori che lo hanno scritto (con le relative relazioni) e tutte le informazioni dei doc MA (eccetto la data che non riesco a prendere) urlStartDoc e' l'URL del documento che viene citato da doc: se e' "" allora doc e' il documento da cui e' partita l'esplorazione NOTA: Per ora Source lo spezzo in 2 proprieta': sourceWWW, sourcePDF; poi dovro' creare un nodo a parte con una relazione che lo lega al documento. TUTTA DA RIVEDERE------------------------------------------------------------
func AlreadyExplored ¶
Controllo se il documento e' gia stato esplorato: ha gia' dei doc che lo citano. NOTA: Non e' proprio vero perche' un doc potrebbe non avere figli che soddisfano la soglia minima, ma a me va benem cosi'
func CleanAllDocument ¶
Pulisce il database da tutti i nodi con label "Document" (cioe' che provengono da scholar) e le relative relazioni
func CreateDocumentsRelations ¶
Creates a relation "CITE_FIELD" from two documents that have the same field and are linked by the relation "CITE", this relation has the field's name as property.
func CreateFieldsRelations ¶
Creates a relation "CITE2" between two "MAFieldOfStudy2" whose names appear consecutively in two "CITE_FIELD"
func CreateNewFields ¶
Creates a new node (label:"MAFieldOfStudy2") for each field "MAFieldOfStudy"
func DeleteGraph ¶
DeleteGraph remove from the database all documents and relations relative to a specific research
func DoesDocumentHaveField ¶
DoesDocumentHaveField returns true if the document (title) has the field of study specified, false otherwise. NOTA: dovrei usare l'URL del documento non il suo titolo
func FieldsRanking ¶
FieldsRanking queries the db to retrieve the top <numFields> field. If <numFields> == -1 -> there's no limit The field score is the number of edges from one article to another whose property "name" is equal to the field. If print -> print to stdOut the ranking
func GetGraphDocuments ¶
func GetGraphDocuments(conn bolt.Conn, graphNumber int) []structures.CiteRelation
GetGraphDocuments get the info aboute "CITE" relation:
(title1)-[CITE]->(title2)
for all the documents of a graph (or all db if graphNumber == -1)
func GetGraphFields ¶
func GetGraphFields(conn bolt.Conn) []structures.CiteRelation
GetGraphFields get the info aboute "CITE2" relation:
(field1)-[CITE2]->(field2)
for all the fields of all db (for now) ///////of a graph (or all db if graphNumber == -1)
func GetResearchNumber ¶
GetResearchNumber returns the number of graphs (of searches) in the db
func PrepareDBForDotFileFields ¶
func PrepareDBForDotFileFields()
ONLY FOR GRAPH NUMBER 5 1) Create relations between articles that have the same field 2) Create a new node for each field 3) Create relations between these nodes
func StartPoolNeo4j ¶
Crea un pool di connessioni con Neo4j come e' diviso pool: array di connesioni : pos=0 (connessione di Concurrency) pos = [1,numThread] (connessioni per i Thread)
Types ¶
This section is empty.