Package org.adempiere.pipo2
Class DataPackInReader
java.lang.Object
org.adempiere.pipo2.DataPackInReader
Reads a JSON or YAML 2Pack and replays synthetic SAX-style events into a
ContentHandler, reusing all existing import logic without modification.
The expected document structure (produced by JsonPackSerializer / YamlPackSerializer):
{
"package": { "Name": "...", "UpdateDictionary": "false", "AD_Client_UU": "...", ... },
"records": [
{
"_type": "AD_Table",
"_subtype": "table",
"TableName": "C_Order",
"_children": [
{ "_type": "AD_Element", "_subtype": "table", "ColumnName": "DocumentNo", ... },
{ "_type": "AD_Column", "_subtype": "table", ... }
]
}
]
}
_subtype is replayed as the type SAX attribute so that
OSGiHandlerRegistry can route translation records to
CommonTranslationHandler exactly as the XML import does.
_children are fired recursively between the parent's
startElement / endElement calls, recreating the nesting
that import handlers rely on for parent-record context.
Reference fields (SAX attributes on the element) are represented as objects
with a _value key; all other keys become element attributes passed to
the handler.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DataPackInReader
-
-
Method Details
-
read
- Throws:
Exception
-