Package org.jibx.schema.codegen
Class ValueItem
- java.lang.Object
-
- org.jibx.schema.codegen.Item
-
- org.jibx.schema.codegen.ValueItem
-
public class ValueItem extends Item
Information for an item of a predefined type to be included in code generated from schema.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private booleanm_attributePresentAttribute data present flag.private booleanm_contentPresentCharacter data content data present flag.private booleanm_elementPresentElement data present flag.private QNamem_schemaTypeOriginal schema type.private JavaTypem_typePredefined type reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Itemcopy(Item ref, GroupItem parent)Copy the item under a different parent.protected java.lang.Stringdescribe(int depth, boolean classified)Build a description of the item.QNamegetSchemaType()Get schema type name.JavaTypegetType()Get the simple type for this value.booleanisAttributePresent()Check if an attribute is part of this item.booleanisContentPresent()Check if character data content is part of this item.booleanisElementPresent()Check if a child elements is part of this item.-
Methods inherited from class org.jibx.schema.codegen.Item
classifyContent, findDisjointParent, getComponentExtension, getEffectiveName, getName, getNext, getParent, getSchemaComponent, getTopmost, isCollection, isFixedName, isIgnored, isImplicit, isOptional, isTopmost, leadString, reparent, setImplicit, setName
-
-
-
-
Field Detail
-
m_type
private final JavaType m_type
Predefined type reference.
-
m_schemaType
private final QName m_schemaType
Original schema type.
-
m_attributePresent
private boolean m_attributePresent
Attribute data present flag.
-
m_elementPresent
private boolean m_elementPresent
Element data present flag.
-
m_contentPresent
private boolean m_contentPresent
Character data content data present flag.
-
-
Constructor Detail
-
ValueItem
private ValueItem(ValueItem original, Item ref, GroupItem parent)
Copy constructor. This creates a copy with a new parent.- Parameters:
original-ref- reference (for overrides to copy;nullif none)parent-
-
ValueItem
ValueItem(AnnotatedBase comp, QName type, JavaType ref, GroupItem parent)
Constructor.- Parameters:
comp- schema component extensiontype- schema type nameref- schema type equivalent (nullif not appropriate)parent- containing structure (nullif a top-level structure)
-
-
Method Detail
-
getType
public JavaType getType()
Get the simple type for this value.- Returns:
- type
-
getSchemaType
public QName getSchemaType()
Get schema type name.- Returns:
- name
-
describe
protected java.lang.String describe(int depth, boolean classified)Build a description of the item.
-
isAttributePresent
public boolean isAttributePresent()
Check if an attribute is part of this item. This is onlytruefor items corresponding to attribute definitions, and groupings including these items which do not define an element name.- Returns:
trueif attribute
-
isElementPresent
public boolean isElementPresent()
Check if a child elements is part of this item. This istruefor all items corresponding to element definitions, and all groupings which include such an item.- Returns:
trueif content
-
isContentPresent
public boolean isContentPresent()
Check if character data content is part of this item. This istruefor all items corresponding to simpleContent definitions, and all groupings which include such an item.- Returns:
trueif content
-
-