### Setup Event Listeners and Initial Filtering Source: https://github.com/diggsml/schema-dev/blob/main/Instances/validation-report.html This script sets up interactive elements within the schema development interface. It attaches click event listeners to elements with the class 'xpath-link' to facilitate navigation via XPath, and change event listeners to a severity filter dropdown to dynamically update displayed items. It also includes error handling for missing elements and logs the setup process. ```javascript function setupEventListeners() { // Function to find element by XPath (assumed to be defined elsewhere) // function findElementByXPath(xpath) { ... } // Function to filter by severity (assumed to be defined elsewhere) // function filterBySeverity(severity) { ... } // Check for CSV button (example error handling) const csvButton = document.querySelector('button[data-testid="csv-download"]'); if (!csvButton) { console.error('CSV button not found'); } // Set up XPath links const xpathLinks = document.querySelectorAll('.xpath-link'); console.log('Found XPath links:', xpathLinks.length); xpathLinks.forEach(link => { link.addEventListener('click', e => { e.preventDefault(); const xpath = link.getAttribute('data-xpath'); if (xpath) { console.log('Navigating to XPath:', xpath); // Assuming findElementByXPath is globally available or imported findElementByXPath(xpath); } else { console.error('No XPath data attribute found'); } }); }); // Set up severity filter const severityFilter = document.getElementById('severity-filter'); if (severityFilter) { severityFilter.addEventListener('change', function() { // Assuming filterBySeverity is globally available or imported filterBySeverity(this.value); }); } else { console.error('Severity filter dropdown not found'); } console.log('Event listeners set up successfully'); } // Initialize everything // Wrap in a DOMContentLoaded listener to ensure elements are ready document.addEventListener('DOMContentLoaded', () => { setupEventListeners(); // Initial filter const severityFilter = document.getElementById('severity-filter'); if (severityFilter) { // Assuming filterBySeverity is globally available or imported filterBySeverity(severityFilter.value); } else { console.error('Severity filter dropdown not found during initial load'); } console.log('Initialization complete'); }); ``` -------------------------------- ### DiggsML Schema Structure Example Source: https://github.com/diggsml/schema-dev/blob/main/Instances/validation-report.html This snippet illustrates the structure of a DiggsML document, showcasing elements for project information, grouting programs, and borehole data. It defines namespaces and schema locations, providing a template for geotechnical data representation. ```APIDOC DiggsML Schema Structure: This document defines the structure for geotechnical data using the DiggsML schema. Namespaces: xmlns="http://diggsml.org/schema-dev" xmlns:diggs="http://diggsml.org/schema-dev" xmlns:diggs_geo="http://diggsml.org/schema-dev/geotechnical" xmlns:g3.3="http://www.opengis.net/gml/3.3/ce" xmlns:glr="http://www.opengis.net/gml/3.3/lr" xmlns:glrov="http://www.opengis.net/gml/3.3/lrov" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:witsml="http://www.witsml.org/schemas/131" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Schema Location: xsi:schemaLocation="http://diggsml.org/schema-dev http://diggsml.org/schema-dev/Diggs.xsd" Root Element: gml:id: Unique identifier for the Diggs document. Elements: documentInformation: gml:id: Unique identifier for document information. creationDate: Date of document creation. project: gml:id: Unique identifier for the project. gml:name: Name of the project. role: rolePerformed: The role performed (e.g., General Contractor). businessAssociate: gml:id: Unique identifier for the business associate. gml:name: Name of the business associate. program: gml:id: Unique identifier for the grouting program. gml:name: Name of the grouting program. projectRef: Reference to the associated project. design: gml:id: Unique identifier for the grout mix design. gml:name: Name of the grout mix design. trialGroutBatchRef: Reference to a trial grout batch. specificGravityMixDesign: Specific gravity of the mix design. strengthDesign: Strength requirement for the mix design (uom attribute specifies units, e.g., 'psi'). samplingFeature: gml:id: Unique identifier for the borehole. gml:name: Name or identifier of the borehole (e.g., 'UP1510'). investigationTarget: The target of the investigation (e.g., 'Natural Ground'). projectRef: Reference to the associated project. referencePoint: gml:id: Unique identifier for the reference point. srsDimension: Number of dimensions for the spatial reference system. srsName: Name of the spatial reference system (e.g., 'urn:diggs:def:crs:DIGGS:0.1:2274_8050'). gml:pos: Coordinates of the reference point. centerLine: gml:id: Unique identifier for the center line. srsDimension: Number of dimensions. srsName: Name of the spatial reference system. gml:posList: List of coordinates defining the center line. linearReferencing: gml:id: Unique identifier for the linear spatial reference system. gml:identifier: Identifier for the linear referencing system. glr:linearElement: Reference to the linear element (e.g., center line). glr:lrm: gml:id: Unique identifier for the method. gml:name: Name of the referencing method (e.g., 'chainage'). gml:type: Type of referencing (e.g., 'absolute'). gml:units: Units used for referencing (e.g., 'ft'). plunge: Plunge angle of the borehole (uom attribute specifies units, e.g., 'dega'). bearing: Bearing angle of the borehole (uom attribute specifies units, e.g., 'dega'). totalMeasuredDepth: Total measured depth of the borehole (uom attribute specifies units, e.g., 'ft'). backfill: gml:id: Unique identifier for the backfill entry. gml:description: Description of the backfill activity. backfillDateTime: start: Start time of the backfill activity. end: End time of the backfill activity. backfillLayer: gml:id: Unique identifier for the backfill layer. remark: content: Remark or comment about the backfill layer. backfillInterval: srsDimension: Number of dimensions. srsName: Name of the spatial reference system. gml:posList: List of positions defining the interval (e.g., start and end chainage). whenEmplaced: start: Start time of emplacement. end: End time of emplacement. backfillMaterial: Material used for backfilling (e.g., 'grout mix F-28'). backfillVolume: Volume of backfill material (uom attribute specifies units, e.g., 'gal[US]'). groutingActivityRef: Reference to the associated grouting activity. groutRef: Reference to the specific grout used. casing: gml:id: Unique identifier for the casing. casingLocation: srsDimension: Number of dimensions. srsName: Name of the spatial reference system. gml:posList: Positions defining the casing extent. casingInsideDiameter: Inside diameter of the casing (uom attribute specifies units, e.g., 'in'). casingMaterial: Material of the casing (e.g., 'steel'). timeCasingInstalled: Time when the casing was installed. constructionMethod: gml:id: Unique identifier for the construction method. gml:name: Name of the construction method (e.g., 'Sonic Core Drilling'). location: srsDimension: Number of dimensions. srsName: Name of the spatial reference system. ``` -------------------------------- ### Setup UI Event Listeners Source: https://github.com/diggsml/schema-dev/blob/main/Instances/validation-report.html Initializes event listeners for various interactive UI elements. This includes toggling an editor's visibility, saving XML content, formatting XML, finding text within the editor, and exporting CSV data. Logs errors if specific UI elements are not found. ```javascript // Set up event listeners for all interactive elements function setupEventListeners() { console.log('Setting up event listeners'); // Editor toggle button const toggleEditorBtn = document.getElementById('toggle-editor'); if (toggleEditorBtn) { toggleEditorBtn.addEventListener('click', () => EditorManager.toggleVisibility()); } else { console.error('Toggle editor button not found'); } // Save XML button const saveXmlBtn = document.getElementById('save-xml'); if (saveXmlBtn) { saveXmlBtn.addEventListener('click', saveXmlDirectly); } else { console.error('Save XML button not found'); } // Format XML button const formatXmlBtn = document.getElementById('format-xml'); if (formatXmlBtn) { formatXmlBtn.addEventListener('click', () => EditorManager.formatXml()); } else { console.error('Format XML button not found'); } // Find button const findXmlBtn = document.getElementById('find-xml'); if (findXmlBtn) { findXmlBtn.addEventListener('click', () => EditorManager.findInEditor()); } else { console.error('Find XML button not found'); } // Export CSV button const exportCsvBtn = document.getElementById('export-csv'); if (exportCsvBtn) { exportCsvBtn.addEventListener('click', () => saveCsvDirectly()); } else { console.error('Export CSV button not found'); } } ``` -------------------------------- ### Schema Element: implementationStatus Source: https://github.com/diggsml/schema-dev/wiki/Properties-common-to-all-Pile-Driving-Equipment-Objects Describes the implementation or completion status of an object or activity. Terms are intended to come from a controlled list. ```APIDOC implementationStatus: type: gml:CodeType description: A text string describing the implementation status of the object or the completion status of the activity. Termes used (usch as in progress, completed, etc.) are intended to come from a controlled list of terms from a dictionary or authority identified in the codeSpace attribute. cardinality: 0..1 ``` -------------------------------- ### AbstractPile Schema Properties Source: https://github.com/diggsml/schema-dev/wiki/Properties-Common-To-All-Pile-Objects Defines the common properties and attributes inherited by all pile objects in the diggsml schema. It specifies data types, definitions, and cardinality for each property, covering aspects like installation timing, elevations, lengths, weights, and capacities. ```APIDOC AbstractPile: Inherits from: AbstractInstallation Properties: whenInstalled: TimeIntervalType Description: Specifies the time interval during which the pile was installed. Cardinality: 0..1 groundSurfaceElevation: eml:LengthMeasureExt Description: The elevation of the ground surface at the pile location. Cardinality: 1 cutoffElevation: eml:LengthMeasureExt Description: The final elevation of the pile after cutting off. Cardinality: 1 jettingElevation: eml:LengthMeasureExt Description: The elevation reached during jetting operations. Cardinality: 0..1 totalPileLength: eml:LengthMeasureExt Description: The total length of the pile. Cardinality: 0..1 weightPerLength: eml:ForcePerLengthMeasureExt Description: The weight of the pile per unit length. Cardinality: 0..1 tipDeviationNorth: eml:LengthMeasureExt Description: Deviation of the pile tip in the North direction. Cardinality: 0..1 tipDeviationEast: eml:LengthMeasureExt Description: Deviation of the pile tip in the East direction. Cardinality: 0..1 lengthAboveGroundSurface: eml:LengthMeasureExt Description: The portion of the pile length that extends above the ground surface. Cardinality: 0..1 lengthBelowGroundSurface: eml:LengthMeasureExt Description: The portion of the pile length that is below the ground surface. Cardinality: 0..1 lengthNonFriction: eml:LengthMeasureExt Description: The length of the pile that is not contributing to skin friction. Cardinality: 0..1 intervalData: IntervalDataPropertyType Description: Contains data related to specific intervals along the pile. Cardinality: 1..* productionPile: boolean Description: Indicates if this is a production pile. Cardinality: 0..1 testPile: boolean Description: Indicates if this is a test pile. Cardinality: 0..1 nominalCapacity: eml:ForceMeasureExt Description: The nominal load capacity of the pile. Cardinality: 0..1 finalTipElevation: eml:LengthMeasureExt Description: The final elevation of the pile tip. Cardinality: 0..1 IntervalDataPropertyType: Description: A complex type that holds data for intervals along the pile. (Details not provided in source text) ``` -------------------------------- ### GitHub Repository Lister Script Source: https://github.com/diggsml/schema-dev/blob/main/energistics/2.0/index.html This JavaScript code dynamically generates an HTML index of a GitHub repository's contents. It fetches data from the GitHub API to list files and directories, determines file types with corresponding icons, calculates file sizes, and retrieves the last commit date for each item. The output is an HTML table suitable for GitHub Pages. ```javascript var path = document.location.pathname.substring(0,document.location.pathname.lastIndexOf("/")); var repo = path.substring(1, path.length); if(repo.indexOf("/") > 0) repo = repo.substring(0,repo.indexOf("/")); var dir = path.substring(repo.length+1,path.length); console.log("Path =" + path); console.log("Repository = " + repo); console.log("Directory = " + dir); var txt = '

Index of ' + path + '

'; txt += ''; txt += ''; txt += ''; txt += ''; (async () => { var api = "https://api.github.com/repos/diggsml/" + repo + "/contents"+dir; const response = await fetch(api); const data = await response.json(); var dString = ""; for (let rec of data) { if(rec.name == "scripts") continue; if(rec.name == "icons") continue; if(rec.name == "stylesheets") continue; if(rec.name == "index.html") continue; if(rec.name == "img") continue; if(rec.name == ".gitignore") continue; if(rec.name == "README.md") continue; if(rec.name == "LICENSE") continue; let image; if(rec.type == "file") { var suffix = rec.name.substring(rec.name.lastIndexOf(".")+1,rec.name.length); if(suffix == "xml" || suffix == "xsl" || suffix == "xsd" || suffix == "diggs"){ image ='[XML]'; } else if(suffix == "zip" || suffix == "gz" || suffix == "Z" || suffix == "bz2" || suffix == "diggz"){ image ='[ZIP]'; } else { image ='[UNK]'; } } else if(rec.type == "dir") { image ='[DIR]'; } var size = rec.size; if(size == 0){ size = ''; } else if(size < 1000) { size = size + " bytes"; } else if(size >= 1000 && size < 1000000){ size = Math.round(size/1000 * 10) / 10; size = size + ' KB'; } else if(size >= 1000000) { size = Math.round(size/1000000 * 10) / 10; size = size + ' MB'; } var commitapi = "https://api.github.com/repos/diggsml/" + repo + "/commits?path=" + dir + "/" + rec.name + "&page=1&per_page=1"; const resp = await fetch(commitapi); const dat = await resp.json(); for (let dt of dat) { var d = new Date(dt.commit.author.date); dString = d.getFullYear() + '-' + ("0"+ (d.getMonth()+1)).slice(-2) + '-' + ("0"+d.getDate()).slice(-2) +' '+('0' + d.getHours()).slice(-2)+':'+('0' + d.getMinutes()).slice(-2)+':'+('0' + d.getSeconds()).slice(-2); } txt += ''; } txt += '
[ ]NameLast ModifiedSize

[PARENTDIR]Parent Directory -
'+image+''+rec.name+''+dString+''+size+'
'; txt+= '
'; txt +='
'; var rtype = "resource"; if(repo == "schemas") rtype = "schema"; if(repo == "doc") rtype = "documantation"; if(repo == "schema-dev") rtype = "schema development"; txt += 'diggsml.org/' + repo + ' is the official ' + rtype + ' repository for the DIGGS project, a data interchange standard for the geotechnical and geoenvironmental community.
'; txt += 'www.diggsml.org is the official namespace of the DIGGS project.

'; if(rtype == "schema"){ if (dir == ""){ txt += '

You may download the schema files as a single compressed file per release version at:
https://github.com/DIGGSml/schema-dev/releases

'; } else { var sdir=dir.substring(1,dir.length); var version; if(sdir.indexOf("/") == -1) { version = sdir; } else { version = sdir.substring(0,sdir.indexOf("/")); } txt += '

You may download the schema files for version ' + version + ' as a single compressed file at:
https://github.com/DIGGSml/schema-dev/releases/tag/' + version + '

'; } } txt += '

DIGGS is a Special Project of the Amerian Society of Civil Engineers Geo-Institute (G-I). All rights reserved.

'; txt += '
'; txt += '
'; document.body.innerHTML = txt; })(); ``` -------------------------------- ### GitHub Repository Lister Script Source: https://github.com/diggsml/schema-dev/blob/main/energistics/2.0/data/index.html This JavaScript code dynamically generates an HTML index of a GitHub repository's contents. It fetches data from the GitHub API to list files and directories, determines file types with corresponding icons, calculates file sizes, and retrieves the last commit date for each item. The output is an HTML table suitable for GitHub Pages. ```javascript var path = document.location.pathname.substring(0,document.location.pathname.lastIndexOf("/")); var repo = path.substring(1, path.length); if(repo.indexOf("/") > 0) repo = repo.substring(0,repo.indexOf("/")); var dir = path.substring(repo.length+1,path.length); console.log("Path =" + path); console.log("Repository = " + repo); console.log("Directory = " + dir); var txt = '

Index of ' + path + '

'; txt += ''; txt += ''; txt += ''; txt += ''; (async () => { var api = "https://api.github.com/repos/diggsml/" + repo + "/contents"+dir; const response = await fetch(api); const data = await response.json(); var dString = ""; for (let rec of data) { if(rec.name == "scripts") continue; if(rec.name == "icons") continue; if(rec.name == "stylesheets") continue; if(rec.name == "index.html") continue; if(rec.name == "img") continue; if(rec.name == ".gitignore") continue; if(rec.name == "README.md") continue; if(rec.name == "LICENSE") continue; let image; if(rec.type == "file") { var suffix = rec.name.substring(rec.name.lastIndexOf(".")+1,rec.name.length); if(suffix == "xml" || suffix == "xsl" || suffix == "xsd" || suffix == "diggs"){ image ='[XML]'; } else if(suffix == "zip" || suffix == "gz" || suffix == "Z" || suffix == "bz2" || suffix == "diggz"){ image ='[ZIP]'; } else { image ='[UNK]'; } } else if(rec.type == "dir") { image ='[DIR]'; } var size = rec.size; if(size == 0){ size = ''; } else if(size < 1000) { size = size + " bytes"; } else if(size >= 1000 && size < 1000000){ size = Math.round(size/1000 * 10) / 10; size = size + ' KB'; } else if(size >= 1000000) { size = Math.round(size/1000000 * 10) / 10; size = size + ' MB'; } var commitapi = "https://api.github.com/repos/diggsml/" + repo + "/commits?path=" + dir + "/" + rec.name + "&page=1&per_page=1"; const resp = await fetch(commitapi); const dat = await resp.json(); for (let dt of dat) { var d = new Date(dt.commit.author.date); dString = d.getFullYear() + '-' + ("0"+ (d.getMonth()+1)).slice(-2) + '-' + ("0"+d.getDate()).slice(-2) +' '+('0' + d.getHours()).slice(-2)+':'+('0' + d.getMinutes()).slice(-2)+':'+('0' + d.getSeconds()).slice(-2); } txt += ''; } txt += '
[ ]NameLast ModifiedSize

[PARENTDIR]Parent Directory -
'+image+''+rec.name+''+dString+''+size+'
'; txt+= '
'; txt +='
'; var rtype = "resource"; if(repo == "schemas") rtype = "schema"; if(repo == "doc") rtype = "documantation"; if(repo == "schema-dev") rtype = "schema development"; txt += 'diggsml.org/' + repo + ' is the official ' + rtype + ' repository for the DIGGS project, a data interchange standard for the geotechnical and geoenvironmental community.
'; txt += 'www.diggsml.org is the official namespace of the DIGGS project.

'; if(rtype == "schema"){ if (dir == ""){ txt += '

You may download the schema files as a single compressed file per release version at:
https://github.com/DIGGSml/schema-dev/releases

'; } else { var sdir=dir.substring(1,dir.length); var version; if(sdir.indexOf("/") == -1) { version = sdir; } else { version = sdir.substring(0,sdir.indexOf("/")); } txt += '

You may download the schema files for version ' + version + ' as a single compressed file at:
https://github.com/DIGGSml/schema-dev/releases/tag/' + version + '

'; } } txt += '

DIGGS is a Special Project of the Amerian Society of Civil Engineers Geo-Institute (G-I). All rights reserved.

'; txt += '
'; txt += '
'; document.body.innerHTML = txt; })(); ``` -------------------------------- ### ConcretePile Schema Definition Source: https://github.com/diggsml/schema-dev/wiki/ConcretePile Defines the ConcretePile object, representing a concrete pile installation. It inherits properties from AbstractPile and AbstractLinearInstallation, and includes specific attributes like shape, dimensions, and splice information. Related enumerations and types are also detailed. ```APIDOC ConcretePile: Inherits from: AbstractPile, AbstractLinearInstallation Description: Represents a concrete pile installation. Properties: shape: PileShapeEnumExtType [0..1] Description: Specifies the cross-sectional shape of the concrete pile. Type: Enumeration or reference to an extended type. hollowWidth: LengthMeasure [0..1] Description: The width of the hollow section for hollow piles. Type: LengthMeasure. wallThickness: LengthMeasure [0..1] Description: The thickness of the pile wall. Type: LengthMeasure. sideLength: LengthMeasure [0..1] Description: The length of a side for non-circular (e.g., square, hexagonal) piles. Type: LengthMeasure. soilPlugDepth: LengthMeasure [0..1] Description: The depth of the soil plug within a hollow pile. Type: LengthMeasure. soilPlugElevation: LengthMeasure [0..1] Description: The elevation of the soil plug within a hollow pile. Type: LengthMeasure. splices: Splice [0..*] Description: An array of splice details for connecting pile sections. Type: Array of Splice objects. AbstractPile: Inherits from: AbstractLinearInstallation Description: Abstract base class for all pile objects, defining common installation and geometric properties. Properties: whenInstalled: TimeInterval [0..1] Description: The time interval during which the pile was installed. Type: TimeInterval. groundSurfaceElevation: PointLocation [1] Description: The elevation of the ground surface at the pile location. Type: PointLocation. cutoffElevation: PointLocation [1] Description: The elevation at which the pile is cut off. Type: PointLocation. jettingElevation: PointLocation [0..1] Description: The elevation reached during jetting (if applicable). Type: PointLocation. totalPileLength: LengthMeasure [0..1] Description: The total length of the pile. Type: LengthMeasure. tipDeviationNorth: LengthMeasure [0..1] Description: Deviation of the pile tip from the intended north position. Type: LengthMeasure. tipDeviationEast: LengthMeasure [0..1] Description: Deviation of the pile tip from the intended east position. Type: LengthMeasure. weightPerLength: ForcePerLength [0..1] Description: The weight of the pile per unit length. Type: ForcePerLength. lengthAboveGS: LengthMeasure [0..1] Description: The length of the pile extending above the ground surface. Type: LengthMeasure. lengthBelowGS: LengthMeasure [0..1] Description: The length of the pile extending below the ground surface. Type: LengthMeasure. lengthNonFriction: LengthMeasure [0..1] Description: The portion of the pile length that does not contribute to friction. Type: LengthMeasure. intervalData: IntervalData [1..*] Description: Data points defining intervals along the pile, e.g., for soil layers or material properties. Type: Array of IntervalData objects. productionPile: boolean [0..1] Description: Flag indicating if this is a production pile. Type: Boolean. testPile: boolean [0..1] Description: Flag indicating if this is a test pile. Type: Boolean. nominalCapacity: ForceMeasure [0..1] Description: The nominal load capacity of the pile. Type: ForceMeasure. finalTipElevation: LengthMeasure [0..1] Description: The final measured elevation of the pile tip. Type: LengthMeasure. AbstractLinearInstallation: Description: Abstract base class for linear installation features, defining common spatial and identification properties. Properties: @gml:id: ID [1] Description: Globally unique identifier for the feature. Type: ID. gml:description: StringOrRefType [0..1] Description: A textual description of the feature. Type: StringOrRefType. gml:identifier: CodeWithAuthorityType [0..1] Description: An identifier for the feature with an associated authority. Type: CodeWithAuthorityType. gml:name: Codetype [1..*] Description: One or more names for the feature. Type: Array of Codetype. internalIdentifier: CodeWithAuthorityType [0..1] Description: An internal identifier for the feature. Type: CodeWithAuthorityType. status: CodeType [0..1] Description: The current status of the feature. Type: CodeType. implementationStatus: CodeType [0..1] Description: The status of the feature's implementation. Type: CodeType. associatedFile: AssociatedFile [0..*] Description: References to associated files (e.g., reports, drawings). Type: Array of AssociatedFile objects. role: Role [0..*] Description: Roles associated with the feature. Type: Array of Role objects. remark: Remark [0..*] Description: Remarks or notes about the feature. Type: Array of Remark objects. investigationTarget: InvestigationTargetEnumExtType [1..*] Description: Specifies what the installation is intended to investigate. Type: Array of InvestigationTargetEnumExtType. projectRef: FeatureReferenceType [1] Description: Reference to the project this installation belongs to. Type: FeatureReferenceType. originalProjectRef: FeatureReferenceType [0..1] Description: Reference to the original project if this is a modification. Type: FeatureReferenceType. associatedProjectRef: FeatureReferenceType [0..*] Description: References to other associated projects. Type: Array of FeatureReferenceType. programRef: FeatureReferenceType [0..1] Description: Reference to the program this installation is part of. Type: FeatureReferenceType. environment: Environment [0..*] Description: Environmental context of the installation. Type: Array of Environment objects. otherSamplingFeatureProperty: Parameter [0..*] Description: Additional properties related to sampling features. Type: Array of Parameter objects. locality: Locality [0..1] Description: Information about the local context of the installation. Type: Locality. referencePoint: PointLocation [1] Description: A reference point defining the location of the installation. Type: PointLocation. localCoordinates: LocalCoordinate [0..1] Description: Local coordinate system information. Type: LocalCoordinate. centerline: LinearExtent [1..*] Description: The centerline geometry of the linear installation. Type: Array of LinearExtent objects. linearReferencing: LinearSpatialReferenceSystem [1..*] Description: Linear referencing system used for the installation. Type: Array of LinearSpatialReferenceSystem objects. plunge: PlaneAngleMeasure [0..1] Description: The plunge angle of the linear feature. Type: PlaneAngleMeasure. bearing: BearingType [0..1] Description: The bearing or orientation of the linear feature. Type: BearingType. samplingFeatureRef: FeatureReferenceType [1] Description: Reference to the sampling feature associated with this installation. Type: FeatureReferenceType. installationConstructionEvent: InstallationEvent [0..*] Description: Details about the construction events for this installation. Type: Array of InstallationEvent objects. Splice: Description: Details about a splice connecting two sections of a pile. Properties: @gml:id: ID [0..1] Description: Globally unique identifier for the splice. Type: ID. spliceNumber: positiveInteger [0..1] Description: The sequential number of the splice. Type: Positive Integer. spliceType: CodeType [0..1] Description: The type of splice used (e.g., mechanical, welded). Type: CodeType. spliceLocation: PointLocation [1] Description: The location of the splice along the pile. Type: PointLocation. PileShapeEnumExtType: Description: Extended type for pile shapes, potentially allowing for custom or additional shape definitions. Type: Union of PileShapeEnumType and other types. PileShapeEnumType: Description: Enumeration defining standard pile cross-sectional shapes. Values: square solid square hollow circular closed circular open hexagonal octagonal OtherNameType: Description: Enumeration for alternative names or classifications. Values: Other: .[2,] Description: Represents an 'Other' category, possibly with additional details. ``` -------------------------------- ### GitHub Repository Lister Script Source: https://github.com/diggsml/schema-dev/blob/main/energistics/2.0/data/common/index.html This JavaScript code dynamically generates an HTML index of a GitHub repository's contents. It fetches data from the GitHub API to list files and directories, determines file types with corresponding icons, calculates file sizes, and retrieves the last commit date for each item. The output is an HTML table suitable for GitHub Pages. ```javascript var path = document.location.pathname.substring(0,document.location.pathname.lastIndexOf("/")); var repo = path.substring(1, path.length); if(repo.indexOf("/") > 0) repo = repo.substring(0,repo.indexOf("/")); var dir = path.substring(repo.length+1,path.length); console.log("Path =" + path); console.log("Repository = " + repo); console.log("Directory = " + dir); var txt = '

Index of ' + path + '

'; txt += ''; txt += ''; txt += ''; txt += ''; (async () => { var api = "https://api.github.com/repos/diggsml/" + repo + "/contents"+dir; const response = await fetch(api); const data = await response.json(); var dString = ""; for (let rec of data) { if(rec.name == "scripts") continue; if(rec.name == "icons") continue; if(rec.name == "stylesheets") continue; if(rec.name == "index.html") continue; if(rec.name == "img") continue; if(rec.name == ".gitignore") continue; if(rec.name == "README.md") continue; if(rec.name == "LICENSE") continue; let image; if(rec.type == "file") { var suffix = rec.name.substring(rec.name.lastIndexOf(".")+1,rec.name.length); if(suffix == "xml" || suffix == "xsl" || suffix == "xsd" || suffix == "diggs"){ image ='[XML]'; } else if(suffix == "zip" || suffix == "gz" || suffix == "Z" || suffix == "bz2" || suffix == "diggz"){ image ='[ZIP]'; } else { image ='[UNK]'; } } else if(rec.type == "dir") { image ='[DIR]'; } var size = rec.size; if(size == 0){ size = ''; } else if(size < 1000) { size = size + " bytes"; } else if(size >= 1000 && size < 1000000){ size = Math.round(size/1000 * 10) / 10; size = size + ' KB'; } else if(size >= 1000000) { size = Math.round(size/1000000 * 10) / 10; size = size + ' MB'; } var commitapi = "https://api.github.com/repos/diggsml/" + repo + "/commits?path=" + dir + "/" + rec.name + "&page=1&per_page=1"; const resp = await fetch(commitapi); const dat = await resp.json(); for (let dt of dat) { var d = new Date(dt.commit.author.date); dString = d.getFullYear() + '-' + ("0"+ (d.getMonth()+1)).slice(-2) + '-' + ("0"+d.getDate()).slice(-2) +' '+('0' + d.getHours()).slice(-2)+':'+('0' + d.getMinutes()).slice(-2)+':'+('0' + d.getSeconds()).slice(-2); } txt += ''; } txt += '
[ ]NameLast ModifiedSize

[PARENTDIR]Parent Directory -
'+image+''+rec.name+''+dString+''+size+'
'; txt+= '
'; txt +='
'; var rtype = "resource"; if(repo == "schemas") rtype = "schema"; if(repo == "doc") rtype = "documantation"; if(repo == "schema-dev") rtype = "schema development"; txt += 'diggsml.org/' + repo + ' is the official ' + rtype + ' repository for the DIGGS project, a data interchange standard for the geotechnical and geoenvironmental community.
'; txt += 'www.diggsml.org is the official namespace of the DIGGS project.

'; if(rtype == "schema"){ if (dir == ""){ txt += '

You may download the schema files as a single compressed file per release version at:
https://github.com/DIGGSml/schema-dev/releases

'; } else { var sdir=dir.substring(1,dir.length); var version; if(sdir.indexOf("/") == -1) { version = sdir; } else { version = sdir.substring(0,sdir.indexOf("/")); } txt += '

You may download the schema files for version ' + version + ' as a single compressed file at:
https://github.com/DIGGSml/schema-dev/releases/tag/' + version + '

'; } } txt += '

DIGGS is a Special Project of the Amerian Society of Civil Engineers Geo-Institute (G-I). All rights reserved.

'; txt += '
'; txt += '
'; document.body.innerHTML = txt; })(); ```