Regular expression to parse an attribute.
Regular expression to parse an attribute. For example: <cim:ACLineSegmentPhase.phase rdf:resource="http://iec.ch/TC57/2013/CIM-schema-cim16#SinglePhaseKind.A"/>
The class name.
The attribute name (without namespace prefix).
The compiled regex pattern and the index of the match group.
Regular expression to parse an element.
Regular expression to parse an element. For example: <cim:ACLineSegment.r>0.224</cim:ACLineSegment.r>
The class name.
The element name (without namespace prefix).
The compiled regex pattern and the index of the match group.
Abstract parse function.
Abstract parse function. To be overridden in each implemented class. This is intended to be used by the companion object of each CIM class to provide a way to parse the XML element and generate the CIM class. The hierarchical nature of the generated elements necessitates CIM classes to call their CIM superclass parser, for example, since Terminal is a subclass of ACDCTerminal, it should invoke the superclass parse method.
def parse (context: Context): Terminal =
{
Terminal
(
ACDCTerminal.parse (context),
...
)
}
The context for the substring in the XML and line number and position context for reporting in case of an error.
The parsed CIM element, e.g. ACLineSegment.
Create a function to parse one attribute from an XML string.
Create a function to parse one attribute from an XML string.
A Tuple2 of the regular expression pattern to look for and the index of the capture group to extract from within the pattern.
A function for parsing the attribute.
Create a function to parse one or more attributes from an XML string.
Create a function to parse one or more attributes from an XML string.
A Tuple2 of the regular expression pattern to look for and the index of the capture group to extract from within the pattern.
A function for parsing the attributes.
Create a function to parse one XML element from a string.
Create a function to parse one XML element from a string.
A Tuple2 of the regular expression pattern to look for and the index of the capture group to extract from within the pattern.
A function for parsing the element.
Parse one or more XML elements from a string.
Parse one or more XML elements from a string.
A Tuple2 of the regular expression pattern to look for and the index of the capture group to extract from within the pattern.
A function for parsing the elements.
Convert a string into a boolean.
Convert a string into a boolean.
The string to convert. Should be either "true" or "false". <null> and the empty string are considered false.
The context for reporting in case of an unparseable boolean.
The boolean value.
Convert a string into a floating point value.
Convert a string into a floating point value.
The string to convert. Should be a valid floating point formatted number although whitespace at the beginning or end is tolerated.
The context for reporting in case of an unparseable double.
The double value.
Convert a string into an integer.
Convert a string into an integer.
The string to convert. Should be just digits although whitespace at the beginning or end is tolerated.
The context for reporting in case of an unparseable integer.
The integer value.