Class NestedPropertyName
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.postgres.repositoryconnector.mappers.NestedPropertyName
Encodes the names of nested properties - the keys of a map, the attributes of a struct and the
indexes of an array - in the property name column of the attribute value tables.
A nested property is stored with a property name made of its parent's property name, a colon, and
its own name, such as additionalProperties:jobType. A map key may itself contain a colon
(for example tag:coco), so each name added to the path is escaped: a backslash becomes
\\ and a colon becomes \:. The path is then split only on unescaped colons, and a
name is unescaped only when it becomes a property name again.
-
Method Summary
-
Method Details
-
escape
Escape a name so that it can be added to a property name path.- Parameters:
name- name of a nested property (map key, struct attribute or array index)- Returns:
- escaped name
-
unescape
Reverseescape(String).- Parameters:
escapedName- escaped name- Returns:
- original name
-
split
Split a property name path on its unescaped colons. The parts keep their escaping.- Parameters:
propertyName- property name path, such asadditionalProperties:tag\:coco- Returns:
- parts of the path, such as
additionalPropertiesandtag\:coco
-