本文整理汇总了Java中org.milyn.Smooks类的典型用法代码示例。如果您正苦于以下问题:Java Smooks类的具体用法?Java Smooks怎么用?Java Smooks使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Smooks类属于org.milyn包,在下文中一共展示了Smooks类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSmooks
import org.milyn.Smooks; //导入依赖的package包/类
@Override
public Smooks createSmooks(ServiceDomain domain, String config) {
if (_logger.isDebugEnabled()) {
_logger.debug("Creating Smooks instance - Domain: " + domain + ", Smooks Config: " + config);
}
if (domain != null && domain.getProperties() != null) {
Bundle bundle = (Bundle)domain.getProperty(SWITCHYARD_DEPLOYMENT_BUNDLE);
if (bundle != null) {
try {
return new SmooksOSGIFactory(bundle).createInstance(config);
} catch (Exception e) {
if (_logger.isDebugEnabled()) {
_logger.debug(e);
}
}
}
}
return null;
}
示例2: XmlStreamSplitterComponent
import org.milyn.Smooks; //导入依赖的package包/类
/**
*
* @param xpathSplitExpression
* @param sendToUri
*/
public XmlStreamSplitterComponent(String xpathSplitExpression, String sendToUri) {
smooks = new Smooks();
smooks.setFilterSettings(FilterSettings.DEFAULT_SAX);
smooks.addVisitor(new FragmentSerializer().setBindTo(FRAGMENT_BEAN_ID), xpathSplitExpression);
// Cannot use lambdas here cause addVisitor()'s param is a Visitor (marker interface), not a SAXVisitAfter
smooks.addVisitor(new XmlStreamSplitterSAXVisitAfter(sendToUri), xpathSplitExpression);
}
示例3: main
import org.milyn.Smooks; //导入依赖的package包/类
public static void main(final String[] args) {
try {
final Smooks smooksForEdifactFile = new EdifactImporter().getSmooksForEdifactFile("COPINO:D:95B:UN:INT10I");
System.out.println(smooksForEdifactFile);
} catch (final Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
示例4: setUp
import org.milyn.Smooks; //导入依赖的package包/类
@Before
public void setUp() throws IOException, SAXException
{
final String smooksConfigPath = "/marshal-config/smooks/invoices/edi-smooks-marshal-compudata-config-fresh.xml";
smooks = new Smooks(smooksConfigPath);
executionContext = smooks.createExecutionContext();
// Configure the execution context to generate a report...
// executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));
}
示例5: XMLBindingTransformer
import org.milyn.Smooks; //导入依赖的package包/类
/**
* Constructor.
* @param from From type.
* @param to To type.
* @param smooks Smooks instance.
* @param beanModel Bean model.
* @param direction Binding direction.
*/
protected XMLBindingTransformer(final QName from, final QName to, Smooks smooks, ModelSet beanModel, BindingDirection direction) {
super(from, to);
_xmlBinding = new XMLBinding(smooks);
_xmlBinding.setOmitXMLDeclaration(true); // XML decl causes problems for StAX code used by SOAP handler
_xmlBinding.intiailize();
_bean = beanModel.getModels().values().iterator().next();
_direction = direction;
}
示例6: SmooksTransformer
import org.milyn.Smooks; //导入依赖的package包/类
/**
* Constructor.
* @param from From type.
* @param to To type.
* @param smooks Smooks instance.
*/
protected SmooksTransformer(final QName from, final QName to, Smooks smooks, SmooksTransformModel model) {
super(from, to);
_smooks = smooks;
_reportPath = model.getReportPath();
init(model);
}
示例7: newXMLBindingTransformer
import org.milyn.Smooks; //导入依赖的package包/类
private static Transformer newXMLBindingTransformer(final QName from, final QName to, Smooks smooks, XMLBindingTransformer.BindingDirection direction) {
ModelSet beanModel = ModelSet.get(smooks.getApplicationContext());
if (beanModel != null && !beanModel.getModels().isEmpty()) {
return new XMLBindingTransformer(from, to, smooks, beanModel, direction);
} else {
throw TransformMessages.MESSAGES.invalidBindingConfiguration(direction.toString());
}
}
示例8: getSmooksConfigs
import org.milyn.Smooks; //导入依赖的package包/类
public Map<String, Smooks> getSmooksConfigs() {
return smooksConfigs;
}
示例9: setSmooksConfigs
import org.milyn.Smooks; //导入依赖的package包/类
public void setSmooksConfigs(Map<String, Smooks> smooksConfigs) {
this.smooksConfigs = smooksConfigs;
}
示例10: getSmooks
import org.milyn.Smooks; //导入依赖的package包/类
public Smooks getSmooks() {
return smooks;
}
示例11: setSmooks
import org.milyn.Smooks; //导入依赖的package包/类
public void setSmooks(Smooks smooks) {
this.smooks = smooks;
smooks.addVisitor(this, "/*/*");
}
示例12: createSmooks
import org.milyn.Smooks; //导入依赖的package包/类
/**
* Creates Smooks instance.
* @param domain SwitchYard ServiceDomain
* @param config Smooks config
* @return Smooks instance
*/
Smooks createSmooks(ServiceDomain domain, String config);