Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.api.model
Class ValueExporter

java.lang.Object
  extended by org.nuxeo.ecm.core.api.model.ValueExporter
All Implemented Interfaces:
PropertyVisitor

public class ValueExporter
extends Object
implements PropertyVisitor

Exporter for a document's values into a map.

The values of the first-level keys of the map may be prefixed (standard prefix:name naming) or not.


Constructor Summary
ValueExporter(boolean prefixed)
          Constructs an exporter.
 
Method Summary
 boolean acceptPhantoms()
           
 Map<String,Serializable> getResult()
           
 Map<String,Serializable> run(DocumentPart dp)
           
 Object visit(ListProperty property, Object arg)
           
 Object visit(MapProperty property, Object arg)
           
 Object visit(ScalarProperty property, Object arg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueExporter

public ValueExporter(boolean prefixed)
Constructs an exporter.

Parameters:
prefixed - whether first-level keys of the map are prefixed
Method Detail

getResult

public Map<String,Serializable> getResult()

run

public Map<String,Serializable> run(DocumentPart dp)
                             throws PropertyException
Throws:
PropertyException

acceptPhantoms

public boolean acceptPhantoms()
Specified by:
acceptPhantoms in interface PropertyVisitor

visit

public Object visit(MapProperty property,
                    Object arg)
             throws PropertyException
Specified by:
visit in interface PropertyVisitor
Throws:
PropertyException

visit

public Object visit(ListProperty property,
                    Object arg)
             throws PropertyException
Specified by:
visit in interface PropertyVisitor
Throws:
PropertyException

visit

public Object visit(ScalarProperty property,
                    Object arg)
             throws PropertyException
Specified by:
visit in interface PropertyVisitor
Throws:
PropertyException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.