Package org.kite9.diagram.builders.krmodel

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


    public ClassBuilder withMemberClasses(Filter<? super Class<?>> f) {
  List<Tie> ties2 = new ArrayList<Tie>(10);
  final ClassLoader cl = Thread.currentThread().getContextClassLoader();

  for (Tie t : ties) {
      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)));
View Full Code Here


    public PackageBuilder withDependencies(Filter<? super Package> f) {
      List<Tie> ties2 = new ArrayList<Tie>(10);
      final ClassLoader cl = Thread.currentThread().getContextClassLoader();

      for (Tie t : ties) {
          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)));
View Full Code Here

  public AnnotationBuilder withAnnotations(Filter<? super Annotation> f) {
    List<Tie> annotations = new ArrayList<Tie>();
    for (Tie t : ties) {
      X anEl = (X) t.getObject().getRepresented();
      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));
        }
      }
    }
View Full Code Here

    classBuilder.withFields(new Filter<Field>() {

      public boolean accept(Field o) {
        if ((fieldRelationshipFilter==null) || (fieldRelationshipFilter.accept(o))) {
          NounPart np = db.createNoun(o.getGenericType());

          return (db.isOnDiagram(np.getRepresented()));
        } else {
          return false;
        }
      }
View Full Code Here

    // show any other fields too
    classBuilder.withFields(new Filter<Field>() {

      public boolean accept(Field o) {
        if ((fieldAttributeFilter==null) || (fieldAttributeFilter.accept(o))) {
          NounPart np = db.createNoun(o.getGenericType());
          return (!db.isOnDiagram(np.getRepresented()));
        } else {
          return false;
        }
      }
View Full Code Here

    // show any other fields too
    classBuilder.withMethods(new Filter<Method>() {

      public boolean accept(Method o) {
        if ((methodAttributeFilter==null) || (methodAttributeFilter.accept(o))) {
          NounPart np = db.createNoun(o.getGenericReturnType());
          return (!db.isOnDiagram(np.getRepresented()));
        } else {
          return false;
        }
      }
View Full Code Here

//      throw new Kite9ProcessingException("No annotation for: "+m.getName()+ ", on member="+m+" annotation="+annotation.getName()+", field="+field+".  Is retention set to RUNTIME?");
    }
   
    SimpleNoun[] out = new SimpleNoun[df.length];
    for (int i = 0; i < out.length; i++) {
      NounPart np = nf.createNoun(df[i]);
      out[i] = checkSimpleNoun(np);
    }

    return out;
  }
View Full Code Here

      throw new Kite9ProcessingException("Could not get annotation values for " + m + " with field " + field, e);
    }
  }

  protected SimpleNoun getTransitionObject(Object m) {
    NounPart np = nf.createNoun(m);
    return checkSimpleNoun(np);
  }
View Full Code Here

      public void write(NounPart subject, Relationship verb,
          NounPart object) {

        // these are the knowledge items that will be represented in the format.
        SimpleNoun from = getExistingNounOnDiagram(subject, ii);
        NounRelationshipBinding sr = new NounRelationshipBinding(
            subject, verb);
        PropositionBinding or = new PropositionBinding(subject, verb, object);
       

        SimpleNoun to = NounFactory.getRawSimpleNoun(object);
View Full Code Here

    if (in == from) {
      return "";
    }

    if (in instanceof OwnedNoun) {
      OwnedNoun on = (OwnedNoun) in;
      if (on.getOwner() == from) {
        return on.getOwned().getLabel();
      } else {
        return "";
      }
    }
View Full Code Here

TOP

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

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.