gpt4 book ai didi

org.apache.xmlbeans.impl.values.XmlObjectBase.get_store()方法的使用及代码示例

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

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

XmlObjectBase.get_store介绍

[英]Used by the ComplexTypeImpl subclass to get direct access to the store.
[中]ComplexTypeImpl子类用于直接访问存储。

代码示例

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

public final XmlLocale getXmlLocale ( )
{
  return get_store().get_locale();
}

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

/**
 * Called after every set operation to invalidate
 * the attached raw text. Also, if we were dated,
 * we make a note that we're now current, since the
 * latest set beats the previous invalidate. Also,
 * if we were nil, we're no longer.
 */
private final void set_commit()
{
  boolean wasNilled = ((_flags & FLAG_NIL) != 0);
   _flags &= ~(FLAG_NIL | FLAG_ISDEFAULT);
  if ((_flags & FLAG_STORE) != 0)
  {
    _flags &= ~(FLAGS_DATED);
    get_store().invalidate_text();
    if (wasNilled)
      get_store().invalidate_nil();
  }
  else
  {
    _textsource = null;
  }
}

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

public final Object monitor()
{
  if (has_store())
    return get_store().get_locale();
  return this;
}

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

/**
 * Called by a TypeStore to pull out the most reasonable
 * text value from us. This is done after we have invalidated
 * the store (typically when our value has been set).
 */
public final String build_text(NamespaceManager nsm)
{
  assert((_flags & FLAG_STORE) != 0);
  assert((_flags & FLAG_VALUE_DATED) == 0);
  if ((_flags & (FLAG_NIL | FLAG_ISDEFAULT)) != 0)
    return "";
  return compute_text(
        nsm == null ? has_store() ? get_store() : null : nsm);
}

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

public XmlObject substitute(QName name, SchemaType type)
{
  if (name == null)
    throw new IllegalArgumentException( "Invalid name (null)" );
  if (type == null)
    throw new IllegalArgumentException( "Invalid type (null)" );
  if ((_flags & FLAG_STORE) == 0)
  {
    throw
      new IllegalStateException(
        "XML Value Objects cannot be used with substitution" );
  }
  synchronized (monitor())
  {
    check_orphaned();
    return (XmlObject) get_store().substitute( name, type );
  }
}

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

/**
 * Called before every set and get, to ensure that we have
 * a correct picture of whether we're nillable, fixed, or
 * if we have a default that can be applied.
 */
private final void check_element_dated()
{
  if ((_flags & FLAG_ELEMENT_DATED) != 0 &&
    (_flags & FLAG_NOT_VARIABLE) == 0)
  {
    if ((_flags & FLAG_ORPHANED) != 0)
      throw new XmlValueDisconnectedException();
    int eltflags = get_store().compute_flags();
    // int eltflags = 0;
    _flags &= ~(FLAGS_ELEMENT | FLAG_ELEMENT_DATED);
    _flags |= eltflags;
  }
  if ((_flags & FLAG_NOT_VARIABLE) != 0)
    _flags &= ~(FLAG_ELEMENT_DATED);
}

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

public SchemaType get_element_type(QName eltName, QName xsiType)
{
  return schemaType().getElementType(
    eltName, xsiType, get_store().get_schematypeloader() );
}

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

private boolean preCheck()
  {
//        if ( isImmutable() )
//            return true;
    if ( has_store() )
      return get_store().get_locale().noSync();
    return false;
  }

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

private TypeStoreUser setterHelper ( XmlObjectBase src )
{
  check_orphaned();
  src.check_orphaned();
  return
    get_store().copy_contents_from( src.get_store() ).
      get_store().change_type( src.schemaType() );
}

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

/**
 * A typestore user can create a new TypeStoreUser instance for
 * a given attribute child, based on the attribute name.
 *
 * Returns null if there is no strongly typed information for that
 * given attributes.
 */
public TypeStoreUser create_attribute_user(QName attrName)
{
  return (TypeStoreUser)((SchemaTypeImpl)schemaType()).createAttributeType(attrName, get_store().get_schematypeloader());
}

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

public SchemaType get_attribute_type(QName attrName)
{
  return schemaType().getAttributeType(
    attrName, get_store().get_schematypeloader() );
}

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

private SchemaField schemaField() {
  SchemaType st = schemaType();
  SchemaField field;
  // First check if this field has an anonymous type
  field = st.getContainerField();
  if (field == null)
    field = get_store().get_schema_field();
  return field;
}

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

/**
 * Grabs the undelying litral representation, applying the
 * implementation's wscanon rule.
 * Null if not simple content.
 */
public final String get_wscanon_text()
{
  if ((_flags & FLAG_STORE) == 0)
  {
    return apply_wscanon((String)_textsource);
  }
  else return get_store().fetch_text(get_wscanon_rule());
}

代码示例来源: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 XmlCursor newCursor()
{
  if ((_flags & FLAG_STORE) == 0)
    throw new IllegalStateException("XML Value Objects cannot create cursors");
  check_orphaned();
  // Note that new_cursor does not really need sync ....
  XmlLocale l = getXmlLocale();
  if (l.noSync())         { l.enter(); try { return get_store().new_cursor(); } finally { l.exit(); } }
  else synchronized ( l ) { l.enter(); try { return get_store().new_cursor(); } finally { l.exit(); } }
}

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

private XmlObject ensureStore()
{
  if ((_flags & FLAG_STORE) != 0)
    return this;
  check_dated();
  String value =
    (_flags & FLAG_NIL) != 0
      ? ""
      : compute_text( has_store() ? get_store() : null );
  XmlOptions options = new XmlOptions().setDocumentType(schemaType());
  XmlObject x = XmlObject.Factory.newInstance( options );
  XmlCursor c = x.newCursor();
  c.toNextToken();
  c.insertChars( value );
  return x;
}

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