node = new TmfFilterTraceTypeNode(null);
String traceTypeId = atts.getValue(TmfFilterTraceTypeNode.TYPE_ATTR);
+ traceTypeId = TmfTraceType.buildCompatibilityTraceTypeId(traceTypeId);
((TmfFilterTraceTypeNode) node).setTraceTypeId(traceTypeId);
TraceTypeHelper helper = TmfTraceType.getTraceType(traceTypeId);
if (helper != null) {
private static void createEventAspect(TmfFilterAspectNode node, Attributes atts) {
String traceTypeId = atts.getValue(TmfFilterAspectNode.TRACE_TYPE_ID_ATTR);
+ traceTypeId = TmfTraceType.buildCompatibilityTraceTypeId(traceTypeId);
String name = atts.getValue(TmfFilterAspectNode.EVENT_ASPECT_ATTR);
if (TmfFilterAspectNode.BASE_ASPECT_ID.equals(traceTypeId)) {
for (ITmfEventAspect eventAspect : ITmfEventAspect.BASE_ASPECTS) {
if (eventAspect.getName().equals(name)) {
node.setEventAspect(eventAspect);
node.setTraceTypeId(traceTypeId);
+ if (eventAspect instanceof TmfEventFieldAspect) {
+ String field = atts.getValue(TmfFilterAspectNode.FIELD_ATTR);
+ if (field != null && !field.isEmpty()) {
+ node.setEventAspect(((TmfEventFieldAspect) eventAspect).forField(field));
+ }
+ }
break;
}
}
- } else if (TmfFilterAspectNode.EVENT_FIELD_ASPECT_ID.equals(traceTypeId) && name != null) {
- ITmfEventAspect eventAspect = new TmfEventFieldAspect(name, name);
- node.setEventAspect(eventAspect);
- node.setTraceTypeId(traceTypeId);
} else if (traceTypeId != null && name != null) {
TraceTypeHelper helper = TmfTraceType.getTraceType(traceTypeId);
if (helper != null) {
if (eventAspect.getName().equals(name)) {
node.setEventAspect(eventAspect);
node.setTraceTypeId(traceTypeId);
+ if (eventAspect instanceof TmfEventFieldAspect) {
+ String field = atts.getValue(TmfFilterAspectNode.FIELD_ATTR);
+ if (field != null && !field.isEmpty()) {
+ node.setEventAspect(((TmfEventFieldAspect) eventAspect).forField(field));
+ }
+ }
break;
}
}
node.setEventAspect(ITmfEventAspect.BaseAspects.CONTENTS);
node.setTraceTypeId(TmfFilterAspectNode.BASE_ASPECT_ID);
} else {
- ITmfEventAspect eventAspect = new TmfEventFieldAspect(field, field);
- node.setEventAspect(eventAspect);
- node.setTraceTypeId(TmfFilterAspectNode.EVENT_FIELD_ASPECT_ID);
+ node.setEventAspect(ITmfEventAspect.BaseAspects.CONTENTS.forField(field));
+ node.setTraceTypeId(TmfFilterAspectNode.BASE_ASPECT_ID);
}
}
}