Application Server Plugins
Plugins are extensions to the basic functionality od LIDS. Definition XML files for plugins/extensions are copied into this metadata directory: {project_folder}\lids-as\model\extensions. The plugins listeners are registered inconfig.xml(see chapter 31.1).
These are available plugins in the version 7.4.1:
| browser.xml |
| bulk-update.xml |
| cross-section.xml |
| cross-section-schema-com.xml |
| cross-section-schema-ele.xml |
| custom-browse.xml |
| database-hints.xml |
| db-procedures.xml |
| discrepancy.xml |
| ext-data-checks.xml |
| ext-dimension.xml |
| free-form.xml |
| generate-detail.xml |
| lrs.xml |
| map-service.xml |
| mobile.xml |
| multi-crs.xml |
| neplan.xml |
| parallel-da.xml |
| profile.xml |
| pw-connector.xml |
| relation-constraint.xml |
| spatial-deriving.xml |
| telco.xml |
Register Plugin on LIDS AS
-
Copy your .xml file (for examplerelation-constraints.xml) to model/extensions directory.
-
Register constraint listener in config.xml.
The class com.berit.lids.plugin.relconstraint.ConstraintListener acts as feature and association listener, hence you must register it in both listener sections of config file.
Example: Config.xml with registration of constraint listener.
<featureListeners>
...
<listenerClass>com.berit.lids.plugin.relconstraint.ConstraintListener</listenerClass>
</featureListeners>
<associationListeners>
...
<listenerClass>com.berit.lids.plugin.relconstraint.ConstraintListener</listenerClass>
</associationListeners>
custom-browse.xml
Extension is used for setting of graphical environment of LIDS Explorer. It can consist of unlimited number of definitions of conditional formatting. Each of the definitions is tied with one definition of form (simpleForm or freeForm). Reference to the form (formId) is stated inside browseCustomization. This part of xml can also contain 3 optional sections:
-
grouping (groupDefinition) – list of attributes in the given order.
-
sorting (sortDefinition) – list of attributes in the given order with parameter ascending/descending.
-
conditional formatting (conditionalFormat).
An attribute, which is formatted, as well as the definition of format itself have to be stated inside columnCustomization. User can combine more types of formatting and can choose from following:
- colorScale – selection of format from predefined options (see list below) is required, parameters minValue and maxValueare optional.
List of predefined formats:
| RedYellowGreenColorScale |
| GreenWhiteRedColorScale |
| RedWhiteGreenColorScale |
| BlueWhiteRedColorScale |
| RedWhiteBlueColorScale |
| WhiteRedColorScale |
| RedWhiteColorScale |
| GreenWhiteColorScale |
| WhiteGreenColorScale |
| GreenYellowColorScale |
| YellowGreenColorScale |
- iconSet – selection of format from predefined options (see list below) is required, parameters minValue and maxValueare optional.
List of predefined formats:
| Arrows3ColoredIconSet |
| Arrows3GrayIconSet |
| Triangles3IconSet |
| Arrows4GrayIconSet |
| Arrows4ColoredIconSet |
| Arrows5GrayIconSet |
| Arrows5ColoredIconSet |
| TrafficLights3UnrimmedIconSet |
| TrafficLights3RimmedIconSet |
| Signs3IconSet |
| TrafficLights4IconSet |
| RedToBlackIconSet |
| Symbols3CircledIconSet |
| Symbols3UncircledIconSet |
| Flags3IconSet |
| Stars3IconSet |
| Ratings4IconSet |
| QuartersIconSet |
| Ratings5IconSet |
| Boxes5IconSet |
| PositiveNegativeArrowsColoredIconSet |
| PositiveNegativeArrowsGrayIconSet |
| PositiveNegativeTrianglesIconSet |
- dataBar – selection of format from predefined options (see list below) is required, parameters minValue and maxValueare optional.
List of predefined formats:
| BlueGradientDataBar |
| GreenGradientDataBar |
| RedGradientDataBar |
| OrangeGradientDataBar |
| LightBlueGradientDataBar |
| PurpleGradientDataBar |
| BlueSolidDataBar |
| GreenSolidDataBar |
| RedSolidDataBar |
| OrangeSolidDataBar |
| LightBlueSolidDataBar |
| PurpleSolidDataBar |
-
topBottomRule – selection of format from predefined options (see list below) and parameter ruleType are required, parameter treshold is optional.
-
conditionRule – selection of format from predefined options (see list below) and parameters value1 and ruleType are required, parameter value2 is optional.
List of predefined formats for topBottomRuleand conditionRule:
| LightRedFillWithDarkRedText |
| YellowFillWithDarkYellowText |
| GreenFillWithDarkGreenText |
| LightRedFill |
| LightGreenFill |
| RedText |
| GreenText |
| BoldText |
| ItalicText |
| StrikethroughText |
Example: Structure of custom-browse.xml.
<ber:browseCustomizationArray>
<ber:browseCustomization formId="ff_mp1" version="1">
<ber:groupDefinition>
<ber:column field="at_5012120"/>
<ber:column field="at_5012115"/>
</ber:groupDefinition>
<ber:sortDefinition>
<ber:sort direction="ascending">
<ber:column field="at_5012115"/>
</ber:sort>
...
</ber:sortDefinition>
<ber:columnCustomization>
<ber:column field="at_5012102">
<ber:conditionalFormat>
<ber:colorScale>
<ber:format predefinedName="WhiteGreenColorScale"/>
</ber:colorScale>
<ber:dataBar minValue="0" maxValue="50000">
<ber:format predefinedName="OrangeGradientDataBar"/>
</ber:dataBar>
</ber:conditionalFormat>
</ber:column>
<ber:column field="at_5012103">
<ber:conditionalFormat>
<ber:conditionRule ruleType="Less" value1="2010-01-01">
<ber:format predefinedName="LightRedFillWithDarkRedText"/>
</ber:conditionRule>
</ber:conditionalFormat>
</ber:column>
<ber:column field="at_5012002">
<ber:conditionalFormat>
<ber:topBottomRule ruleType="TopPercent" treshold="30">
<ber:format predefinedName="GreenText"/>
</ber:topBottomRule>
...
<ber:iconSet>
<ber:format predefinedName="Arrows5GrayIconSet"/>
</ber:iconSet>
</ber:conditionalFormat>
</ber:column>
<ber:column field="at_5012116" visible="false"/>
</ber:columnCustomization>
</ber:browseCustomization>
<ber:browseCustomization formId="fmd_50110" version="1">
...
<ber:columnCustomization>
<ber:column field="createDate" visible="true">
<ber:conditionalFormat>
<ber:colorScale>
<ber:format predefinedName="RedYellowGreenColorScale"/>
</ber:colorScale>
</ber:conditionalFormat>
</ber:column>
<ber:column field="at_5011001" visible="true">
...
</ber:column>
</ber:columnCustomization>
</ber:browseCustomization>
</ber:browseCustomizationArray>
db-procedures.xml
Extension allows user to run existing database procedures from LIDS Edit / Explorer client applications. Using simple GUI, it is possible to select data for processing and select particular function. Extension serves mainly for operations specific for the given project and operations which can’t be performed with LIDS client functions.
⚠️ Warning: The extension is activated in LIDS client using a specific project tool (module id="ProjectProcedures", function id="openDialog"). Data selection or Template must be selected for launching the extension. The data selection / template doesn’t need to be saved in the store. It’s always saved into the preconfigured folder under generated name when executing the extension. The output is simple text response displayed in the client’s GUI.
⚠️ Warning: Editing must be enabled.
-
procedureArray – contains one or more procedures identified by id.
-
select – selection of a function from a given package.
Example: Structure of db-procedures.xml.
<?xml version="1.0" encoding="UTF-8"?>
<ber:dbProcedures xmlns:ber="http://www.berit.com/ber">
<ber:version>
<ber:metadata>1</ber:metadata>
<ber:minClient>8888</ber:minClient>
<ber:minAS>11503</ber:minAS>
</ber:version>
<ber:folderId>id_123456</ber:folderId>
<ber:procedureArray>
<ber:procedure id="pr_01" name="Name">
<ber:description>Description</ber:description>
<ber:select>"SELECT package_name.function1_name ({0}) FROM DUAL"</ber:select>
</ber:procedure>
<ber:procedure id="pr_02" name="Name">
<ber:description>Description</ber:description>
<ber:select>"SELECT package_name.function2_name ({0}) FROM DUAL"</ber:select>
</ber:procedure>
</ber:procedureArray>
</ber:dbProcedures>
relation-constraints.xml
This extension shouldn’t be used anymore. It’s replaced by the relation rules definition in standard model.xml.
Plugin is used for defining constraints for relations associations which are defined in model.xml. Three constraint types are supported:
-
Unique constraint – defines a child feature attribute for related features whose value must be unique.
-
Max cardinality constraint – defines a master feature attribute containing max cardinality value (max features that can be related).
-
Semantic condition constraint – defines a semantic condition for features either from source or destination, only if the condition is met features can be related.
-
The following elements are used in xml file, they are highlighted in example:
-
constraintArray – represents a constraint collection; it contains one or more constraints.
-
uniqueConstraint – element contains relation association reference, child role type reference and XPath expression specifying feature attribute with unique values.
-
relationAssoc– contains xlink reference to the relation association defined in the model.xml file.
-
roleType – contains xlink reference to the relation role defined in the model.xml file.
-
attribute – element refers feature attribute via xpath expression, e.g. attributeId or attributeId/codelistColumnId.
-
-
maxCardinalityConstraint– contains a relation association reference, master role type reference and a XPath expression. The XPath expression specifies feature attribute containing max cardinality value (features that can be related).
-
semanticConditionConstraint– element contains a relation association reference, role type reference and either comparison or logic operation. This operation specifies a semantic condition for features either from source or destination role. A feature is related only when this condition is fulfilled.
Example: Structure of relation-constraints.xml.
<?xml version="1.0" encoding="utf-8"?>
<relationConstraint xmlns="http://www.berit.com/ber"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink">
...
<constraintArray>
<uniqueConstraint name="Unique pumping station identification">
<description>Only pumping stations with unique identification can be related with master</description>
<relationAssoc xlink:href="model.xml#r_5040000_5010100"/>
<roleType xlink:href="model.xml#rt_5010100_d"/>
<attribute xpath="at_5010007"/>
</uniqueConstraint>
<maxCardinalityConstraint name="Number of PSs <= segment count">
<description>Number of related Pumping stations cannot be greater than master segment count</description>
<relationAssoc xlink:href="model.xml#r_5040000_5010100"/>
<roleType xlink:href="model.xml#rt_5040000_s"/>
<attribute xpath="at_5040002"/>
</maxCardinalityConstraint>
<semanticConditionConstraint name="Water variety of Pumping station must not be 'Unknown'">
<description>Water variety of Pumping station must not be 'Unknown'</description>
<relationAssoc xlink:href="model.xml#r_5040000_5010100"/>
<roleType xlink:href="model.xml#rt_5010100_d"/>
<ogc:PropertyIsNotEqualTo> <!-- choice of comparison or logic operator -->
<ogc:PropertyName>at_5010008/ca_10902</ogc:PropertyName>
<ogc:Literal>Unknown</ogc:Literal>
</ogc:PropertyIsNotEqualTo>
</semanticConditionConstraint>
<semanticConditionConstraint name="Water variety of Water mains must not be 'Unknown'">
<relationAssoc xlink:href="model.xml#r_5040000_5010100"/>
<roleType xlink:href="model.xml#rt_5040000_s"/>
<ogc:PropertyIsNotEqualTo>
<ogc:PropertyName>at_5040008</ogc:PropertyName>
<ogc:Literal>-1</ogc:Literal>
</ogc:PropertyIsNotEqualTo>
</semanticConditionConstraint>
</constraintArray>
</relationConstraint>
spatial-deriving.xml
Plugin enables deriving of attributes based on spatial m:n relation. One spatial condition – the longest intersection – is implemented so far.
-
derivedAttributeArray – represents a collection of attributes to derive.
-
derivedAttribute – reference to an attribute from model.xml.
-
spatialRelationQuery – represents spatial relation query definition.
-
attribute – specifies the source attribute, i.e. surface feature attribute with surface name.
-
spatialRelationAssoc – i.e. faceToLine spatial relation – all features (generally by different feature types) associated by this relation are considered.
-
spatialInteractionOp – specifies a spatial interaction operation; possible values are maxIntersectionLength and minIntersectionLength.
Example: Structure of spatial-deriving.xml.
<?xml version="1.0" encoding="utf-8"?>
<spatialDeriving xmlns="http://www.berit.com/ber"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- LIDSdemo project example for spatial deriving plugin -->
<version>
<metadata>1</metadata>
<minClient>8888</minClient>
<minAS>11801</minAS>
</version>
<derivedAttributeArray>
<!-- Derived attribute: ft = Main pipeline segment, attr = Service OU - intersection -->
<derivedAttribute xlink:href="model.xml#at_5012120">
<spatialRelationQuery>
<!-- Source attribute: service organization unit name -->
<attribute xpath="at_5060002/ca_00903"/>
<!-- faceToLine spatial relation - all features (generally by different feature types) associated by this relation are considered -->
<spatialRelationAssoc xlink:href="model.xml#sr_ou_mps"/>
<!-- Spatial interaction operation - possible values are maxIntersectionLength and minIntersectionLength -->
<spatialInteractionOp>maxIntersectionLength</spatialInteractionOp>
</spatialRelationQuery>
...
</derivedAttributeArray>
</spatialDeriving>
💡 Tip: For such an attribute, there should be forbidden an update operation:
<ber:attribute id="at_5012120" name="Service OU - intersection" dbName="OU_INTERSECT">
<ber:dataType>
<ber:string maxLength="100"/>
</ber:dataType>
<ber:forbiddenOperations>
<ber:update/>
</ber:forbiddenOperations>
</ber:attribute>