|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.aludratest.content.edifact.edifatto.EdifattoContent
public class EdifattoContent
Parses and saves EDIFACT and X12 documents from and to streams.
Constructor Summary | |
---|---|
EdifattoContent()
Constructor. |
Method Summary | |
---|---|
org.databene.edifatto.model.Interchange |
createInterchange(String templateUri,
org.databene.edifatto.EdiFormatSymbols symbols,
Map<String,Object> variables)
Uses a FreeMarker template to create an EDI message based on the content of a variables map. |
org.databene.edifatto.compare.AggregateDiff |
diff(org.databene.edifatto.model.Interchange expected,
org.databene.edifatto.model.Interchange actual,
org.databene.edifatto.ComparisonSettings settings,
org.databene.edifatto.compare.ComparisonModel<Element> model)
Finds out the differences between two EDIFACT or X12 interchanges, ignoring elements that are tolerated by the ComparisonSettings . |
String |
formatRecursively(org.databene.edifatto.model.Interchange interchange)
Formats a full interchange structure recursively as String. |
Object |
queryXML(org.databene.edifatto.model.Interchange interchange,
String expression,
QName returnType)
Creates an XML representation of the interchange and performs an XPath query on it. |
org.databene.edifatto.model.Interchange |
readInterchange(InputStream in)
Parses an EDIFACT or X12 interchange available in an InputStream . |
void |
writeInterchange(org.databene.edifatto.model.Interchange interchange,
OutputStream out,
boolean useLinefeed)
Writes an EDIFACT or X12 interchange to an OutputStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EdifattoContent()
Method Detail |
---|
public org.databene.edifatto.model.Interchange readInterchange(InputStream in)
InputStream
.
readInterchange
in interface EdifactContent
in
- the InputStream
from which to read the EDI document
Interchange
public void writeInterchange(org.databene.edifatto.model.Interchange interchange, OutputStream out, boolean useLinefeed)
OutputStream
.
writeInterchange
in interface EdifactContent
interchange
- the EDI Interchange
to writeout
- the OutputStream
to write topublic org.databene.edifatto.model.Interchange createInterchange(String templateUri, org.databene.edifatto.EdiFormatSymbols symbols, Map<String,Object> variables)
EdifactContent
createInterchange
in interface EdifactContent
Interchange
with the data configured in the variables mappublic Object queryXML(org.databene.edifatto.model.Interchange interchange, String expression, QName returnType)
queryXML
in interface EdifactContent
interchange
- the interchange to queryexpression
- the XPath query to performreturnType
- determines the type of the returned object:
XPathConstants.STRING
for a single String
,
XPathConstants.NODE
for a single Element
,
XPathConstants.NODESET
for a NodeList
public org.databene.edifatto.compare.AggregateDiff diff(org.databene.edifatto.model.Interchange expected, org.databene.edifatto.model.Interchange actual, org.databene.edifatto.ComparisonSettings settings, org.databene.edifatto.compare.ComparisonModel<Element> model)
ComparisonSettings
.
diff
in interface EdifactContent
expected
- actual
-
AggregateDiff
between the documentspublic String formatRecursively(org.databene.edifatto.model.Interchange interchange)
formatRecursively
in interface EdifactContent
interchange
- the Edifact interchange to format
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |