Package org.jfree.xml.generator.model
Class DescriptionModel
- java.lang.Object
-
- org.jfree.xml.generator.model.DescriptionModel
-
public class DescriptionModel extends java.lang.Object
A model containing class descriptions.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList
classes
The classes.private java.util.HashMap
classesMap
Maps classes to class descriptions.private java.util.HashMap
includeComments
Include comments.private MappingModel
mappingModel
The mapping model.private Comments
modelComments
Model comments.private java.util.ArrayList
sources
The sources.
-
Constructor Summary
Constructors Constructor Description DescriptionModel()
Creates a new class description model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClassDescription(ClassDescription cd)
Adds a class description to the model.void
addIncludeComment(java.lang.String source, Comments comments)
Adds an include comment.void
addSource(java.lang.String source)
Adds a source to the model description.ClassDescription
get(int index)
Returns a class description.ClassDescription
get(java.lang.Class key)
Returns a class description for the given class name.Comments
getIncludeComment(java.lang.String source)
Returns the include comment for the specified source.MappingModel
getMappingModel()
Returns the mapping model.Comments
getModelComments()
Returns the model comments.java.lang.String[]
getSources()
Returns the sources for the model description.void
prune()
Removes any class descriptions that are not fully defined.void
removeClassDescription(ClassDescription cd)
Removes a class description from the model.void
setModelComments(Comments modelComments)
Sets the model comments.int
size()
Returns the number of classes in the model.
-
-
-
Field Detail
-
sources
private java.util.ArrayList sources
The sources.
-
classes
private java.util.ArrayList classes
The classes.
-
classesMap
private java.util.HashMap classesMap
Maps classes to class descriptions.
-
mappingModel
private MappingModel mappingModel
The mapping model.
-
modelComments
private Comments modelComments
Model comments.
-
includeComments
private java.util.HashMap includeComments
Include comments.
-
-
Method Detail
-
addClassDescription
public void addClassDescription(ClassDescription cd)
Adds a class description to the model.- Parameters:
cd
- the class description.
-
removeClassDescription
public void removeClassDescription(ClassDescription cd)
Removes a class description from the model.- Parameters:
cd
- the class description.
-
get
public ClassDescription get(int index)
Returns a class description.- Parameters:
index
- the description index (zero-based).- Returns:
- a class description.
-
get
public ClassDescription get(java.lang.Class key)
Returns a class description for the given class name.- Parameters:
key
- the class name.- Returns:
- the class description.
-
size
public int size()
Returns the number of classes in the model.- Returns:
- the number of classes in the model.
-
getMappingModel
public MappingModel getMappingModel()
Returns the mapping model.- Returns:
- the mapping model.
-
addSource
public void addSource(java.lang.String source)
Adds a source to the model description.- Parameters:
source
- the source.
-
getSources
public java.lang.String[] getSources()
Returns the sources for the model description.- Returns:
- The sources.
-
prune
public void prune()
Removes any class descriptions that are not fully defined.
-
addIncludeComment
public void addIncludeComment(java.lang.String source, Comments comments)
Adds an include comment.- Parameters:
source
- the source.comments
- the comments.
-
getIncludeComment
public Comments getIncludeComment(java.lang.String source)
Returns the include comment for the specified source.- Parameters:
source
- the source.- Returns:
- The include comment.
-
getModelComments
public Comments getModelComments()
Returns the model comments.- Returns:
- The model comments.
-
setModelComments
public void setModelComments(Comments modelComments)
Sets the model comments.- Parameters:
modelComments
- the model comments.
-
-