private void storeStatement(final Statement statement) throws IOException, IllegalArgumentException {
  final boolean isValidPredicate=validPredicates.isEmpty() || validPredicates.contains(statement.getPredicate());
  if (!isValidPredicate || !(statement.getObject() instanceof Literal)) {
    return;
  }
  final DateTime[] indexDateTimes=new DateTime[2];
  extractDateTime(statement,indexDateTimes);
  if (indexDateTimes[0] == null) {
    return;
  }
  try {
    if (indexDateTimes[1] != null) {
      final TemporalInterval interval=new TemporalInterval(new TemporalInstantRfc3339(indexDateTimes[0]),new TemporalInstantRfc3339(indexDateTimes[1]));
      addInterval(temporalIndexBatchWriter,interval,statement);
    }
 else {
      final TemporalInstant instant=new TemporalInstantRfc3339(indexDateTimes[0]);
      addInstant(temporalIndexBatchWriter,instant,statement);
    }
  }
 catch (  final MutationsRejectedException e) {
    throw new IOException("While adding interval/instant for statement =" + statement,e);
  }
}

private void storeStatement ( final Statement statement ) throws IOException , IllegalArgumentException { final boolean isValidPredicate = validPredicates . isEmpty ( ) || validPredicates . contains ( statement . getPredicate ( ) ) ; if ( ! isValidPredicate || ! ( statement . getObject ( ) instanceof Literal ) ) { return ; } final DateTime [ ] indexDateTimes = new DateTime [ 2 ] ; extractDateTime ( statement , indexDateTimes ) ; if ( indexDateTimes [ 0 ] == null ) { return ; } try { if ( indexDateTimes [ 1 ] != null ) { final TemporalInterval interval = new TemporalInterval ( new TemporalInstantRfc3339 ( indexDateTimes [ 0 ] ) , new TemporalInstantRfc3339 ( indexDateTimes [ 1 ] ) ) ; addInterval ( temporalIndexBatchWriter , interval , statement ) ; } else { final TemporalInstant instant = new TemporalInstantRfc3339 ( indexDateTimes [ 0 ] ) ; addInstant ( temporalIndexBatchWriter , instant , statement ) ; } } catch ( final MutationsRejectedException e ) { throw new IOException ( "While adding interval/instant for statement =" + statement , e ) ; } }
store a statement in the index if it meets the criterion : object should be a literal and one of the validpredicates from the configuration . if it does not meet the criteria , it is silently ignored . logs a warning if the object is not parse - able . attempts to parse with calendarvalue = literalvalue . calendarvalue ( ) if that fails , tries : org . joda . time . datetime . parse ( ) . t o d o parse an interval using multiple predicates for same subject - - ontology dependent .
