Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fragment property to URIRef (#1991)
Added a property `fragment` to `URIRef` so it is easy to access the URI's fragment: ```python >>> URIRef("http://example.com/some/path/#some-fragment").fragment 'some-fragment' >>> URIRef("http://example.com/some/path/").fragment '' ``` ## Why is this useful? The non-fragment part of the URI often just serves a namespace purpose, e.g. `https://brickschema.org/schema/Brick#`. Actual "things" use that namespace, and have the "thing" name as the fragment, e.g. `https://brickschema.org/schema/Brick#Valve_Position_Sensor` For display purposes, it's nice to get to the "thing" name, i.e. the fragment easily.
- Loading branch information