gpt4 book ai didi

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

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

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

XPathFragment.setNamespaceURI介绍

暂无

代码示例

代码示例来源: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: 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

public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
  XPathFragment xPathFragment = new XPathFragment(localName);
  xPathFragment.setNamespaceURI(namespaceURI);
  JSONFormattedWriterRecord.this.endElement(xPathFragment, namespaceResolver);
}

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

public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
  XPathFragment xPathFragment = new XPathFragment(localName);
  xPathFragment.setNamespaceURI(namespaceURI);
  JSONWriterRecord.this.endElement(xPathFragment, namespaceResolver);
}

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

public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
  XPathFragment xPathFragment = new XPathFragment(localName);
  xPathFragment.setNamespaceURI(namespaceURI);
  
  JSONFormattedWriterRecord.this.endElement(xPathFragment, namespaceResolver);        
}

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

public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
  XPathFragment xPathFragment = new XPathFragment(localName);
  xPathFragment.setNamespaceURI(namespaceURI);
  
  JSONWriterRecord.this.endElement(xPathFragment, namespaceResolver);        
}

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

/**
 * Used when an nil attribute should be written
 * @since EclipseLink 2.4
 */
public void nilSimple(NamespaceResolver namespaceResolver){
   XPathFragment groupingFragment = openStartGroupingElements(namespaceResolver);
   String xsiPrefix = processNamespaceResolverForXSIPrefix(namespaceResolver);
   StringBuilder qName = new StringBuilder(Constants.ATTRIBUTE); // Unsynchronized
   qName.append(xsiPrefix).append(COLON_W_SCHEMA_NIL_ATTRIBUTE);
   XPathFragment nilFragment = new XPathFragment(qName.toString());
   nilFragment.setNamespaceURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
   attribute(nilFragment, namespaceResolver, TRUE);
   closeStartGroupingElements(groupingFragment);
}

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

public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
    XPathFragment xPathFragment = new XPathFragment(localName);
    xPathFragment.setNamespaceURI(namespaceURI);
    openStartElement(xPathFragment, namespaceResolver);
    handleAttributes(atts);
}

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

public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
    XPathFragment xPathFragment = new XPathFragment(localName);
    xPathFragment.setNamespaceURI(namespaceURI);
    openStartElement(xPathFragment, namespaceResolver);
    handleAttributes(atts);
}

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

/**
 * Marshal an attribute for the give namespaceURI, localName, qualifiedName and value
 * @param namespaceURI
 * @param localName
 * @param qName     
 * @param value
 */
public void attribute(String namespaceURI, String localName, String qName, String value){
  XMLField xmlField = new XMLField(XMLConstants.ATTRIBUTE +qName);
  xmlField.setNamespaceResolver(getNamespaceResolver());
  xmlField.getLastXPathFragment().setNamespaceURI(namespaceURI);
  add(xmlField, value);
}

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

/**
 * Marshal an attribute for the give namespaceURI, localName, qualifiedName and value
 * @param namespaceURI
 * @param localName
 * @param qName
 * @param value
 */
public void attribute(String namespaceURI, String localName, String qName, String value){
  XMLField xmlField = new XMLField(XMLConstants.ATTRIBUTE +qName);
  xmlField.setNamespaceResolver(getNamespaceResolver());
  xmlField.getLastXPathFragment().setNamespaceURI(namespaceURI);
  add(xmlField, value);
}

代码示例来源: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: 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: 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: 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/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: 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;
}

代码示例来源: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);
  }
}

代码示例来源: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);
  }
}

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