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


Java OutputNode.setName方法代码示例

本文整理汇总了Java中org.simpleframework.xml.stream.OutputNode.setName方法的典型用法代码示例。如果您正苦于以下问题:Java OutputNode.setName方法的具体用法?Java OutputNode.setName怎么用?Java OutputNode.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.simpleframework.xml.stream.OutputNode的用法示例。


在下文中一共展示了OutputNode.setName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: write

import org.simpleframework.xml.stream.OutputNode; //导入方法依赖的package包/类
@Override
public void write(Type type, NodeMap<OutputNode> node) throws Exception {
    OutputNode outputNode = node.getNode();
    if ("DdsRequestObject".equals(outputNode.getName())) {
        OutputNode operationNameAtribute = outputNode.getParent().getAttributes().get("DdsOperationName");
        outputNode.setName(operationNameAtribute.getValue());
    }
}
 
开发者ID:open-eid,项目名称:MOPP-Android,代码行数:9,代码来源:RequestObjectInterceptor.java

示例2: write

import org.simpleframework.xml.stream.OutputNode; //导入方法依赖的package包/类
/**
 * The <code>write</code> method uses the name of the XML element to
 * select a converter to be used to write the instance. Selection of
 * the converter is done by looking up the associated label from
 * the union group using the instance type. Once the converter has
 * been selected it is used to write the instance.
 * 
 * @param node this is the XML element used to write the instance
 * @param item this is the individual list entry to be serialized
 * @param label this is the label to used to acquire the converter     
 */
private void write(OutputNode node, Object item, Label label) throws Exception {
   Converter converter = label.getConverter(context);
   Collection list = Collections.singleton(item);

   if(!label.isInline()) {
      String name = label.getName();
      String root = style.getElement(name);
     
      if(!node.isCommitted()) {
         node.setName(root);
      }
   }
   converter.write(node, list);    
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:26,代码来源:CompositeListUnion.java

示例3: write

import org.simpleframework.xml.stream.OutputNode; //导入方法依赖的package包/类
/**
 * The <code>write</code> method uses the name of the XML element to
 * select a converter to be used to write the instance. Selection of
 * the converter is done by looking up the associated label from
 * the union group using the instance type. Once the converter has
 * been selected it is used to write the instance.
 * 
 * @param node this is the XML element used to write the instance
 * @param key this is the key associated with the item to write
 * @param item this is the value associated with the item to write
 * @param label this is the label to used to acquire the converter     
 */
private void write(OutputNode node, Object key, Object item, Label label) throws Exception {  
   Converter converter = label.getConverter(context);
   Map map = Collections.singletonMap(key, item);
   
   if(!label.isInline()) {
      String name = label.getName();
      String root = style.getElement(name);
     
      if(!node.isCommitted()) {
         node.setName(root);
      }
   }
   converter.write(node, map);   
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:27,代码来源:CompositeMapUnion.java

示例4: write

import org.simpleframework.xml.stream.OutputNode; //导入方法依赖的package包/类
public void write(Type type, NodeMap<OutputNode> node) throws Exception {        
   OutputNode parent = node.getNode();
   String name = parent.getName();
   name = name.toUpperCase();
   parent.setName(name);
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:7,代码来源:VisitorSetNodeNameTest.java


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