gpt4 book ai didi

org.eclipse.persistence.internal.oxm.XPathNode.getTextNode()方法的使用及代码示例

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

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

XPathNode.getTextNode介绍

暂无

代码示例

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

private boolean isTextValue(String localName) {
  XPathNode currentNode = ((UnmarshalRecord) contentHandler).getXPathNode();
  if (currentNode == null) {
    return textWrapper != null && textWrapper.equals(localName);
  }
  return ((currentNode.getNonAttributeChildrenMap() == null
          || currentNode.getNonAttributeChildrenMap().size() == 0
          || (currentNode.getNonAttributeChildrenMap().size() == 1
              && currentNode.getTextNode() != null)
      ) && textWrapper != null && textWrapper.equals(localName)
  );
}

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

private boolean isTextValue(String localName, UnmarshalRecord contentHandler_) {
  XPathNode currentNode = ((UnmarshalRecord) contentHandler_).getXPathNode();
  if (currentNode == null) {
    return textWrapper != null && textWrapper.equals(localName);
  }
  return ((currentNode.getNonAttributeChildrenMap() == null
      || currentNode.getNonAttributeChildrenMap().size() == 0
      || (currentNode.getNonAttributeChildrenMap().size() == 1
      && currentNode.getTextNode() != null)
  ) && textWrapper != null && textWrapper.equals(localName)
  );
}

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

public Object getNonAttributeChild(int index, XPathNode xPathNode) {
  Setting setting = settings.get(index);
  if(null == setting.getName()) {
    return xPathNode.getAnyNode();
  } else {
    if (setting.getName().equals(Constants.TEXT)) {
      return xPathNode.getTextNode();
    } else {
      indexFragment.setLocalName(null);
      indexFragment.setXPath(setting.getName());
      indexFragment.setNamespaceURI(setting.getNamespaceURI());
      return xPathNode.getNonAttributeChildrenMap().get(indexFragment);
    }
  }
}

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

public Object getNonAttributeChild(int index, XPathNode xPathNode) {
  Setting setting = settings.get(index);
  if(null == setting.getName()) {
    return xPathNode.getAnyNode();
  } else {
    if (setting.getName().equals(XMLConstants.TEXT)) {
      return xPathNode.getTextNode();
    } else {
      indexFragment.setLocalName(null);
      indexFragment.setXPath(setting.getName());
      indexFragment.setNamespaceURI(setting.getNamespaceURI());
      return xPathNode.getNonAttributeChildrenMap().get(indexFragment);
      
    }
  }
}

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

public Object getNonAttributeChild(int index, XPathNode xPathNode) {
  Setting setting = settings.get(index);
  if(null == setting.getName()) {
    return xPathNode.getAnyNode();
  } else {
    if (setting.getName().equals(Constants.TEXT)) {
      return xPathNode.getTextNode();
    } else {
      indexFragment.setLocalName(null);
      indexFragment.setXPath(setting.getName());
      indexFragment.setNamespaceURI(setting.getNamespaceURI());
      return xPathNode.getNonAttributeChildrenMap().get(indexFragment);
      
    }
  }
}

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

XPathNode textNode = xPathNode.getTextNode();
if (null == textNode) {
  textNode = xPathNode.getAnyNode();

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

if(null == resultNode && xPathNode.getTextNode() != null){
  XPathFragment textWrapperFragment = getTextWrapperFragment();
  if(textWrapperFragment != null && localName.equals(textWrapperFragment.getLocalName())){
    resultNode = xPathNode.getTextNode();

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

if(null == resultNode && xPathNode.getTextNode() != null){
  XPathFragment textWrapperFragment = getTextWrapperFragment();
  if(textWrapperFragment != null && localName.equals(textWrapperFragment.getLocalName())){
    resultNode = xPathNode.getTextNode();

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

return;
XPathNode textNode = xPathNode.getTextNode();
if (null == textNode) {
  textNode = xPathNode.getAnyNode();

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

return;
XPathNode textNode = xPathNode.getTextNode();
if (null == textNode) {
  textNode = xPathNode.getAnyNode();

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

xPathNode = xPathNode.getTextNode(); 
} else {
  Map nonAttributeChildrenMap = xPathNode.getNonAttributeChildrenMap();

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

XPathFragment rootFragment) {
lazyInitialize();
XPathNode textNode = rootXPathNode.getTextNode();
List<XPathNode> nonAttributeChildren = rootXPathNode.getNonAttributeChildren();
if (null == textNode && null == nonAttributeChildren) {

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

xPathNode = xPathNode.getTextNode();
} else {
  Map nonAttributeChildrenMap = xPathNode.getNonAttributeChildrenMap();

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

xPathNode.getUnmarshalNodeValue().endElement(xPathFragment, this);
} else {
  XPathNode textNode = xPathNode.getTextNode();

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

public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {
   Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor();
   ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder();
   MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue();
   Mapping textMapping = textMappingNodeValue.getMapping();
   Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance();
   if(textMapping.isAbstractDirectMapping()) {
     DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping();
     Field xmlField = (Field) xmlDirectMapping.getField();
     Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord);
     Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord);
     xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue);
   } else {
     Object oldChildObject = unmarshalRecord.getCurrentObject();
     CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping();
     unmarshalRecord.setCurrentObject(childObject);
     textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value);
     unmarshalRecord.setCurrentObject(oldChildObject);
   }
   setXPathInObject(namespaceURI, localName, childObject);
   setOrAddAttributeValue(unmarshalRecord, childObject, null, null);
 }

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

public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {        
   Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor();
   ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder();
   MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue();
   Mapping textMapping = textMappingNodeValue.getMapping();
   Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance();
   if(textMapping.isAbstractDirectMapping()) {
     DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping();
     Field xmlField = (Field) xmlDirectMapping.getField();
     Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord);
     Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord);
     xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue);
   } else {
     Object oldChildObject = unmarshalRecord.getCurrentObject();
     CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping();
     unmarshalRecord.setCurrentObject(childObject);
     textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value);
     unmarshalRecord.setCurrentObject(oldChildObject);
   }                                  
   setXPathInObject(namespaceURI, localName, childObject);           
   setOrAddAttributeValue(unmarshalRecord, childObject, null, null);
 }

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

@Override
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {
  unmarshalRecord.removeNullCapableValue(this);
  Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor();
  ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder();
  MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue();
  Mapping textMapping = textMappingNodeValue.getMapping();
  Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance();
  if(textMapping.isAbstractDirectMapping()) {
    DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping();
    Field xmlField = (Field) xmlDirectMapping.getField();
    Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord);
    Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord);
    xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue);
  } else {
    Object oldChildObject = unmarshalRecord.getCurrentObject();
    CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping();
    unmarshalRecord.setCurrentObject(childObject);
    textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value);
    unmarshalRecord.setCurrentObject(oldChildObject);
  }
  setAttributeValue(childObject, unmarshalRecord);
}

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

@Override
public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {
  unmarshalRecord.removeNullCapableValue(this);
  Descriptor referenceDescriptor = (Descriptor) getMapping().getReferenceDescriptor();
  ObjectBuilder treeObjectBuilder = (ObjectBuilder) referenceDescriptor.getObjectBuilder();
  MappingNodeValue textMappingNodeValue = (MappingNodeValue) treeObjectBuilder.getRootXPathNode().getTextNode().getNodeValue();
  Mapping textMapping = textMappingNodeValue.getMapping();
  Object childObject = referenceDescriptor.getInstantiationPolicy().buildNewInstance();
  if(textMapping.isAbstractDirectMapping()) {
    DirectMapping xmlDirectMapping = (DirectMapping) textMappingNodeValue.getMapping();
    Field xmlField = (Field) xmlDirectMapping.getField();
    Object realValue = unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField, value, (ConversionManager) unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(), unmarshalRecord);
    Object convertedValue = xmlDirectMapping.getAttributeValue(realValue, unmarshalRecord.getSession(), unmarshalRecord);
    xmlDirectMapping.setAttributeValueInObject(childObject, convertedValue);
  } else {
    Object oldChildObject = unmarshalRecord.getCurrentObject();
    CompositeObjectMapping nestedXMLCompositeObjectMapping = (CompositeObjectMapping) textMappingNodeValue.getMapping();
    unmarshalRecord.setCurrentObject(childObject);
    textMappingNodeValue.attribute(unmarshalRecord, namespaceURI, localName, value);
    unmarshalRecord.setCurrentObject(oldChildObject);
  }
  setAttributeValue(childObject, unmarshalRecord);
}

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

if(mapping.isAttribute()){	    	
    ObjectBuilder tob = (ObjectBuilder) mapping.getReferenceDescriptor().getObjectBuilder();
    MappingNodeValue textMappingNodeValue = (MappingNodeValue) tob.getRootXPathNode().getTextNode().getMarshalNodeValue();
    Mapping textMapping = textMappingNodeValue.getMapping();
    if(textMapping.isAbstractDirectMapping()) {

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

if(mapping.isAttribute()){
    ObjectBuilder tob = (ObjectBuilder) mapping.getReferenceDescriptor().getObjectBuilder();
    MappingNodeValue textMappingNodeValue = (MappingNodeValue) tob.getRootXPathNode().getTextNode().getMarshalNodeValue();
    Mapping textMapping = textMappingNodeValue.getMapping();
    if(textMapping.isAbstractDirectMapping()) {

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