|
ModeShape Distribution 3.0.0.CR1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.schematic.internal.document.JsonReader.SimpleValueMatcher
org.infinispan.schematic.internal.document.JsonReader.DateValueMatcher
@NotThreadSafe public static class JsonReader.DateValueMatcher
The component that parses a tokenized JSON stream and attempts to evaluate literal values such as dates
Field Summary |
---|
Fields inherited from class org.infinispan.schematic.internal.document.JsonReader.SimpleValueMatcher |
---|
values |
Constructor Summary | |
---|---|
JsonReader.DateValueMatcher(DocumentValueFactory values)
Create a new matcher that uses the supplied DocumentValueFactory instance. |
Method Summary | |
---|---|
protected Date |
evaluateDate(String millisOrIso)
|
protected Date |
parseDateFromLiteral(String value)
Parse the date represented by the supplied value. |
Object |
parseValue(String value)
Parse the value given by the supplied string into an appropriate value object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonReader.DateValueMatcher(DocumentValueFactory values)
DocumentValueFactory
instance.
values
- the factory for creating value objects; may not be nullMethod Detail |
---|
public Object parseValue(String value)
parseValue
in interface JsonReader.ValueMatcher
parseValue
in class JsonReader.SimpleValueMatcher
value
- the string representation of the value
protected Date parseDateFromLiteral(String value)
parseValue(String)
method. This
method checks the following formats:
"yyyy-MM-ddTHH:mm:ss"
where T
is a literal character"yyyy-MM-ddTHH:mm:ssZ"
where T
and Z
are literal characters"yyyy-MM-ddTHH:mm:ssGMT+00:00"
where
T
, and GMT
are literal characters"/Date(millisOrIso)/"
"\/Date(millisOrIso)\/"
Note that this method does not handle the new Date(...)
or Date(...)
representations, as
that's handled elsewhere.
value
- the string representation of the value; never null and never empty
protected Date evaluateDate(String millisOrIso)
|
ModeShape Distribution 3.0.0.CR1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |