public class PetalObjectFactory extends Object
Modifier | Constructor and Description |
---|---|
protected |
PetalObjectFactory() |
Modifier and Type | Method and Description |
---|---|
AssocAttachView |
createAssocAttachView() |
Association |
createAssociation(Class clazz1,
Class clazz2)
Create association without explicit name, it will have an invisible
anonymous name.
|
Association |
createAssociation(Class clazz,
UseCase caze) |
Association |
createAssociation(String name,
Class clazz1,
Class clazz2)
Create Association between two classes.
|
Association |
createAssociation(String name,
Class clazz,
UseCase caze) |
Association |
createAssociation(String name,
UseCase case1,
UseCase case2)
Create Association between two use cases.
|
Association |
createAssociation(UseCase case1,
UseCase case2)
Create association without explicit name, it will have an invisible
anonymous name.
|
AssociationViewNew |
createAssociationView(Association assoc) |
AssociationViewNew |
createAssociationView(Association assoc,
boolean show_label)
Creates view for given association.
|
AttachView |
createAttachView() |
Class |
createClass(String name)
Creates empty class object with just the name and the quid set. init() is
called on it after has been added to a model.
|
ClassAttribute |
createClassAttribute(String name,
String type)
Creates new class attribute (aka field)
|
ClassUtility |
createClassUtility(String name)
Creates empty utility class object with just the name and the quid set.
|
ClassView |
createClassView(Class clazz)
Creates class view for given class and sets the qualified name and quidu
for the referenced class accordingly.
|
InheritanceRelationship |
createInheritanceRelationship(Inheritable clazz,
Inheritable super_class)
Create InheritanceRelationship between two classes, this method is called
by Class.addSuperClass().
|
List |
createInheritViews(Inheritable clazz) |
Class |
createInterface(String name)
Just like createClass() except that it sets the stereotype to "Interface".
|
ItemLabel |
createItemLabel(String text) |
LogicalCategory |
createLogicalCategory(String name)
Creates empty class category (logical view).
|
PetalFile |
createModel()
Creates empty model.
|
NoteView |
createNoteView(String text)
create a note view
|
Operation |
createOperation(String name,
String result,
List params)
Creates new operation (aka method)
|
RealizeRelationship |
createRealizeRelationship(Class clazz,
Class inter)
Create RealizeRelationship between class and an interface, called by
Class.addImplementedInterface().
|
List |
createRealizeViews(Class clazz) |
SegLabel |
createSegLabel(String text) |
UseCase |
createUseCase(String name)
Creates use case object with just the name and the quid set. init() is
called on it after has been added to a model.
|
UseCaseCategory |
createUseCaseCategory(String name)
Creates empty class category (use case view).
|
UseCaseView |
createUseCaseView(UseCase caze)
Creates use case view for given class and sets the qualified name and quidu
for the referenced class accordingly.
|
UsesRelationship |
createUsesRelationship(Class clazz,
Class clazz2)
Create UsesRelationship between class and an interface, called by
Class.addUsedClass().
|
List |
createUsesViews(Class clazz) |
String |
getAnonymousName() |
static PetalObjectFactory |
getInstance() |
PetalNode |
getTemplate(String name)
Read the object of the given type (name) from templates directory looking
for a file with suffix ".ser"
|
String |
getTemplateRoot() |
static void |
setInstance(PetalObjectFactory inst) |
void |
setTemplateRoot(String templateRoot) |
public static PetalObjectFactory getInstance()
public static void setInstance(PetalObjectFactory inst)
public String getTemplateRoot()
public void setTemplateRoot(String templateRoot)
public PetalNode getTemplate(String name)
name
- - template file name pathpublic PetalFile createModel()
public Class createClass(String name)
ClassCategory.addToModel(cb.petal.Class)
public UseCase createUseCase(String name)
UseCaseCategory.addToModel(UseCase)
public Class createInterface(String name)
public ClassUtility createClassUtility(String name)
ClassCategory.addToModel(cb.petal.Class)
public Operation createOperation(String name, String result, List params)
Class.addOperation(cb.petal.Operation)
public ClassAttribute createClassAttribute(String name, String type)
public UseCaseCategory createUseCaseCategory(String name)
public LogicalCategory createLogicalCategory(String name)
public InheritanceRelationship createInheritanceRelationship(Inheritable clazz, Inheritable super_class)
public RealizeRelationship createRealizeRelationship(Class clazz, Class inter)
public UsesRelationship createUsesRelationship(Class clazz, Class clazz2)
Class.addUsedClass(cb.petal.Class)
public final String getAnonymousName()
public Association createAssociation(String name, Class clazz1, Class clazz2)
public Association createAssociation(Class clazz1, Class clazz2)
public Association createAssociation(String name, UseCase case1, UseCase case2)
public Association createAssociation(String name, Class clazz, UseCase caze)
public Association createAssociation(Class clazz, UseCase caze)
public Association createAssociation(UseCase case1, UseCase case2)
public ClassView createClassView(Class clazz)
These properties/view objects will be set (if defined in given class): quidu, label, stereotype, QualifiedNameParameter
Diagram.addToView(ClassView)
public NoteView createNoteView(String text)
public AttachView createAttachView()
public ItemLabel createItemLabel(String text)
public SegLabel createSegLabel(String text)
public AssocAttachView createAssocAttachView()
public List createInheritViews(Inheritable clazz)
ClassDiagram.addToView(cb.petal.InheritView)
public List createRealizeViews(Class clazz)
ClassDiagram.addToView(cb.petal.RealizeView)
public List createUsesViews(Class clazz)
ClassDiagram.addToView(cb.petal.UsesView)
public AssociationViewNew createAssociationView(Association assoc, boolean show_label)
show_label
- show association nameDiagram.addToView(cb.petal.ClassView)
public AssociationViewNew createAssociationView(Association assoc)
public UseCaseView createUseCaseView(UseCase caze)
UseCaseDiagram.addToView(UseCaseView)
Copyright © 2018 BITPlan GmbH. All rights reserved.