Package org.kite9.diagram.builders.krmodel

Examples of org.kite9.diagram.builders.krmodel.Tie


      NounPart sub = NounFactory.createNewSubjectNounPart(t);
      Package p = getRepresented(t);
      Set<String> classNames = model.getClassesInPackage(MemberHandle.convertPackageName(p));
      for (Class<?> c : MemberHandle.hydrateClasses(classNames, cl)) {
    if ((f==null) || (f.accept(c))) {
        ties2.add(new Tie(sub, JavaRelationships.CLASS, createNoun(c)));
    }
      }
  }
  ClassBuilder ch = new ClassBuilder(ties2, model, a);
  return ch; 
View Full Code Here


          NounPart sub = NounFactory.createNewSubjectNounPart(t);
          Package p = getRepresented(t);
          Set<PackageHandle> packNames = model.getDependsOnPackages(new PackageHandle(MemberHandle.convertPackageName(p), null));
          for (Package p2 : MemberHandle.hydratePackages(packNames, cl)) {
        if ((f==null) || (f.accept(p2))) {
            ties2.add(new Tie(sub, JavaRelationships.REQUIRES, createNoun(p2)));
        }
          }
      }
      PackageBuilder ch = new PackageBuilder(ties2, model, a);
      return ch; 
View Full Code Here

      Annotation[] anns = anEl.getAnnotations();
      NounPart subject = NounFactory.createNewSubjectNounPart(t);
      for (Annotation annotation : anns) {
        if ((f == null) || (f.accept(annotation))) {
          NounPart object = createNoun(annotation);
          annotations.add(new Tie(subject, JavaRelationships.ANNOTATION, object));
        }
      }
    }

    return new AnnotationBuilder(annotations, model, a);
View Full Code Here

    for (Tie t : ties) {
      AccessibleObjectValue fv = getRepresented(t);
      AccessibleObject m = fv.getAccessibleObject();
      Type returnType = getGenericReturnType(m);
      if (f == null || f.accept(m)) {
        ties2.add(new Tie(NounFactory.createNewSubjectNounPart(t),
            JavaRelationships.HAS_TYPE, createNoun(returnType)));
      }
    }
    return new TypeBuilder(ties2, model, a);
  }
View Full Code Here

      AccessibleObjectValue fv = getRepresented(t);
      Object o = fv.getValue();
        Set<NounPart> nouns = new ObjectNounHelper().generateNouns(o, getAliaser());
        for (NounPart nounPart : nouns) {
          if ((f == null || f.accept(nounPart.getRepresented()))) {
          ties2.add(new Tie(NounFactory.createNewSubjectNounPart(t),
              JavaRelationships.REFERENCES, nounPart));
          }
      } 
    }
    return new ObjectBuilder(ties2, model, a);
View Full Code Here

    ClassBuilder cb = db.withClasses(Book.class);
    cb.show(db.asConnectedContexts());
    Context c = (Context) db.getNounElement(Book.class);
    FiniteStateMachineWizard fsmFormat = new FiniteStateMachineWizard(db, c);
    Field f = Book.class.getDeclaredField("state");
    FSMDataProvider provider = new EnumWithAnnotationFSMDataProvider(db, f, BookState.class, BeforeState.class,
        AfterState.class);
    fsmFormat.write(provider);

    return db.getDiagram();
  }
View Full Code Here

              : new TextLine(fromLabel);
          String toLabel = getLabel(object, to, ii);
          TextLine toLabelTL = toLabel.length() == 0 ? null
              : new TextLine(toLabel);

          Direction direction = d == null ? activeVerb.getDirection()
              : d;
          if (verb.getType() == RelationshipType.PASSIVE) {
            ii.returnConnection(toEl, arrowEl, or, toLabelTL, null, false, direction);
            if (!arrowPreExists) {
              ii.returnConnection(arrowEl, fromEl, null, null, fromLabelTL, true, direction);
View Full Code Here

            subject, verb);
        PropositionBinding or = new PropositionBinding(subject, verb, object);
       

        SimpleNoun to = NounFactory.getRawSimpleNoun(object);
        Container cont = c == null ? getContainerFor(from, verb, ii) : c;
        DiagramElement toEl = toElementFormat.returnElement(cont, to,
            ii);

        if ((from != null) && (verb != null)) {
          DiagramElement fromEl = ii.returnExisting(from);
View Full Code Here

  public static NounFormat asGlyph(final String stereotypeOverride) {
    return new NounFormat() {
      public Connected returnElement(Container c, SimpleNoun to,
          InsertionInterface ii) {
        DiagramElement de = ii.returnGlyph(c, to, to.getLabel(),
            stereotypeOverride == null ? to.getStereotype()
                : stereotypeOverride);

        if (to.getDisambiguation() != null) {
          for (NounPart item : to.getDisambiguation()) {
View Full Code Here

 
  public static NounFormat asConnectionBody( ) {
    return new NounFormat() {
      public Connected returnElement(Container c, SimpleNoun to,
          InsertionInterface ii) {
        DiagramElement de = ii.returnConnectionBody(c, to, to.getLabel());

        if (de instanceof Connected) {
          return (Connected) de;
        } else {
          throw new Kite9ProcessingException(
View Full Code Here

TOP

Related Classes of org.kite9.diagram.builders.krmodel.Tie

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.