Package org.jibx.schema.codegen
Class ValueItem
java.lang.Object
org.jibx.schema.codegen.Item
org.jibx.schema.codegen.ValueItem
Information for an item of a predefined type to be included in code generated from schema.
- Author:
- Dennis M. Sosnoski
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Item
Copy the item under a different parent.protected String
describe
(int depth, boolean classified) Build a description of the item.Get schema type name.getType()
Get the simple type for this value.boolean
Check if an attribute is part of this item.boolean
Check if character data content is part of this item.boolean
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 Details
-
m_type
Predefined type reference. -
m_schemaType
Original schema type. -
m_attributePresent
private boolean m_attributePresentAttribute data present flag. -
m_elementPresent
private boolean m_elementPresentElement data present flag. -
m_contentPresent
private boolean m_contentPresentCharacter data content data present flag.
-
-
Constructor Details
-
ValueItem
Copy constructor. This creates a copy with a new parent.- Parameters:
original
-ref
- reference (for overrides to copy;null
if none)parent
-
-
ValueItem
ValueItem(AnnotatedBase comp, QName type, JavaType ref, GroupItem parent) Constructor.- Parameters:
comp
- schema component extensiontype
- schema type nameref
- schema type equivalent (null
if not appropriate)parent
- containing structure (null
if a top-level structure)
-
-
Method Details
-
getType
Get the simple type for this value.- Returns:
- type
-
getSchemaType
Get schema type name.- Returns:
- name
-
copy
Copy the item under a different parent. -
describe
Build a description of the item. -
isAttributePresent
public boolean isAttributePresent()Check if an attribute is part of this item. This is onlytrue
for items corresponding to attribute definitions, and groupings including these items which do not define an element name.- Returns:
true
if attribute
-
isElementPresent
public boolean isElementPresent()Check if a child elements is part of this item. This istrue
for all items corresponding to element definitions, and all groupings which include such an item.- Returns:
true
if content
-
isContentPresent
public boolean isContentPresent()Check if character data content is part of this item. This istrue
for all items corresponding to simpleContent definitions, and all groupings which include such an item.- Returns:
true
if content
-