gpt4 book ai didi

org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping.usesSingleNode()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 15:43:05 27 4
gpt4 key购买 nike

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

XMLCompositeDirectCollectionMapping.usesSingleNode介绍

暂无

代码示例

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

public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {
  Object collection = unmarshalRecord.getContainerInstance(this);
  if (xmlCompositeDirectCollectionMapping.usesSingleNode()) {
    StringTokenizer stringTokenizer = new StringTokenizer(value);
    while (stringTokenizer.hasMoreTokens()) {
      addUnmarshalValue(unmarshalRecord, stringTokenizer.nextToken(), collection);
    }
  } else {
    addUnmarshalValue(unmarshalRecord, value, collection);
  }
}

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

public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Object collection) {
  Object value = unmarshalRecord.getStringBuffer().toString();
  unmarshalRecord.resetStringBuffer();
  if (xmlCompositeDirectCollectionMapping.usesSingleNode()) {
    StringTokenizer stringTokenizer = new StringTokenizer((String) value);
    while (stringTokenizer.hasMoreTokens()) {
      addUnmarshalValue(unmarshalRecord, stringTokenizer.nextToken(), collection);
    }
  } else {
    addUnmarshalValue(unmarshalRecord, value, collection);
  }
}

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

public boolean isOwningNode(XPathFragment xPathFragment) {
  if (xmlCompositeDirectCollectionMapping.usesSingleNode()) {
    return xPathFragment.nameIsText() || xPathFragment.isAttribute();
  } else {
    XPathFragment nextFragment = xPathFragment.getNextFragment();
    return (nextFragment != null) && (nextFragment.nameIsText() || nextFragment.isAttribute());
  }
}

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

public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {
  XMLField xmlField = (XMLField) xmlCompositeDirectCollectionMapping.getField();
  if (!xmlField.getLastXPathFragment().nameIsText()) {
    return;
  }
  
  Object value = unmarshalRecord.getStringBuffer().toString();
  Object collection = unmarshalRecord.getContainerInstance(this);
  unmarshalRecord.resetStringBuffer();
  if (xmlCompositeDirectCollectionMapping.usesSingleNode()) {
    StringTokenizer stringTokenizer = new StringTokenizer((String) value);
    while (stringTokenizer.hasMoreTokens()) {
      addUnmarshalValue(unmarshalRecord, stringTokenizer.nextToken(), collection);
    }
  } else {
    if (value.equals(XMLConstants.EMPTY_STRING)) {
      if (xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByEmptyNode() ||
          xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByXsiNil()) {
        return;
      }
    }
    addUnmarshalValue(unmarshalRecord, value, collection);
  }
}

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

} else if(!usesSingleNode()){
  AbstractNullPolicy nullPolicy = getNullPolicy();
  if (nullPolicy == null) {

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

} else if(!usesSingleNode()){
  AbstractNullPolicy nullPolicy = getNullPolicy();
  if (nullPolicy == null) {

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

public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) {
  XMLField xmlField = (XMLField) xmlCompositeDirectCollectionMapping.getField();
  if (xmlField.getLastXPathFragment().nameIsText()) {
    String type = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE);
    if (null != type) {
      String namespaceURI = null;
      int colonIndex = type.indexOf(XMLConstants.COLON);
      if (colonIndex > -1) {
        String prefix = type.substring(0, colonIndex);
        namespaceURI = unmarshalRecord.resolveNamespacePrefix(prefix);
        type = type.substring(colonIndex + 1);
      }
      unmarshalRecord.setTypeQName(new QName(namespaceURI, type));
    }
    if (xmlCompositeDirectCollectionMapping.getNullPolicy().isNullRepresentedByXsiNil() && xmlCompositeDirectCollectionMapping.getNullPolicy().valueIsNull(atts)) {
      getContainerPolicy().addInto(null, unmarshalRecord.getContainerInstance(this), unmarshalRecord.getSession());
    }
  } else if (xmlField.getLastXPathFragment().isAttribute()) {
    if (!this.xmlCompositeDirectCollectionMapping.usesSingleNode()) {
      String namespaceURI = xmlField.getLastXPathFragment().getNamespaceURI();
      if (namespaceURI == null) {
        namespaceURI = XMLConstants.EMPTY_STRING;
      }
      String value = atts.getValue(namespaceURI, xmlField.getLastXPathFragment().getLocalName());
      Object collection = unmarshalRecord.getContainerInstance(this);
      addUnmarshalValue(unmarshalRecord, value, collection);
    }
  }
  return true;
}

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

String newValue;
QName schemaType;
if (xmlCompositeDirectCollectionMapping.usesSingleNode()) {
  while (cp.hasNext(iterator)) {
    objectValue = cp.next(iterator, session);

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