Class ModelCommentSupport

java.lang.Object
org.tentackle.wurblet.ModelCommentSupport

public class ModelCommentSupport extends Object
Support methods for model comment.
Author:
harald
  • Method Details

    • printVia

      public static void printVia(Relation relation, PrintStream out)
      Prints the attribute holding the link.
      Parameters:
      relation - the relation
      out - the output stream
    • printReferencedBy

      public static void printReferencedBy(Entity entity, Relation relation, String indent, PrintStream out)
      Prints the referencing relation.
      Parameters:
      entity - the referenced entity
      relation - the relation
      indent - the indent string
      out - 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 loops
      compositeRelations - the composite relations
      subEntities - the sub entities
      indent - the indent string
      out - the output stream
      Throws:
      ModelException
    • printSubEntities

      public static void printSubEntities(Collection<Entity> subEntities, String indent, PrintStream out)
      Recursively prints the sub-entities of an entity.
      Parameters:
      subEntities - the sub entities
      indent - the indent string
      out - 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 entity
      relations - the outgoing relations
      rootsFromForeignEntity - true if print roots from "relation.foreignEntity" else "relation.entity"
      indent - the indent string
      out - the output stream