Home > Class Reference > ENSLIB namespace > EnsLib.EDI.ASTM.Segment
Private  Storage   

EnsLib.EDI.ASTM.Segment


class EnsLib.EDI.ASTM.Segment extends %RegisteredObject, EnsLib.EDI.Segment

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
10 49 2


Summary


Properties
CS Count DocType DocTypeCategory
DocTypeName ESC FS FullSize
ID Identifier IsMutable Name
OriginalDocId RS RawContent Separators
Source TimeCreated TypeVersion UserValues

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
CSGet CSSet CopyValues DocTypeSet
DrawFormButtons DrawHTMLContentsForm DrawHTMLForm DumpMaps
ESCGet ESCSet EnumerateDocTypesClose EnumerateDocTypesExecute
EnumerateDocTypesFetch EnumerateTypeCategoriesClose EnumerateTypeCategoriesExecute EnumerateTypeCategoriesFetch
EnumerateVDocsClose EnumerateVDocsExecute EnumerateVDocsFetch Escape
EscapeEx FSGet FSSet FindValues
FindValuesArray FullSizeGet GetAlias GetContentArray
GetManagerLinks GetNewManagerLinks GetNextIndex GetValueAt
ImportFromIOStream ImportFromString IsChildHolder OutputHTML
OutputHTMLZen OutputToDevice OutputToIOStream OutputToLibraryStream
OutputToString PokeDocType RSGet RSSet
ReadRawDataStream SaveData SeparatorsSet SetValueAt
StoreRawDataStream TypeVersionGet Unescape UnescapeEx
Validate decompose decomposeData getAtFromArray
getAtFromGlobal getTestNewArg init outputHTMLSeg
outputHTMLSegZen parsePropertyPath replaceSeparators


Properties


• property CS as %String [ Calculated ];
Component separator character
• property DocTypeCategory as %String [ ReadOnly ];
the Category portion of the DocType
• property DocTypeName as %String [ ReadOnly ];
the Name portion of the DocType ( name [ ! required fields] - ordinal )
• property ESC as %String [ Calculated ];
Escape separator character
• property FS as %String [ Calculated ];
Field separator character
• property FullSize as %Integer [ Calculated,ReadOnly ];
Size in bytes of the segment content (even if >32k)
• property RS as %String [ Calculated ];
Repetition separator character
• property Separators as %String(MAXLEN=4,MINLEN=4) [ InitialExpression = $$$ASTMDefSeparators ];
All 4 Separators as a single String

Methods


• method CSGet() as %String
This is a Get accessor method for the CS property.
• method CSSet(newval) as %Status
This is a Set accessor method for the CS property.
• method CopyValues(pSource As EnsLib.EDI.ASTM.Segment, pSourcePath As %String, pTargetPath As %String, pAction As %String, pKey As %String, pEmptyFieldAsNull As %Boolean = 0, pIgnoreMissingSource As %Boolean = 0) as %Status
Copy a whole set of values from source to target when iteration is implied between 2 VDocs pSourcePath contains the property path to the source set
pTargetPath contains the property path to the target set
pAction contains an action code: "set", etc..
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
• method DocTypeSet(pDocType As %String) as %Status
This is a Set accessor method for the DocType property.
• method DumpMaps() as %Status
• method ESCGet() as %String
This is a Get accessor method for the ESC property.
• method ESCSet(newval) as %Status
This is a Set accessor method for the ESC property.
• classmethod EnumerateDocTypesClose(ByRef qHandle As %Binary) as %Status
• classmethod EnumerateDocTypesExecute(ByRef qHandle As %Binary, Category As %String, IncludeBase As %Boolean) as %Status
• classmethod EnumerateDocTypesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• classmethod EnumerateTypeCategoriesClose(ByRef qHandle As %Binary) as %Status
• classmethod EnumerateTypeCategoriesExecute(ByRef qHandle As %Binary, Standard As %String = "") as %Status
• classmethod EnumerateTypeCategoriesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
• method Escape(pData) as %String
• classmethod EscapeEx(pData, pSeparators, pEscapeChar) as %String
• method FSGet() as %String
This is a Get accessor method for the FS property.
• method FSSet(newval) as %Status
This is a Set accessor method for the FS property.
• method FullSizeGet() as %String
This is a Get accessor method for the FullSize property.
• classmethod GetContentArray(Output pContents, pMode As %String, pDocType As %String, pLevel As %Integer, pIncludeBase As %Boolean = 0) as %Status
Returns array of properties that make up the contents of this object.
This method in implemented within the document class.
The content array is in the form:
pContents(n,"type")="%String"
pContents(n,"name")="Field"
pContents(n,"alias")=alias code
If pContents(n) is non-zero then the property is a composite type with
sub-properties. The sub-properties are indexed with a similar structure under
pContents(n,m) where m is the index of the subtype property.
• method GetNextIndex(pPath As %String, pIndex As %String, ByRef pStatus As %Status = $$$OK) as %String
Gets the next index in an array
• method GetValueAt(pPropertyPath As %String, pSeparators As %String, Output pStatus As %Status) as %String
pPropertyPath is of syntax: field [ ( array ) ] [ . component ] Returns the value at the specified property path. pSeparators is used to specify the separators to be used when a non-atomic value is returned. All property path elements must be either name or index.
• classmethod ImportFromIOStream(pIOStream As %IO.I.CharacterStream, Output pStatus As %Status = $$$OK, pSeparators As %String, pIOFormatClassname As %String = "") as EnsLib.EDI.ASTM.Document
• classmethod ImportFromString(pString As %String, Output pStatus As %Status, pSeparators As %String, ByRef pConfigItem As %String = "", pIOFormatClassname As %String) as EnsLib.EDI.ASTM.Segment
• method OutputHTML() as %Status
Display Segment as HTML, using DocType info if available
• method OutputHTMLZen() as %Status
Display Segment as HTML, using DocType info if available
• method OutputToDevice(pSeparators As %String, ByRef pDoFraming As %Integer, pResponseTimeout As %Numeric = -1) as %Status
• method OutputToIOStream(pIOStream As %IO.I.CharacterStream, pSeparators As %String, ByRef pDoFraming As %Integer = 0, pResponseTimeout As %Numeric = -1) as %Status
Convert segments back to Stream
• method OutputToLibraryStream(pLibStream As %Stream.Object, pSeparators As %String, ByRef pDoFraming As %Integer, pResponseTimeout As %Numeric = -1) as %Status
• method OutputToString(pSeparators As %String, ByRef pDoFraming As %Integer, pResponseTimeout As %Numeric = -1, Output pStatus As %Status) as %String
• method PokeDocType(pDocType As %String) as %Status
• method RSGet() as %String
This is a Get accessor method for the RS property.
• method RSSet(newval) as %Status
This is a Set accessor method for the RS property.
• method ReadRawDataStream(ByRef pStream As %Stream.Object, pPropertyPath As %String = "") as %Status
Read a field from a >32k segment, or the whole segment, into a stream. Note that this will return the entire remainder of the segment, not stopping at the end of the field specified in pPropertyPath
• method SaveData(pSeparators As %String = "") as %Status
Compose the segment and store it at a new ID
• method SeparatorsSet(newvalue As %String) as %Status
This is a Set accessor method for the Separators property.
• method SetValueAt(pValue As %String, pPropertyPath As %String = "", pAction As %String = "set", pKey As %String = "") as %Status
Sets the value at the specified property path. pPropertyPath is of syntax: field [ ( array ) ] [ . component ] All property path elements must be either name or index. pKey is used to append an array index to the value at the given property path. pAction corresponds to the actions in the DTL statement.
• method StoreRawDataStream(pStream As %Stream.Object, pPropertyPath As %String = "") as %Status
Write a >32k field or whole segment stream to a segment. Note that this renders the segment immutable after completing, and therefore works only once per segment.
• method Unescape(pData) as %String
• classmethod UnescapeEx(pData, pSeparators, pEscapeChar) as %String
• method decompose() as %Status
Decompose the segment from a single string into a multidimensional array
• method decomposeData(pData As %String) as %Status
• method getAtFromArray(pPropertyPath As %String = "", pSeparators As %String, Output pStatus As %Status) as %String
• method getAtFromGlobal(pPropertyPath As %String = "", pSeparators As %String, Output pStatus As %Status) as %String
• method init(pSegID As %String, pMutable As %Boolean, pDocType As %String, pSegData As %String) as %Status
Initialize a segment. The segid is typically an index into the Segment storage global. Mutable indicates whether the initialized segment may be modified or not and SegType is used to determine the segment schema to be used for interpretation of segment contents
• method outputHTMLSeg(pSeparators As %String, pSegNum As %String = "", pSegPath As %String = "", pDocument As EnsLib.EDI.Document = $$$NULLOREF) as %Status
• method outputHTMLSegZen(pSeparators As %String, pSegNum As %String = "", pSegPath As %String = "", pDocument As EnsLib.EDI.Document = $$$NULLOREF) as %Status
• method parsePropertyPath(pPropertyPath As %String, Output pField As %Integer, Output pArray As %Integer, Output pComponent As %Integer) as %Status
Given a property path, determine the Field, Array, and Component positions
• classmethod replaceSeparators(pInputData, oSeparators) as %String

Queries


• query EnumerateDocTypes(Category As %String = "", IncludeBase As %Boolean = 0)
Selects Type As %String
Returns a list of available DocTypes for this document class.
The DocType is returned as the first column in the result set.
The Category parameter can be used to restrict the list.
If Category is:
0 - return only DocTypes in standard categories
+ - return only DocTypes in user-defined categories
empty - return DocTypes from all categories
a category name - return only DocTypes in the named category
a partial name suffixed with '%' - return only DocTypes in categories matching the partial category name
other - return nothing
If IncludeBase is:
0 - return only DocTypes defined in the current schema category itself
1 - return all DocTypes in the current schema category's base category in addition to those defined in the current category itself
• query EnumerateTypeCategories(Standard As %String = "")
Selects Category As %String, Description As %String, IsStandard As %Boolean, Base As %String
Returns a list of document type schema categories for the document class.
The Standard parameter can be used to restrict the list.
If Standard is: 0 - return only standard categories + - return only user-defined categories empty - return all categories a category name - return only the named category a partial name suffixed with '%' - return only categories matching the partial category name other - return nothing