/** * Returns the default element text, if it's consistent. If it's * not consistent, returns null, and requires a visitor walk. * * Also returns null if there is no default at all (although * that can also be discovered via get_elementflags without * doing a walk). */ public String get_default_element_text(QName eltName) { assert(_isComplexContent()); if (!_isComplexContent()) throw new IllegalStateException(); SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
/** * A typestore user can return a visitor that is used to compute * default text and elementflags for an arbitrary element. */ public TypeStoreVisitor new_visitor() { if (!_isComplexContent()) return null; return new SchemaTypeVisitorImpl(schemaType().getContentModel()); }
/** * Returns the elementflags, if they're consistent. If they're * not, returns -1, and requires a vistor walk. */ public int get_elementflags(QName eltName) { if (!_isComplexContent()) return 0; SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }
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); } }
/** * Returns the default element text, if it's consistent. If it's * not consistent, returns null, and requires a visitor walk. * * Also returns null if there is no default at all (although * that can also be discovered via get_elementflags without * doing a walk). */ public String get_default_element_text(QName eltName) { assert(_isComplexContent()); if (!_isComplexContent()) throw new IllegalStateException(); SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
/** * Returns the default element text, if it's consistent. If it's * not consistent, returns null, and requires a visitor walk. * * Also returns null if there is no default at all (although * that can also be discovered via get_elementflags without * doing a walk). */ public String get_default_element_text(QName eltName) { assert(_isComplexContent()); if (!_isComplexContent()) throw new IllegalStateException(); SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return ""; return prop.getDefaultText(); }
/** * A typestore user can return a visitor that is used to compute * default text and elementflags for an arbitrary element. */ public TypeStoreVisitor new_visitor() { if (!_isComplexContent()) return null; return new SchemaTypeVisitorImpl(schemaType().getContentModel()); }
/** * A typestore user can return a visitor that is used to compute * default text and elementflags for an arbitrary element. */ public TypeStoreVisitor new_visitor() { if (!_isComplexContent()) return null; return new SchemaTypeVisitorImpl(schemaType().getContentModel()); }
/** * Returns the elementflags, if they're consistent. If they're * not, returns -1, and requires a vistor walk. */ public int get_elementflags(QName eltName) { if (!_isComplexContent()) return 0; SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }
/** * Returns the elementflags, if they're consistent. If they're * not, returns -1, and requires a vistor walk. */ public int get_elementflags(QName eltName) { if (!_isComplexContent()) return 0; SchemaProperty prop = schemaType().getElementProperty(eltName); if (prop == null) return 0; if (prop.hasDefault() == SchemaProperty.VARIABLE || prop.hasFixed() == SchemaProperty.VARIABLE || prop.hasNillable() == SchemaProperty.VARIABLE) return -1; return (prop.hasDefault() == SchemaProperty.NEVER ? 0 : TypeStore.HASDEFAULT) | (prop.hasFixed() == SchemaProperty.NEVER ? 0 : TypeStore.FIXED) | (prop.hasNillable() == SchemaProperty.NEVER ? 0 : TypeStore.NILLABLE); }
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); } }
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); } }