Bulk module updates urns - #228
Conversation
e2de9c4 to
af24b00
Compare
| */ | ||
| 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:"; |
There was a problem hiding this comment.
Not sure what our UID requirements are, but should we change this usage of uppercase letters?
There was a problem hiding this comment.
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:"; |
There was a problem hiding this comment.
Just double checking; is this a system and not a sensor
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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
|
|
||
| @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:"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Not sure if this is used how you are expecting, but maybe double check the usage.
There was a problem hiding this comment.
Reverted change as the URNs are not used as system or sensor identifiers
earocorn
left a comment
There was a problem hiding this comment.
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
This PR updates all URNs to ensure they follow the same base
urn:osh:[TYPE]:georobotix: