/** * Gets the textual representation of the assigned label as it was entered by the user. */ @Exported(name="labelExpression") public String getAssignedLabelString() { if (canRoam || assignedNode==null) return null; try { LabelExpression.parseExpression(assignedNode); return assignedNode; } catch (ANTLRException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(assignedNode); } }
@Override public String getExpression() { return getDisplayName(); }
/** * Gets the textual representation of the assigned label as it was entered by the user. */ public String getAssignedLabelString() { if (canRoam || assignedNode==null) return null; try { LabelExpression.parseExpression(assignedNode); return assignedNode; } catch (ANTLRException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(assignedNode); } }
@Override public String getExpression() { return getDisplayName(); }
private Set<Node> getNodesForLabel(String labelExp) throws ANTLRException { Label label = LabelExpression.parseExpression(labelExp); return label.getNodes(); }
@Override public String getExpression() { return getDisplayName(); }
/** * Gets the textual representation of the assigned label as it was entered by the user. * @return Assigned label string */ @Override public String getAssignedLabelString() { if (assignedLabel == null) return null; try { LabelExpression.parseExpression(assignedLabel); return assignedLabel; } catch (ANTLRException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(assignedLabel); } }
@Override public String getExpression() { return getDisplayName(); }
/** * Gets the textual representation of the assigned label as it was entered by the user. * * @return assigned label as string */ public String getAssignedLabelString() { if (canRoam || nodeName == null) { return null; } try { LabelExpression.parseExpression(nodeName); return nodeName; } catch (ANTLRException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(nodeName); } }
@Override public String getExpression() { return getDisplayName(); }
/** * Gets the textual representation of the assigned label as it was entered by the user. * * @return assigned label as string */ public String getAssignedLabelString() { if (canRoam || nodeName == null) { return null; } try { LabelExpression.parseExpression(nodeName); return nodeName; } catch (ANTLRException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(nodeName); } }
@Override public String getExpression() { return getDisplayName(); }
/** * Gets the textual representation of the assigned label as it was entered by the user. * * @return assigned label as string */ public String getAssignedLabelString() { if (canRoam || nodeName == null) { return null; } try { LabelExpression.parseExpression(nodeName); return nodeName; } catch (ANTLRException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(nodeName); } }
/** * Gets the textual representation of the assigned label as it was entered * by the user. * * @return assigned label as string */ public String getAssignedLabelString() { if (canRoam || nodeName == null) { return null; } try { LabelExpression.parseExpression(nodeName); return nodeName; } catch (RecognitionException e) { // must be old label or host name that includes whitespace or other unsafe chars return LabelAtom.escape(nodeName); } }
private List<String> getNodeNamesForLabelExpression(String labelExp) { List<String> nodeNames = new ArrayList<String>(); try { Label label = LabelExpression.parseExpression(labelExp); for (Node node : label.getNodes()) { nodeNames.add(node.getSelfLabel().getName()); } } catch (ANTLRException e) { LOGGER.log(Level.SEVERE, "failed to parse label [" + labelExp + "]", e); } return nodeNames; }