|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openspml.v2.util.xml.ObjectFactory
This is a singleton class that will, given a name of a Marshallable element, return an object of that type. The object will be empty.
Nested Class Summary | |
static interface |
ObjectFactory.MarshallableCreator
You can register objects to create wrappers for the unmarshalling. |
static interface |
ObjectFactory.OCEUnmarshaller
Implement these to adapt the OpenContentElement stuff to the toolkit. |
static interface |
ObjectFactory.ProfileRegistrar
|
Method Summary | |
void |
addCreator(ObjectFactory.MarshallableCreator creator)
|
void |
addOCEUnmarshaller(ObjectFactory.OCEUnmarshaller oceum)
Need to register an unmarshaller for OpenContent - call this. |
Marshallable |
createMarshallable(java.lang.String name,
java.lang.String uri)
given a name of an element, create a hollow object that we can populate via a parser. |
MarshallableElement |
createMarshallableElement(java.lang.Class cls)
XMLUnmarshaller implementations will use this to create objects within the core SPML schema. |
static ObjectFactory |
getInstance()
This is a Singleton. |
java.lang.String |
register(ObjectFactory.ProfileRegistrar pr)
Used to register profiles. |
boolean |
removeCreator(ObjectFactory.MarshallableCreator creator)
|
boolean |
removeOCEUnmarshaller(ObjectFactory.OCEUnmarshaller oceum)
You can unregister them too. |
OpenContentElement |
unmarshallOpenContentElement(java.lang.Object obj)
XMLUnmarshaller implementations need to to handle OpenContentElements. |
boolean |
unregister(ObjectFactory.ProfileRegistrar pr)
Shortcut for the unregister(String profileId) method. |
boolean |
unregister(java.lang.String profileId)
Given the id of the profile, unregister it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Marshallable createMarshallable(java.lang.String name, java.lang.String uri) throws UnknownSpml2TypeException
name
- uri
- (the uri of the namespace)
UnknownSpml2TypeException
public MarshallableElement createMarshallableElement(java.lang.Class cls) throws UnknownSpml2TypeException
cls
-
UnknownSpml2TypeException
public void addOCEUnmarshaller(ObjectFactory.OCEUnmarshaller oceum)
oceum
- public boolean removeOCEUnmarshaller(ObjectFactory.OCEUnmarshaller oceum)
oceum
-
public OpenContentElement unmarshallOpenContentElement(java.lang.Object obj) throws Spml2Exception
obj
-
Spml2Exception
public void addCreator(ObjectFactory.MarshallableCreator creator)
creator
- public boolean removeCreator(ObjectFactory.MarshallableCreator creator)
creator
-
public java.lang.String register(ObjectFactory.ProfileRegistrar pr)
// DSMLProfileRegistrar adds a creator for spmldsml and dsml.
ObjectFactory.getInstance().register(
new DSMLProfileRegistrar());
pr
- The registrar to use and track.public boolean unregister(java.lang.String profileId)
profileId
-
public boolean unregister(ObjectFactory.ProfileRegistrar pr)
pr
- A registrar...
public static ObjectFactory getInstance()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |