gpt4 book ai didi

org.apache.xmlbeans.impl.values.XmlObjectBase类的使用及代码示例

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

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

XmlObjectBase介绍

暂无

代码示例

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public String getStringValue()
{
  if (isImmutable())
  {
    if ((_flags & FLAG_NIL) != 0)
      return null;
    return compute_text(null);
  }
  // Since complex-content types don't have a "natural" string value, we
  // emit the deeply concatenated, tag-removed content of the tag.
  synchronized (monitor())
  {
    if (_isComplexContent())
      return get_store().fetch_text(TypeStore.WS_PRESERVE);
    check_dated();
    if ((_flags & FLAG_NIL) != 0)
      return null;
    return compute_text(has_store() ? get_store() : null);
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public XmlObject changeType(SchemaType type)
{
  if (type == null)
    throw new IllegalArgumentException( "Invalid type (null)" );
  if ((_flags & FLAG_STORE) == 0)
  {
    throw
      new IllegalStateException(
        "XML Value Objects cannot have thier type changed" );
  }
  synchronized (monitor())
  {
    check_orphaned();
    return (XmlObject) get_store().change_type( type );
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public String xmlText (XmlOptions options)
{
  XmlCursor cur = newCursorForce();
  try
  {
    return cur.xmlText(makeInnerOptions(options));
  }
  finally
  {
    cur.dispose();
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final XmlObject copy(XmlOptions options)
{
  if (preCheck())
    return _copy(options);
  else
    synchronized (monitor())
    {
      return _copy(options);
    }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * True if the value is nilled.
 */
public final boolean isNil()
{
  synchronized (monitor())
  {
    check_dated();
    return ((_flags & FLAG_NIL) != 0);
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public int valueHashCode()
{
  synchronized (monitor())
  {
    return value_hash_code();
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

setNil();
  return;
  set( (XmlObject) o );
else if (o instanceof String)
  setStringValue( (String) o );
else if (o instanceof StringEnumAbstractBase)
  setEnumValue( (StringEnumAbstractBase) o );
else if (o instanceof BigInteger)
  setBigIntegerValue( (BigInteger) o );
else if (o instanceof BigDecimal)
  setBigDecimalValue( (BigDecimal) o );
else if (o instanceof Byte)
  setByteValue( ((Byte)o).byteValue() );
else if (o instanceof Short)
  setShortValue( ((Short)o).shortValue() );
else if (o instanceof Integer)
  setIntValue( ((Integer)o).intValue() );
else if (o instanceof Long)
  setLongValue( ((Long)o).longValue() );
else if (o instanceof Boolean)
  setBooleanValue( ((Boolean)o).booleanValue() );
else if (o instanceof Float)
  setFloatValue( ((Float)o).floatValue() );
else if (o instanceof Double)
  setDoubleValue( ((Double)o).doubleValue() );
else if (o instanceof Calendar)
  setCalendarValue( ((Calendar)o) );
else if (o instanceof Date)

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

if (isImmutable())
  throw new IllegalStateException("Cannot set the value of an immutable XmlObject");
XmlObjectBase obj = underlying(src);
  setNil();
  return this;
if (obj.isImmutable())
  setStringValue(obj.getStringValue());
else
  boolean noSyncThis = preCheck();
  boolean noSyncObj  = obj.preCheck();
  if (monitor() == obj.monitor())             // both are in the same locale
      newObj = setterHelper( obj );
    else                                    // the locale is sync
      synchronized (monitor()) {
        newObj = setterHelper( obj );
        newObj = setterHelper( obj );
        synchronized (obj.monitor()) {
          newObj = setterHelper( obj );
        synchronized (monitor()) {

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * Same as set() but unsynchronized.
 * Warning: Using this method in mutithreaded environment can cause invalid states.
 */
public final XmlObject _set(XmlObject src)
{
  if (isImmutable())
    throw new IllegalStateException("Cannot set the value of an immutable XmlObject");
  XmlObjectBase obj = underlying(src);
  TypeStoreUser newObj = this;
  if (obj == null)
  {
    setNil();
    return this;
  }
  if (obj.isImmutable())
    set(obj.stringValue());
  else
  {
    check_orphaned();
    obj.check_orphaned();
    newObj = get_store().copy_contents_from( obj.get_store() ).
      get_store().change_type( obj.schemaType() );
  }
  return (XmlObject) newObj;
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

XmlObjectBase srcObj = underlying(src);
  synchronized (monitor())
    XmlObjectBase target = getTargetForSetter(propName, index, kindSetterHelper);
    target.setNil();
    return target;
if (srcObj.isImmutable())
  synchronized (monitor())
    XmlObjectBase target = getTargetForSetter(propName, index, kindSetterHelper);
    target.setStringValue(srcObj.getStringValue());
    return (XmlObject) target;
boolean noSyncThis = preCheck();
boolean noSyncObj  = srcObj.preCheck();
if (monitor() == srcObj.monitor())             // both are in the same locale
    return (XmlObject)objSetterHelper(srcObj, propName, index, kindSetterHelper);
    synchronized (monitor())
      return (XmlObject)objSetterHelper(srcObj, propName, index, kindSetterHelper);
    return (XmlObject)objSetterHelper(srcObj, propName, index, kindSetterHelper);

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final void setBigIntegerValue(BigInteger obj)
  { if (obj == null) setNil(); else { synchronized (monitor()) { set_prepare(); set_BigInteger(obj); set_commit(); } } }
public final void setBigDecimalValue(BigDecimal obj)

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final void setCalendarValue(Calendar obj)
  { if (obj == null) setNil(); else { synchronized (monitor()) { set_prepare(); set_Calendar(obj); set_commit(); } } }
public final void setDateValue(Date obj)

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final void setGDurationValue(GDurationSpecification obj)
{ if (obj == null) setNil(); else { synchronized (monitor()) { set_prepare(); set_GDuration(obj); set_commit(); } } }
public final void setQNameValue(QName obj)

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final void setByteArrayValue(byte[] obj)
  { if (obj == null) setNil(); else { synchronized (monitor()) { set_prepare(); set_ByteArray(obj); set_commit(); } } }
public final void setEnumValue(StringEnumAbstractBase obj)

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public XmlObject[] execQuery ( String queryExpr, XmlOptions options )
{
  synchronized (monitor())
  {
    TypeStore typeStore = get_store();
    if (typeStore == null)
    {
      throw
        new XmlRuntimeException(
          "Cannot do XQuery on XML Value Objects" );
    }
    try
    {
      return _typedArray(typeStore.exec_query( queryExpr, options ));
    }
    catch (XmlException e)
    {
      throw new XmlRuntimeException( e );
    }
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

String def = get_store().compute_default_text();
    if (def == null)
      throw new XmlValueOutOfRangeException();
    try { this.setStringValue(def); }
    finally { _flags &= ~FLAG_SETTINGDEFAULT; }
    _flags &= ~FLAG_NIL;
set_text(v);
_flags &= ~(FLAG_NIL | FLAG_ISDEFAULT);

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * Same as copy() but unsynchronized.
 * If Locale.COPY_USE_NEW_LOCALE is set in the options, a new locale will be created for the copy.
 * Warning: Using this method in mutithreaded environment can cause invalid states.
 */
public final XmlObject _copy(XmlOptions xmlOptions)
{
  // immutable objects don't get copied. They're immutable
  if (isImmutable())
    return this;
  check_orphaned();
  SchemaTypeLoader stl = get_store().get_schematypeloader();
  XmlObject result = (XmlObject)get_store().copy(stl, schemaType(), xmlOptions);
  return result;
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

private TypeStoreUser objSetterHelper(XmlObjectBase srcObj, QName propName, int index, short kindSetterHelper)
{
  XmlObjectBase target = getTargetForSetter(propName, index, kindSetterHelper);
  target.check_orphaned();
  srcObj.check_orphaned();
  return target.get_store().copy_contents_from( srcObj.get_store() ).
      get_store().change_type( srcObj.schemaType() );
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final void setLongValue(long v)
  { synchronized (monitor()) { set_prepare(); set_long(v); set_commit(); } }
public final void setFloatValue(float v)

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public final void setFloatValue(float v)
  { synchronized (monitor()) { set_prepare(); set_float(v); set_commit(); } }
public final void setDoubleValue(double v)

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