public TtkRefexUuidUuidUuidStringRevision(RefexNidNidNidStringVersionBI another)
      throws IOException {
    super(another);

    TerminologyStoreDI ts = Ts.get();

    this.uuid1 = ts.getUuidPrimordialForNid(another.getNid1());
    this.uuid2 = ts.getUuidPrimordialForNid(another.getNid2());
    this.uuid3 = ts.getUuidPrimordialForNid(another.getNid3());
    this.string1 = another.getString1();
  }
コード例 #2
0
ファイル: Bdb.java プロジェクト: jefron-ap/TTK
  private static void finishSetup() {
    setupLatch.countDown();
    if (setupLatch.getCount() == 0) {
      try {
        BdbTerminologyStore ts = new BdbTerminologyStore();
        if (P.s == null) {
          Ts.set(ts);
          FxTs.set(ts);
          P.s = ts;
        }
        Looker.add(ts, UUID.randomUUID(), "Embedded BdbTerminologyStore");
        Looker.add(
            new TtkConceptChronicleConverter(),
            UUID.randomUUID(),
            "TtkConceptChronicle to ConceptChronicleDTO converter");
        ConceptChronicle.reset();

        ReferenceConcepts.reset();
        String versionString = getProperty(G_VERSION);
        if (versionString != null) {
          gVersion.set(Long.parseLong(versionString));
        }
        if (viewCoordinateMapFile.exists()) {
          FileInputStream fis = new FileInputStream(viewCoordinateMapFile);
          try (ObjectInputStream ois = new ObjectInputStream(fis)) {
            try {
              viewCoordinates = (ConcurrentHashMap<UUID, ViewCoordinate>) ois.readObject();
            } catch (IOException | ClassNotFoundException ex) {
              Logger.getLogger(Bdb.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
        }
        pathManager = BdbPathManager.get();
        Looker.lookup(TermstoreLatch.class).openLatch();

        AceLog.getAppLog()
            .info(
                "mutable maxMem: " + Bdb.mutable.bdbEnv.getConfig().getConfigParam("je.maxMemory"));
        AceLog.getAppLog()
            .info("mutable shared cache: " + Bdb.mutable.bdbEnv.getConfig().getSharedCache());
        AceLog.getAppLog()
            .info(
                "readOnly maxMem: "
                    + Bdb.readOnly.bdbEnv.getConfig().getConfigParam("je.maxMemory"));
        AceLog.getAppLog()
            .info("readOnly shared cache: " + Bdb.readOnly.bdbEnv.getConfig().getSharedCache());

      } catch (IOException ex) {
        Logger.getLogger(Bdb.class.getName()).log(Level.SEVERE, null, ex);
      }
    }
  }
  public TtkRefexUuidIntMemberChronicle(RefexChronicleBI another) throws IOException {
    super((RefexVersionBI) another.getPrimordialVersion());

    TerminologyStoreDI ts = Ts.get();
    Collection<? extends RefexNidIntVersionBI> refexes = another.getVersions();
    int partCount = refexes.size();
    Iterator<? extends RefexNidIntVersionBI> relItr = refexes.iterator();
    RefexNidIntVersionBI rv = relItr.next();

    this.uuid1 = ts.getUuidPrimordialForNid(rv.getNid1());
    this.int1 = rv.getInt1();

    if (partCount > 1) {
      revisions = new ArrayList<>(partCount - 1);

      while (relItr.hasNext()) {
        rv = relItr.next();
        revisions.add(new TtkRefexUuidIntRevision(rv));
      }
    }
  }
コード例 #4
0
 @Override
 public int getAuthorNid() {
   return Ts.get().getAuthorNidForStamp(stamp);
 }
コード例 #5
0
 @Override
 public int getModuleNid() {
   return Ts.get().getModuleNidForStamp(stamp);
 }
コード例 #6
0
 public Status getStatus() {
   return Ts.get().getStatusForStamp(stamp);
 }
コード例 #7
0
 @Override
 public int getPathNid() {
   return Ts.get().getPathNidForStamp(stamp);
 }
コード例 #8
0
 @Override
 public long getTime() {
   return Ts.get().getTimeForStamp(stamp);
 }