@Override
	public void visitResourceInst(ResourceInst resourceInst)
	{
		String name = resourceInst.getName();
		
		ResourceType resourceType= resourceInst.getType();
		
		boolean skip =  resourceType == null || resourceType.getName() == null || 
		(this.typeName != null && !resourceType.getName().toUpperCase().contains(this.typeName));
		
		if(skip)
		{
			System.out.println("skipping resourceType:"+resourceType+" name:"+name);
			return;
		}
		
		ArrayList<String> values = new ArrayList<String>();
		ArrayList<String> headers = new ArrayList<String>();
		
		headers.add("name");
		values.add(name);
		
	
		StatValue[] statValues = resourceInst.getStatValues();
		if(statValues == null)
			return;
		
		for (StatValue statValue : statValues)
		{
			String statName = statValue.getDescriptor().getName();
			
			if(this.statNames != null && this.statNames.length > 0)
			{
				if(Arrays.binarySearch(statNames, statName) < 0)
					continue; //skip
			}
			StatValue dataStoreEntryCount = resourceInst.getStatValue(statName);

			StatDescriptor statDescriptor = resourceInst.getType().getStat(statName);
			
			headers.add(statName+"        "+statDescriptor.getDescription());
			
			values.add(String.valueOf(dataStoreEntryCount.getSnapshotsMaximum()));
		}
		
		writeCsv(resourceInst,headers,values);
		
	}
@ Override public void visitResourceInst ( ResourceInst resourceInst ) { String name = resourceInst . getName ( ) ; ResourceType resourceType = resourceInst . getType ( ) ; boolean skip = resourceType == null || resourceType . getName ( ) == null || ( this . typeName != null && ! resourceType . getName ( ) . toUpperCase ( ) . contains ( this . typeName ) ) ; if ( skip ) { System . out . println ( "skipping resourceType:" + resourceType + " name:" + name ) ; return ; } ArrayList < String > values = new ArrayList < String > ( ) ; ArrayList < String > headers = new ArrayList < String > ( ) ; headers . add ( "name" ) ; values . add ( name ) ; StatValue [ ] statValues = resourceInst . getStatValues ( ) ; if ( statValues == null ) return ; for ( StatValue statValue : statValues ) { String statName = statValue . getDescriptor ( ) . getName ( ) ; if ( this . statNames != null && this . statNames . length > 0 ) { if ( Arrays . binarySearch ( statNames , statName ) < 0 ) continue ; } StatValue dataStoreEntryCount = resourceInst . getStatValue ( statName ) ; StatDescriptor statDescriptor = resourceInst . getType ( ) . getStat ( statName ) ; headers . add ( statName + "        " + statDescriptor . getDescription ( ) ) ; values . add ( String . valueOf ( dataStoreEntryCount . getSnapshotsMaximum ( ) ) ) ; } writeCsv ( resourceInst , headers , values ) ; }
------------------------------------------------