public static boolean isConceptActive( int conceptSequence, CasSequenceObjectMap<TaxonomyRecordPrimitive> taxonomyMap, StampCoordinate sc) { Optional<TaxonomyRecordPrimitive> optionalRecord = taxonomyMap.get(conceptSequence); if (optionalRecord.isPresent()) { TaxonomyRecordPrimitive record = optionalRecord.get(); if (record.isConceptActive(conceptSequence, sc)) { return true; } } return false; }
public static Optional<TaxonomyRecordPrimitive> getIfConceptActive( int conceptSequence, CasSequenceObjectMap<TaxonomyRecordPrimitive> taxonomyMap, TaxonomyCoordinate vp) { Optional<TaxonomyRecordPrimitive> optionalRecord = taxonomyMap.get(conceptSequence); if (optionalRecord.isPresent()) { TaxonomyRecordPrimitive record = optionalRecord.get(); if (record.containsSequenceViaType( conceptSequence, conceptSequence, vp, TaxonomyFlags.CONCEPT_STATUS.bits)) { return optionalRecord; } } return Optional.empty(); }
public static Optional<TaxonomyRecordPrimitive> getIfActiveViaType( int conceptSequence, int typeSequence, CasSequenceObjectMap<TaxonomyRecordPrimitive> taxonomyMap, TaxonomyCoordinate vp, int flags) { Optional<TaxonomyRecordPrimitive> optionalRecord = taxonomyMap.get(conceptSequence); if (optionalRecord.isPresent()) { TaxonomyRecordPrimitive record = optionalRecord.get(); if (record.containsSequenceViaType(conceptSequence, typeSequence, vp, flags)) { return optionalRecord; } } return Optional.empty(); }