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

EnsLib.EDI.ASTM.Document


persistent class EnsLib.EDI.ASTM.Document extends %Persistent, EnsLib.EDI.Document, EnsLib.EDI.Segmented, EnsLib.EDI.ASTM.MsgBodyMethods

Represents an Interchange or a TransactionSet. FunctionalGroups are represented as Segments within an Interchange.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
7 16 79 3 2 1


Summary


Properties
%maps AutoBuildMap BuildMapStatus CacheSegsGotten
ComponentSeparator DocType DocTypeCategory DocTypeName
Envelope EscapeSeparator FieldSeparator FullSize
Identifier IsMutable Name OriginalDocId
RawContent RepetitionSeparator SegCount Separators
Source TimeCreated TypeVersion UserValues

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %CompareContents
%ComposeOid %ConstructClone %Delete %DeleteExtent
%DeleteId %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%DrawHTMLForm %DrawHTMLTable %Exists %ExistsId
%Extends %GUID %GUIDSet %GetContentType
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%OnTimeout %Open %OpenId %OriginalNamespace
%PackageName %PhysicalAddress %ProcessSubmit %PurgeIndices
%Reload %RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack
%Save %SaveDirect %SaveIndices %SerializeObject
%SetModified %ShowContents %ShowContentsHead %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject AppendSegment
AppendSegmentId BuildMap Clear ComponentSeparatorGet
CopyValues DocTypeSet DrawFormButtons DrawHTMLContentsForm
DrawHTMLForm DumpMaps EnumerateDocTypesClose EnumerateDocTypesExecute
EnumerateDocTypesFetch EnumerateSegTypesClose EnumerateSegTypesExecute EnumerateSegTypesFetch
EnumerateTypeCategoriesClose EnumerateTypeCategoriesExecute EnumerateTypeCategoriesFetch EnumerateVDocsClose
EnumerateVDocsExecute EnumerateVDocsFetch EscapeSeparatorGet FieldSeparatorGet
FindSegment FindSegmentValues FindSegmentValuesArray FullSizeGet
GetAlias GetContentArray GetFullSize GetManagerLinks
GetMutableSegmentAt GetNewManagerLinks GetNextGroupPath GetNextIndex
GetSegmentAt GetSegmentIdAt GetSegmentIndex GetSegmentPath
GetSegmentTypeAt GetStatsDimension GetValueAt GetValues
GetValuesArray IdentifierGet ImportFromDevice ImportFromFile
ImportFromIOStream ImportFromLibraryStream ImportFromString InsertSegmentAt
InsertSegmentIdAt IsMutableSet KillGlobals NameGet
NewReplyDocument NewSegment OutputHTML OutputHTMLZen
OutputToDevice OutputToFile OutputToIOStream OutputToLibraryStream
OutputToString PokeDocType Purge RawContentGet
RemoveSegmentAt RepetitionSeparatorGet SegCountGet SetSegmentAt
SetSegmentIdAt SetValueAt TotalCount TypeVersionGet
Validate buildRuntimePathFromIndex checkDocType chooseDocType
commitSegmentByIndex commitSegmentByPath convertRuntimePathToSchemaPath getId
getSegmentIdByIndex getSegmentIdByPath getSegsAsString getTestNewArg
getValsArray


Parameters


• parameter DEFSEARCHCLASS = "EnsLib.EDI.ASTM.SearchTable";
Name of the default SearchTable indexing class used in UI choices and MessageBank submissions
• parameter DOCCLASSFULLNAME = "ASC ASTM EDI Document";
Full descriptive name for this subclass of document
• parameter DOCCLASSNAME = "ASTM Document";
Compact descriptive name for this subclass of document
• parameter DOCSHORTNAME = "ASTM";
• parameter DOMAIN = "Ensemble";
Use our own domain for localization
• parameter EXTENTSIZE = 2000000;
The EXTENTSIZE parameter is used to inform the Caché SQL Query Optimizer of the approximate number of instances in the extent containing instances of this class.

For example, a class that expects to have about 1,000,000 instances should define:

parameter EXTENTSIZE = 1000000;
• parameter SCHEMACLASS = "EnsLib.EDI.ASTM.Schema:DS";
Name of the associated schema class and, after a colon, the schema class code that represents a DocType

Properties


• property %maps  [ MultiDimensional,Transient ];
A local array of orefs "orefs" - a local map of integer ids to segment objects And either a subscript into ^CacheTemp for this object's LVD maps (for notes on LVD implementation see EnsEDI.inc) or local storage for these additional maps: "runtimeIndex" - array for runtime index to segment; will always be defined unless mapRuntimePath is defined "runtimePath" - array for runtime path to segment "bidirectionalLink" - array for runtime path and index linkage
• property ComponentSeparator as %String [ Calculated,Transient ];
Sub-element component separator character
• property DocTypeCategory as %String [ Transient,ReadOnly ];
the category portion of the DocType
• property DocTypeName as %String [ Transient,ReadOnly ];
Stored raw document type name ; the secondary type name portion of the DocType
• property Envelope as %String(MAXLEN="");
'Envelope' information for the ASTM document message. Used in propagating info about the return Service address for reply documents
• property EscapeSeparator as %String [ Calculated,Transient ];
Escape separator character
• property FieldSeparator as %String [ Calculated,Transient ];
Data-field separator character
• property FullSize as %Integer [ Calculated,Transient,ReadOnly ];
Size in bytes of the message content (assuming 1-byte segment terminators, including segments >32k)
• property Identifier as %String [ Calculated,Transient,ReadOnly ];
Unique document identification string found in document content
• property Name as %String [ Calculated,Transient,ReadOnly ];
Raw type name of document
• property RawContent as %String(MAXLEN=10000) [ Calculated,Transient,ReadOnly ];
The raw text content of the document. Note that this is a truncated version suitable for use in SQL results and visual inspection, but not a complete or definitive representation of the document.
• property RepetitionSeparator as %String [ Calculated,Transient ];
Repetition separator character
• property SegCount as %Integer [ Calculated,Transient,ReadOnly ];
Count of segments composing this document
• property Separators as %String(MAXLEN=4,MINLEN=4) [ Transient ];
All 4 Separators as a String,FLDSEP_REPSEP_COMSEP_ESCSEP
• property TypeVersion as %String [ Calculated,Transient,ReadOnly ];
Raw type version name of message found at H:13 in message content

Methods


• method BuildMap(pKeepParsingAfterError As %Boolean = 1) as %Status
pKeepParsingAfterError means keep trying to parse after errors are encountered; returned Status will contain all errors encountered
• method Clear() as %Status
Delete All Content and reset all properties
• method ComponentSeparatorGet() as %String
This is a Get accessor method for the ComponentSeparator property.
• method CopyValues(pSource As EnsLib.EDI.ASTM.Document, 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, pBuildMap As %Boolean = 1) as %Status
This is a Set accessor method for the DocType property.
• method DumpMaps() as %Status
• 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) 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) 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) as %Status
• method EscapeSeparatorGet() as %String
This is a Get accessor method for the EscapeSeparator property.
• method FieldSeparatorGet() as %String
This is a Get accessor method for the FieldSeparator property.
• method FindSegment(pSegName As %String, ByRef pIndex As %String = "", Output pStatus As %Status) as EnsLib.EDI.ASTM.Segment
Gets the next segment after index pIndex with name pSegName. Supports pSegName = '*' to match any segment.
• method FullSizeGet() as %Integer
This is a Get accessor method for the FullSize property.
• classmethod GetAlias(pContentArrayName As %String, pArrayPos As %String) as %String
This method computes the Alias string for a property name, given the property's node in the Content Array.
• classmethod GetContentArray(Output pContents, pMode As %String, pDocType As %String, pLevel As %Integer, pIncludeBase As %Boolean) 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.
• classmethod GetFullSize(pMsgId) as %Integer
• classmethod GetManagerLinks(Output pColumns) as %Boolean
Returns an array of links to manager pages for this type of VDoc; item 0 is the family description
• method GetNextGroupPath(pGroup As %String, pPath As %String, ByRef pStatus As %Status = $$$OK) as %String
Gets the next path in a group
• method GetNextIndex(pPath As %String, pIndex As %String, ByRef pStatus As %Status = $$$OK) as %String
Gets the next index in an array
• method GetSegmentIndex(pPath As %String, Output pStatus As %Status) as %Integer
Given a segment path, find the corresponding segment index
• method GetSegmentPath(pIndex As %Integer, Output pStatus As %Status) as %String
Given a segment index, find the corresponding segment path
• method GetValueAt(pSegmentPropertyPath As %String, pSeparators As %String, Output pStatus As %Status) as %String
Return the value of the designated virtual property.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
pFormat contains additional context that may be used to influence the form of the result value
If no value can be found matching pPropertyPath in the current document an empty string is returned and output argument pStatus returns status information explaining the failure
This is implemented by the document subclass.
• method IdentifierGet() as %String
This is a Get accessor method for the Identifier property.
• classmethod ImportFromDevice(Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String) as EnsLib.EDI.ASTM.Document
• classmethod ImportFromFile(pFilename As %String, pDocNum As %Integer = 1, Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String) as EnsLib.EDI.ASTM.Document
• classmethod ImportFromIOStream(pIOStream As %IO.I.CharacterStream, Output pStatus As %Status = $$$OK, ByRef pConfigItem As %String = "", pIOFormatClassname As %String = "") as EnsLib.EDI.ASTM.Document
• classmethod ImportFromLibraryStream(pLibStream As %Stream.Object, Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String) as EnsLib.EDI.ASTM.Document
• classmethod ImportFromString(pString As %String, Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String) as EnsLib.EDI.ASTM.Document
• classmethod KillGlobals(Output pDeletedCount, pKeepExtentCount=0, pDisplayLog=1)
• method NameGet() as %String
This is a Get accessor method for the Name property.
• method NewReplyDocument(pDocType As %String = "", pLocalApplicationID As %String, Output pSC As %Status) as EnsLib.EDI.ASTM.Document
• method OutputHTML() as %Status
Display Segments as HTML, using DocType info if available
• method OutputHTMLZen() as %Status
Display Segments as HTML, using DocType info if available
• method OutputToDevice(pSeparators As %String, pDoFraming As %Integer, pResponseTimeout As %Numeric = -1, pIOFormatClassname As %String) as %Status
• method OutputToFile(pFilename As %String, pOverwrite As %Boolean, pSeparators As %String, pDoFraming As %Integer, pResponseTimeout As %Numeric = -1, pIOFormatClassname As %String) as %Status
• method OutputToIOStream(pIOStream As %IO.I.CharacterStream, pSeparators As %String, ByRef pDoFraming As %Integer = 0, pResponseTimeout As %Numeric = -1, pIOFormatClassname As %String = "") as %Status
• method OutputToLibraryStream(pLibStream As %Stream.Object, pSeparators As %String, pDoFraming As %Integer, pResponseTimeout As %Numeric = -1, pIOFormatClassname As %String) as %Status
• method OutputToString(pSeparators As %String, pDoFraming As %Integer, pResponseTimeout As %Numeric = -1, Output pStatus As %Status, pIOFormatClassname As %String) as %String
• method PokeDocType(pDocType As %String) as %Status
• classmethod Purge(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pDummy As %Boolean = 0) as %Status
• method RawContentGet() as %String
This is a Get accessor method for the RawContent property.
• method RepetitionSeparatorGet() as %String
This is a Get accessor method for the RepetitionSeparator property.
• method SegCountGet() as %Integer
This is a Get accessor method for the SegCount property.
• method SetValueAt(pValue As %String, pSegmentPropertyPath As %String, pAction As %String = "set", pKey As %String = "") as %Status
Set the value of the designated virtual property.
pValue contains the value to set.
pPropertyPath contains a text expression representing the address within the document of the value of interest.
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.
pAction contains an action code: "set", "clear", "append", etc.
• classmethod TotalCount() as %Integer
• method TypeVersionGet() as %String
Subclasses should override this if the version can be gotten from the document content
• method buildRuntimePathFromIndex(pId As %String, pPath As %String, pContentArray As %String, pType As %String, ByRef pCurrSeg As %Integer, pParentGrpOpt As %Boolean, pSC As %Status, pKeepParsingAfterError As %Boolean) as %Status
Build a segment map for the current segment index array based on the document schema
If pKeepParsingAfterError is false then stop parsing when first error is encountered
• classmethod checkDocType(ByRef pDocType As %String) as %Status
• method commitSegmentByIndex(pIndex As %Integer) as %Status
collapse segment object into just ID; Save if necessary
• method commitSegmentByPath(pPath As %String) as %Status
collapse segment object into just Id; Save if necessary
• method convertRuntimePathToSchemaPath(pPath As %String) as %String
• method getId() as %String
The same as %Id(), but allocates the Id even if the object hasn't been saved already
• method getSegmentIdByIndex(pIndex As %Integer, Output pStatus As %Status) as %String
• method getSegmentIdByPath(pPath As %String, Output pStatus As %Status) as %String
• classmethod getSegsAsString(pId As %String, pMaxLen As %Integer = 10000, pStartOffset As %Integer = 1) as %String
This method is for use from the RawContent property's SQL Compute invocation

Queries


• query EnumerateDocTypes(Category As %String = "", IncludeBase As %Boolean = 1)
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 EnumerateSegTypes(Category As %String = "", Level As %String = "")
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 this 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
• 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 partial category name - return only categories starting with the given category name part
other - return nothing

Indices


•index (Extent on ) [Extent,Type = bitmap];
•index (OriginalDocId on OriginalDocId);

Triggers


•trigger OnDelete (BEFORE event DELETE)