the Parent Id Path is everything except our Id if id_path is "0.2.8.15", our Parent Id is "0.2.8" @return parent id path
()
| 276 | * @return parent id path |
| 277 | **/ |
| 278 | public String getParentIdPath() |
| 279 | { |
| 280 | final StringBuilder buf = new StringBuilder(50); |
| 281 | |
| 282 | // get all tokens and include the delimiter |
| 283 | try |
| 284 | { |
| 285 | final StringTokenizer aTok = new StringTokenizer(id_path, Constants.EQUIP_SET_PATH_SEPARATOR, true); |
| 286 | |
| 287 | // get all tokens (and delimiters) except last two |
| 288 | for (int i = aTok.countTokens() - 2; i > 0; i--) |
| 289 | { |
| 290 | buf.append(aTok.nextToken()); |
| 291 | } |
| 292 | } |
| 293 | catch (NullPointerException e) |
| 294 | { |
| 295 | Logging.errorPrint("Error in EquipSet.getParentIdPath", e); |
| 296 | } |
| 297 | |
| 298 | return buf.toString(); |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * Set's the number of items in this equipset |
no test coverage detected