public static PLConceptContainer createConceptContainer(List collectedconcepts, Module module, boolean includechildrenP) {
    { PLConceptContainer container = PLConceptContainer.new_PLConceptContainer();
      List plconcepts = List.newList();

      { Description concept = null;
        Cons iter000 = collectedconcepts.theConsList;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          concept = ((Description)(iter000.value));
          { PLConcept plconcept = PLConcept.new_PLConcept();
            edu.isi.powerloom.PlIterator childconceptiter = edu.isi.powerloom.PLI.getDirectSubrelations(concept, module, null);
            List surrogatechildren = List.newList();

            plconcept.ConceptName = GuiServer.xmlifyString(GuiServer.plObjectToGuiName(concept));
            plconcept.Module = concept.homeModule().moduleFullName;
            plconcept.SourceString = "";
            if (includechildrenP) {
              { LogicObject child = null;
                edu.isi.powerloom.PlIterator iter001 = childconceptiter;
                Cons collect000 = null;

                while (iter001.nextP()) {
                  child = ((LogicObject)(iter001.value));
                  if (Logic.classP(child) &&
                      (!BooleanWrapper.coerceWrappedBooleanToBoolean((child.deletedP() ? Stella.TRUE_WRAPPER : Stella.FALSE_WRAPPER)))) {
                    if (collect000 == null) {
                      {
                        collect000 = Cons.cons(GuiServer.makeLogicSurrogate(child), Stella.NIL);
                        if (surrogatechildren.theConsList == Stella.NIL) {
                          surrogatechildren.theConsList = collect000;
                        }
                        else {
                          Cons.addConsToEndOfConsList(surrogatechildren.theConsList, collect000);
                        }
                      }
                    }
                    else {
                      {
                        collect000.rest = Cons.cons(GuiServer.makeLogicSurrogate(child), Stella.NIL);
                        collect000 = collect000.rest;
                      }
                    }
                  }
                }
              }
            }
            surrogatechildren = surrogatechildren.sort(Native.find_java_method("edu.isi.powerloom.server.gui.PLSurrogate", "PLSurrogateL", new java.lang.Class [] {Native.find_java_class("edu.isi.powerloom.server.gui.PLSurrogate"), Native.find_java_class("edu.isi.powerloom.server.gui.PLSurrogate")}));
            plconcept.PLSurrogate = surrogatechildren;
            plconcepts.insert(plconcept);
          }
        }
      }
      plconcepts = plconcepts.sort(Native.find_java_method("edu.isi.powerloom.server.gui.PLConcept", "PLConceptL", new java.lang.Class [] {Native.find_java_class("edu.isi.powerloom.server.gui.PLConcept"), Native.find_java_class("edu.isi.powerloom.server.gui.PLConcept")}));
      container.PLConcept = plconcepts;
      return (container);
    }
  }