Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
zheyxu committed Jul 17, 2024
1 parent b72e4ed commit 53ba5f8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions lib/src/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -742,23 +742,7 @@ class Graph {
// 1. <>
else if (s.startsWith('<') && s.endsWith('>')) {
String uri = s.substring(1, s.length - 1);
if (URIRef.isValidUri(uri)) {
// Valid uri is sufficient as URIRef.
return URIRef(uri);
} else {
if (ctx.containsKey(':')) {
// FIXME: if context has base, do we need to stitch them?
// Examples:
// 1. <> -> URIRef('')
// 2. <./> -> URIRef('./')
// 3. <bob#me> -> e.g., URIRef('http://example.org/bob#me')
// or just URIRef('bob#m3') [current implementation]?
return URIRef(uri);
// return URIRef('${ctx[':']!.value}${uri}');
} else {
return URIRef(uri); // or it's just a string within <>
}
}
return URIRef(uri);
}
// 4. abc^^xsd:string
// Note this needs to come before :abc or abc:efg cases.
Expand Down

0 comments on commit 53ba5f8

Please sign in to comment.