public class KGCUBEResource extends Object
KGCUBEResources.
The parser can be shared for serialisation and deserialisation of different resource across multiple threads.| Modifier and Type | Class and Description |
|---|---|
protected static class |
KGCUBEResource.SchemaResolver |
| Modifier and Type | Field and Description |
|---|---|
protected static DOMImplementationLS |
domImplementation |
protected static GCUBELog |
logger |
static String |
NS |
static String |
SCHEMA_RESOURCE_LOCATION |
protected static Map<Class<? extends GCUBEResourceImpl>,Schema> |
schemaMap |
protected static SchemaFactory |
sfactory |
| Constructor and Description |
|---|
KGCUBEResource() |
| Modifier and Type | Method and Description |
|---|---|
static Date |
fromXMLDateAndTime(String date)
Transforms the input date in a
Date object |
protected static Schema |
getSchema(GCUBEResourceImpl component) |
static <T extends GCUBEResource & GCUBEResourceImpl> |
load(T component,
Reader reader)
Deserialises a
GCUBEResourceImpl which implements a GCUBEResource from a
serialisation. |
static <T extends GCUBEResource & GCUBEResourceImpl> |
store(T component,
Writer writer)
Serialises a
GCUBEResourceImpl which implements a GCUBEResource. |
static String |
toXMLDateAndTime(Date date)
Transforms the input
Date in a valid string representation for the dateAndTime XML Schema data type |
protected static void |
validate(Reader reader,
Schema schema) |
public static final String NS
public static final String SCHEMA_RESOURCE_LOCATION
protected static final GCUBELog logger
protected static Map<Class<? extends GCUBEResourceImpl>,Schema> schemaMap
protected static final SchemaFactory sfactory
protected static DOMImplementationLS domImplementation
public static <T extends GCUBEResource & GCUBEResourceImpl> void load(T component, Reader reader) throws Exception
GCUBEResourceImpl which implements a GCUBEResource from a
serialisation.T - the type of the GCUBEResourceImpl.component - the GCUBEResourceImpl.reader - the Reader which gives access to the GCUBEResourceImpl.Exception - if the GCUBEResourceImpl could not be deserialised.public static <T extends GCUBEResource & GCUBEResourceImpl> void store(T component, Writer writer) throws Exception
GCUBEResourceImpl which implements a GCUBEResource.T - the type of the GCUBEResourceImpl.component - the GCUBEResourceImpl.writer - the Writer which gives access to the serialisation.Exception - if the GCUBEResourceImpl could not be serialised.protected static Schema getSchema(GCUBEResourceImpl component) throws Exception
Exceptionprotected static void validate(Reader reader, Schema schema) throws Exception
Exceptionpublic static String toXMLDateAndTime(Date date)
Date in a valid string representation for the dateAndTime XML Schema data typepublic static Date fromXMLDateAndTime(String date) throws ParseException
Date objectdate - the string representation of the dateDate objectParseException - if the input date is not in an valid formatCopyright © 2015. All Rights Reserved.