A policy is a function takes a URI and may return the given URI or a transformed version of it.
A policy is a function takes a URI and may return the given URI or a transformed version of it. Human-readable type alias.
PolicyApplicable is a function that decides if a policy should be applied for the given DBpedia URI.
PolicyApplicable is a function that decides if a policy should be applied for the given DBpedia URI. Human-readable type alias.
Parse all format lines.
Parse all format lines.
format key prefix, e.g. "format"
map from file suffix (without '.' dot) to formatter
parse all URI policy lines
parse all URI policy lines
property key prefix, e.g. "uri-policy"
map from URI policy name (including prefix) to an array of policies (with one entry for each position in a quad)
Parses a policy list like "uri:en,fr; generic:en"
Check if the tail of the URI could be used as an XML element name.
Check if the tail of the URI could be used as an XML element name. If not, attach an underscore (which is a valid XML name). The resulting URI is guaranteed to be usable as a predicate in RDF/XML - it can be split into a valid namespace URI and a valid XML name.
Examples:
original URI xml safe URI (may be equal) possible namespace and name in RDF/XML
http://foo/bar http://foo/bar http://foo/ bar http://foo/123 http://foo/123_ http://foo/123 _ http://foo/%22 http://foo/%22_ http://foo/%22 _ http://foo/%C3%BC http://foo/%C3%BC_ http://foo/%C3%BC _ http://foo/%C3%BCD http://foo/%C3%BCD http://foo/%C3%BC D http://foo/% http://foo/%22_ http://foo/%22 _ http://foo/bar_(fub) http://foo/bar_(fub)_ http://foo/bar_(fub) _ http://foo/bar#a123 http://foo/bar#a123 http://foo/bar# a123 http://foo/bar#123 http://foo/bar#123_ http://foo/bar#123 _ http://foo/bar# http://foo/bar#_ http://foo/bar# _ http://foo/bar?a123 http://foo/bar?a123 http://foo/bar? a123 http://foo/bar?a= http://foo/bar?a=_ http://foo/bar?a= _ http://foo/bar?a=b http://foo/bar?a=b http://foo/bar?a= b http://foo/bar?123 http://foo/bar?123_ http://foo/bar?123 _ http://foo/bar? http://foo/bar?_ http://foo/bar? _ http://foo/ http://foo/_ http://foo/ _ http://foo http://foo/_ http://foo/ _ http://foo/: http://foo/:_ http://foo/: _ http://foo/a: http://foo/a:_ http://foo/a: _ http://foo/a:b http://foo/a:b http://foo/a: b
TODO: use scala.collection.Map[String, String] instead of java.util.Properties?