Overview
Novella is a lightweight spatial data catalogue using ISO 19115 and INSPIRE standards.
Basic Usage
Getting Started
- 1 Log in to the system using your credentials
- 2 Navigate to "Datasets" to view existing metadata records
- 3 Use the "New Dataset" button to create a new metadata record
- 4 Fill in the required metadata fields following ISO 19115 standards
- 5 Save your changes and export to XML when ready
Key Features
API Documentation
Available Endpoints
Dataset Operations
/api/datasets
- List all datasets
/api/datasets/{id}
- Get specific dataset
/api/datasets
- Create new dataset
/api/datasets/{id}
- Update dataset
/api/datasets/{id}
- Delete dataset
Export Operations
/api/datasets/{id}/xml
- Export dataset to XML
/api/datasets/{id}/json
- Export dataset to JSON
Authentication
All API endpoints require authentication using Bearer token:
Authorization: Bearer your-token-here
Adding New Fields for Datasets
This application is designed to be extensible, allowing you to add new metadata fields as needed. Here's how to add new fields to datasets:
Step 1: Database Migration
Create a new migration file in the database/migrations/
directory:
-- Example: add_new_field.sql
-- Add new field to metadata_records table
ALTER TABLE metadata_records
ADD COLUMN IF NOT EXISTS new_field_name VARCHAR(255);
-- Add comment to explain the column
COMMENT ON COLUMN metadata_records.new_field_name IS 'Description of what this field contains';
Step 2: Update the Form Template
Add the new field to the form in templates/form.twig
:
<div class="mb-4">
<label for="new_field_name" class="block text-sm font-medium text-gray-700 mb-1">New Field Label</label>
<input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"
id="new_field_name" name="new_field_name"
value="">
</div>
Step 3: Update the Controller
Modify the relevant controller (usually src/Controllers/GisController.php
) to handle the new field:
- Add the field to the data array when creating/updating records
- Include the field in validation if required
- Update any display logic to show the new field
Step 4: Update Display Templates
Add the new field to display templates like templates/dataset_detail.twig
:
<div class="mb-3">
<strong>New Field:</strong>
</div>
Step 5: Update XML Export
If the field should be included in XML exports, update the XML generation logic in the controller.
Common Field Types
VARCHAR(255)
or TEXT
DATE
or TIMESTAMP
INTEGER
, DECIMAL
, or REAL
BOOLEAN
TEXT[]
for multiple values
Best Practices
-
Always use
IF NOT EXISTS
in migrations to prevent errors - Add meaningful comments to database columns
- Follow the existing naming conventions (snake_case for database, camelCase for form fields)
- Test the new field thoroughly before deploying
- Consider whether the field should be required or optional
- Update documentation when adding new fields
Example: Adding a "Data Source" Field
Here's a complete example of adding a "Data Source" field:
-
1
Migration: Create
add_data_source_field.sql
- 2 Form: Add input field to the Identification Info section
- 3 Controller: Include in create/update methods
- 4 Display: Show in dataset detail view
- 5 Export: Include in XML generation
Standards Compliance
This application follows:
Support
For technical support or questions, please contact your system administrator.