class EnsLib.EDI.SEF.Importer
extends %RegisteredObject
This parses, validates and imports data from a SEF file into InterSystems IRIS
property DocKey
as %Integer;
This holds the document key
property DocKeyOnly
as %Boolean;
Quit after discovering the DocKey
property Error
as %Status [ InitialExpression = $$$OK ];
This holds error messages
property Line
as %String;
This holds the current line
property LineNumber
as %Integer [ InitialExpression = 0 ];
This holds the current line number
property NextState
as %String;
This holds the next state of the machine
property PrevState
as %String;
This holds the previous state of the machine
property PrivateSection
as %Integer [ InitialExpression = 0 ];
This holds the PRIVATE section flag
property Sections
as %String [ MultiDimensional ];
This holds the allowed sections in this file
property Status
as %Integer [ InitialExpression = $$$StateRunning ];
This holds the status of the machine
property Stream
as %FileCharacterStream;
This holds the File Stream
property Trace
as %Boolean [ InitialExpression = 0 ];
This holds the Trace flag. Set to 1 to output trace to console
property Version
as %String [ InitialExpression = "1.0" ];
This holds the version
method %OnNew(initvalue As %RawString)
as %Status
This callback method is invoked by the %New method to
provide notification that a new instance of an object is being created.
If this method returns an error then the object will not be created.
It is passed the arguments provided in the %New call.
When customizing this method, override the arguments with whatever variables and types you expect to receive from %New().
For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:
Method %OnNew(dob as %Date = "", name as %Name = "") as %Status
If instead of returning a %Status code this returns an oref and this oref is a subclass of the current
class then this oref will be the one returned to the caller of %New method.
method CODES(pPrevState As %String)
This handes the CODES section
method CODESLINE()
as %Status
This is the processor for a single CODES line
method COMS(pPrevState As %String)
This method handles the COMS section
method COMSLINE()
as %Status
This is the processor for a single COMS line
method Dispatch()
as %String
Read a line and dispatch to the section
method ELMS(pPrevState As %String)
This handes the ELMS section
method ELMSLINE()
as %Status
This is the processor for a single ELMS line
method EOF(pPrevState As %String)
This handles the EOF state
method Error(pPrevState As %String)
This handles the Error state
method INI(pPrevState As %String)
This handles the INI section
method Import(pFileName As %String, Output pDocKey As %String, pDocKeyOnly As %Boolean = 0)
as %Status
Import the named file
method NextStateSet(pState As %String)
as %Status
This is a Set accessor method for the NextState property.
method OBJVARS(pPrevState As %String)
This method handles the OBJVARS section
method OBJVARSLINE()
as %Status
This is the processor for a single OBJVARS line
method OVERHEAD(pPrevState As %String)
This method handes the OVERHEAD section
method OVERHEADLINE()
as %Status
This is the processor for a single OBJVARS line
method PRIVATE(pPrevState As %String)
This method handles the PRIVATE section
method PRIVATELINE()
as %Status
This is the processor for a single PRIVATE line
method PUBLIC(pPrevState As %String)
This method handles a PUBLIC declaration if no PRIVATE is present in the file
method ProcessSectionBody(pLineHandler As %String)
as %String
This method processes a section by reading lines, validating them
and returning the next state to invoke
method ReadLine(ByRef pStatus As %Status)
as %Boolean
This Reads the next line from the file
method SEGS(pPrevState As %String)
This method handles the SEGS section
method SEGSLINE()
as %Status
This is the processor for a single SEGS line
method SEMREFS(pPrevState As %String)
This method handes the SEMREFS section
method SEMREFSLINE()
as %Status
This is the processor for a single SEMREFS line
method SETS(pPrevState As %String)
This method handles the SETS section
method SETSLINE()
as %Status
This is the processor for a single SETS line
method STD(pPrevState As %String)
This method handes the STD section
method Section(ByRef pSection As %String)
as %Status
method Start(pPrevState As %String)
method Stop(pPrevState As %String)
This handles the Stop state
method TEXTCOMS(pPrevState As %String)
This method handes the TEXTCOMS section
method TEXTCOMSLINE()
as %Status
This is the processor for a single TEXTCOMS line
method TEXTELMS(pPrevState As %String)
This method handes the TEXTELMS section
method TEXTELMSLINE()
as %Status
This is the processor for a single TEXTELMS line
method TEXTSEGS(pPrevState As %String)
This method handes the TEXTSEGS section
method TEXTSEGSLINE()
as %Status
This is the processor for a single TEXTSEGS line
method TEXTSETS(pPrevState As %String)
This method handes the TEXTSETS section
method TEXTSETSLINE()
as %Status
This is the processor for a single TEXTSETS line
method Unescape(ByRef pLine As %String, Output pOffset As %Integer)
as %Boolean
method VALLISTS(pPrevState As %String)
This method handes the VALLISTS section
method VALREFS(pPrevState As %String)
This method handes the VALREFS section
method VALREFSLINE()
as %Status
This is the processor for a single VALREFS line
method VER(pPrevState As %String)
This method handles the VER state