public class ModelRegistry extends Object implements IModelRegistry
| Constructor and Description |
|---|
ModelRegistry() |
| Modifier and Type | Method and Description |
|---|---|
IEntity |
newInstance(org.symphonyoss.s2.common.dom.json.ImmutableJsonObject jsonObject) |
IEntity |
parseOne(Reader reader) |
static org.symphonyoss.s2.common.dom.json.ImmutableJsonObject |
parseOneJsonObject(Reader reader)
Parse a single JSON object from the given Reader.
|
static org.symphonyoss.s2.common.dom.json.JsonValue<?,?> |
parseOneJsonValue(Reader reader)
Parse a single JSON value from the given Reader.
|
void |
parseStream(InputStream in,
IEntityConsumer consumer) |
ModelRegistry |
withFactories(IEntityFactory<?,?,?>... factories)
Create a registry with the given models.
|
public ModelRegistry withFactories(IEntityFactory<?,?,?>... factories)
factories - Entity factories to be registered.public IEntity newInstance(org.symphonyoss.s2.common.dom.json.ImmutableJsonObject jsonObject) throws org.symphonyoss.s2.common.exception.InvalidValueException
newInstance in interface IModelRegistryorg.symphonyoss.s2.common.exception.InvalidValueExceptionpublic static org.symphonyoss.s2.common.dom.json.ImmutableJsonObject parseOneJsonObject(Reader reader) throws org.symphonyoss.s2.common.exception.InvalidValueException
reader - The source of a JSON object.org.symphonyoss.s2.common.exception.InvalidValueException - If the input cannot be parsed or does not contain a single object.public static org.symphonyoss.s2.common.dom.json.JsonValue<?,?> parseOneJsonValue(Reader reader) throws org.symphonyoss.s2.common.exception.InvalidValueException
reader - The source of a JSON value.org.symphonyoss.s2.common.exception.InvalidValueException - If the input cannot be parsed or does not contain a single object.public IEntity parseOne(Reader reader) throws IOException, org.symphonyoss.s2.common.exception.InvalidValueException
parseOne in interface IModelRegistryIOExceptionorg.symphonyoss.s2.common.exception.InvalidValueExceptionpublic void parseStream(InputStream in, IEntityConsumer consumer) throws org.symphonyoss.s2.common.exception.InvalidValueException, IOException
parseStream in interface IModelRegistryorg.symphonyoss.s2.common.exception.InvalidValueExceptionIOExceptionCopyright © 2018 Symphony Software Foundation. All rights reserved.