Author: rhauch
Date: 2008-05-23 23:48:56 -0400 (Fri, 23 May 2008)
New Revision: 192
Added:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/DateTimeFactory.java
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateValueFactory.java
Removed:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/DateValueFactory.java
Modified:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/ValueFactories.java
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateTime.java
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/StandardValueFactories.java
branches/federation/dna-spi/src/test/java/org/jboss/dna/spi/graph/impl/DateValueFactoryTest.java
Log:
DNA-67: Create graph API for federation engine
http://jira.jboss.org/jira/browse/DNA-67
Added DateTimeFactory interface with additional methods for create DateTime instances.
Added:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/DateTimeFactory.java
===================================================================
---
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/DateTimeFactory.java
(rev 0)
+++
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/DateTimeFactory.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.spi.graph;
+
+/**
+ * @author Randall Hauch
+ */
+public interface DateTimeFactory extends ValueFactory<DateTime> {
+
+ /**
+ * Create a date-time instance for the current time.
+ * @return the date-time instance
+ */
+ DateTime create();
+
+ /**
+ * Create a date-time instance given the individual values for the fields
+ * @param year the year of the era
+ * @param monthOfYear the month of the year
+ * @param dayOfMonth the day of the month
+ * @param hourOfDay the hour of the day
+ * @param minuteOfHour the minute of the hour
+ * @param secondOfMinute the second of the minute
+ * @param millisecondsOfSecond the milliseconds of the second
+ * @return the date-time instance
+ */
+ DateTime create( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond );
+
+ /**
+ * Create a date-time instance given the individual values for the fields
+ * @param year the year of the era
+ * @param monthOfYear the month of the year
+ * @param dayOfMonth the day of the month
+ * @param hourOfDay the hour of the day
+ * @param minuteOfHour the minute of the hour
+ * @param secondOfMinute the second of the minute
+ * @param millisecondsOfSecond the milliseconds of the second
+ * @param timeZoneOffsetHours the number of hours offset from UTC for the time zone
+ * @return the date-time instance
+ */
+ DateTime create( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond, int timeZoneOffsetHours );
+
+ /**
+ * Create a date-time instance given the individual values for the fields
+ * @param year the year of the era
+ * @param monthOfYear the month of the year
+ * @param dayOfMonth the day of the month
+ * @param hourOfDay the hour of the day
+ * @param minuteOfHour the minute of the hour
+ * @param secondOfMinute the second of the minute
+ * @param millisecondsOfSecond the milliseconds of the second
+ * @param timeZoneId the ID of the time zone (e.g, "PST", "UTC",
"EDT"); may not be null
+ * @return the date-time instance
+ */
+ DateTime create( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond, String timeZoneId );
+
+}
Property changes on:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/DateTimeFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/ValueFactories.java
===================================================================
---
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/ValueFactories.java 2008-05-24
03:23:42 UTC (rev 191)
+++
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/ValueFactories.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -80,7 +80,7 @@
* Get the value factory for {@link PropertyType#DATE date} properties.
* @return the factory; never null
*/
- ValueFactory<DateTime> getDateFactory();
+ DateTimeFactory getDateFactory();
/**
* Get the value factory for {@link PropertyType#BOOLEAN boolean} properties.
Deleted:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/DateValueFactory.java
===================================================================
---
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/DateValueFactory.java 2008-05-24
03:23:42 UTC (rev 191)
+++
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/DateValueFactory.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -1,184 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.dna.spi.graph.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.math.BigDecimal;
-import java.net.URI;
-import java.util.Calendar;
-import java.util.Date;
-import net.jcip.annotations.Immutable;
-import org.jboss.dna.common.text.TextEncoder;
-import org.jboss.dna.spi.SpiI18n;
-import org.jboss.dna.spi.graph.DateTime;
-import org.jboss.dna.spi.graph.Name;
-import org.jboss.dna.spi.graph.Path;
-import org.jboss.dna.spi.graph.PropertyType;
-import org.jboss.dna.spi.graph.Reference;
-import org.jboss.dna.spi.graph.ValueFactory;
-import org.jboss.dna.spi.graph.ValueFormatException;
-
-/**
- * The standard {@link ValueFactory} for {@link PropertyType#DATE} values.
- * @author Randall Hauch
- */
-@Immutable
-public class DateValueFactory extends AbstractValueFactory<DateTime> {
-
- public DateValueFactory( TextEncoder encoder, ValueFactory<String>
stringValueFactory ) {
- super(PropertyType.DATE, encoder, stringValueFactory);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( String value ) throws ValueFormatException {
- if (value == null) return null;
- try {
- return new JodaDateTime(value.trim());
- } catch (IllegalArgumentException e) {
- throw new
ValueFormatException(SpiI18n.errorCreatingValue.text(getPropertyType().getName(),
String.class.getSimpleName(), value), e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( String value, TextEncoder decoder ) {
- // this probably doesn't really need to call the decoder, but by doing so
then we don't care at all what the decoder does
- return create(getEncoder(decoder).decode(value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( int value ) {
- return create((long)value);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( long value ) {
- return new JodaDateTime(value);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( boolean value ) throws ValueFormatException {
- throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Date.class.getSimpleName(), value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( float value ) throws ValueFormatException {
- return create((long)value);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( double value ) throws ValueFormatException {
- return create((long)value);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( BigDecimal value ) throws ValueFormatException {
- if (value == null) return null;
- return create(value.longValue());
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( Calendar value ) throws ValueFormatException {
- if (value == null) return null;
- return new JodaDateTime(value);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( Date value ) throws ValueFormatException {
- if (value == null) return null;
- return new JodaDateTime(value);
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( Name value ) throws ValueFormatException {
- throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Name.class.getSimpleName(), value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( Path value ) throws ValueFormatException {
- throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Path.class.getSimpleName(), value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( Reference value ) throws ValueFormatException {
- throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Reference.class.getSimpleName(), value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( URI value ) throws ValueFormatException {
- throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
URI.class.getSimpleName(), value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( byte[] value ) throws ValueFormatException {
- // First attempt to create a string from the value, then a long from the string
...
- return create(getStringValueFactory().create(value));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( InputStream stream, int approximateLength ) throws
IOException, ValueFormatException {
- // First attempt to create a string from the value, then a double from the string
...
- return create(getStringValueFactory().create(stream, approximateLength));
- }
-
- /**
- * {@inheritDoc}
- */
- public DateTime create( Reader reader, int approximateLength ) throws IOException,
ValueFormatException {
- // First attempt to create a string from the value, then a double from the string
...
- return create(getStringValueFactory().create(reader, approximateLength));
- }
-
-}
Modified:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateTime.java
===================================================================
---
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateTime.java 2008-05-24
03:23:42 UTC (rev 191)
+++
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateTime.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -71,6 +71,14 @@
this.instance = new DateTime(year, monthOfYear, dayOfMonth, hourOfDay,
minuteOfHour, secondOfMinute, millisecondsOfSecond, dateTimeZone);
}
+ public JodaDateTime( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond, int timeZoneOffsetHours ) {
+ this.instance = new DateTime(year, monthOfYear, dayOfMonth, hourOfDay,
minuteOfHour, secondOfMinute, millisecondsOfSecond,
DateTimeZone.forOffsetHours(timeZoneOffsetHours));
+ }
+
+ public JodaDateTime( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond, String timeZoneId ) {
+ this.instance = new DateTime(year, monthOfYear, dayOfMonth, hourOfDay,
minuteOfHour, secondOfMinute, millisecondsOfSecond, DateTimeZone.forID(timeZoneId));
+ }
+
public JodaDateTime( java.util.Date jdkDate ) {
this.instance = new DateTime(jdkDate);
}
Copied:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateValueFactory.java
(from rev 191,
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/DateValueFactory.java)
===================================================================
---
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateValueFactory.java
(rev 0)
+++
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateValueFactory.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -0,0 +1,213 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.dna.spi.graph.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.math.BigDecimal;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import net.jcip.annotations.Immutable;
+import org.jboss.dna.common.text.TextEncoder;
+import org.jboss.dna.spi.SpiI18n;
+import org.jboss.dna.spi.graph.DateTime;
+import org.jboss.dna.spi.graph.DateTimeFactory;
+import org.jboss.dna.spi.graph.Name;
+import org.jboss.dna.spi.graph.Path;
+import org.jboss.dna.spi.graph.PropertyType;
+import org.jboss.dna.spi.graph.Reference;
+import org.jboss.dna.spi.graph.ValueFactory;
+import org.jboss.dna.spi.graph.ValueFormatException;
+
+/**
+ * The standard {@link ValueFactory} for {@link PropertyType#DATE} values.
+ * @author Randall Hauch
+ */
+@Immutable
+public class JodaDateValueFactory extends AbstractValueFactory<DateTime> implements
DateTimeFactory {
+
+ public JodaDateValueFactory( TextEncoder encoder, ValueFactory<String>
stringValueFactory ) {
+ super(PropertyType.DATE, encoder, stringValueFactory);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( String value ) throws ValueFormatException {
+ if (value == null) return null;
+ try {
+ return new JodaDateTime(value.trim());
+ } catch (IllegalArgumentException e) {
+ throw new
ValueFormatException(SpiI18n.errorCreatingValue.text(getPropertyType().getName(),
String.class.getSimpleName(), value), e);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( String value, TextEncoder decoder ) {
+ // this probably doesn't really need to call the decoder, but by doing so
then we don't care at all what the decoder does
+ return create(getEncoder(decoder).decode(value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( int value ) {
+ return create((long)value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( long value ) {
+ return new JodaDateTime(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( boolean value ) throws ValueFormatException {
+ throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Date.class.getSimpleName(), value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( float value ) throws ValueFormatException {
+ return create((long)value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( double value ) throws ValueFormatException {
+ return create((long)value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( BigDecimal value ) throws ValueFormatException {
+ if (value == null) return null;
+ return create(value.longValue());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( Calendar value ) throws ValueFormatException {
+ if (value == null) return null;
+ return new JodaDateTime(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( Date value ) throws ValueFormatException {
+ if (value == null) return null;
+ return new JodaDateTime(value);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( Name value ) throws ValueFormatException {
+ throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Name.class.getSimpleName(), value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( Path value ) throws ValueFormatException {
+ throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Path.class.getSimpleName(), value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( Reference value ) throws ValueFormatException {
+ throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
Reference.class.getSimpleName(), value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( URI value ) throws ValueFormatException {
+ throw new
ValueFormatException(SpiI18n.unableToCreateValue.text(getPropertyType().getName(),
URI.class.getSimpleName(), value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( byte[] value ) throws ValueFormatException {
+ // First attempt to create a string from the value, then a long from the string
...
+ return create(getStringValueFactory().create(value));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( InputStream stream, int approximateLength ) throws
IOException, ValueFormatException {
+ // First attempt to create a string from the value, then a double from the string
...
+ return create(getStringValueFactory().create(stream, approximateLength));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( Reader reader, int approximateLength ) throws IOException,
ValueFormatException {
+ // First attempt to create a string from the value, then a double from the string
...
+ return create(getStringValueFactory().create(reader, approximateLength));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond ) {
+ return new JodaDateTime(year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour,
secondOfMinute, millisecondsOfSecond);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond, int timeZoneOffsetHours ) {
+ return new JodaDateTime(year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour,
secondOfMinute, millisecondsOfSecond, timeZoneOffsetHours);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public DateTime create( int year, int monthOfYear, int dayOfMonth, int hourOfDay, int
minuteOfHour, int secondOfMinute, int millisecondsOfSecond, String timeZoneId ) {
+ return new JodaDateTime(year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour,
secondOfMinute, millisecondsOfSecond, timeZoneId);
+ }
+
+}
Property changes on:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/JodaDateValueFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/StandardValueFactories.java
===================================================================
---
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/StandardValueFactories.java 2008-05-24
03:23:42 UTC (rev 191)
+++
branches/federation/dna-spi/src/main/java/org/jboss/dna/spi/graph/impl/StandardValueFactories.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -31,7 +31,7 @@
import org.jboss.dna.common.text.TextEncoder;
import org.jboss.dna.common.util.ArgCheck;
import org.jboss.dna.spi.graph.Binary;
-import org.jboss.dna.spi.graph.DateTime;
+import org.jboss.dna.spi.graph.DateTimeFactory;
import org.jboss.dna.spi.graph.NameFactory;
import org.jboss.dna.spi.graph.NamespaceRegistry;
import org.jboss.dna.spi.graph.PathFactory;
@@ -51,7 +51,7 @@
private final ValueFactory<String> stringFactory;
private final ValueFactory<Binary> binaryFactory;
private final ValueFactory<Boolean> booleanFactory;
- private final ValueFactory<DateTime> dateFactory;
+ private final DateTimeFactory dateFactory;
private final ValueFactory<BigDecimal> decimalFactory;
private final ValueFactory<Double> doubleFactory;
private final ValueFactory<Long> longFactory;
@@ -98,7 +98,7 @@
this.stringFactory = getFactory(factories, new
StringValueFactory(this.encoder));
this.binaryFactory = getFactory(factories, new
InMemoryBinaryValueFactory(this.encoder, this.stringFactory));
this.booleanFactory = getFactory(factories, new BooleanValueFactory(this.encoder,
this.stringFactory));
- this.dateFactory = getFactory(factories, new DateValueFactory(this.encoder,
this.stringFactory));
+ this.dateFactory = (DateTimeFactory)getFactory(factories, new
JodaDateValueFactory(this.encoder, this.stringFactory));
this.decimalFactory = getFactory(factories, new DecimalValueFactory(this.encoder,
this.stringFactory));
this.doubleFactory = getFactory(factories, new DoubleValueFactory(this.encoder,
this.stringFactory));
this.longFactory = getFactory(factories, new LongValueFactory(this.encoder,
this.stringFactory));
@@ -161,7 +161,7 @@
/**
* {@inheritDoc}
*/
- public ValueFactory<DateTime> getDateFactory() {
+ public DateTimeFactory getDateFactory() {
return this.dateFactory;
}
Modified:
branches/federation/dna-spi/src/test/java/org/jboss/dna/spi/graph/impl/DateValueFactoryTest.java
===================================================================
---
branches/federation/dna-spi/src/test/java/org/jboss/dna/spi/graph/impl/DateValueFactoryTest.java 2008-05-24
03:23:42 UTC (rev 191)
+++
branches/federation/dna-spi/src/test/java/org/jboss/dna/spi/graph/impl/DateValueFactoryTest.java 2008-05-24
03:48:56 UTC (rev 192)
@@ -52,7 +52,7 @@
LAST_YEAR = new JodaDateTime(now.minusYears(1));
}
- private DateValueFactory factory;
+ private JodaDateValueFactory factory;
private StringValueFactory stringFactory;
private Mockery context;
@@ -63,7 +63,7 @@
public void setUp() throws Exception {
TextEncoder encoder = Path.URL_ENCODER;
stringFactory = new StringValueFactory(encoder);
- factory = new DateValueFactory(encoder, stringFactory);
+ factory = new JodaDateValueFactory(encoder, stringFactory);
context = new Mockery();
}