Beispiel #1
0
 private static com.geopista.feature.Domain addTreeNode(
     com.geopista.feature.Domain dRoot, DomainNode childNode, String sLocale) {
   String sName = childNode.getTerm(sLocale);
   com.geopista.feature.Domain newDom = null;
   switch (childNode.getType()) {
     case com.geopista.feature.Domain.TREE:
       newDom = new TreeDomain(sName, sName);
       break;
     case com.geopista.feature.Domain.PATTERN:
       newDom = newStringDomain(childNode.getPatron(), sName);
       break;
     case com.geopista.feature.Domain.DATE:
       newDom = newDateDomain(childNode.getPatron(), sName);
       break;
     case com.geopista.feature.Domain.NUMBER:
       newDom = newNumberDomain(childNode.getPatron(), sName);
       break;
     case com.geopista.feature.Domain.CODEDENTRY:
       newDom = newCodedEntryDomain(childNode.getPatron(), sName);
       break;
     case com.geopista.feature.Domain.BOOLEAN:
       newDom = newBooleanDomain(sName, sName);
       break;
   }
   if (dRoot != null) dRoot.addChild(newDom);
   for (Iterator it = childNode.getlHijos().gethDom().values().iterator(); it.hasNext(); ) {
     DomainNode node = (DomainNode) it.next();
     addTreeNode(newDom, node, sLocale);
   }
   return newDom;
 }
Beispiel #2
0
 private static CodeBookDomain newCodeBookDomain(
     String sName,
     String sDescription,
     ListaDomainNode ldnEntries,
     String sLocale,
     String patron) {
   CodeBookDomain cbdRet = new CodeBookDomain(sName, sDescription);
   cbdRet.setPattern(patron);
   DomainNode node = null;
   String sPattern;
   String sTerm;
   for (Iterator it = ldnEntries.gethDom().values().iterator(); it.hasNext(); ) {
     node = (DomainNode) it.next();
     cbdRet.addChild(
         (CodedEntryDomain) newCodedEntryDomain(node.getPatron(), node.getTerm(sLocale)));
   }
   return cbdRet;
 }