gpt4 book ai didi

org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil.normalize()方法的使用及代码示例

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

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

XMLTypeUtil.normalize介绍

暂无

代码示例

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

protected String replaceWhiteSpace(String value)
{
 return XMLTypeUtil.normalize(value, false);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

protected String collapseWhiteSpace(String value)
{
 return XMLTypeUtil.normalize(value, true);
}

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

protected String collapseWhiteSpace(String value)
{
 return XMLTypeUtil.normalize(value, true);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

protected String replaceWhiteSpace(String value)
{
 return XMLTypeUtil.normalize(value, false);
}

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

public XMLDuration(String value)
{
 duration = XMLCalendar.datatypeFactory.newDuration(XMLTypeUtil.normalize(value, true));
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

public XMLDuration(String value)
{
 duration = XMLCalendar.datatypeFactory.newDuration(XMLTypeUtil.normalize(value, true));
}

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

protected boolean convertToBoolean(String value)
 {
  value = XMLTypeUtil.normalize(value, true);
  return "true".equals(value) || "1".equals(value);
 }
}

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

/**
 * Returns the URI corresponding to the resolved QName of the value of the attribute of the element.
 * @param element an element.
 * @param localNameOfAttribute the name of the attribute whose value to use.
 * @return the URI corresponding to the resolved QName of the value of the attribute of the element.
 * @see #lookupQName(Element, String)
 * @see Element#getAttribute(String)
 */
public static String lookupQNameForAttribute(Element element, String localNameOfAttribute)
{
 if (element != null && element.hasAttribute(localNameOfAttribute))
 {
  // Some DOM implementations return a null here.
  //
  String qName = XMLTypeUtil.normalize(element.getAttribute(localNameOfAttribute), true);
  return lookupQName(element, qName);
 }
 else
 {
  return "";
 }
}

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

/**
 * Returns the URI corresponding to the resolved QName of the value of the attribute of the element.
 * @param element an element.
 * @param localNameOfAttribute the name of the attribute whose value to use.
 * @return the URI corresponding to the resolved QName of the value of the attribute of the element.
 * @see #lookupQName(Element, String)
 * @see Element#getAttribute(String)
 */
public static String lookupQNameForAttribute(Element element, String localNameOfAttribute)
{
 if (element != null && element.hasAttribute(localNameOfAttribute))
 {
  // Some DOM implementations return a null here.
  //
  String qName = XMLTypeUtil.normalize(element.getAttribute(localNameOfAttribute), true);
  return lookupQName(element, qName);
 }
 else
 {
  return "";
 }
}

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

public XMLCalendar(String value, short datatype)
{
 value = XMLTypeUtil.normalize(value, true);
 if (value.length() == 0)
 {
  throw new InvalidDatatypeValueException("Incomplete value");
 }
 if (datatype < 0 || datatype > GMONTH)
 {
  throw new IllegalArgumentException("Illegal datatype value " + datatype);
 }
 if (datatype == GMONTH && FIX_GMONTH_PARSE)
 {
  if (value.length() < 6 || value.charAt(4) != '-' || value.charAt(5) != '-')
  {
   StringBuilder v = new StringBuilder(value);
   v.insert(4, "--");
   value = v.toString();
  }
 }
 this.date = null;
 this.dataType = datatype;
 this.xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(value);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

public XMLCalendar(String value, short datatype)
{
 value = XMLTypeUtil.normalize(value, true);
 if (value.length() == 0)
 {
  throw new InvalidDatatypeValueException("Incomplete value");
 }
 if (datatype < 0 || datatype > GMONTH)
 {
  throw new IllegalArgumentException("Illegal datatype value " + datatype);
 }
 if (datatype == GMONTH && FIX_GMONTH_PARSE)
 {
  if (value.length() < 6 || value.charAt(4) != '-' || value.charAt(5) != '-')
  {
   StringBuilder v = new StringBuilder(value);
   v.insert(4, "--");
   value = v.toString();
  }
 }
 this.date = null;
 this.dataType = datatype;
 this.xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(value);
}

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

protected void reconcileNameAttribute()
{
 Element theElement = getElement();
 if (theElement.hasAttributeNS(null, XSDConstants.NAME_ATTRIBUTE))
 {
  String newName = XMLTypeUtil.normalize(theElement.getAttributeNS(null, XSDConstants.NAME_ATTRIBUTE), true);
  if (!newName.equals(getName()))
  {
   setName(newName);
  }
 }
 else if (getName() != null)
 {
  setName(null);
 }
}

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

protected void reconcileNameAttribute()
{
 Element theElement = getElement();
 if (theElement.hasAttributeNS(null, XSDConstants.NAME_ATTRIBUTE))
 {
  String newName = XMLTypeUtil.normalize(theElement.getAttributeNS(null, XSDConstants.NAME_ATTRIBUTE), true);
  if (!newName.equals(getName()))
  {
   setName(newName);
  }
 }
 else if (getName() != null)
 {
  setName(null);
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.xmi

!"".equals(XMLTypeUtil.normalize(entry.getValue().toString(), true)))

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore.xmi

!"".equals(XMLTypeUtil.normalize(entry.getValue().toString(), true)))

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