You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root element adapter (entry point) is special as it does not have any parent adapter, hence, its method `amChildElementRef(T)`
@@ -82,23 +96,101 @@ should always return `true`:
82
96
[...]
83
97
}
84
98
85
-
86
-
87
99
## SCT DATA
88
100
Data models and connectivity to database are defined here. Data access layer is an abstract layer that defined connectivity
89
101
interfaces. This layer manages a database with single table (SQL-Like database) or single collection (NoSQL-Like database).
90
-
The concrete data access layers are implemented in specific packages
102
+
The concrete data access layers are implemented in specific packages. A data model can implement the following interface
103
+
104
+
```
105
+
public interface IScd <ID> {
106
+
ID getId();
107
+
byte[] getRawXml();
108
+
ID getHeaderId();
109
+
String getHeaderRevision();
110
+
String getHeaderVersion();
111
+
String filename();
112
+
}
113
+
```
91
114
92
115
*### SQL-Like Database
93
116
An implementation of the sct-data connectivity interface with custom data models. This allows the application to work with sql-like database.
94
117
The libraries ares use for SQL-Like databases, those that support XML type (PostgreSql, Oracle, etc)
95
118
96
119
*### NoSQL-Like Database
97
120
Like SQL-like part, this package contains the sct-data connector interfaces implementation for NoSQL-Like databases (BaseX, existDB, etc )
98
-
that support XML processing
121
+
that support XML processing.
122
+
123
+
This can also be a local repository connector (file system). For example, with meta-data headerID, headerVersion, headerRevision and filename
124
+
one can implement the connector to have the below output (with the constraint of having a single file in /pathTo/headerId/headerVersion/headerRevision):
125
+
126
+
```
127
+
myRepo
128
+
├───<headerID>
129
+
│ ├───<headerVersion1>
130
+
│ │ └───<headerRevision1>
131
+
│ │ | ├───<fileName1.scd>
132
+
│ │ └───<headerRevision2>
133
+
│ │ ├───<fileName2.scd>
134
+
```
99
135
100
-
## SCT SERVICE
101
-
This module implements all needed specification as functions (methods in Java). As shown in package diagram,
102
-
it interacts with sct-data (database access) and sct-commons (delegate SCL manipulation).
103
136
## SCT APPLICATION
104
-
**TODO**
137
+
**TODO**
138
+
> In progress
139
+
140
+
### Tips for memory consumption's optimization
141
+
For large SCL file, it is not a good idea to load the whole file in memory. JAXB is capable of processing XML file by chunks.
142
+
The need to load the whole SCL file relies on the fact that XML validation processes needs the entire file content.
143
+
To go through that process we must take advantage of the XSD constraints and build minimal SCL file from the large one.
144
+
The most "important" tags in the SCL file are: Header, Substation, Communication, IED and DataTypeTemplate. By looking closely in the XSD file, one can realize
145
+
the below dependencies' logic :
146
+
* Substation is grammatically independent
147
+
* IED depends on DataTypeTemplate
148
+
* Communication depends on IED (IED name, Access Point, ...)
149
+
150
+
Hence, with this in mind, one can reconstruct a minimal SCL file by focusing on the chunk of interest then realize creation/update operations
151
+
on the file and validate it against the XSD file.
152
+
153
+
For example: Updating IED
154
+
155
+
From SCD header's information, create a minimal valid SCD file
0 commit comments