indexing description: "Creates ids" author: "Beat Strasser " date: "$Date$" revision: "$Revision$" class P2P_ID_CREATOR inherit P2P_STRING_UTILS feature -- Access null_id: P2P_NULL_ID is -- JXTA Null id indexing once_status: global once create Result.make end worldgroup_id: P2P_WORLDGROUP_ID is -- World group id indexing once_status: global once create Result.make end netgroup_id: P2P_NETGROUP_ID is -- Net group id indexing once_status: global once create Result.make end feature -- Basic operations create_peergroup_id (urn: STRING): P2P_PEERGROUP_ID is -- Parse `urn' and create peer group id require Urn_valid: urn /= Void local source: STRING do source := trimmed (urn) if source.is_equal (worldgroup_id.out) then Result := worldgroup_id elseif source.is_equal (netgroup_id.out) then Result := netgroup_id else create {P2P_PEERGROUP_UUID} Result.make_from_urn (source) if not Result.is_valid then Result := Void end end end end