Interface SclEditor

All Known Implementing Classes:
SclService

public interface SclEditor
Service class that will be used to create, update or delete elements in SCL XML Files.

The following features are supported:

See Also:
  • Method Details

    • initScl

      SCL initScl(UUID hId, String hVersion, String hRevision) throws ScdException
      Initialise SCD file with Header and Private SCLFileType
      Parameters:
      hId - SCL Header ID
      hVersion - SCL Header Version
      hRevision - SCL Header Revision
      Returns:
      SCL SCD object
      Throws:
      ScdException - throws when inconsistance in SCL file
    • addHistoryItem

      void addHistoryItem(SCL scd, String who, String what, String why)
      Adds new HistoryItem in SCL file
      Parameters:
      scd - SCL file in which new History should be added
      who - Who realize the action
      what - What kind of action is realized
      why - Why this action is done
    • updateHeader

      void updateHeader(@NonNull @NonNull SCL scd, @NonNull @NonNull HeaderDTO headerDTO)
      Updates Header of SCL file
      Parameters:
      scd - SCL file in which Header should be updated
      headerDTO - Header new values
    • addIED

      void addIED(SCL scd, String iedName, SCL icd) throws ScdException
      Adds IED in SCL file (Related DataTypeTemplate of SCL is updated also)
      Parameters:
      scd - SCL file in which IED should be added
      iedName - name of IED to add in SCL
      icd - ICD containing IED to add and related DataTypeTemplate
      Throws:
      ScdException - throws when inconsistency between IED to add and SCL file content
    • addSubnetworks

      void addSubnetworks(SCL scd, List<SubNetworkDTO> subNetworks, SCL icd) throws ScdException
      Adds new SubNetworks in SCL file from ICD file
      Parameters:
      scd - SCL file in which SubNetworks should be added
      subNetworks - List of SubNetworks DTO contenting SubNetwork and ConnectedAp parameter names
      icd - ICD file from which SubNetworks functional data are copied from
      Throws:
      ScdException - throws when no Communication in SCL and createIfNotExists == false
    • updateDAI

      void updateDAI(SCL scd, String iedName, String ldInst, DataAttributeRef dataAttributeRef) throws ScdException
      Updates DAI based on given data in dataAttributeRef
      Parameters:
      scd - SCL file in which DataTypeTemplate of DAI should be found
      iedName - name of IED in which DAI is localized
      ldInst - ldInst of LDevice in which DAI is localized
      dataAttributeRef - reference summarized DataTypeTemplate related to DAI to update
      Throws:
      ScdException - when inconsistency are found in th SCL's DataTypeTemplate. Which should normally not happens.
    • importSTDElementsInSCD

      void importSTDElementsInSCD(SCL scd, List<SCL> stds, List<SubNetworkTypeDTO> subNetworkTypes) throws ScdException
      Imports IEDs, DataTypeTemplates and Communication nodes of STD files into SCL (SCD) file STD : System Template Definition To import STD into SCD, this step are realized
      • Check SCD and STD compatibilities by checking if there is at least one ICD_SYSTEM_VERSION_UUID in LNode/Private CompasICDHeader of SCL/Substation/.. not present in IED/Private CompasICDHeader of STD
      • List all LNode/Private COMPAS-ICDHeader of SCL/Substation/.. and remove duplicated one with same iedName in order to ovoid repetition in actions
      • For each Private.ICDSystemVersionUUID and Private.iedName in Substation/ of SCL find corresponding STD File
      • import /IED /DataTypeTemplate from that STD file and update IEDName of /IED in SCD file
      • import connectedAP and rename ConnectedAP/@iedName in Communication node in SCD file
      Parameters:
      scd - SCL object in which content of STD files are imported
      stds - list of STD files contenting datas to import into SCD
      subNetworkTypes - couple of Subnetwork name and possible corresponding ConnectedAP names
      Throws:
      ScdException - throws when inconsistency between Substation of SCL content and gien STD files as :
      • ICD_SYSTEM_VERSION_UUID in IED/Private of STD is not present in COMPAS-ICDHeader in Substation/../LNode of SCL
      • There are several STD files corresponding to ICD_SYSTEM_VERSION_UUID of COMPAS-ICDHeader in Substation/../LNode of SCL
      • There is no STD file found corresponding to COMPAS-ICDHeader in Substation/../LNode of SCL
      • COMPAS-ICDHeader is not the same in Substation/../LNode of SCL and in IED/Private of STD
      • COMPAS_ICDHEADER in Substation/../LNode of SCL not found in IED/Private of STD
    • updateLDeviceStatus

      List<SclReportItem> updateLDeviceStatus(SCL scd)
      Activate used LDevice and Deactivate unused LDevice in TLNode
      Parameters:
      scd - SCL file for which LDevice should be activated or deactivated
      Returns:
      list of encountered errors
    • updateDoInRef

      List<SclReportItem> updateDoInRef(SCL scd)
      Update DAIs of DO InRef in all LN0 of the SCD using matching ExtRef information.
      Parameters:
      scd - SCL file for which DOs InRef should be updated with matching ExtRef information
      Returns:
      list of encountered errors
    • manageMonitoringLns

      List<SclReportItem> manageMonitoringLns(SCL scd)
      Update and/or create Monitoring LNs (LSVS and LGOS) for bound GOOSE and SMV Control Blocks
      Parameters:
      scd - SCL file for which LNs (LSVS and LGOS) should be updated and/or created in each LDevice LDSUIED with matching ExtRef information
      Returns:
      list of encountered errors