templateReferences.typeReference = cloneNode(resourceTuple.getValueNode(), new HashMap<String, String>());
removeParametersFromTemplateCall(resourceTuple);
}
else if (key.equals(TRAIT_USE_KEY) && expect(resourceTuple.getValueNode(), sequence))
{
SequenceNode sequence = cloneSequenceNode((SequenceNode) resourceTuple.getValueNode(), new HashMap<String, String>());
templateReferences.traitsReference.put(ALL_ACTIONS, sequence);
removeParametersFromTraitsCall(resourceTuple);
}
else if (isAction(key))
{
Node actionNode = resourceTuple.getValueNode();
if (actionNode.getTag().equals(Tag.NULL))
{
actionNode = setTupleValueToEmptyMappingNode(resourceTuple);
}
else if (actionNode.getTag().equals(INCLUDE_TAG))
{
actionNode = includeResolver.resolve(actionNode, resourceLoader, nodeNandler);
resourceNode.getValue().remove(i);
resourceNode.getValue().add(i, new NodeTuple(resourceTuple.getKeyNode(), actionNode));
}
if (actionNode.getNodeId() != mapping)
{
break;
}
templateReferences.actionNodes.put(normalizeKey(key), actionNode);
for (NodeTuple actionTuple : ((MappingNode) actionNode).getValue())
{
String actionTupleKey = ((ScalarNode) actionTuple.getKeyNode()).getValue();
if (actionTupleKey.equals(TRAIT_USE_KEY) && expect(actionTuple.getValueNode(), sequence))
{
SequenceNode sequence = cloneSequenceNode((SequenceNode) actionTuple.getValueNode(), new HashMap<String, String>());
templateReferences.traitsReference.put(normalizeKey(key), sequence);
removeParametersFromTraitsCall(actionTuple);
}
}
}