Example #1
0
 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);
 }
Example #2
0
  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);
  }
Example #3
0
 public static ConceptChronicle getConceptForComponent(int componentNid) throws IOException {
   int cNid = Bdb.getConceptNid(componentNid);
   if (cNid == Integer.MAX_VALUE) {
     return null;
   }
   return ConceptChronicle.get(cNid);
 }
Example #4
0
 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;
 }
Example #5
0
 public static List<NidPairForRefex> getRefsetPairs(int nid) {
   return Arrays.asList(Bdb.getNidCNidMap().getRefsetPairs(nid));
 }
Example #6
0
 public static void forgetXrefPair(int nid, NidPairForRefex pair) {
   Bdb.getNidCNidMap().forgetNidPairForRefex(nid, pair);
 }
Example #7
0
 public static void addXrefPair(int nid, NidPairForRefex pair) throws IOException {
   Bdb.getNidCNidMap().addNidPairForRefex(nid, pair);
 }
Example #8
0
 public static boolean isConcept(int cNid) {
   return cNid == Bdb.getConceptNid(cNid);
 }
Example #9
0
 public static UUID getPrimUuidForConcept(int cNid) throws IOException {
   assert cNid == Bdb.getConceptNid(cNid) : " Not a concept nid: " + cNid;
   return conceptDb.getConcept(cNid).getPrimordialUuid();
 }