Class JsonPropertysetPersister
- java.lang.Object
-
- no.priv.bang.modeling.modelstore.backend.JsonPropertysetPersister
-
-
Field Summary
Fields Modifier and Type Field Description private com.fasterxml.jackson.core.JsonFactory
factory
-
Constructor Summary
Constructors Constructor Description JsonPropertysetPersister(com.fasterxml.jackson.core.JsonFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Propertyset
createPropertysetIfNull(Propertyset propertyset)
private void
outputArray(com.fasterxml.jackson.core.JsonGenerator generator, ValueList listvalue)
private void
outputPropertyset(com.fasterxml.jackson.core.JsonGenerator generator, Propertyset propertyset)
private void
outputPropertySets(com.fasterxml.jackson.core.JsonGenerator generator, Collection<Propertyset> propertysets)
private void
outputValue(com.fasterxml.jackson.core.JsonGenerator generator, String propertyname, Value value)
private Value
parseArray(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext)
private Propertyset
parseIdProperty(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext, Propertyset propertyset)
private Value
parseObject(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext)
private Propertyset
parseObjectReference(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext)
private void
parseUntilEnd(ModelContext modelContext, com.fasterxml.jackson.core.JsonParser parser)
private Propertyset
parsingAllOrdinaryPropertiesOfAPropertyset(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext, Propertyset propertyset, String currentFieldName)
private Propertyset
parsingAspectProperty(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext, Propertyset propertyset)
void
persist(File propertysetsFile, ModelContext modelContext)
void
persist(OutputStream jsonstream, ModelContext context)
void
restore(File propertysetsFile, ModelContext modelContext)
void
restore(InputStream jsonstream, ModelContext context)
-
-
-
Method Detail
-
persist
public void persist(File propertysetsFile, ModelContext modelContext) throws IOException
- Throws:
IOException
-
persist
public void persist(OutputStream jsonstream, ModelContext context)
-
restore
public void restore(File propertysetsFile, ModelContext modelContext) throws IOException
- Throws:
IOException
-
restore
public void restore(InputStream jsonstream, ModelContext context)
-
outputPropertySets
private void outputPropertySets(com.fasterxml.jackson.core.JsonGenerator generator, Collection<Propertyset> propertysets) throws IOException
- Throws:
IOException
-
outputPropertyset
private void outputPropertyset(com.fasterxml.jackson.core.JsonGenerator generator, Propertyset propertyset) throws IOException
- Throws:
IOException
-
outputValue
private void outputValue(com.fasterxml.jackson.core.JsonGenerator generator, String propertyname, Value value) throws IOException
- Throws:
IOException
-
outputArray
private void outputArray(com.fasterxml.jackson.core.JsonGenerator generator, ValueList listvalue) throws IOException
- Throws:
IOException
-
parseUntilEnd
private void parseUntilEnd(ModelContext modelContext, com.fasterxml.jackson.core.JsonParser parser) throws IOException
- Throws:
IOException
-
parseArray
private Value parseArray(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext) throws IOException
- Throws:
IOException
-
parseObject
private Value parseObject(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext) throws IOException
- Throws:
IOException
-
parseObjectReference
private Propertyset parseObjectReference(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext) throws IOException
- Throws:
IOException
-
parseIdProperty
private Propertyset parseIdProperty(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext, Propertyset propertyset) throws IOException
- Throws:
IOException
-
parsingAspectProperty
private Propertyset parsingAspectProperty(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext, Propertyset propertyset) throws IOException
- Throws:
IOException
-
parsingAllOrdinaryPropertiesOfAPropertyset
private Propertyset parsingAllOrdinaryPropertiesOfAPropertyset(com.fasterxml.jackson.core.JsonParser parser, ModelContext modelContext, Propertyset propertyset, String currentFieldName) throws IOException
- Throws:
IOException
-
createPropertysetIfNull
private Propertyset createPropertysetIfNull(Propertyset propertyset)
-
-