skip to main content
Developing with design tools > Using the Designer > Data formats > Application data in flat files for JViews Diagrammer
 
Application data in flat files for JViews Diagrammer
You can import application data from a flat file into the Designer.
The following examples, Node data on Arizona cities in a flat file and Link data on traffic between Arizona cities in a flat file, show the initial Arizona data files for nodes and links respectively as loaded in Importing data from a flat file. (The data is shown with spacing for readability.)
Node data on Arizona cities in a flat file
 
City Availability Throughput latitude longitude Population
Flagstaff Online Busy 35D11'53N 111D39'02W 340000
Page Offline Unknown 36D84'00N 111D15'00W 30000
Tuba City Online Average 36D08'06N 111D14'21W 47600
Winslow Online Slow 35D01'27N 110D41'48W 90000
Sedona Online Slow 34D52'11N 111D45'37W 120000
Phoenix Online Busy 33D26'54N 112D04'24W 1200000
Tucson Online Busy 32D13'18N 110D55'33W 980000
Nogales Online Average 31D20'25N 110D56'01W 45000
Holbrook Online Average 34D54'08N 110D09'27W 16000
Show_Low Offline Busy 34D15'15N 110D01'45W 4000
Lake_Havasu Online Busy 34D29'02N 114D19'18W 20000
Taylor Online Slow 34D27'00N 110D06'00W 20000
Yuma Unknown Average 32D43'31N 114D37'25W 15000
Kingman Online Average 35D11'22N 114D03'08W 230000
Link data on traffic between Arizona cities in a flat file
 
City1 City2 Traffic
Kingman Phoenix 2.6
Lake Havasu Yuma 1
Kingman Lake Havasu 2
Kingman Flagstaff 3.4
Tuba City Page 0.9
Flagstaff Tuba City 2.1
Flagstaff Winslow 2.7
Flagstaff Taylor 2.9
Flagstaff Sedona 1.1
Flagstaff Phoenix 4.3
Flagstaff Tucson 4.5
Holbrook Taylor 1.9
Show Low Taylor 0.9
Taylor Phoenix 3.1
Phoenix Tucson 4.5
Tucson Nogales 0.1
Yuma Phoenix 1.1
Sedona Flagstaff 2.1
Phoenix Phoenix 4
Nogales Phoenix 3.7
Flagstaff Tucson 5
A flat file is a text file containing the same number of values on each line. The values are separated by a separator character. The separator characters supported by the Designer are comma, semicolon, space, and tab. You can request automatic detection of the separators. If a flat file contains values exported from Microsoft® Excel®, it is sometimes referred to as a CSV (comma-separated values) file.
In a flat file, the first line must contain the names of the data properties and each subsequent line must contain the property values for an object, with the properties in the same order as on the first line.
Nodes and links must be loaded from separate files.
You must define a mapping between the data properties in the file and the properties proposed by the Designer in the New Diagram Wizard. Some data properties may be unmapped and therefore not used in the diagram.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.