Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [EnsLib] >  [EDI] >  [Segmented]
Private  Storage   

abstract class EnsLib.EDI.Segmented extends %RegisteredObject

Common (secondary) base class for VDoc classes that have segments, BuildMap(), and Separators

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
4 22 1


Summary

Properties
AutoBuildMap BuildMapStatus CacheSegsGotten SegCount

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AppendSegment AppendSegmentId BuildMap EnumerateSegTypesClose
EnumerateSegTypesExecute EnumerateSegTypesFetch FindSegment FindSegmentValues
FindSegmentValuesArray GetMutableSegmentAt GetSegmentAt GetSegmentIdAt
GetSegmentTypeAt GetValues GetValuesArray InsertSegmentAt
InsertSegmentIdAt NewSegment RemoveSegmentAt SetSegmentAt
SetSegmentIdAt getValsArray

Subclasses
EnsLib.EDI.EDIFACT.Document EnsLib.EDI.X12.Document

Properties

• property AutoBuildMap as %Boolean [ InitialExpression = 0,Transient ];
Determines if maps should be built automatically on segment insertion/deletion
• property BuildMapStatus as %Status [ Transient,ReadOnly ];
The status of the last BuildMap() action, or empty if the map gets updated or discarded later. Note that the BuildMap() is not called automatically when a saved document gets opened.
• property CacheSegsGotten as %Boolean [ InitialExpression = 1,Transient ];
Flag to control whether segments retrieved from a document should be cached in the map of the document object. Segments not cached will be marked immutable because the document will have no record of them and therefore couldn't save any changes to them when it is saved
• property SegCount as %Integer [ Calculated,Transient,ReadOnly ];
Number of Segments composing this Document

Methods

• method AppendSegment(pSegment As EnsLib.EDI.Segment) as %Status
Insert a segment at the end by index
• method AppendSegmentId(pSegmentId As %String) as %Status
Insert a segment ID at the end by index
• abstract method BuildMap(pKeepParsingAfterError As %Boolean = 1) as %Status
• classmethod EnumerateSegTypesClose(ByRef qHandle As %Binary) as %Status
• classmethod EnumerateSegTypesExecute(ByRef qHandle As %Binary, Category As %String, Level As %String, IncludeBase As %Boolean) as %Status
• classmethod EnumerateSegTypesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• abstract method FindSegment(pSegName As %String, ByRef pIndex As %String = "", Output pStatus As %Status) as EnsLib.EDI.Segment
Gets the next segment after index pIndex with name pSegName. Supports pSegName = '*' to match any segment.
• method FindSegmentValues(pSegmentPropertyPath As %String, pSeparators As %String, pValSepString As %String = "<>", Output pStatus As %Status, pSchemaCategory As %String = "", Output pIndices As %String) as %String
Finds all values matching a SegName:PropertyPath string, where the SegName is a simple segment type name (not a full schema-based seg path); PropertyPath describes a field or subfield within the segment.
Supports SegName = '*' to match any segment, and SegName(n) to match only the n'th segment of the given type.
Final parameter is an output of the list of segment indexes (separated by pValSepString) for the values found.
• method FindSegmentValuesArray(pSegmentPropertyPath As %String, pSeparators As %String, ByRef pArray As %String, Output pStatus As %Status, pSchemaCategory As %String = "", ByRef pLongArray As %String)
Finds all values matching a SegName:PropertyPath string, where the SegName is a simple segment type name (not a full schema-based seg path); PropertyPath describes a field or subfield within the segment. Supports SegName = '*' to match any segment, and SegName(n) to match only the n'th segment of the given type.
• method GetMutableSegmentAt(pIndexOrPath As %String, Output pStatus As %Status) as EnsLib.EDI.Segment
Gets a mutable segment object by path or index
• method GetSegmentAt(pIndexOrPath As %String, Output pStatus As %Status) as EnsLib.EDI.Segment
Gets a immutable segment object by path or index
• method GetSegmentIdAt(pIndexOrPath As %String, Output pStatus As %Status) as %String
Gets a immutable segment ID by path or index
• abstract method GetSegmentTypeAt(pSegPath As %String, Output pStatus As %Status) as %String
• method GetValues(pSegmentPropertyPath As %String, pSeparators As %String, pValSepString As %String = "<>", Output pStatus As %Status) as %String
Finds all values matching a SegPath:PropertyPath string that contains zero or more () implicit iterators Supports SegPath values with (), (n) to choose a specific one of the given type, or just plain (same as seg() or seg(*)).
• method GetValuesArray(pSegmentPropertyPath As %String, pSeparators As %String, ByRef pArray As %String, Output pStatus As %Status, ByRef pLongArray As %String)
Finds all values matching a SegPath:PropertyPath string that contains zero or more () implicit iterators
• method InsertSegmentAt(pSegment As EnsLib.EDI.Segment, pIndex As %Integer = "") as %Status
Insert a segment object by index
• method InsertSegmentIdAt(pSegmentId As %String, pIndex As %Integer = "") as %Status
Insert a segment ID by index
• abstract method NewSegment(pSegPath As %String, pSeparators As %String, Output pStatus As %Status) as EnsLib.EDI.Segment
Returns a new segment of type suitable for inserting in the current transaction type at the position given by pSegPath
• method RemoveSegmentAt(pIndexOrPath As %String = "") as %Status
Removes a segment by path or index
• method SetSegmentAt(pSegment As EnsLib.EDI.Segment, pIndexOrPath As %String = "") as %Status
Set a segment object by path or index
• method SetSegmentIdAt(pSegmentId As %String, pIndexOrPath As %String = "") as %Status
Set a segment ID by path or index
• method getValsArray(pSegmentPropertyPath As %String, pSeparators As %String, ByRef pArray As %String, Output pStatus As %Status, ByRef pLongArray As %String)
Finds all values matching a SegPath:PropertyPath string that contains zero or more () implicit iterators

Queries

• query EnumerateSegTypes(Category As %String = "", Level As %String = "", IncludeBase As %Boolean = 0)
Selects SegType As %String, Field As %String, Description As %String, IsStandard As %Boolean
Returns a list of schema categories and segment types and segment fields for the document class.
The Category and Level parameters can be used to restrict the list.
If Category is:
0 - return only standard categories
+ - return only user-defined categories
empty - return all categories
a category name - return only SegTypes in the named category
a category name:segment type name - return only information about the named SegType
a partial name suffixed with '%' - return only SegTypes in categories matching the partial category name
other - return nothing
If Level is:
0 - return all segment names
n - return the given number of levels of nested field names within each segment
empty - return all levels of nested field names within each segment
If IncludeBase is:
0 - return only segment names defined in the current schema category itself
1 - return all segment names in the current schema category's base category in addition to those defined in the current category itself


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.