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 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 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 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(); }