/** * True if the value is currently defaulted. */ public final boolean isDefault() { check_dated(); return ((_flags & FLAG_ISDEFAULT) != 0); }
/** * A store will call back on validate_now to force us to look at * the text if we're in an invalid state. We're allowed to throw * an exception if the text isn't valid for our type. */ public void validate_now() { check_dated(); }
/** * True if the value is nilled. */ public final boolean isNil() { synchronized (monitor()) { check_dated(); return ((_flags & FLAG_NIL) != 0); } }
/** * True if the value is currently defaulted. */ public final boolean isDefault() { check_dated(); return ((_flags & FLAG_ISDEFAULT) != 0); }
/** * A store will call back on validate_now to force us to look at * the text if we're in an invalid state. We're allowed to throw * an exception if the text isn't valid for our type. */ public void validate_now() { check_dated(); }
private final boolean valueEqualsImpl(XmlObject xmlobj) { check_dated(); SchemaType typethis = instanceType(); SchemaType typeother = ((SimpleValue)xmlobj).instanceType(); if (typethis == null && typeother == null) // detects nil return true; if (typethis == null || typeother == null) return false; if (!comparable_value_spaces(typethis, typeother)) return false; if (xmlobj.schemaType().getSimpleVariety() == SchemaType.UNION) return (underlying(xmlobj)).equal_to(this); return equal_to(xmlobj); }
/** * True if the value is currently defaulted. */ public final boolean isDefault() { check_dated(); return ((_flags & FLAG_ISDEFAULT) != 0); }
/** * A store will call back on validate_now to force us to look at * the text if we're in an invalid state. We're allowed to throw * an exception if the text isn't valid for our type. */ public void validate_now() { check_dated(); }
public XmlAnySimpleType newValue(Object obj, boolean validateOnSet) { if (!isSimpleType() && getContentType() != SchemaType.SIMPLE_CONTENT) throw new XmlValueOutOfRangeException(); // values must be simple XmlObjectBase result = (XmlObjectBase)createUnattachedNode(null); if (validateOnSet) result.setValidateOnSet(); // In the case of tree copy, need to call a specla setter to avoid // set(XmlObject) if (obj instanceof XmlObject) result.set_newValue((XmlObject)obj); else result.objectSet(obj); result.check_dated(); result.setImmutable(); return (XmlAnySimpleType) result; }
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); } }
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; }
/** * True if the value is nilled. */ public final boolean isNil() { synchronized (monitor()) { check_dated(); return ((_flags & FLAG_NIL) != 0); } }
/** * True if the value is nilled. */ public final boolean isNil() { synchronized (monitor()) { check_dated(); return ((_flags & FLAG_NIL) != 0); } }
public XmlAnySimpleType newValue(Object obj, boolean validateOnSet) { if (!isSimpleType() && getContentType() != SchemaType.SIMPLE_CONTENT) throw new XmlValueOutOfRangeException(); // values must be simple XmlObjectBase result = (XmlObjectBase)createUnattachedNode(null); if (validateOnSet) result.setValidateOnSet(); // In the case of tree copy, need to call a specla setter to avoid // set(XmlObject) if (obj instanceof XmlObject) result.set_newValue((XmlObject)obj); else result.objectSet(obj); result.check_dated(); result.setImmutable(); return (XmlAnySimpleType) result; }
private final boolean valueEqualsImpl(XmlObject xmlobj) { check_dated(); SchemaType typethis = instanceType(); SchemaType typeother = ((SimpleValue)xmlobj).instanceType(); if (typethis == null && typeother == null) // detects nil return true; if (typethis == null || typeother == null) return false; if (!comparable_value_spaces(typethis, typeother)) return false; if (xmlobj.schemaType().getSimpleVariety() == SchemaType.UNION) return (underlying(xmlobj)).equal_to(this); return equal_to(xmlobj); }
private final boolean valueEqualsImpl(XmlObject xmlobj) { check_dated(); SchemaType typethis = instanceType(); SchemaType typeother = ((SimpleValue)xmlobj).instanceType(); if (typethis == null && typeother == null) // detects nil return true; if (typethis == null || typeother == null) return false; if (!comparable_value_spaces(typethis, typeother)) return false; if (xmlobj.schemaType().getSimpleVariety() == SchemaType.UNION) return (underlying(xmlobj)).equal_to(this); return equal_to(xmlobj); }
public XmlAnySimpleType newValue(Object obj, boolean validateOnSet) { if (!isSimpleType() && getContentType() != SchemaType.SIMPLE_CONTENT) throw new XmlValueOutOfRangeException(); // values must be simple XmlObjectBase result = (XmlObjectBase)createUnattachedNode(null); if (validateOnSet) result.setValidateOnSet(); // In the case of tree copy, need to call a specla setter to avoid // set(XmlObject) if (obj instanceof XmlObject) result.set_newValue((XmlObject)obj); else result.objectSet(obj); result.check_dated(); result.setImmutable(); return (XmlAnySimpleType) result; }
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); } }
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; }
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; }