Skip to content

Commit 2bc108b

Browse files
committed
Neater representation of combining data events.
1 parent 0da001e commit 2bc108b

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/dataflows/cul.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,24 @@ space
9595
transform id@adele sip@adele "Create\nSIP Folder"
9696
"""The identifier is used to create a SIP folder that will hold the transfer. It contains a data folder and a metadata folder, named according to item identifiers. The data folder will contain the physical or logical disk contents. The metadata folder will contain photographs and the log and hash manifest from the media extraction process."""
9797
98-
start photo@camera "Photograph\nCarrier"@N [0,0]
98+
start photo@camera "Photograph\nCarrier"@N [0,1]
9999
"""A camera attached to the workstation is used to record what the carrier look like."""
100100
101-
merge photo@camera sip@adele "Take\nPhotographs"
101+
move photo@camera photo@adele "Take\nPhotographs"
102102
"""Pictures are taken of the front and back of the carrier, and these photos are added to the metadata folder of the SIP."""
103103
104+
combine photo@adele "Add photos\nto SIP"
105+
"""The photographs are added to the SIP metadata folder."""
106+
104107
space
105108
move leg@shelf leg@hub "Connect\nCarrier" [0,1]
106109
"""The carrier is connected or inserted into the appropriate drive of the workstation."""
107110
108111
space
109-
derive leg@hub content@hub "Extract\nContent & Logs"@N [0,0]
112+
copy leg@hub content@adele "Extract\nContent & Logs"@W [0,1]
110113
"""The device in the workstation makes a copy of the content, logging the process as it goes, along with the checksums of each file. This may be a physical disk image of a logical copy of the disk contents, depending on teh situation."""
111114
112-
merge content@hub sip@adele "Transfer to SIP"
115+
combine content@adele "Add data\nto SIP"
113116
"""The extracted file contents and the log are written into the data and metadata folders of the SIP."""
114117
115118
move leg@hub leg@shelf "Reshelve\nCarrier"

src/dataflows/dataflows.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ export function generateTubeMapData(df, wf) {
145145
}
146146
setupEntitiesForEvent(lines, stations, item, event );
147147
pushCopyEvent(lines, stations, item, event, t1, y1, t2, y2 );
148+
// Create a post-merge marker 'station'?
149+
// Add this is a 'name' to the last line segment line and .marker = "interchange"???
150+
//lines[item].nodes[-1].name = terminus
148151
// Record as a merge:
149152
lines[source.item].terminated = t2;
150153
lines[item].name = `${target.itemId}@${target.place.id}`;
@@ -209,7 +212,7 @@ export function generateTubeMapData(df, wf) {
209212
// Note that start point is marked:
210213
lines[source.item].markedAtStart = true;
211214
});
212-
} else if( event.type == "delete" ) {
215+
} else if( event.type == "delete" || event.type == "combine" ) {
213216
const targets = getTargets(df, event);
214217
targets.forEach( (target) => {
215218
var item = target.item;
@@ -372,15 +375,15 @@ export function parseDataflow(text) {
372375
label: l[1] || l[0],
373376
type: l[0],
374377
}
375-
} else if( l[0] == "delete" || l[0] == "start" ) {
378+
} else if( l[0] == "delete" || l[0] == "combine" || l[0] == "start" ) {
376379
// FIXME START is kinda broken because only one color is allowed and there could be multiple starts
377380
event = {
378381
label: l[2] || l[0],
379382
type: l[0],
380383
targets: l[1].split(','),
381384
color: l[1]
382385
}
383-
if( l[0] == "delete") {
386+
if( l[0] == "delete" || l[0] == "combine") {
384387
event.marker = 'interchange';
385388
}
386389
// Parse offset if any:
@@ -505,6 +508,8 @@ export async function generateDataflow(dfl) {
505508
return `<i>Transform ${e.source} to ${e.target}</i>.<br>${e.description || ''}`;
506509
} else if( e.type == "merge") {
507510
return `<i>Merge ${e.sources} into ${e.target}</i>.<br>${e.description || ''}`;
511+
} else if( e.type == "combine") {
512+
return `<i>Combine ${e.targets.join(', ') || e.target}</i>.<br>${e.description || ''}`;
508513
} else if( e.type == "delete") {
509514
return `<i>Delete ${e.targets.join(', ') || e.target}</i>.<br>${e.description || ''}`;
510515
} else if( e.type == "start") {

0 commit comments

Comments
 (0)