gpt4 book ai didi

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

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

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

XPathFragment.setLocalName介绍

暂无

代码示例

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

private void updateXPathFragment(String qName, String localName, String namespaceURI) {
  if (namespaceURI != null && namespaceURI.length() == 0) {
    xPathFragment.setLocalName(qName);
    xPathFragment.setNamespaceURI(null);
  } else {
    xPathFragment.setLocalName(localName);
    xPathFragment.setNamespaceURI(namespaceURI);
  }
}

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

private void updateXPathFragment(String qName, String localName, String namespaceURI) {
  if (namespaceURI != null && namespaceURI.length() == 0) {
    xPathFragment.setLocalName(qName);
    xPathFragment.setNamespaceURI(null);
  } else {
    xPathFragment.setLocalName(localName);
    xPathFragment.setNamespaceURI(namespaceURI);
  }
}

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

public NodeValue getAttributeChildNodeValue(String namespace, String localName) {
  Map attributeChildrenMap = xPathNode.getAttributeChildrenMap();
  if (attributeChildrenMap != null) {
    xPathFragment.setLocalName(localName);
    if(namespace != null && namespace.length() == 0){
      xPathFragment.setNamespaceURI(null);
    } else {
      xPathFragment.setNamespaceURI(namespace);
    }
    XPathNode node = (XPathNode)attributeChildrenMap.get(xPathFragment);
    if (node != null) {
      return node.getUnmarshalNodeValue();
    }
  }
  return null;
}

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

public NodeValue getAttributeChildNodeValue(String namespace, String localName) {
  Map<XPathFragment, XPathNode> attributeChildrenMap = xPathNode.getAttributeChildrenMap();
  if (attributeChildrenMap != null) {
    XPathNode resultNode;
    xPathFragment.setLocalName(localName);
    xPathFragment.setNamespaceURI(namespace);
    if (unmarshaller.isCaseInsensitive()){
      resultNode = getNodeFromLookupTable(attributeChildrenMap, true);
    } else {
      resultNode = attributeChildrenMap.get(xPathFragment);
    }
    if (resultNode != null) {
      return resultNode.getUnmarshalNodeValue();
    }
  }
  return null;
}

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

public NodeValue getAttributeChildNodeValue(String namespace, String localName) {
  Map<XPathFragment, XPathNode> attributeChildrenMap = xPathNode.getAttributeChildrenMap();
  if (attributeChildrenMap != null) {
    XPathNode resultNode;
    xPathFragment.setLocalName(localName);
    xPathFragment.setNamespaceURI(namespace);
    if (unmarshaller.isCaseInsensitive()){
      resultNode = getNodeFromLookupTable(attributeChildrenMap, true);
    } else {
      resultNode = attributeChildrenMap.get(xPathFragment);
    }
    if (resultNode != null) {
      return resultNode.getUnmarshalNodeValue();
    }
  }
  return null;
}

代码示例来源: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/org.eclipse.persistence.core

/**
 * INTERNAL:
 */
public void setMarshaller(XMLMarshaller marshaller) {
  super.setMarshaller(marshaller);
  attributePrefix = marshaller.getAttributePrefix();
  encoder = Charset.forName(marshaller.getEncoding()).newEncoder();
  if (marshaller.getValueWrapper() != null) {
    textWrapperFragment = new XPathFragment();
    textWrapperFragment.setLocalName(marshaller.getValueWrapper());
  }
  characterEscapeHandler = marshaller.getCharacterEscapeHandler();
  writer.setMarshaller(marshaller);
}

代码示例来源: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: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 */
public void setMarshaller(XMLMarshaller marshaller) {
  super.setMarshaller(marshaller);
  attributePrefix = marshaller.getAttributePrefix();
  encoder = Charset.forName(marshaller.getEncoding()).newEncoder();
  if (marshaller.getValueWrapper() != null) {
    textWrapperFragment = new XPathFragment();
    textWrapperFragment.setLocalName(marshaller.getValueWrapper());
  }
  characterEscapeHandler = marshaller.getCharacterEscapeHandler();
  writer.setMarshaller(marshaller);
}

代码示例来源: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: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 */
public void setMarshaller(XMLMarshaller marshaller) {
  super.setMarshaller(marshaller);
  attributePrefix = marshaller.getAttributePrefix();
  if (marshaller.getValueWrapper() != null) {
    textWrapperFragment = new XPathFragment();
    textWrapperFragment.setLocalName(marshaller.getValueWrapper());
  }
  characterEscapeHandler = marshaller.getCharacterEscapeHandler();
}

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

@Override
public void attribute(String namespaceURI, String localName, String qName, String value) {
  XPathFragment xPathFragment = new XPathFragment();
  xPathFragment.setNamespaceURI(namespaceURI);
  xPathFragment.setAttribute(true);
  xPathFragment.setLocalName(localName);
  openStartElement(xPathFragment, namespaceResolver);
  characters(null, value, null, false, true);
  endElement(xPathFragment, namespaceResolver);
}

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

/**
 * INTERNAL:
 */
public void attribute(String namespaceURI, String localName, String qName, String value) {
  XPathFragment xPathFragment = new XPathFragment();
  xPathFragment.setNamespaceURI(namespaceURI);
  xPathFragment.setAttribute(true);
  xPathFragment.setLocalName(localName);
  openStartElement(xPathFragment, namespaceResolver);
  characters(null, value, null, false, true);
  endElement(xPathFragment, namespaceResolver);
}

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

/**
 * INTERNAL:
 */
public void setMarshaller(XMLMarshaller marshaller) {
  super.setMarshaller(marshaller);
  attributePrefix = marshaller.getAttributePrefix();
  if (marshaller.getValueWrapper() != null) {
    textWrapperFragment = new XPathFragment();
    textWrapperFragment.setLocalName(marshaller.getValueWrapper());
  }
  characterEscapeHandler = marshaller.getCharacterEscapeHandler();
}

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

@Override
public void attribute(String namespaceURI, String localName, String qName, String value) {
  XPathFragment xPathFragment = new XPathFragment();
  xPathFragment.setNamespaceURI(namespaceURI);
  xPathFragment.setAttribute(true);
  xPathFragment.setLocalName(localName);
  openStartElement(xPathFragment, namespaceResolver);
  characters(null, value, null, false, true);
  endElement(xPathFragment, namespaceResolver);
  
}

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

/**
 * INTERNAL:
 */
public void attribute(String namespaceURI, String localName, String qName, String value) {
  XPathFragment xPathFragment = new XPathFragment();
  xPathFragment.setNamespaceURI(namespaceURI);
  xPathFragment.setAttribute(true);
  xPathFragment.setLocalName(localName);
  openStartElement(xPathFragment, namespaceResolver);
  characters(null, value, null, false, true);
  endElement(xPathFragment, namespaceResolver);
}

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

public XPathFragment getTextWrapperFragment() {
if(xmlReader.getMediaType() .isApplicationJSON()){
  if(textWrapperFragment == null){
    textWrapperFragment = new XPathFragment();
    textWrapperFragment.setLocalName(unmarshaller.getValueWrapper());
    textWrapperFragment.setNamespaceAware(isNamespaceAware());
    textWrapperFragment.setNamespaceSeparator(getNamespaceSeparator());
  }
  return textWrapperFragment;
}
return null;
}

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

public XPathFragment getTextWrapperFragment() {
if(xmlReader.getMediaType() .isApplicationJSON()){
  if(textWrapperFragment == null){
    textWrapperFragment = new XPathFragment();
    textWrapperFragment.setLocalName(unmarshaller.getValueWrapper());
    textWrapperFragment.setNamespaceAware(isNamespaceAware());
    textWrapperFragment.setNamespaceSeparator(getNamespaceSeparator());
  }
  return textWrapperFragment;
}
return null;
}

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

public void setXPathNode(XPathNode xPathNode) {
  super.setXPathNode(xPathNode);
  xmlDirectMapping.getNullPolicy().xPathNode(xPathNode, this);
  if(((Field) xmlDirectMapping.getField()).isTypedTextField()) {
    XPathFragment typeAttributeXPathFragment = new XPathFragment();
    typeAttributeXPathFragment.setAttribute(true);
    typeAttributeXPathFragment.setLocalName(Constants.SCHEMA_TYPE_ATTRIBUTE);
    typeAttributeXPathFragment.setNamespaceURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    xPathNode.getParent().addChild(typeAttributeXPathFragment, new TypeNodeValue(), null);
  }
}

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

public void setXPathNode(XPathNode xPathNode) {
  super.setXPathNode(xPathNode);
  xmlDirectMapping.getNullPolicy().xPathNode(xPathNode, this);
  if(((Field) xmlDirectMapping.getField()).isTypedTextField()) {
    XPathFragment typeAttributeXPathFragment = new XPathFragment();
    typeAttributeXPathFragment.setAttribute(true);
    typeAttributeXPathFragment.setLocalName(Constants.SCHEMA_TYPE_ATTRIBUTE);
    typeAttributeXPathFragment.setNamespaceURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    xPathNode.getParent().addChild(typeAttributeXPathFragment, new TypeNodeValue(), null);
  }
}

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