gpt4 book ai didi

org.eclipse.xsd.impl.XSDSchemaImpl.getElement()方法的使用及代码示例

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

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

XSDSchemaImpl.getElement介绍

暂无

代码示例

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

@Override
public String put(String key, String value)
{
 if ("".equals(key))
 {
  throw new IllegalArgumentException("The default prefix should represented as null rather than as a zero length String");
 }
 if (value == null)
 {
  value = "";
 }
 String result = super.put(key, value);
 if (!isReconciling)
 {
  Element theElement = getElement();
  if (theElement != null)
  {
    String xmlnsAttribute = "xmlns";
    if (key != null)
    {
     xmlnsAttribute += ":" + key;
    }
    theElement.setAttributeNS(XSDConstants.XMLNS_URI_2000, xmlnsAttribute, value);
  }
 }
 return result;
}

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

if (changedElement == getElement())

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

Element theElement = getElement();
if (theElement != null)

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

if (changedElement == getElement())

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

@Override
public String put(String key, String value)
{
 if ("".equals(key))
 {
  throw new IllegalArgumentException("The default prefix should represented as null rather than as a zero length String");
 }
 if (value == null)
 {
  value = "";
 }
 String result = super.put(key, value);
 if (!isReconciling)
 {
  Element theElement = getElement();
  if (theElement != null)
  {
    String xmlnsAttribute = "xmlns";
    if (key != null)
    {
     xmlnsAttribute += ":" + key;
    }
    theElement.setAttributeNS(XSDConstants.XMLNS_URI_2000, xmlnsAttribute, value);
  }
 }
 return result;
}

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

Element theElement = getElement();
if (theElement != null)

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

if (shareDOM && getElement() != null)
 clonedSchema.setElement(getElement());

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

@Override
 public String remove(Object key) 
 {
  String result = super.remove(key);
  if (!isReconciling)
  {
   if (result != null)
   {
    if (key == null)
    {
     key = "xmlns";
    }
    Element theElement = getElement();
    if (theElement != null &&
       theElement.hasAttributeNS(XSDConstants.XMLNS_URI_2000, (String)key))
    {
     theElement.removeAttributeNS(XSDConstants.XMLNS_URI_2000, (String)key);
    }
   }
  }
  return result;
 }
};

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

if (shareDOM && getElement() != null)
 clonedSchema.setElement(getElement());

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

@Override
 public String remove(Object key) 
 {
  String result = super.remove(key);
  if (!isReconciling)
  {
   if (result != null)
   {
    if (key == null)
    {
     key = "xmlns";
    }
    Element theElement = getElement();
    if (theElement != null &&
       theElement.hasAttributeNS(XSDConstants.XMLNS_URI_2000, (String)key))
    {
     theElement.removeAttributeNS(XSDConstants.XMLNS_URI_2000, (String)key);
    }
   }
  }
  return result;
 }
};

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

Element theElement = getElement();
if (theElement != null)

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

/**
 * This sets the QName prefix used to reference the schema for schema;
 * it must be a key in {@link #getQNamePrefixToNamespaceMap} that maps to a valid schema for schema namespace.
 * It can also be used to rename the prefix, one it's established.
 */
public void setSchemaForSchemaQNamePrefix(String qNamePrefix)
{
 String oldSchemaForSchemaQNamePrefix = schemaForSchemaQNamePrefix;
 String oldSchemaForSchemaNamespace = getSchemaForSchemaNamespace();
 this.schemaForSchemaQNamePrefix = qNamePrefix;
 String newSchemaForSchemaNamespace = getSchemaForSchemaNamespace();
 // Rename it if there was an old one but no new one.
 //
 if (XSDConstants.isSchemaForSchemaNamespace(oldSchemaForSchemaNamespace) && 
   !XSDConstants.isSchemaForSchemaNamespace(newSchemaForSchemaNamespace))
 {
  getQNamePrefixToNamespaceMap().remove(oldSchemaForSchemaQNamePrefix);
  getQNamePrefixToNamespaceMap().put(qNamePrefix, oldSchemaForSchemaNamespace);
  if (getElement() != null && XSDConstants.isSchemaForSchemaNamespace(getSchemaForSchemaNamespace()))
  {
   updatePrefix(getElement(), getSchemaForSchemaNamespace(), oldSchemaForSchemaQNamePrefix, qNamePrefix);
   updateElement();
  }
 }
}

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

Element theElement = getElement();
if (theElement != null)

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

/**
 * This sets the QName prefix used to reference the schema for schema;
 * it must be a key in {@link #getQNamePrefixToNamespaceMap} that maps to a valid schema for schema namespace.
 * It can also be used to rename the prefix, one it's established.
 */
public void setSchemaForSchemaQNamePrefix(String qNamePrefix)
{
 String oldSchemaForSchemaQNamePrefix = schemaForSchemaQNamePrefix;
 String oldSchemaForSchemaNamespace = getSchemaForSchemaNamespace();
 this.schemaForSchemaQNamePrefix = qNamePrefix;
 String newSchemaForSchemaNamespace = getSchemaForSchemaNamespace();
 // Rename it if there was an old one but no new one.
 //
 if (XSDConstants.isSchemaForSchemaNamespace(oldSchemaForSchemaNamespace) && 
   !XSDConstants.isSchemaForSchemaNamespace(newSchemaForSchemaNamespace))
 {
  getQNamePrefixToNamespaceMap().remove(oldSchemaForSchemaQNamePrefix);
  getQNamePrefixToNamespaceMap().put(qNamePrefix, oldSchemaForSchemaNamespace);
  if (getElement() != null && XSDConstants.isSchemaForSchemaNamespace(getSchemaForSchemaNamespace()))
  {
   updatePrefix(getElement(), getSchemaForSchemaNamespace(), oldSchemaForSchemaQNamePrefix, qNamePrefix);
   updateElement();
  }
 }
}

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

@Override
public void setElement(Element element)
{
 Element oldElement = getElement();
 if (oldElement instanceof EventTarget)
 {
  EventTarget oldEventTarget = ((EventTarget)oldElement);
  oldEventTarget.removeEventListener("DOMNodeInserted", getEventListener(), true);
  oldEventTarget.removeEventListener("DOMNodeRemoved", getEventListener(), true);
  oldEventTarget.removeEventListener("DOMAttrModified", getEventListener(), true);
 }
 super.setElement(element);
 if (element instanceof EventTarget)
 {
  EventTarget eventTarget = ((EventTarget)element);
  eventTarget.addEventListener("DOMNodeInserted", getEventListener(), true);
  eventTarget.addEventListener("DOMNodeRemoved", getEventListener(), true);
  eventTarget.addEventListener("DOMAttrModified", getEventListener(), true);
 }
 if (element != null)
 {
  document = element.getOwnerDocument();
 }
}

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

@Override
public void setElement(Element element)
{
 Element oldElement = getElement();
 if (oldElement instanceof EventTarget)
 {
  EventTarget oldEventTarget = ((EventTarget)oldElement);
  oldEventTarget.removeEventListener("DOMNodeInserted", getEventListener(), true);
  oldEventTarget.removeEventListener("DOMNodeRemoved", getEventListener(), true);
  oldEventTarget.removeEventListener("DOMAttrModified", getEventListener(), true);
 }
 super.setElement(element);
 if (element instanceof EventTarget)
 {
  EventTarget eventTarget = ((EventTarget)element);
  eventTarget.addEventListener("DOMNodeInserted", getEventListener(), true);
  eventTarget.addEventListener("DOMNodeRemoved", getEventListener(), true);
  eventTarget.addEventListener("DOMAttrModified", getEventListener(), true);
 }
 if (element != null)
 {
  document = element.getOwnerDocument();
 }
}

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