Package org.tentackle.wurblet
Class ModelCommentSupport
java.lang.Object
org.tentackle.wurblet.ModelCommentSupport
Support methods for model comment.
- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidprintComponents(Set<Relation> allRelations, Collection<Relation> compositeRelations, Collection<Entity> subEntities, String indent, PrintStream out) Recursively prints the components and sub-entities of an entity.static voidprintNonCompositeRelations(Entity entity, List<Relation> relations, boolean rootsFromForeignEntity, String indent, PrintStream out) Prints outgoing non-composite relations from components.static voidprintReferencedBy(Entity entity, Relation relation, String indent, PrintStream out) Prints the referencing relation.static voidprintSubEntities(Collection<Entity> subEntities, String indent, PrintStream out) Recursively prints the sub-entities of an entity.static voidprintVia(Relation relation, PrintStream out) Prints the attribute holding the link.
-
Method Details
-
printVia
Prints the attribute holding the link.- Parameters:
relation- the relationout- the output stream
-
printReferencedBy
public static void printReferencedBy(Entity entity, Relation relation, String indent, PrintStream out) Prints the referencing relation.- Parameters:
entity- the referenced entityrelation- the relationindent- the indent stringout- the output stream
-
printComponents
public static void printComponents(Set<Relation> allRelations, Collection<Relation> compositeRelations, Collection<Entity> subEntities, String indent, PrintStream out) throws ModelException Recursively prints the components and sub-entities of an entity.- Parameters:
allRelations- set to avoid recursion loopscompositeRelations- the composite relationssubEntities- the sub entitiesindent- the indent stringout- the output stream- Throws:
ModelException
-
printSubEntities
Recursively prints the sub-entities of an entity.- Parameters:
subEntities- the sub entitiesindent- the indent stringout- the output stream
-
printNonCompositeRelations
public static void printNonCompositeRelations(Entity entity, List<Relation> relations, boolean rootsFromForeignEntity, String indent, PrintStream out) Prints outgoing non-composite relations from components.- Parameters:
entity- the root entityrelations- the outgoing relationsrootsFromForeignEntity- true if print roots from "relation.foreignEntity" else "relation.entity"indent- the indent stringout- the output stream
-