public class DocumentModelToJSON extends Object implements PropertyVisitor
Only non-null properties are exported.
Modifier and Type | Field and Description |
---|---|
protected static DateFormat |
dateFormat |
protected net.sf.json.JSONObject |
result |
Constructor and Description |
---|
DocumentModelToJSON() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptPhantoms() |
net.sf.json.JSONObject |
getResult() |
net.sf.json.JSONObject |
run(DocumentModel doc) |
Object |
visit(ListProperty property,
Object arg) |
Object |
visit(MapProperty property,
Object arg) |
Object |
visit(ScalarProperty property,
Object arg) |
protected static final DateFormat dateFormat
protected net.sf.json.JSONObject result
public DocumentModelToJSON()
public net.sf.json.JSONObject getResult()
public net.sf.json.JSONObject run(DocumentModel doc)
public boolean acceptPhantoms()
acceptPhantoms
in interface PropertyVisitor
public Object visit(MapProperty property, Object arg) throws PropertyException
visit
in interface PropertyVisitor
PropertyException
public Object visit(ListProperty property, Object arg) throws PropertyException
visit
in interface PropertyVisitor
PropertyException
public Object visit(ScalarProperty property, Object arg) throws PropertyException
visit
in interface PropertyVisitor
PropertyException
Copyright © 2015 Nuxeo SA. All rights reserved.