private void parseTarget() throws SchemaException { VariableBindingDefinitionType targetType = mappingType.getTarget(); if (targetType == null) { outputDefinition = defaultTargetDefinition; outputPath = defaultTargetPath; } else { ItemPathType itemPathType = targetType.getPath(); if (itemPathType == null) { outputDefinition = defaultTargetDefinition; outputPath = defaultTargetPath; } else { ItemPath path = itemPathType.getItemPath(); outputDefinition = ExpressionUtil.resolveDefinitionPath(path, variables, targetContext, "target definition in "+getMappingContextDescription()); if (outputDefinition == null) { throw new SchemaException("No target item that would conform to the path "+path+" in "+getMappingContextDescription()); } outputPath = path.stripVariableSegment(); } } if (stringPolicyResolver != null) { stringPolicyResolver.setOutputDefinition(outputDefinition); stringPolicyResolver.setOutputPath(outputPath); } }
ValuePolicyResolver valuePolicyResolver = context.getValuePolicyResolver(); if (valuePolicyResolver != null) { valuePolicyType = valuePolicyResolver.resolve();