NCBI C++ ToolKit
miscedit_util.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: miscedit_util.hpp 45110 2020-06-02 19:35:24Z asztalos $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Colleen Bollin
27  */
28 #ifndef _MISCEDIT_UTIL_H_
29 #define _MISCEDIT_UTIL_H_
30 
31 #include <corelib/ncbistd.hpp>
32 #include <objects/seq/Seqdesc.hpp>
37 #include <objects/pub/Pub.hpp>
38 #include <objects/seq/Pubdesc.hpp>
41 #include <objmgr/scope.hpp>
42 
46 
52 
53 
55 
57 {
58 public:
59  static CRef<ncbi::CFieldHandler> Create(const string &field_name);
60 };
61 
62 
63 class CTextDescriptorField : public ncbi::CFieldHandler
64 {
65 public:
66  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
67  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
68  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
69  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
70  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
71 
72  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; } ;
73  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return m_Subtype; } ;
74 
75 
76  virtual void SetConstraint(const string& field_name, CConstRef<objects::edit::CStringConstraint> string_constraint) {};
77  objects::CSeqdesc::E_Choice GetSubtype() { return m_Subtype; };
78  void SetSubtype(objects::CSeqdesc::E_Choice subtype) { m_Subtype = subtype; };
79  virtual bool AllowMultipleValues() { return false; };
80 protected:
81  objects::CSeqdesc::E_Choice m_Subtype;
82 };
83 
84 
86 {
87 public:
88  CCommentDescField () { m_Subtype = objects::CSeqdesc::e_Comment; };
89 
90  virtual string GetVal(const CObject& object);
91  virtual vector<string> GetVals(const CObject& object);
92  virtual bool IsEmpty(const CObject& object) const;
93  virtual void ClearVal(CObject& object);
94  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
95 };
96 
97 
99 {
100 public:
101  CDefinitionLineField () { m_Subtype = objects::CSeqdesc::e_Title; };
102  virtual string GetVal(const CObject& object);
103  virtual vector<string> GetVals(const CObject& object);
104  virtual bool IsEmpty(const CObject& object) const;
105  virtual void ClearVal(CObject& object);
106  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
107 };
108 
109 
111 {
112 public:
113  CGenbankKeywordField() : m_StringConstraint(NULL) { m_Subtype = objects::CSeqdesc::e_Genbank; };
114  virtual string GetVal(const CObject& object);
115  virtual vector<string> GetVals(const CObject& object);
116  virtual bool IsEmpty(const CObject& object) const;
117  virtual void ClearVal(CObject& object);
118  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
119  virtual string IsValid(const string& val) { return kEmptyStr; };
120  virtual vector<string> IsValid(const vector<string>& values) { vector<string> rval; return rval; };
121  virtual void SetConstraint(const string& field, CConstRef<objects::edit::CStringConstraint> string_constraint);
122  virtual bool AllowMultipleValues() { return true; };
123 protected:
125 };
126 
127 
128 class CGenomeProjectField : public ncbi::CFieldHandler
129 {
130 public:
132  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
133  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
134  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
135  virtual string GetVal(const CObject& object);
136  virtual vector<string> GetVals(const CObject& object);
137  virtual bool IsEmpty(const CObject& object) const;
138  virtual void ClearVal(CObject& object);
139  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
140  virtual string IsValid(const string& val);
141  virtual vector<string> IsValid(const vector<string>& values);
142  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; };
143  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return objects::CSeqdesc::e_User; };
144  virtual void SetConstraint(const string& field, CConstRef<objects::edit::CStringConstraint> string_constraint) {};
145  virtual bool AllowMultipleValues() { return false; } ;
146  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
147  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
148  static bool IsGenomeProject(const objects::CUser_object& user);
149  static bool IsGenomeProjectID(const objects::CUser_field& field);
150 };
151 
152 class CBankITCommentField : public ncbi::CFieldHandler
153 {
154 public:
156  virtual ~CBankITCommentField() {}
157 
158  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
159  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
160  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
161  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
162  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
163 
164  virtual void SetConstraint(const string& field, CConstRef<objects::edit::CStringConstraint> string_constraint) {}
165  virtual bool AllowMultipleValues() { return true; }
166 
167  virtual string GetVal(const CObject& object);
168  virtual vector<string> GetVals(const CObject& object);
169  virtual bool IsEmpty(const CObject& object) const { return false; }
170  virtual void ClearVal(CObject& object) {}
171  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text) { return false; }
172  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; }
173  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return objects::CSeqdesc::e_User; }
174 };
175 
176 
177 class CGeneralCommentField : public ncbi::CBankITCommentField
178 {
179 public:
182 
183  virtual vector<string> GetVals(const CObject& object);
184 };
185 
186 class CSeqIdField : public ncbi::CFieldHandler
187 {
188 public:
189  CSeqIdField () {}
190  virtual ~CSeqIdField() {}
191  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
192  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
193  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
194  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
195  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
196 
197  virtual void SetConstraint(const string& field_name, CConstRef<objects::edit::CStringConstraint> string_constraint) {};
198  virtual bool AllowMultipleValues() { return false; };
199 
200  virtual string GetVal(const CObject& object);
201  virtual vector<string> GetVals(const CObject& object);
202  virtual bool IsEmpty(const CObject& object) const { return false; }
203  virtual void ClearVal(CObject& object) {};
204  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text) { return false;}
205  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; }
206  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return objects::CSeqdesc::e_not_set; }
207 
208 };
209 
210 // NCBIFILE File ID field
211 class CFileIDField : public CSeqIdField
212 {
213 public:
215  virtual string GetVal(const CObject& object);
216  virtual bool IsEmpty(const CObject& object) const;
217 private:
218  bool x_IsNCBIFILEId(const objects::CSeq_id& seq_id);
219 };
220 
221 
223 {
224 public:
229  eGenIdTag
230  };
231  CGeneralIDField( EGeneralIDPart part, const string& db = kEmptyStr)
232  : m_GeneralIDPart(part), m_PreferredDB (db) {}
233  virtual string GetVal(const CObject& object);
234 
235  static const string& GetName_GeneralIDPart( EGeneralIDPart stype_part );
236  static EGeneralIDPart GetGeneralIDPart_FromName ( const string& name );
237 private:
239  // used when only a specific DB tag is needed
240  string m_PreferredDB;
241 };
242 
243 
244 class CLocalIDField : public ncbi::CFieldHandler
245 {
246 public:
248  virtual ~CLocalIDField() {}
249 
250  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
251  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
252  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
253  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
254  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
255 
256  virtual void SetConstraint(const string& field, CConstRef<objects::edit::CStringConstraint> string_constraint) {}
257  virtual bool AllowMultipleValues() { return false; }
258 
259  virtual string GetVal(const CObject& object);
260  virtual vector<string> GetVals(const CObject& object);
261  virtual bool IsEmpty(const CObject& object) const;
262  virtual void ClearVal(CObject& object) {}
263  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text) { return false; }
264  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; }
265  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return objects::CSeqdesc::e_not_set; }
266 };
267 
268 // (label, data) members in User_field within a Structured Comment
269 class CStructCommFieldValuePair : public ncbi::CFieldHandler
270 {
271 public:
272  CStructCommFieldValuePair(const string& fieldname)
273  : m_FieldName(fieldname) {}
274 
275  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
276  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
277  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
278  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
279  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
280  virtual void SetConstraint(const string& field_name, CConstRef<objects::edit::CStringConstraint> string_constraint) {}
281 
282  virtual string GetVal(const CObject& object);
283  virtual vector<string> GetVals(const CObject& object);
284  virtual void ClearVal(CObject& object);
285  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
286  virtual bool SetVal(objects::CUser_field& field, const string & newValue, objects::edit::EExistingText existing_text);
287  virtual bool IsEmpty(const CObject& object) const;
288  virtual bool AllowMultipleValues() { return false; }
289  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; }
290  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return objects::CSeqdesc::e_User; }
291 protected:
292  string m_FieldName;
293  void x_InsertFieldAtCorrectPosition(objects::CUser_object& user, CRef<objects::CUser_field> field);
294  const objects::CUser_object* x_GetUser_Object(const CObject& object) const;
295  objects::CUser_object* x_GetUser_Object(CObject& object) const;
296 };
297 
298 // data member of User_field corresponding to the StructuredCommentPrefix(Suffix) label
300 {
301 public:
302  CStructCommDBName() : CStructCommFieldValuePair("StructuredComment") {}
303 
304  virtual vector<string> GetVals(const CObject& object);
305  virtual void ClearVal(CObject& object);
306  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
307  virtual bool SetVal(objects::CUser_field& field, const string & newValue, objects::edit::EExistingText existing_text);
308 };
309 
311 {
312 public:
314 
315  virtual vector<string> GetVals(const CObject& object);
316  virtual void ClearVal(CObject& object);
317  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
318  virtual bool SetVal(objects::CUser_field& field, const string & newValue, objects::edit::EExistingText existing_text);
319 private:
320  void x_Init(void);
321  // for editing from the AECR dlg, we need to store the (label, data) pairs, and later restore them
322  objects::CUser_object::TData m_FieldValuePairs;
323  bool m_Cleared;
324  unsigned int m_NrOfSetting;
325 };
326 
327 class CFlatFileField : public ncbi::CFieldHandler
328 {
329 public:
331  virtual ~CFlatFileField() {}
332 
333  virtual vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
334  virtual vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
335  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
336  virtual vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
337  virtual vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
338 
339  virtual void SetConstraint(const string& field, CConstRef<objects::edit::CStringConstraint> string_constraint) {}
340  virtual bool AllowMultipleValues() { return false; }
341 
342  virtual string GetVal(const CObject& object);
343  virtual vector<string> GetVals(const CObject& object) { vector<string> vals; return vals; }
344  virtual bool IsEmpty(const CObject& object) const { return false; }
345  virtual void ClearVal(CObject& object) {}
346  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text) { return false; }
347  virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype() { return objects::CSeqFeatData::eSubtype_bad; }
348  virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype() { return objects::CSeqdesc::e_not_set; }
349 };
350 
352 {
353 public:
354  CMiscSeqTableColumn(const string& name);
356  bool IsFeature() const { if (m_Feature) return true; else return false; }
357  bool IsSource() const { if (m_Src) return true; else return false; }
358  vector<CConstRef<CObject> > GetObjects(objects::CBioseq_Handle bsh);
359  vector<CConstRef<CObject> > GetObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
360  vector<CConstRef<CObject> > GetRelatedObjects(const CObject& object, CRef<objects::CScope> scope);
361  vector<CConstRef<CObject> > GetRelatedObjects(const objects::edit::CApplyObject& object);
362  vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CBioseq_Handle bsh);
363  vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(objects::CSeq_entry_Handle seh, const string& constraint_field, CRef<objects::edit::CStringConstraint> string_constraint);
364  void GetApplyObjectsValues(objects::CSeq_entry_Handle seh, const string& constraint_field, set<string> &values);
365  void AddApplyObjectValue(const objects::edit::CApplyObject& object, const string& field, set<string> &values);
366  vector<CRef<objects::edit::CApplyObject> > GetRelatedApplyObjects(objects::edit::CApplyObject& object);
367 
368  string GetVal(const CObject& object);
369  vector<string> GetVals(const CObject& object);
370  bool IsEmpty(const CObject& object) const;
371  void ClearVal(CObject& object);
372  CRef<CCmdComposite> ClearValCmd(CConstRef<CObject> object, bool update_mrna_product, objects::CScope& scope);
373  bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
374  CRef<CCmdComposite> SetValCmd(CConstRef<CObject> object, const string& val, objects::edit::EExistingText existing_text, objects::CScope& scope, bool update_mrna_product = false);
375  CRef<CCmdComposite> ConvertValCmd(objects::edit::CApplyObject& object, CMiscSeqTableColumn& other, objects::edit::EExistingText existing_text, objects::ECapChange cap_change, const bool leave_original, const string& field_name, const bool update_mrna_product);
376  CRef<CCmdComposite> ConvertValCmd(CRef<objects::edit::CApplyObject> src_object, CRef<objects::edit::CApplyObject> dst_object, CMiscSeqTableColumn& other, objects::edit::EExistingText existing_text, objects::ECapChange cap_change, const bool leave_original, const string& field_name, const bool update_mrna_product);
377  CRef<CCmdComposite> CopyValCmd(objects::edit::CApplyObject& object, CMiscSeqTableColumn& other, objects::edit::EExistingText existing_text, bool update_mrna_product);
379  CRef<CCmdComposite> SwapValCmd(objects::edit::CApplyObject& object,CMiscSeqTableColumn& other, objects::edit::EExistingText existing_text, bool update_mrna_product);
381  CRef<CCmdComposite> ParseValCmd(objects::edit::CApplyObject& object, CMiscSeqTableColumn& other, const objects::edit::CParseTextOptions& parse_options, objects::edit::EExistingText existing_text, bool update_mrna_product);
382  CRef<CCmdComposite> ParseValCmd(CRef<objects::edit::CApplyObject> src_object, CRef<objects::edit::CApplyObject> dst_object, CMiscSeqTableColumn& other, const objects::edit::CParseTextOptions& parse_options, objects::edit::EExistingText existing_text, bool update_mrna_product);
383  string IsValid(const string& val);
384  vector<string> IsValid(const vector<string>& values);
385  int CountConflicts(set<CConstRef<CObject> > objs, const string& val);
386  int CountConflicts(const CObject& obj, const string& val);
388  CRef<CCmdComposite> GetReplacementCommand(CConstRef<CObject>, CRef<CObject> newobj, objects::CScope& scope, const string& cmd_name);
389  objects::CSeqFeatData::ESubtype GetFeatureSubtype();
390  objects::CSeqdesc::E_Choice GetDescriptorSubtype();
391  void SetConstraint(string field, CRef<objects::edit::CStringConstraint> string_constraint);
392  bool AllowMultipleValues();
393  static bool s_IsSequenceIDField(const string& field);
394  bool IsProductField( void );
395  void SetScope(CRef<objects::CScope> scope);
396 
397 private:
401 
402  CRef<CCmdComposite> x_GetMrnaUpdate(objects::edit::CApplyObject& object, CMiscSeqTableColumn& other);
403  CRef<CCmdComposite> x_GetMrnaUpdate(objects::edit::CApplyObject& src_object, objects::edit::CApplyObject& dst_object, CMiscSeqTableColumn& other, bool& changed_src);
404 };
405 
406 
407 typedef vector< CRef<CMiscSeqTableColumn> > TMiscSeqTableColumnList;
408 
412  objects::edit::EExistingText existing_text,
413  objects::CScope& scope);
414 
415 
416 CRef<objects::CSeq_table> NCBI_GUIPKG_SEQUENCE_EDIT_EXPORT GetMiscTableFromSeqEntry(const vector<string> &fields, objects::CSeq_entry_Handle entry);
417 void AddMiscColumnsToTable(CRef<objects::CSeq_table> table, const vector<string> &fields, objects::CSeq_entry_Handle entry);
418 
421 
422 int CountColumnConflicts(CRef<CMiscSeqTableColumn> col, vector<CConstRef<CObject> > objs, const string& val);
423 
424 bool DoesObjectMatchFieldConstraint (const CObject& object, const string& field_name, CRef<objects::edit::CStringConstraint> string_constraint, CRef<objects::CScope> scope);
425 bool DoesApplyObjectMatchFieldConstraint (const objects::edit::CApplyObject& object, const string& field_name, CRef<objects::edit::CStringConstraint> string_constraint);
426 
427 CRef<CCmdComposite> GetPropagateDBLinkCmd(objects::CSeq_entry_Handle entry);
428 
429 CRef<CCmdComposite> GetCommandFromApplyObject(objects::edit::CApplyObject& obj);
430 
432 
434 bool FocusedOnNucleotides(TConstScopedObjects& objects, const objects::CSeq_entry_Handle& tse);
435 bool FocusedOnAll(TConstScopedObjects& objects, const objects::CSeq_entry_Handle& tse);
436 
438 
439 #endif
440  // _MISCEDIT_UTIL_H_
User-defined methods of the data storage class.
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual string GetVal(const CObject &object)
virtual void ClearVal(CObject &object)
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual bool IsEmpty(const CObject &object) const
virtual ~CBankITCommentField()
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual bool AllowMultipleValues()
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual vector< string > GetVals(const CObject &object)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual string GetVal(const CObject &object)
virtual bool IsEmpty(const CObject &object) const
virtual void ClearVal(CObject &object)
virtual vector< string > GetVals(const CObject &object)
CConstRef –.
Definition: ncbiobj.hpp:1266
virtual string GetVal(const CObject &object)
virtual vector< string > GetVals(const CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual bool IsEmpty(const CObject &object) const
virtual void ClearVal(CObject &object)
static CRef< ncbi::CFieldHandler > Create(const string &field_name)
virtual string GetVal(const CObject &object)
virtual bool IsEmpty(const CObject &object) const
bool x_IsNCBIFILEId(const objects::CSeq_id &seq_id)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
virtual vector< string > GetVals(const CObject &object)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual bool AllowMultipleValues()
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual bool IsEmpty(const CObject &object) const
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual void ClearVal(CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual ~CFlatFileField()
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual string GetVal(const CObject &object)
virtual bool IsEmpty(const CObject &object) const
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual string GetVal(const CObject &object)
virtual bool AllowMultipleValues()
virtual string IsValid(const string &val)
virtual void ClearVal(CObject &object)
CRef< objects::edit::CStringConstraint > m_StringConstraint
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< string > IsValid(const vector< string > &values)
virtual vector< string > GetVals(const CObject &object)
virtual ~CGeneralCommentField()
virtual vector< string > GetVals(const CObject &object)
static EGeneralIDPart GetGeneralIDPart_FromName(const string &name)
virtual string GetVal(const CObject &object)
CGeneralIDField(EGeneralIDPart part, const string &db=kEmptyStr)
EGeneralIDPart m_GeneralIDPart
static const string & GetName_GeneralIDPart(EGeneralIDPart stype_part)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
static bool IsGenomeProject(const objects::CUser_object &user)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
static bool IsGenomeProjectID(const objects::CUser_field &field)
virtual bool IsEmpty(const CObject &object) const
virtual string GetVal(const CObject &object)
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual string IsValid(const string &val)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
virtual void ClearVal(CObject &object)
virtual bool AllowMultipleValues()
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual vector< string > GetVals(const CObject &object)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual bool AllowMultipleValues()
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual void ClearVal(CObject &object)
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual string GetVal(const CObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual ~CLocalIDField()
virtual bool IsEmpty(const CObject &object) const
virtual vector< string > GetVals(const CObject &object)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
CRef< CCmdComposite > SetValCmd(CConstRef< CObject > object, const string &val, objects::edit::EExistingText existing_text, objects::CScope &scope, bool update_mrna_product=false)
CRef< ncbi::CFieldHandler > m_FieldHandler
CRef< CCmdComposite > SwapValCmd(CRef< objects::edit::CApplyObject > src_object, CRef< objects::edit::CApplyObject > dst_object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, bool update_mrna_product)
CRef< CCmdComposite > ConvertValCmd(CRef< objects::edit::CApplyObject > src_object, CRef< objects::edit::CApplyObject > dst_object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, objects::ECapChange cap_change, const bool leave_original, const string &field_name, const bool update_mrna_product)
CRef< CSrcTableColumnBase > m_Src
CRef< CObject > GetNewObject(CConstRef< CObject > obj)
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
CRef< CCmdComposite > x_GetMrnaUpdate(objects::edit::CApplyObject &src_object, objects::edit::CApplyObject &dst_object, CMiscSeqTableColumn &other, bool &changed_src)
void AddApplyObjectValue(const objects::edit::CApplyObject &object, const string &field, set< string > &values)
void ClearVal(CObject &object)
CRef< CCmdComposite > CopyValCmd(CRef< objects::edit::CApplyObject > src_object, CRef< objects::edit::CApplyObject > dst_object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, bool update_mrna_product)
vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
static bool s_IsSequenceIDField(const string &field)
CRef< CCmdComposite > SwapValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, bool update_mrna_product)
CRef< CCmdComposite > ParseValCmd(CRef< objects::edit::CApplyObject > src_object, CRef< objects::edit::CApplyObject > dst_object, CMiscSeqTableColumn &other, const objects::edit::CParseTextOptions &parse_options, objects::edit::EExistingText existing_text, bool update_mrna_product)
int CountConflicts(set< CConstRef< CObject > > objs, const string &val)
bool IsEmpty(const CObject &object) const
vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
objects::CSeqdesc::E_Choice GetDescriptorSubtype()
CRef< CCmdComposite > ConvertValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, objects::ECapChange cap_change, const bool leave_original, const string &field_name, const bool update_mrna_product)
void SetConstraint(string field, CRef< objects::edit::CStringConstraint > string_constraint)
bool IsFeature() const
CRef< CCmdComposite > GetReplacementCommand(CConstRef< CObject >, CRef< CObject > newobj, objects::CScope &scope, const string &cmd_name)
CRef< CCmdComposite > CopyValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, objects::edit::EExistingText existing_text, bool update_mrna_product)
vector< string > GetVals(const CObject &object)
objects::CSeqFeatData::ESubtype GetFeatureSubtype()
CRef< CCmdComposite > ParseValCmd(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other, const objects::edit::CParseTextOptions &parse_options, objects::edit::EExistingText existing_text, bool update_mrna_product)
CMiscSeqTableColumn(const string &name)
vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
CRef< CCmdComposite > x_GetMrnaUpdate(objects::edit::CApplyObject &object, CMiscSeqTableColumn &other)
CRef< CFeatureSeqTableColumnBase > m_Feature
vector< CRef< objects::edit::CApplyObject > > GetRelatedApplyObjects(objects::edit::CApplyObject &object)
string IsValid(const string &val)
vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
string GetVal(const CObject &object)
CRef< CCmdComposite > ClearValCmd(CConstRef< CObject > object, bool update_mrna_product, objects::CScope &scope)
bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
void GetApplyObjectsValues(objects::CSeq_entry_Handle seh, const string &constraint_field, set< string > &values)
void SetScope(CRef< objects::CScope > scope)
CObject –.
Definition: ncbiobj.hpp:180
virtual void ClearVal(CObject &object)
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual ~CSeqIdField()
virtual void SetConstraint(const string &field_name, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual bool AllowMultipleValues()
virtual vector< string > GetVals(const CObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual bool IsEmpty(const CObject &object) const
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual string GetVal(const CObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual vector< string > GetVals(const CObject &object)
virtual void ClearVal(CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual bool SetVal(objects::CUser_field &field, const string &newValue, objects::edit::EExistingText existing_text)
unsigned int m_NrOfSetting
virtual void ClearVal(CObject &object)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< string > GetVals(const CObject &object)
virtual bool SetVal(objects::CUser_field &field, const string &newValue, objects::edit::EExistingText existing_text)
objects::CUser_object::TData m_FieldValuePairs
void x_InsertFieldAtCorrectPosition(objects::CUser_object &user, CRef< objects::CUser_field > field)
virtual bool SetVal(objects::CUser_field &field, const string &newValue, objects::edit::EExistingText existing_text)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< string > GetVals(const CObject &object)
CStructCommFieldValuePair(const string &fieldname)
virtual void ClearVal(CObject &object)
virtual string GetVal(const CObject &object)
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual bool IsEmpty(const CObject &object) const
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
virtual void SetConstraint(const string &field_name, CConstRef< objects::edit::CStringConstraint > string_constraint)
const objects::CUser_object * x_GetUser_Object(const CObject &object) const
virtual bool AllowMultipleValues()
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
virtual void SetConstraint(const string &field_name, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const CObject &object, CRef< objects::CScope > scope)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(objects::CBioseq_Handle bsh)
virtual vector< CConstRef< CObject > > GetRelatedObjects(const objects::edit::CApplyObject &object)
virtual vector< CConstRef< CObject > > GetObjects(objects::CSeq_entry_Handle seh, const string &constraint_field, CRef< objects::edit::CStringConstraint > string_constraint)
virtual objects::CSeqdesc::E_Choice GetDescriptorSubtype()
virtual objects::CSeqFeatData::ESubtype GetFeatureSubtype()
objects::CSeqdesc::E_Choice m_Subtype
objects::CSeqdesc::E_Choice GetSubtype()
void SetSubtype(objects::CSeqdesc::E_Choice subtype)
virtual bool AllowMultipleValues()
virtual vector< CConstRef< CObject > > GetObjects(objects::CBioseq_Handle bsh)
IWorkbench is the central interface in the application framework.
Definition: workbench.hpp:113
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define false
Definition: bool.h:36
static char col1[256]
Definition: compute.c:13
static char col2[256]
Definition: compute.c:13
#define NULL
Definition: ncbistd.hpp:225
vector< SConstScopedObject > TConstScopedObjects
Definition: objects.hpp:65
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define kEmptyStr
Definition: ncbistr.hpp:123
#define NCBI_GUIPKG_SEQUENCE_EDIT_EXPORT
Definition: gui_export.h:515
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
@ e_not_set
bool DoesObjectMatchFieldConstraint(const CObject &object, const string &field_name, CRef< objects::edit::CStringConstraint > string_constraint, CRef< objects::CScope > scope)
int CountColumnConflicts(CRef< CMiscSeqTableColumn > col, vector< CConstRef< CObject > > objs, const string &val)
string MakeTableMetaInfoString(objects::edit::EExistingText rule, bool erase_blanks)
CRef< CCmdComposite > GetCommandFromApplyObject(objects::edit::CApplyObject &obj)
bool FocusedOnNucleotides(TConstScopedObjects &objects, const objects::CSeq_entry_Handle &tse)
vector< CRef< CMiscSeqTableColumn > > TMiscSeqTableColumnList
CRef< CCmdComposite > ConvertValCmd(CConstRef< CObject > object, CRef< CMiscSeqTableColumn > col1, CRef< CMiscSeqTableColumn > col2, objects::edit::EExistingText existing_text, objects::CScope &scope)
bool DoesApplyObjectMatchFieldConstraint(const objects::edit::CApplyObject &object, const string &field_name, CRef< objects::edit::CStringConstraint > string_constraint)
CRef< CCmdComposite > GetPropagateDBLinkCmd(objects::CSeq_entry_Handle entry)
int GetNumberOfViewedBioseqs(TConstScopedObjects &objects)
void GetViewObjects(IWorkbench *workbench, TConstScopedObjects &objects)
CRef< objects::CSeq_table > GetMiscTableFromSeqEntry(const vector< string > &fields, objects::CSeq_entry_Handle entry)
CRef< objects::CUser_field > MakeTableMetaInfoField(objects::edit::EExistingText rule, bool erase_blanks)
void AddMiscColumnsToTable(CRef< objects::CSeq_table > table, const vector< string > &fields, objects::CSeq_entry_Handle entry)
bool FocusedOnAll(TConstScopedObjects &objects, const objects::CSeq_entry_Handle &tse)
EExistingText
Modified on Tue May 28 05:52:14 2024 by modify_doxy.py rev. 669887