gpt4 book ai didi

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

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

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

XMLMarshaller.isFragment介绍

[英]PUBLIC: Returns if this should marshal to a fragment. If true an XML header string is not written out.
[中]PUBLIC:返回是否应该封送到片段。如果为true,则不会写出XML头字符串。

代码示例

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

public Object getProperty(String propName) throws PropertyException {
  if (null == propName) {
    throw new IllegalArgumentException();
  }
  if (propName.equals(Marshaller.JAXB_ENCODING)) {
    return this.xmlBinder.getMarshaller().getEncoding();
  }
  if (propName.equals(Marshaller.JAXB_FORMATTED_OUTPUT)) {
    return this.xmlBinder.getMarshaller().isFormattedOutput();
  }
  if (propName.equals(Marshaller.JAXB_FRAGMENT)) {
    return this.xmlBinder.getMarshaller().isFragment();
  }
  if (propName.equals(Marshaller.JAXB_SCHEMA_LOCATION)) {
    return this.xmlBinder.getMarshaller().getSchemaLocation();
  }
  if (propName.equals(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION)) {
    return this.xmlBinder.getMarshaller().getNoNamespaceSchemaLocation();
  }
  throw new PropertyException(propName);
}

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

@Override
public Object getProperty(String propName) throws PropertyException {
  if (null == propName) {
    throw new IllegalArgumentException();
  }
  if (propName.equals(Marshaller.JAXB_ENCODING)) {
    return this.xmlBinder.getMarshaller().getEncoding();
  }
  if (propName.equals(Marshaller.JAXB_FORMATTED_OUTPUT)) {
    return this.xmlBinder.getMarshaller().isFormattedOutput();
  }
  if (propName.equals(Marshaller.JAXB_FRAGMENT)) {
    return this.xmlBinder.getMarshaller().isFragment();
  }
  if (propName.equals(Marshaller.JAXB_SCHEMA_LOCATION)) {
    return this.xmlBinder.getMarshaller().getSchemaLocation();
  }
  if (propName.equals(Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION)) {
    return this.xmlBinder.getMarshaller().getNoNamespaceSchemaLocation();
  }
  throw new PropertyException(propName);
}

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

return xmlMarshaller.getNoNamespaceSchemaLocation();
} else if (Constants.JAXB_FRAGMENT.equals(key)) {
  return xmlMarshaller.isFragment();
} else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
  return xmlMarshaller.getMediaType();
  return xmlMarshaller.getCharacterEscapeHandler();
} else if (XML_DECLARATION.equals(key)) {
  return !xmlMarshaller.isFragment();
} else if (XML_HEADERS.equals(key)) {
  return xmlMarshaller.getXmlHeader();

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

return xmlMarshaller.getNoNamespaceSchemaLocation();
} else if (Constants.JAXB_FRAGMENT.equals(key)) {
  return xmlMarshaller.isFragment();
} else if (MarshallerProperties.MEDIA_TYPE.equals(key)) {
  return xmlMarshaller.getMediaType();
  return xmlMarshaller.getCharacterEscapeHandler();
} else if (XML_DECLARATION.equals(key)) {
  return !xmlMarshaller.isFragment();
} else if (XML_HEADERS.equals(key)) {
  return xmlMarshaller.getXmlHeader();

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

document = objectToXML(object, xmlDescriptor, isXMLRoot);
if ((result instanceof SAXResult) && (isFragment())) {
  FragmentContentHandler fragmentHandler = new FragmentContentHandler(((SAXResult) result).getHandler());
  if (isXMLRoot) {

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

if (isFragment()) {
  record.node(xmlDocument, xmlDescriptor.getNamespaceResolver());
} else {

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

if (isFragment()) {
  writerRecord.node(xmlDocument, xmlDescriptor.getNamespaceResolver());
} else {

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

if (isFragment()) {
  FragmentContentHandler fragmentHandler = new FragmentContentHandler(contentHandler);
  reader.setContentHandler(fragmentHandler);

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

Document document = objectToXML(object, xmlDescriptor, isXMLRoot);
if ((result instanceof SAXResult) && (isFragment())) {
  FragmentContentHandler fragmentHandler = new FragmentContentHandler(((SAXResult) result).getHandler());

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

getMarshalListener().beforeMarshal(object);
if (!isFragment()) {
  String encoding = getEncoding();
  String version = DEFAULT_XML_VERSION;
  marshalRecord.endPrefixMappings(nr);
if (!isFragment()) {
  marshalRecord.endDocument();

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

Document document = objectToXML(object, xmlDescriptor, isXMLRoot);
if ((result instanceof SAXResult) && (isFragment())) {
  FragmentContentHandler fragmentHandler = new FragmentContentHandler(((SAXResult) result).getHandler());

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