/** * @param dto * @return Map<Name, Expression> with the values per qualified name (attribute name in the * mapping) * @throws DataSourceException */ private Map getClientProperties(org.geotools.data.complex.config.AttributeMapping dto) throws DataSourceException { if (dto.getClientProperties().size() == 0) { return Collections.EMPTY_MAP; } Map clientProperties = new HashMap(); for (Iterator it = dto.getClientProperties().entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); String name = (String) entry.getKey(); Name qName = Types.degloseName(name, namespaces); String cqlExpression = (String) entry.getValue(); final Expression expression = parseOgcCqlExpression(cqlExpression); clientProperties.put(qName, expression); } return clientProperties; }
String idExpr = attDto.getIdentifierExpression(); String idXpath = null; if (idExpr == null) { idXpath = attDto.getIdentifierPath(); if (idXpath != null) { String sourceExpr = attDto.getSourceExpression(); String inputXPath = null; if (sourceExpr == null) { inputXPath = attDto.getInputAttributePath(); if (inputXPath != null) { final StepList inputXPathSteps = String expectedInstanceTypeName = attDto.getTargetAttributeSchemaElement(); final String targetXPath = attDto.getTargetAttributePath(); final StepList targetXPathSteps = XPath.steps(root, targetXPath, namespaces); validateConfiguredNamespaces(targetXPathSteps); final boolean isMultiValued = attDto.isMultiple(); String sourceElement = attDto.getLinkElement(); if (sourceElement != null) { String sourceField = attDto.getLinkField(); StepList sourceFieldSteps = null; if (sourceField != null) {
parseExpression(attributeMapping.getSourceExpression()); attributes.addAll(extractAttributesNames(expression)); if (attributeMapping.getMultipleValue() instanceof SolrMultipleValue) { expression = ((SolrMultipleValue) attributeMapping.getMultipleValue()) .getExpression(); attributes.addAll(extractAttributesNames(expression)); parseExpression(attributeMapping.getIdentifierExpression()); attributes.addAll(extractAttributesNames(expression)); (Set<String>) attributeMapping .getClientProperties() .values() .stream()
for (AttributeMapping attributeMapping : attributesMappings) { Expression expression = parseExpression(attributeMapping.getSourceExpression()); attributes.addAll(extractAttributesNames(expression)); expression = parseExpression(attributeMapping.getIdentifierExpression()); attributes.addAll(extractAttributesNames(expression)); for (Object value : attributeMapping.getClientProperties().values()) { attributes.addAll(extractAttributesNames(parseExpression(value))); if (attributeMapping.getMultipleValue() instanceof SolrMultipleValue) { SolrMultipleValue multipleValue = (SolrMultipleValue) attributeMapping.getMultipleValue(); attributes.addAll(extractAttributesNames(multipleValue.getExpression()));
String idExpr = attDto.getIdentifierExpression(); String idXpath = null; if (idExpr == null) { idXpath = attDto.getIdentifierPath(); if (idXpath != null) { String sourceExpr = attDto.getSourceExpression(); String inputXPath = null; if (sourceExpr == null) { inputXPath = attDto.getInputAttributePath(); if (inputXPath != null) { final StepList inputXPathSteps = XPath.steps(root, itemXpath + "/" + inputXPath, namespaces); String expectedInstanceTypeName = attDto.getTargetAttributeSchemaElement(); final String targetXPath = attDto.getTargetAttributePath(); final StepList targetXPathSteps = XPath.steps(root, targetXPath, namespaces); validateConfiguredNamespaces(targetXPathSteps); final boolean isMultiValued = attDto.isMultiple(); String sourceElement = attDto.getLinkElement(); if (sourceElement != null) { String sourceField = attDto.getLinkField(); StepList sourceFieldSteps = null; if (sourceField != null) {
/** * * @param dto * @return Map<Name, Expression> with the values per qualified name (attribute name in the * mapping) * @throws DataSourceException */ private Map getClientProperties(org.geotools.data.complex.config.AttributeMapping dto) throws DataSourceException { if (dto.getClientProperties().size() == 0) { return Collections.EMPTY_MAP; } Map clientProperties = new HashMap(); for (Iterator it = dto.getClientProperties().entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); String name = (String) entry.getKey(); Name qName = Types.degloseName(name, namespaces); String cqlExpression = (String) entry.getValue(); final Expression expression = parseOgcCqlExpression(cqlExpression); clientProperties.put(qName, expression); } return clientProperties; }