public SNode getBreakingNodeAndClearContext(CheckingNodeContext checkingNodeContext) {
    if (checkingNodeContext.getBreakingNode() == null) {
      return null;
    }

    SNode node = checkingNodeContext.getBreakingNode().getNode();
    checkingNodeContext.setBreakingNode(null);

    return node;
  }
  @Override
  public boolean canBeRoot(
      IOperationContext context, SModel model, @Nullable CheckingNodeContext checkingNodeContext) {
    boolean result = static_canBeARoot(model, context);

    if (!(result) && checkingNodeContext != null) {
      checkingNodeContext.setBreakingNode(canBeRootBreakingPoint);
    }

    return result;
  }
  @Override
  public boolean canBeChild(
      @Nullable SNode node,
      SNode parentNode,
      SNode link,
      SNode childConcept,
      final IOperationContext operationContext,
      @Nullable final CheckingNodeContext checkingNodeContext) {
    boolean result = staticCanBeAChild_Old(node, parentNode, link, childConcept, operationContext);

    if (!(result) && checkingNodeContext != null) {
      checkingNodeContext.setBreakingNode(canBeChildBreakingPoint);
    }

    return result;
  }
  @Override
  public boolean canBeParent(
      SNode node,
      @Nullable SNode childNode,
      SNode childConcept,
      SNode link,
      IOperationContext operationContext,
      @Nullable CheckingNodeContext checkingNodeContext) {
    boolean result = static_canBeAParent(node, childNode, childConcept, link, operationContext);

    if (!(result) && checkingNodeContext != null) {
      checkingNodeContext.setBreakingNode(canBeParentBreakingPoint);
    }

    return result;
  }
예제 #5
0
  @Override
  public boolean canBeChild(
      final IOperationContext operationContext,
      SNode node,
      SNode node1,
      SNode node2,
      @Nullable final CheckingNodeContext checkingNodeContext) {
    boolean result =
        static_canBeAChild(operationContext, new CanBeAChildContext(node, node1, node2));

    if (!(result) && checkingNodeContext != null) {
      checkingNodeContext.setBreakingNode(canBeChildBreakingPoint);
    }

    return result;
  }