gpt4 book ai didi

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

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

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

XPathFragment.nameIsText介绍

暂无

代码示例

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

/**
 * Indicate if the XPathFragment is an attribute or text() node.
 */
public boolean isOwningNode(XPathFragment xPathFragment) {
  return xPathFragment.isAttribute() || xPathFragment.nameIsText();
}

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

public boolean isOwningNode(XPathFragment xPathFragment) {
  if(isMixedNodeValue) {
    if(xPathFragment.nameIsText()) {
      return true;
    } else {
      return false;
    }
  }
  return choiceElementNodeValue.isOwningNode(xPathFragment);
}

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

public boolean isOwningNode(XPathFragment xPathFragment) {
  if(isMixedNodeValue) {
    if(xPathFragment.nameIsText()) {
      return true;
    } else {
      return false;
    }
  }
  return choiceElementNodeValue.isOwningNode(xPathFragment);
}

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

/**
 * Indicate if the XPathFragment is an attribute or text() node.
 */
public boolean isOwningNode(XPathFragment xPathFragment) {
  return xPathFragment.isAttribute() || xPathFragment.nameIsText();
}

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

public boolean isOwningNode(XPathFragment xPathFragment) {
  if(isMixedNodeValue) {
    if(xPathFragment.nameIsText()) {
      return true;
    } else {
      return false;
    }
  }
  return choiceElementNodeValue.isOwningNode(xPathFragment);
}

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

/**
 * Indicate if the XPathFragment is an attribute or text() node.
 */
public boolean isOwningNode(XPathFragment xPathFragment) {
  return xPathFragment.isAttribute() || xPathFragment.nameIsText();
}

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

public boolean isOwningNode(XPathFragment xPathFragment) {
  if(isMixedNodeValue) {
    if(xPathFragment.nameIsText()) {
      return true;
    } else {
      return false;
    }
  }
  return choiceElementNodeValue.isOwningNode(xPathFragment);
}

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

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

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

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

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

/**
 * Indicate if the next XPathFragment is an attribute or text() node.
 */
public boolean isOwningNode(XPathFragment xPathFragment) {
  if(isMarshalNodeValue()) {
    if (xmlCollectionReferenceMapping.usesSingleNode()) {
      return xPathFragment.nameIsText() || xPathFragment.isAttribute();
    }
    XPathFragment nextFragment = xPathFragment.getNextFragment();
    return (nextFragment != null) && (nextFragment.nameIsText() || nextFragment.isAttribute());
  }
  return super.isOwningNode(xPathFragment);
}

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

public void writeSingleValue(Object attributeValue, Object parent, XMLRecord row, AbstractSession session) {
  if (((XMLField)this.getField()).getLastXPathFragment().nameIsText()) {
    if (attributeValue instanceof Text) {
      attributeValue = ((Text)attributeValue).getNodeValue();
    }
  }
  row.put(getField(), attributeValue);
}

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

public void writeSingleValue(Object attributeValue, Object parent, XMLRecord row, AbstractSession session) {
  if (((XMLField)this.getField()).getLastXPathFragment().nameIsText()) {
    if (attributeValue instanceof Text) {
      attributeValue = ((Text)attributeValue).getNodeValue();
    }
  }
  row.put(getField(), attributeValue);
}

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

public void writeSingleValue(Object attributeValue, Object parent, XMLRecord row, AbstractSession session) {
  if (((XMLField)this.getField()).getLastXPathFragment().isAttribute()) {
    if (attributeValue instanceof Attr) {
      attributeValue = ((Attr)attributeValue).getValue();
    }
  } else if (((XMLField)this.getField()).getLastXPathFragment().nameIsText()) {
    if (attributeValue instanceof Text) {
      attributeValue = ((Text)attributeValue).getNodeValue();
    }
  }
  row.put(getField(), attributeValue);
}

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

public void writeSingleValue(Object attributeValue, Object parent, XMLRecord row, AbstractSession session) {
  if (((XMLField)this.getField()).getLastXPathFragment().isAttribute()) {
    if (attributeValue instanceof Attr) {
      attributeValue = ((Attr)attributeValue).getValue();
    }
  } else if (((XMLField)this.getField()).getLastXPathFragment().nameIsText()) {
    if (attributeValue instanceof Text) {
      attributeValue = ((Text)attributeValue).getNodeValue();
    }
  }
  row.put(getField(), attributeValue);
}

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

public void writeSingleValue(Object attributeValue, Object parent, XMLRecord row, AbstractSession session) {
  if (((XMLField)this.getField()).getLastXPathFragment().isAttribute()) {
    if (attributeValue instanceof Attr) {
      attributeValue = ((Attr)attributeValue).getValue();
    }
  } else if (((XMLField)this.getField()).getLastXPathFragment().nameIsText()) {
    if (attributeValue instanceof Text) {
      attributeValue = ((Text)attributeValue).getNodeValue();
    }
  }
  row.put(getField(), attributeValue);
}

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

public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {
  unmarshalRecord.removeNullCapableValue(this);
  XPathFragment lastFrag = ((XMLField)xmlFragmentMapping.getField()).getLastXPathFragment();
  SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder();
  if (lastFrag.nameIsText()) {
    Object attributeValue = builder.buildTextNode(unmarshalRecord.getStringBuffer().toString());
    unmarshalRecord.resetStringBuffer();
    xmlFragmentMapping.setAttributeValueInObject(unmarshalRecord.getCurrentObject(), attributeValue);
  } else if (!lastFrag.isAttribute()) {
    Object value = builder.getNodes().remove(builder.getNodes().size() -1);
    unmarshalRecord.setAttributeValue(value, xmlFragmentMapping);
  }
}

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

private Node getSingleNode(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver) {
  if (xPathFragment.isAttribute()) {
    return selectSingleAttribute(contextNode, xPathFragment, xmlNamespaceResolver);
  } else if (xPathFragment.nameIsText()) {
    return selectSingleText(contextNode);
  } else if (xPathFragment.isSelfFragment()) {
    return contextNode;
  }
  if (xPathFragment.containsIndex()) {
    return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
  }
  return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver);
}

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

public void initialize(DatabaseMapping mapping, Session session) {
  XPathFragment fragment = associatedField.getXPathFragment();
  while(fragment.getNextFragment() != null && !(fragment.getNextFragment().nameIsText())) {
    fragment = fragment.getNextFragment();
  }
  if(fragment.hasNamespace() && associatedField.getNamespaceResolver() != null){
    String uri = associatedField.getNamespaceResolver().resolveNamespacePrefix(fragment.getPrefix());
    fragment.setNamespaceURI(uri);
  }
  this.rootFragment = fragment;
  this.mapping = mapping;
}

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

public void initialize(DatabaseMapping mapping, Session session) {
  XPathFragment fragment = associatedField.getXPathFragment();
  while(fragment.getNextFragment() != null && !(fragment.getNextFragment().nameIsText())) {
    fragment = fragment.getNextFragment();
  }
  if(fragment.hasNamespace() && associatedField.getNamespaceResolver() != null){
    String uri = associatedField.getNamespaceResolver().resolveNamespacePrefix(fragment.getPrefix());
    fragment.setNamespaceURI(uri);
  }
  this.rootFragment = fragment;
  this.mapping = mapping;
}

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

public void initialize(DatabaseMapping mapping, Session session) {
  XPathFragment fragment = associatedField.getXPathFragment();
  while(fragment.getNextFragment() != null && !(fragment.getNextFragment().nameIsText())) {
    fragment = fragment.getNextFragment();
  }
  if(fragment.hasNamespace() && associatedField.getNamespaceResolver() != null){
    String uri = associatedField.getNamespaceResolver().resolveNamespacePrefix(fragment.getPrefix());
    fragment.setNamespaceURI(uri);
  }
  this.rootFragment = fragment;
  this.mapping = mapping;
}

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