/** * Register the target of any hrefs' with the target id specified, to the attribute provided. * This has two effects: it puts the id and value in the discoveredComplexAttributes object so * that if we come across a href pointing to this id in the future, we'll be able to just use * the attribute provided as the value for that href. Secondly: it loops over any * placeholderComplexAttributes to see if any of them were waiting for this target, if their are * any they will have their values changed from the placeholder value to the value provided. * * @param id The id of the gml target. * @param value The parsed attribute value for this id. */ private void registerGmlTarget(String id, Attribute value) { // Add the value to the discoveredComplexAttributes object: discoveredComplexAttributes.put(id, value); // Check whether anything is waiting for this attribute and, if so, // populate them. if (placeholderComplexAttributes.containsKey(id)) { for (Attribute placeholderComplexAttribute : this.placeholderComplexAttributes.get(id)) { placeholderComplexAttribute.setValue(value.getValue()); } } }
target.setValue(geom);
contents, attribute.getDescriptor(), attribute.getIdentifier()); nestedAttContents.add(nestedAtt); attribute.setValue(nestedAttContents);
} else { instance.setValue(valueString);
ArrayList<Property> geomAtts = new ArrayList<Property>(); geomAtts.add(geom); parent.setValue(geomAtts); return geom;
/** * Register the target of any hrefs' with the target id specified, to the attribute provided. * This has two effects: it puts the id and value in the discoveredComplexAttributes object so * that if we come across a href pointing to this id in the future, we'll be able to just use * the attribute provided as the value for that href. Secondly: it loops over any * placeholderComplexAttributes to see if any of them were waiting for this target, if their are * any they will have their values changed from the placeholder value to the value provided. * * @param id The id of the gml target. * @param value The parsed attribute value for this id. */ private void registerGmlTarget(String id, Attribute value) { // Add the value to the discoveredComplexAttributes object: discoveredComplexAttributes.put(id, value); // Check whether anything is waiting for this attribute and, if so, // populate them. if (placeholderComplexAttributes.containsKey(id)) { for (Attribute placeholderComplexAttribute : this.placeholderComplexAttributes.get(id)) { placeholderComplexAttribute.setValue(value.getValue()); } } }
/** * Set a simple content value for an attribute. * * @param attribute * Attribute of simple content type. * @param value * Value for the simple content. * @return The attribute with simple content type. */ private Attribute setSimpleContentValue(Attribute attribute, Object value) { ArrayList<Attribute> contents = new ArrayList<Attribute>(); Attribute simpleContent = buildSimpleContent(attribute.getType(), value); contents.add(simpleContent); attribute.setValue(contents); return simpleContent; }
target.setValue(geom);
} else { instance.setValue(valueString);