gpt4 book ai didi

org.eclipse.persistence.oxm.XMLMarshaller.isSimpleXMLRoot()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 01:39:40 25 4
gpt4 key购买 nike

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

XMLMarshaller.isSimpleXMLRoot介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

protected XMLDescriptor getDescriptor(XMLRoot object, AbstractSession session) throws XMLMarshalException {
  XMLDescriptor descriptor = null;
  try {
    if(null == session) {
      return null;
    }
    descriptor = (XMLDescriptor) session.getDescriptor(((XMLRoot) object).getObject());
  } catch (XMLMarshalException marshalException) {
    if ((descriptor == null) && isSimpleXMLRoot((XMLRoot) object)) {
      return null;
    }
    throw marshalException;
  }
  if (descriptor == null) {
    throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName());
  }
  return descriptor;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

protected XMLDescriptor getDescriptor(XMLRoot object) throws XMLMarshalException {
  XMLDescriptor descriptor = null;
  try {
    AbstractSession session = xmlContext.getSession(((XMLRoot) object).getObject());
    if(null == session) {
      return null;
    }
    descriptor = (XMLDescriptor) session.getDescriptor(((XMLRoot) object).getObject());
  } catch (XMLMarshalException marshalException) {
    if ((descriptor == null) && isSimpleXMLRoot((XMLRoot) object)) {
      return null;
    }
    throw marshalException;
  }
  if (descriptor == null) {
    throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName());
  }
  return descriptor;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Convert the given object to XML and update the given marshal record with
 * that XML Document.
 * @param object the object to marshal
 * @param marshalRecord the marshalRecord to marshal the object to
 */
public void marshal(Object object, MarshalRecord marshalRecord) {
  boolean isXMLRoot = (object instanceof XMLRoot);
  
  AbstractSession session = null;
  XMLDescriptor xmlDescriptor = null;
  if(isXMLRoot){
    try{
      session = xmlContext.getSession(((XMLRoot)object).getObject());
      if(session != null){
        xmlDescriptor = getDescriptor(((XMLRoot)object).getObject(), session);
      }
    }catch (XMLMarshalException marshalException) {
      if (!isSimpleXMLRoot((XMLRoot) object)) {
        throw marshalException;    
      }                
    }
  }else{
    session = xmlContext.getSession(object);
    xmlDescriptor = getDescriptor(object, session);
  }
  
  marshal(object, marshalRecord, session, xmlDescriptor, isXMLRoot);
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (!isSimpleXMLRoot((XMLRoot) object)) {
  throw marshalException;

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (!isSimpleXMLRoot((XMLRoot) object)) {
  throw marshalException;

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (!isSimpleXMLRoot((XMLRoot) object)) {
  throw marshalException;

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if (!isSimpleXMLRoot((Root) object)) {
  throw marshalException;

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

if (!isSimpleXMLRoot((Root) object)) {
  throw marshalException;

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (!isSimpleXMLRoot((XMLRoot) object)) {
  throw marshalException;

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (!isSimpleXMLRoot((XMLRoot) object)) {
  throw marshalException;

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if (!isSimpleXMLRoot((Root) object)) {
  throw marshalException;

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

if (!isSimpleXMLRoot((Root) object)) {
  throw marshalException;

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