}
@Override
public void event(Object dest, Event event) {
if ( this.equals(dest) ) {
EventType type = event.getType();
if ( type.equals(Constants.eventQuad) ) {
if ( counterQuads == null ) counterQuads = context.getCounter(Constants.TDBLOADER4_COUNTER_GROUPNAME, Constants.TDBLOADER4_COUNTER_QUADS);
numQuads++;
} else if ( type.equals(Constants.eventTriple) ) {
if ( counterTriples == null ) counterTriples = context.getCounter(Constants.TDBLOADER4_COUNTER_GROUPNAME, Constants.TDBLOADER4_COUNTER_TRIPLES);
numTriples++;
} else if ( type.equals(Constants.eventDuplicate) ) {
if ( counterDuplicates == null ) counterDuplicates = context.getCounter(Constants.TDBLOADER4_COUNTER_GROUPNAME, Constants.TDBLOADER4_COUNTER_DUPLICATES);
numDuplicates++;
} else if ( type.equals(Constants.eventMalformed) ) {
if ( counterMalformed == null ) counterMalformed = context.getCounter(Constants.TDBLOADER4_COUNTER_GROUPNAME, Constants.TDBLOADER4_COUNTER_MALFORMED);
numMalformed++;
} else if ( type.equals(Constants.eventRdfNode) ) {
if ( counterRdfNodes == null ) counterRdfNodes = context.getCounter(Constants.TDBLOADER4_COUNTER_GROUPNAME, Constants.TDBLOADER4_COUNTER_RDFNODES);
numRdfNodes++;
} else if ( type.equals(Constants.eventRecord) ) {
if ( counterRecords == null ) counterRecords = context.getCounter(Constants.TDBLOADER4_COUNTER_GROUPNAME, Constants.TDBLOADER4_COUNTER_RECORDS);
numRecords++;
} else {
throw new TDBLoader4Exception("Unsupported event type: " + type);
}