Skip to content

Bulk module updates urns - #228

Open
nickgaray wants to merge 8 commits into
opensensorhub:masterfrom
Botts-Innovative-Research:bulk_module_updates_urns
Open

Bulk module updates urns#228
nickgaray wants to merge 8 commits into
opensensorhub:masterfrom
Botts-Innovative-Research:bulk_module_updates_urns

Conversation

@nickgaray

Copy link
Copy Markdown
Collaborator

This PR updates all URNs to ensure they follow the same base

urn:osh:[TYPE]:georobotix:

@nickgaray
nickgaray marked this pull request as ready for review July 15, 2026 13:00
@nickgaray
nickgaray force-pushed the bulk_module_updates_urns branch from e2de9c4 to af24b00 Compare July 22, 2026 20:14
*/
public class notecardGPSSensor extends AbstractSensorModule<Config> implements Runnable {
static final String UID_PREFIX = "osh:notecardGPS:";
static final String UID_PREFIX = "urn:osh:sensor:georobotix:notecardGPS:";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what our UID requirements are, but should we change this usage of uppercase letters?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made all lower case

*/
public class FoscamDriver extends AbstractSensorModule<FoscamConfig> {
private static final Logger logger = LoggerFactory.getLogger(FoscamDriver.class);
static final String UID_PREFIX = "urn:osh:system:georobotix:foscam:";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking; is this a system and not a sensor

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed as :sensor:

static final String SERVICE_INSTANCE_ID = "oshServiceId";
static final HashMap<Integer, STAService> serviceInstances = new HashMap<>(); // static map needed to get access to service from persistence manager
static final String DEFAULT_GROUP_UID = "urn:osh:sta:group";
static final String DEFAULT_GROUP_UID = "urn:osh:sensor:georobotix:sta:group";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable seems unused, so it may be better to remove it rather than defaulting this UID prefix to a sensor. I think it may have been used as a UID for something other than a sensor/system UID

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed


@DisplayInfo(label="UID Prefix", desc="Prefix to use for Things, Sensors and FOIs UIDs")
public String uidPrefix = "urn:osh:sta:";
public String uidPrefix = "urn:osh:sensor:georobotix:sta:";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is tricky to make this generic change since this prefixes UIDs of Things, Sensors, and FOIs. You can check the usage of this config value in the entity handlers of this SensorThings service. Basically, the :foi or :thing or :sensor seems to be attached later, so this may be confusing when used practically.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid options for the 3rd segment are
actuator | data | def | foi | process | sensor | system

To avoid confusion should I think using data as it comes from an STA appliance, but we do not know if it is a system or process

String internalName = internalNames2Original.get(uri);
if (internalName == null) {
internalName = "urn:mp4parser:" + p++ + ext;
internalName = "urn:osh:sensor:georobotix:mp4parser:" + p++ + ext;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is used how you are expecting, but maybe double check the usage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted change as the URNs are not used as system or sensor identifiers

@earocorn earocorn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments on URN prefixes that don't make sense when changed, so maybe just double check the actual usages of all the changed prefixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants