/* * Decompiled with CFR 0.152. */ package javax.baja.nav; import java.util.HashMap; import javax.baja.naming.BOrd; import javax.baja.naming.OrdQuery; import javax.baja.naming.ViewQuery; import javax.baja.nav.BINavNode; import javax.baja.nav.BNavFileNode; import javax.baja.space.BSpace; import javax.baja.sys.BIcon; import javax.baja.sys.Context; import javax.baja.sys.Sys; import javax.baja.sys.Type; import javax.baja.util.Lexicon; /* * Illegal identifiers - consider using --renameillegalidents true */ public class BNavFileSpace extends BSpace { public static final Type TYPE; BNavFileNode root; HashMap map; static /* synthetic */ Class class$javax$baja$nav$BNavFileSpace; public Type getType() { return TYPE; } void buildMap(BINavNode bINavNode) { BOrd bOrd = bINavNode.getNavOrd(); this.map.put(bOrd, bINavNode); BINavNode[] bINavNodeArray = bINavNode.getNavChildren(); int n = 0; while (n < bINavNodeArray.length) { this.buildMap(bINavNodeArray[n]); ++n; } } public BNavFileNode getRootNode() { return this.root; } public BNavFileNode lookup(BOrd bOrd) { BNavFileNode bNavFileNode = (BNavFileNode)this.map.get(bOrd); if (bNavFileNode != null) { return bNavFileNode; } OrdQuery[] ordQueryArray = bOrd.parse(); if (ordQueryArray.length > 0 && ordQueryArray[ordQueryArray.length - 1] instanceof ViewQuery && (bNavFileNode = (BNavFileNode)this.map.get(bOrd = BOrd.make(ordQueryArray, 0, ordQueryArray.length - 1))) != null) { return bNavFileNode; } return null; } public BOrd getOrdInSession() { return BOrd.make("dummy:"); } public String getNavDisplayName(Context context) { if (this.root == null) { return super.getNavDisplayName(context); } return this.root.getNavDisplayName(context); } public String getNavDescription(Context context) { return Lexicon.make("baja", context).getText("nav.navFileSpace.description"); } public boolean hasNavChildren() { boolean bl = false; if (this.root != null) { bl = true; } return bl; } public BINavNode getNavChild(String string) { if (this.root == null) { return null; } return this.root.getNavChild(string); } public BINavNode[] getNavChildren() { if (this.root == null) { return new BINavNode[0]; } return this.root.getNavChildren(); } public BIcon getNavIcon() { if (this.root == null) { return this.getIcon(); } return this.root.getNavIcon(); } public BOrd getNavOrd() { if (this.root == null) { return super.getNavOrd(); } return this.root.getNavOrd(); } static /* synthetic */ Class class(String string, boolean bl) { try { Class clazz = Class.forName(string); if (!bl) { clazz = clazz.getComponentType(); } return clazz; } catch (ClassNotFoundException classNotFoundException) { throw new NoClassDefFoundError(classNotFoundException.getMessage()); } } private final /* synthetic */ void this() { this.map = new HashMap(); } public BNavFileSpace(BNavFileNode bNavFileNode) { super("navfile", null); this.this(); this.root = bNavFileNode; this.addNavChild(bNavFileNode); this.buildMap(bNavFileNode); } static { Class clazz = class$javax$baja$nav$BNavFileSpace; if (clazz == null) { clazz = class$javax$baja$nav$BNavFileSpace = BNavFileSpace.class("[Ljavax.baja.nav.BNavFileSpace;", false); } TYPE = Sys.loadType(clazz); } }