public static ConceptChronicle getConcept(int cNid) throws IOException { assert cNid == Bdb.getConceptNid(cNid) : " Not a concept nid: " + cNid + " Bdb cNid:" + Bdb.getConceptNid(cNid) + " max nid: " + Bdb.getUuidsToNidMap().getCurrentMaxNid() + " (" + (Bdb.getUuidsToNidMap().getCurrentMaxNid() - cNid) + ")"; return conceptDb.getConcept(cNid); }
public static ComponentBI getComponent(int nid) throws IOException { if (nid == Integer.MAX_VALUE) { return null; } int cNid = Bdb.getConceptNid(nid); if (cNid == Integer.MAX_VALUE) { return null; } ConceptChronicle c = Bdb.getConceptDb().getConcept(cNid); if (cNid == nid) { return c; } return c.getComponent(nid); }
public static ConceptChronicle getConceptForComponent(int componentNid) throws IOException { int cNid = Bdb.getConceptNid(componentNid); if (cNid == Integer.MAX_VALUE) { return null; } return ConceptChronicle.get(cNid); }
public static UUID getPrimUuidForComponent(int nid) throws IOException { int cNid = Bdb.getConceptNid(nid); assert cNid != Integer.MAX_VALUE : "No cNid for nid: " + nid; ConceptChronicle c = ConceptChronicle.get(cNid); ComponentChronicleBI<?> component = c.getComponent(nid); if (component != null) { return component.getPrimordialUuid(); } String warning = "Can't find component: " + nid + " in concept: " + c.toLongString(); AceLog.getAppLog().warning(warning); return null; }
public static List<NidPairForRefex> getRefsetPairs(int nid) { return Arrays.asList(Bdb.getNidCNidMap().getRefsetPairs(nid)); }
public static void forgetXrefPair(int nid, NidPairForRefex pair) { Bdb.getNidCNidMap().forgetNidPairForRefex(nid, pair); }
public static void addXrefPair(int nid, NidPairForRefex pair) throws IOException { Bdb.getNidCNidMap().addNidPairForRefex(nid, pair); }
public static boolean isConcept(int cNid) { return cNid == Bdb.getConceptNid(cNid); }
public static UUID getPrimUuidForConcept(int cNid) throws IOException { assert cNid == Bdb.getConceptNid(cNid) : " Not a concept nid: " + cNid; return conceptDb.getConcept(cNid).getPrimordialUuid(); }