public class RegionExportJson extends Object implements org.nuiton.topia.persistence.EntityVisitor
Modifier and Type | Field and Description |
---|---|
protected EntitySemanticsDecorator |
decorator |
protected boolean |
doVisit |
static String |
FORMAT_EXTENSION |
static int |
FORMAT_VERSION |
protected com.fasterxml.jackson.core.JsonGenerator |
g |
protected LinkedHashMap<String,List<String>> |
isisEntities |
protected MatrixCSVHelper |
matrixCSVHelper |
protected LinkedList<org.nuiton.topia.persistence.TopiaEntity> |
toVisit |
protected Set<String> |
visited |
Constructor and Description |
---|
RegionExportJson(Writer w) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset all states of the visitor.
|
void |
end() |
void |
end(org.nuiton.topia.persistence.TopiaEntity entity)
Ends the visit of the given entity.
|
void |
export(FisheryRegion fisheryRegion)
Export la region et tous les elements de la region.
|
void |
export(org.nuiton.topia.persistence.TopiaEntity entity)
Export seulement l'entity et ses dépendances.
|
protected void |
export(org.nuiton.topia.persistence.TopiaEntity entity,
boolean isRegion) |
void |
start() |
void |
start(org.nuiton.topia.persistence.TopiaEntity entity)
Start the visit of the given entity.
|
void |
visit(org.nuiton.topia.persistence.TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
int index,
Object value)
Visit a indexed value from a collection property for the given entity.
|
void |
visit(org.nuiton.topia.persistence.TopiaEntity entity,
String propertyName,
Class<?> collectionType,
Class<?> type,
Object value)
Visit a collection property for the given entity.
|
void |
visit(org.nuiton.topia.persistence.TopiaEntity entity,
String propertyName,
Class<?> type,
Object value)
Visit a none indexed property for the given entity.
|
protected void |
writeValue(Class<?> type,
Object value) |
public static final int FORMAT_VERSION
public static final String FORMAT_EXTENSION
protected LinkedList<org.nuiton.topia.persistence.TopiaEntity> toVisit
protected LinkedHashMap<String,List<String>> isisEntities
protected boolean doVisit
protected MatrixCSVHelper matrixCSVHelper
protected EntitySemanticsDecorator decorator
protected com.fasterxml.jackson.core.JsonGenerator g
public RegionExportJson(Writer w)
public void export(FisheryRegion fisheryRegion)
fisheryRegion
- public void export(org.nuiton.topia.persistence.TopiaEntity entity)
entity
- protected void export(org.nuiton.topia.persistence.TopiaEntity entity, boolean isRegion)
public void start()
public void end()
public void start(org.nuiton.topia.persistence.TopiaEntity entity)
start
in interface org.nuiton.topia.persistence.EntityVisitor
entity
- the visited entitypublic void end(org.nuiton.topia.persistence.TopiaEntity entity)
end
in interface org.nuiton.topia.persistence.EntityVisitor
entity
- the visited entitypublic void visit(org.nuiton.topia.persistence.TopiaEntity entity, String propertyName, Class<?> type, Object value)
visit
in interface org.nuiton.topia.persistence.EntityVisitor
entity
- the visited entitypropertyName
- the name of the visited propertytype
- the type of the visited propertyvalue
- the value of the visited propertypublic void visit(org.nuiton.topia.persistence.TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, Object value)
visit
in interface org.nuiton.topia.persistence.EntityVisitor
entity
- the visited entitypropertyName
- the name of the visited propertycollectionType
- the type of the visited collectiontype
- the type of the visited propertyvalue
- the value of the visited propertypublic void visit(org.nuiton.topia.persistence.TopiaEntity entity, String propertyName, Class<?> collectionType, Class<?> type, int index, Object value)
visit
in interface org.nuiton.topia.persistence.EntityVisitor
entity
- the visited entitypropertyName
- the name of the visited propertycollectionType
- the type of the container of the visited propertytype
- the type of the visited propertyindex
- the index of the visited property in his containervalue
- the value of the visited propertypublic void clear()
clear
in interface org.nuiton.topia.persistence.EntityVisitor
Copyright © 1999–2020 CodeLutin. All rights reserved.