use of org.opennms.netmgt.collection.api.AttributeGroup in project opennms by OpenNMS.
the class DistributedLatencyCollectionResource method getGroup.
/**
* Finds, or creates, and returns the AttributeGroup for the given group Type
*
* @param groupType a {@link org.opennms.netmgt.collection.api.AttributeGroupType} object.
* @return a {@link org.opennms.netmgt.collection.api.AttributeGroup} object.
*/
public final AttributeGroup getGroup(AttributeGroupType groupType) {
AttributeGroup group = m_attributeGroups.get(groupType);
if (group == null) {
group = new AttributeGroup(this, groupType);
m_attributeGroups.put(groupType, group);
}
return group;
}
use of org.opennms.netmgt.collection.api.AttributeGroup in project opennms by OpenNMS.
the class LatencyCollectionResource method visit.
/**
* {@inheritDoc}
*/
@Override
public void visit(CollectionSetVisitor visitor) {
visitor.visitResource(this);
for (AttributeGroup group : m_attributeGroups.values()) {
group.visit(visitor);
}
visitor.completeResource(this);
}
use of org.opennms.netmgt.collection.api.AttributeGroup in project opennms by OpenNMS.
the class LatencyCollectionResource method getGroup.
/**
* Finds, or creates, and returns the AttributeGroup for the given group Type
*
* @param groupType a {@link org.opennms.netmgt.collection.api.AttributeGroupType} object.
* @return a {@link org.opennms.netmgt.collection.api.AttributeGroup} object.
*/
public final AttributeGroup getGroup(AttributeGroupType groupType) {
AttributeGroup group = m_attributeGroups.get(groupType);
if (group == null) {
group = new AttributeGroup(this, groupType);
m_attributeGroups.put(groupType, group);
}
return group;
}
use of org.opennms.netmgt.collection.api.AttributeGroup in project opennms by OpenNMS.
the class AbstractCollectionResource method getGroup.
/**
* Finds, or creates, and returns the AttributeGroup for the given group Type
*
* @param groupType a {@link org.opennms.netmgt.collection.api.AttributeGroupType} object.
* @return a {@link org.opennms.netmgt.collection.api.AttributeGroup} object.
*/
public final AttributeGroup getGroup(AttributeGroupType groupType) {
AttributeGroup group = m_attributeGroups.get(groupType);
if (group == null) {
group = new AttributeGroup(this, groupType);
m_attributeGroups.put(groupType, group);
}
return group;
}
use of org.opennms.netmgt.collection.api.AttributeGroup in project opennms by OpenNMS.
the class CollectCommand method printCollectionSet.
private static void printCollectionSet(CollectionSet collectionSet) {
AtomicBoolean didPrintAttribute = new AtomicBoolean(false);
collectionSet.visit(new AbstractCollectionSetVisitor() {
@Override
public void visitResource(CollectionResource resource) {
System.out.printf("%s\n", resource);
}
@Override
public void visitGroup(AttributeGroup group) {
System.out.printf("\tGroup: %s\n", group.getName());
}
@Override
public void visitAttribute(CollectionAttribute attribute) {
System.out.printf("\t\t%s\n", attribute);
didPrintAttribute.set(true);
}
});
if (!didPrintAttribute.get()) {
System.out.println("(Empty collection set)");
}
}
Aggregations