use of org.osgi.service.indexer.impl.types.TypedValue in project bnd by bndtools.
the class RepoIndex method appendAttributeAndDirectiveTags.
private static void appendAttributeAndDirectiveTags(Tag parentTag, Map<String, Object> attribs, Map<String, String> directives) {
for (Entry<String, Object> attribEntry : attribs.entrySet()) {
Tag attribTag = new Tag(Schema.ELEM_ATTRIBUTE);
attribTag.addAttribute(Schema.ATTR_NAME, attribEntry.getKey());
TypedValue value = TypedValue.valueOf(attribEntry.getValue());
value.addTo(attribTag);
parentTag.addContent(attribTag);
}
for (Entry<String, String> directiveEntry : directives.entrySet()) {
Tag directiveTag = new Tag(Schema.ELEM_DIRECTIVE);
directiveTag.addAttribute(Schema.ATTR_NAME, directiveEntry.getKey());
directiveTag.addAttribute(Schema.ATTR_VALUE, directiveEntry.getValue());
parentTag.addContent(directiveTag);
}
}
Aggregations