use of org.mitre.cybox.common_2.AnyURIObjectPropertyType in project metron by apache.
the class URIHandler method extract.
@Override
public Iterable<LookupKV> extract(URIObjectType type, Map<String, Object> config) throws IOException {
List<LookupKV> ret = new ArrayList<>();
if (type != null) {
AnyURIObjectPropertyType val = type.getValue();
if (val != null) {
Object v = val.getValue();
if (v != null) {
final String indicatorType = getType();
LookupKV results = new LookupKV(new EnrichmentKey(indicatorType, v.toString()), new EnrichmentValue(new HashMap<String, Object>() {
{
put("source-type", "STIX");
put("uri", v.toString());
put("indicator-type", indicatorType);
put("source", type.toXMLString());
}
}));
ret.add(results);
}
}
}
return ret;
}
Aggregations