public static interface IlvPolylineMergerDataSource.IlvGraphicIdentifier
// Create an object that implements IlvPolylineMergerDataSource.IlvGraphicIdentifier
// For instance, the identifier returns the value of the field "STREETNAME" if any
IlvPolylineMergerDataSource.IlvGraphicIdentifier identifier = new
IlvPolylineMergerDataSource.IlvGraphicIdentifier() {
public String getIdentifierPropertyName() { return "STREETNAME"; }
public Object getIdentifier(IlvGraphic component) {
if (component != null) {
IlvAttributeProperty properties = (IlvAttributeProperty) component.getNamedProperty(IlvAttributeProperty.NAME);
if (properties instanceof IlvFeatureAttributeProperty) {
try {
return ((IlvFeatureAttributeProperty)properties).getAttribute(getIdentifierPropertyName());
} catch (IllegalArgumentException e){
// if property does not exist
}
}
}
return null;
}
IlvMapDataSource newSource=new IlvPolylineMergerDataSource(oldSource,identifier);
IlvMapDataSourceModel dsm = IlvMapDataSourceProperty.getMapDataSourceModel(manager);
dsm.addChild(reader);
| Modifier and Type | Method and Description |
|---|---|
Object |
getIdentifier(IlvGraphic graphic)
Identifies this
|
String |
getIdentifierPropertyName()
Returns the property name (to reintroduce into the merged object)
|
Object getIdentifier(IlvGraphic graphic)
graphic - The object to identify.String getIdentifierPropertyName()
© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.