private void countCooccurringProperties ( StatementDocument statementDocument , UsageRecord usageRecord , PropertyIdValue thisPropertyIdValue ) { for ( StatementGroup sg : statementDocument . getStatementGroups ( ) ) { if ( ! sg . getProperty ( ) . equals ( thisPropertyIdValue ) ) { Integer propertyId = getNumId ( sg . getProperty ( ) . getId ( ) , false ) ; if ( ! usageRecord . propertyCoCounts . containsKey ( propertyId ) ) { usageRecord . propertyCoCounts . put ( propertyId , 1 ) ; } else { usageRecord . propertyCoCounts . put ( propertyId , usageRecord . propertyCoCounts . get ( propertyId ) + 1 ) ; } } } }
Counts each property for which there is a statement in the given item document ignoring the property thisPropertyIdValue to avoid properties counting themselves .