@@ -15,7 +15,9 @@ FROM wos_publications WHERE source_id IN
1515(select distinct wos_id from garfield_hgraph2) AND
1616publication_year <= 1992 ;
1717
18- -- get first gen of citing references
18+ -- get first gen of citing references (note target:cited_source_uid polarity to preserve a cites b)
19+ -- the 9 endrefs are cited by gen1 pubs
20+
1921DROP TABLE IF EXISTS garfield_gen1;
2022CREATE TABLE garfield_gen1 AS
2123SELECT source_id AS source, cited_source_uid AS target,
@@ -34,7 +36,7 @@ FROM wos_references WHERE cited_source_uid IN
3436CREATE INDEX garfield_gen2_idx ON garfield_gen2(source);
3537
3638-- Citation starting point is publications DMET Plus keyword search
37- -- get one generation of cited references
39+ -- get two generations of cited references not reversed polarity since this is cited reference not citing
3840DROP TABLE IF EXISTS garfield_dmet_begina;
3941CREATE TABLE garfield_dmet_begina AS
4042SELECT source_id AS source, cited_source_uid AS target,
@@ -98,7 +100,7 @@ SELECT DISTINCT 'n'||substring(target,5),target,ttype
98100FROM garfield_dmet_begin;
99101
100102-- gen1_cited
101- INSERT INTO garfield_node_assembly(node_id,node_name,ttype )
103+ INSERT INTO garfield_node_assembly(node_id,node_name,stype )
102104SELECT DISTINCT ' n' || substring (source,5 ),source,stype
103105FROM garfield_dmet_twog;
104106
@@ -141,8 +143,12 @@ CREATE INDEX garfield_edgelist_idx ON garfield_edgelist(source,target);
141143
142144-- create formatted nodelist with unique node_ids
143145DROP TABLE IF EXISTS garfield_nodelist_formatted_a;
144- CREATE TABLE garfield_nodelist_formatted_a (node_id varchar (16 ), node_name varchar (19 ), stype varchar (10 ), ttype varchar (10 ), startref varchar (10 ), endref varchar (10 ));
145- INSERT INTO garfield_nodelist_formatted_a (node_id,node_name,stype,ttype) SELECT DISTINCT * FROM garfield_nodelist;
146+ CREATE TABLE garfield_nodelist_formatted_a (node_id varchar (16 ), node_name varchar (19 ),
147+ stype varchar (10 ), ttype varchar (10 ),
148+ startref varchar (10 ), endref varchar (10 ));
149+ INSERT INTO garfield_nodelist_formatted_a (node_id,node_name,stype,ttype)
150+ SELECT DISTINCT * FROM garfield_nodelist;
151+
146152UPDATE garfield_nodelist_formatted_a SET startref= 1 WHERE stype= ' startref' ;
147153UPDATE garfield_nodelist_formatted_a SET startref= 0 WHERE stype= ' source' OR stype IS NULL ;
148154UPDATE garfield_nodelist_formatted_a SET endref= 1 WHERE ttype= ' endref' ;
0 commit comments