当前位置: 首页>>代码示例>>Java>>正文


Java Smooks类代码示例

本文整理汇总了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;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:21,代码来源:OsgiSmooksProducer.java

示例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);
}
 
开发者ID:guido-n,项目名称:mule-useful-experiments,代码行数:15,代码来源:XmlStreamSplitterComponent.java

示例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();
	}
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:10,代码来源:EdifactImporter.java

示例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"));
}
 
开发者ID:metasfresh,项目名称:metasfresh,代码行数:12,代码来源:SmooksTest.java

示例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;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:17,代码来源:XMLBindingTransformer.java

示例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);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:13,代码来源:SmooksTransformer.java

示例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());
    }
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:9,代码来源:SmooksTransformFactory.java

示例8: getSmooksConfigs

import org.milyn.Smooks; //导入依赖的package包/类
public Map<String, Smooks> getSmooksConfigs() {
    return smooksConfigs;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:4,代码来源:SmooksEdFi2SLITransformer.java

示例9: setSmooksConfigs

import org.milyn.Smooks; //导入依赖的package包/类
public void setSmooksConfigs(Map<String, Smooks> smooksConfigs) {
    this.smooksConfigs = smooksConfigs;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:4,代码来源:SmooksEdFi2SLITransformer.java

示例10: getSmooks

import org.milyn.Smooks; //导入依赖的package包/类
public Smooks getSmooks() {
    return smooks;
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:4,代码来源:SmooksProcessor.java

示例11: setSmooks

import org.milyn.Smooks; //导入依赖的package包/类
public void setSmooks(Smooks smooks) {
    this.smooks = smooks;
    smooks.addVisitor(this, "/*/*");
}
 
开发者ID:inbloom,项目名称:secure-data-service,代码行数:5,代码来源:SmooksProcessor.java

示例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);
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:8,代码来源:SmooksProducer.java


注:本文中的org.milyn.Smooks类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。