gpt4 book ai didi

org.apache.shindig.protocol.conversion.xstream.WriterStack类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 18:35:05 24 4
gpt4 key购买 nike

本文整理了Java中org.apache.shindig.protocol.conversion.xstream.WriterStack类的一些代码示例,展示了WriterStack类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriterStack类的具体详情如下:
包路径:org.apache.shindig.protocol.conversion.xstream.WriterStack
类名称:WriterStack

WriterStack介绍

[英]A writer stack is a simple stack that tracks the current location of the writer.
[中]写入程序堆栈是跟踪写入程序当前位置的简单堆栈。

代码示例

代码示例来源:origin: com.lmco.shindig/shindig-social-api

/**
 * {@inheritDoc}
 *
 * @see org.apache.shindig.protocol.conversion.BeanXStreamConverter#convertToString(java.lang.Object)
 */
@Override
public String convertToString(Object obj) {
 writerStack.reset();
 AtomFeed af = new AtomFeed(obj);
 XStreamConfiguration.ConverterConfig cc = converterMap.get(XStreamConfiguration.ConverterSet.DEFAULT);
 cc.mapper.setBaseObject(af); // thread safe method
 return cc.xstream.toXML(af);
}

代码示例来源:origin: org.gatein.shindig/shindig-common

/**
 * @param name
 */
private void addNamespace(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified and not current
 if ( namespaceSet != null && namespaceSet != currentNamespace ) {
  for (Entry<String, String> e : namespaceSet.nameSpaceEntrySet()) {
   super.addAttribute(e.getKey(), e.getValue());
  }
  currentNamespace = namespaceSet;
 }
 writerStack.push(name, currentNamespace);
}

代码示例来源:origin: org.apache.shindig/shindig-common

/**
  * End the current node, making the parent node the active node.
  *
  * @see com.thoughtworks.xstream.io.WriterWrapper#endNode()
  */
 @Override
 public void endNode() {
  writerStack.pop();
  super.endNode();
 }
}

代码示例来源:origin: org.apache.shindig/shindig-common

String parentElementName = writerStack.peek();
if (Collection.class.isAssignableFrom(type) && firstChild.get() != null) {

代码示例来源:origin: com.lmco.shindig/shindig-common

/**
 * @param name
 * @return
 */
private String translateName(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified by not current
 if (namespaceSet != null &&  namespaceSet != currentNamespace) {
   return namespaceSet.getElementName(name);
 }
 // current has been specified
 if ( currentNamespace != null ) {
  return currentNamespace.getElementName(name);
 }
 return name;
}

代码示例来源:origin: org.gatein.shindig/shindig-common

String parentElementName = writerStack.peek();
if (Collection.class.isAssignableFrom(type) && firstChild.get() != null) {

代码示例来源:origin: org.apache.shindig/shindig-common

/**
 * @param name
 * @return
 */
private String translateName(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified by not current
 if (namespaceSet != null &&  namespaceSet != currentNamespace) {
   return namespaceSet.getElementName(name);
 }
 // current has been specified
 if ( currentNamespace != null ) {
  return currentNamespace.getElementName(name);
 }
 return name;
}

代码示例来源:origin: org.apache.shindig/shindig-social-api

/**
  * {@inheritDoc}
  *
  * @see org.apache.shindig.protocol.conversion.BeanXStreamConverter#convertToString(java.lang.Object)
  */
 @Override
 public String convertToString(Object obj) {
  writerStack.reset();
  AtomFeed af = new AtomFeed(obj);
  XStreamConfiguration.ConverterConfig cc = converterMap.get(XStreamConfiguration.ConverterSet.DEFAULT);
  cc.mapper.setBaseObject(af); // thread safe method

  return cc.xstream.toXML(af);
 }
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

/**
 * @param name
 */
private void addNamespace(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified and not current
 if ( namespaceSet != null && namespaceSet != currentNamespace ) {
  for (Entry<String, String> e : namespaceSet.nameSpaceEntrySet()) {
   super.addAttribute(e.getKey(), e.getValue());
  }
  currentNamespace = namespaceSet;
 }
 writerStack.push(name, currentNamespace);
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

String parentElementName = writerStack.peek();
if (Collection.class.isAssignableFrom(type) && firstChild.get() != null) {

代码示例来源:origin: apache/shindig

/**
  * End the current node, making the parent node the active node.
  *
  * @see com.thoughtworks.xstream.io.WriterWrapper#endNode()
  */
 @Override
 public void endNode() {
  writerStack.pop();
  super.endNode();
 }
}

代码示例来源:origin: apache/shindig

/**
 * @param name
 * @return
 */
private String translateName(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified by not current
 if (namespaceSet != null &&  namespaceSet != currentNamespace) {
   return namespaceSet.getElementName(name);
 }
 // current has been specified
 if ( currentNamespace != null ) {
  return currentNamespace.getElementName(name);
 }
 return name;
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-social-api

/**
  * {@inheritDoc}
  *
  * @see org.apache.shindig.protocol.conversion.BeanXStreamConverter#convertToString(java.lang.Object)
  */
 @Override
 public String convertToString(Object obj) {
  writerStack.reset();
  AtomFeed af = new AtomFeed(obj);
  XStreamConfiguration.ConverterConfig cc = converterMap.get(XStreamConfiguration.ConverterSet.DEFAULT);
  cc.mapper.setBaseObject(af); // thread safe method

  return cc.xstream.toXML(af);
 }
}

代码示例来源:origin: com.lmco.shindig/shindig-common

/**
 * @param name
 */
private void addNamespace(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified and not current
 if ( namespaceSet != null && namespaceSet != currentNamespace ) {
  for (Entry<String, String> e : namespaceSet.nameSpaceEntrySet()) {
   super.addAttribute(e.getKey(), e.getValue());
  }
  currentNamespace = namespaceSet;
 }
 writerStack.push(name, currentNamespace);
}

代码示例来源:origin: com.lmco.shindig/shindig-common

String parentElementName = writerStack.peek();
if (Collection.class.isAssignableFrom(type) && firstChild.get() != null) {

代码示例来源:origin: com.lmco.shindig/shindig-common

/**
  * End the current node, making the parent node the active node.
  *
  * @see com.thoughtworks.xstream.io.WriterWrapper#endNode()
  */
 @Override
 public void endNode() {
  writerStack.pop();
  super.endNode();
 }
}

代码示例来源:origin: org.gatein.shindig/shindig-common

/**
 * @param name
 * @return
 */
private String translateName(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified by not current
 if (namespaceSet != null &&  namespaceSet != currentNamespace) {
   return namespaceSet.getElementName(name);
 }
 // current has been specified
 if ( currentNamespace != null ) {
  return currentNamespace.getElementName(name);
 }
 return name;
}

代码示例来源:origin: org.wso2.org.apache.shindig/shindig-common

writerStack.reset();
if (obj instanceof RestfulCollection) {
 XStreamConfiguration.ConverterConfig cc = converterMap

代码示例来源:origin: org.apache.shindig/shindig-common

/**
 * @param name
 */
private void addNamespace(String name) {
 NamespaceSet namespaceSet = namespaces.get(name);
 NamespaceSet currentNamespace = writerStack.peekNamespace();
 // specified and not current
 if ( namespaceSet != null && namespaceSet != currentNamespace ) {
  for (Entry<String, String> e : namespaceSet.nameSpaceEntrySet()) {
   super.addAttribute(e.getKey(), e.getValue());
  }
  currentNamespace = namespaceSet;
 }
 writerStack.push(name, currentNamespace);
}

代码示例来源:origin: apache/shindig

String parentElementName = writerStack.peek();
if (Collection.class.isAssignableFrom(type) && firstChild.get() != null) {

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com