public static DateTimeDateTimeLiteralBuilder of(DateTime dateTime) { checkNotNull(dateTime,DATE_TIME_CANNOT_BE_NULL); return new DateTimeDateTimeLiteralBuilder(dateTime); }
managedIndividual(dataSet,"one","template1")). withValue( Literals.of(new Date()).date(), localIndividual(dataSet,"two")); InversePropertyConstraint ipc= relativeIndividual(dataSet,"three","template3","path")). withValue( Literals.of(new Date()).date(), externalIndividual(dataSet,"http://www.example.org/external/"), newIndividual(dataSet, "new/resource"));
managedIndividual(dataSet,"one","template1")). withValue( Literals.of(new Date()).date(), localIndividual(dataSet,"two")); InversePropertyConstraint ipc= relativeIndividual(dataSet,"three","template3","path")). withValue( Literals.of(new Date()).date(), externalIndividual(dataSet,"http://www.example.org/external/"), newIndividual(dataSet, "new/resource"));
addValue( URI.create("http://www.example.org/vocab#creationDate"), Literals.of(new Date()).dateTime()); try { this.handler.add(name, representation);
/** * Update the resource representation adding a temporal timestamp of when * the resource was last updated. */ @Override public void run() { ApplicationContext ctx = ApplicationContext.getInstance(); Date date = new Date(); LOGGER.debug("Starting update process on {}...",date); try(WriteSession session = ctx.createSession()) { ResourceSnapshot snapshot = session.find(ResourceSnapshot.class,this.name,DynamicResourceHandler.class); DataSet dataSet = this.handler.get(snapshot); Individual<?,?> individual = dataSet. individualOfId( ManagedIndividualId. createId(this.name, DynamicResourceHandler.ID)); individual. addValue( REFRESHED_ON, Literals.of(date).dateTime()); this.handler.update(this.name, dataSet); session.modify(snapshot); session.saveChanges(); } catch (Exception e) { LOGGER.error("Could not update resource",e); } finally { LOGGER.debug("Finalized update process"); } }
public static DateTimeDateTimeLiteralBuilder of(Date date) { checkNotNull(date,DATE_CANNOT_BE_NULL); return new DateTimeDateTimeLiteralBuilder(new DateTime(date)); }
@Before public void setUp() { this.dateTime = Literals.of(NOW).dateTime(); }
public static DateTimeDateTimeLiteralBuilder of(Calendar calendar) { checkNotNull(calendar,CALENDAR_CANNOT_BE_NULL); return new DateTimeDateTimeLiteralBuilder(normalizeChronology(new DateTime(calendar))); }
public static DateTimeDateTimeLiteralBuilder of(GregorianCalendar calendar) { checkNotNull(calendar,CALENDAR_CANNOT_BE_NULL); return new DateTimeDateTimeLiteralBuilder(normalizeChronology(new DateTime(calendar))); }