File tree Expand file tree Collapse file tree
meta_configurator/src/components/panels/rdf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 <div class =" flex flex-col gap-3 text-sm" >
99 <ul class =" pl-4 list-disc leading-relaxed" >
1010 <li >
11- Choosing <code >Blank Node</code > for subject or object always creates a new internal blank
12- node at root level on save.
11+ Choosing <code >Blank Node</code > for a new subject or object creates a new internal blank
12+ node on save.
13+ </li >
14+ <li >
15+ When you edit an existing triple that already references a blank node, the blank node id
16+ is preserved instead of creating a new one.
1317 </li >
1418 <li >
1519 Existing blank nodes are not listed in subject/object dropdowns. Those lists contain only
1620 named node IRIs.
1721 </li >
22+ <li >
23+ Tracking active selection between RDF View and Text View is currently not working for
24+ triples containing blank nodes.
25+ </li >
1826 <li >Blank nodes do not support IRI-based rename.</li >
1927 </ul >
2028 <Divider align =" left" type =" dashed" >
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ function createNode(
9191 case RdfTermType . NamedNode :
9292 return $rdf . sym ( value ) ;
9393 case RdfTermType . BlankNode :
94- return $rdf . blankNode ( ) ;
94+ return $rdf . blankNode ( normalizeBlankNodeId ( value ) ) ;
9595 case RdfTermType . Literal :
9696 return datatype
9797 ? $rdf . literal ( value , $rdf . sym ( expandDatatype ( datatype ) ) )
@@ -100,3 +100,8 @@ function createNode(
100100 throw new Error ( `Unknown term type: ${ type } ` ) ;
101101 }
102102}
103+
104+ function normalizeBlankNodeId ( value : string ) : string | undefined {
105+ if ( ! value ) return undefined ;
106+ return value . startsWith ( '_:' ) ? value . slice ( 2 ) : value ;
107+ }
You can’t perform that action at this time.
0 commit comments