Skip to content

Commit

Permalink
Removed use of urn scheme as must be registered for valid use
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Feb 15, 2024
1 parent 6614ead commit bd32a57
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 160 deletions.
44 changes: 22 additions & 22 deletions src/main/java/net/fortuna/ical4j/extensions/concept/ActionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@
*/
public class ActionType extends ImmutableConcept {

public enum Urn {
Action("urn:ical4j:concept:action"),
public enum Id {
Action("ical4j:concept:action"),

Agenda("urn:ical4j:concept:action:agenda"),
Agenda("ical4j:concept:action:agenda"),

Approval("urn:ical4j:concept:action:approval"),
Approval("ical4j:concept:action:approval"),

ServiceQualification("urn:ical4j:concept:action:service_qualification"),
ServiceQualification("ical4j:concept:action:service_qualification"),

Payment("urn:ical4j:concept:action:payment"),
Payment("ical4j:concept:action:payment"),

Fulfilment("urn:ical4j:concept:action:fulfilment"),
Fulfilment("ical4j:concept:action:fulfilment"),

Clarification("urn:ical4j:concept:action:clarification"),
Clarification("ical4j:concept:action:clarification"),

Review("urn:ical4j:concept:action:review"),
Review("ical4j:concept:action:review"),

LinkRegistration("urn:ical4j:concept:action:link_registration");
LinkRegistration("ical4j:concept:action:link_registration");

private final URI uri;

Urn(String uri) {
Id(String uri) {
this.uri = URI.create(uri);
}

Expand All @@ -41,40 +41,40 @@ public URI getUri() {
/**
* General action type.
*/
public static final ActionType ACTION = new ActionType(Urn.Action);
public static final ActionType ACTION = new ActionType(Id.Action);

/**
* A proposed agenda for events such as meetings, etc.
*/
public static final ActionType AGENDA = new ActionType(Urn.Agenda);
public static final ActionType AGENDA = new ActionType(Id.Agenda);

/**
* Approval action, typically used in a workflow involving orders and service requests.
*/
public static final ActionType APPROVAL = new ActionType(Urn.Approval);
public static final ActionType APPROVAL = new ActionType(Id.Approval);

/**
* Qualification action, used to review a service request to ensure requester qualifies for service.
*/
public static final ActionType SERVICE_QUALIFICATION = new ActionType(Urn.ServiceQualification);
public static final ActionType SERVICE_QUALIFICATION = new ActionType(Id.ServiceQualification);

public static final ActionType PAYMENT = new ActionType(Urn.Payment);
public static final ActionType PAYMENT = new ActionType(Id.Payment);

/**
* Fulfilment action, typically used to resolve orders and service requests.
*/
public static final ActionType FULFILMENT = new ActionType(Urn.Fulfilment);
public static final ActionType FULFILMENT = new ActionType(Id.Fulfilment);

/**
* Clarification action, typically use to request further information to resolve orders and service requests.
*/
public static final ActionType CLARIFICATION = new ActionType(Urn.Clarification);
public static final ActionType CLARIFICATION = new ActionType(Id.Clarification);

public static final ActionType REVIEW = new ActionType(Urn.Review);
public static final ActionType REVIEW = new ActionType(Id.Review);

public static final ActionType LINK_REGISTRATION = new ActionType(Urn.LinkRegistration);
public static final ActionType LINK_REGISTRATION = new ActionType(Id.LinkRegistration);

public ActionType(Urn urn) {
super(urn.getUri());
public ActionType(Id id) {
super(id.getUri());
}
}
22 changes: 11 additions & 11 deletions src/main/java/net/fortuna/ical4j/extensions/concept/AssetType.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
public class AssetType extends ImmutableConcept {


public enum Urn {
Asset("urn:ical4j:concept:asset"),
public enum Id {
Asset("ical4j:concept:asset"),

Vehicle("urn:ical4j:concept:asset:vehicle"),
Vehicle("ical4j:concept:asset:vehicle"),

Property("urn:ical4j:concept:asset:property"),
Property("ical4j:concept:asset:property"),

ConfigurationItem("urn:ical4j:concept:asset:configuration_item");
ConfigurationItem("ical4j:concept:asset:configuration_item");

private final URI uri;

Urn(String uri) {
Id(String uri) {
this.uri = URI.create(uri);
}

Expand All @@ -28,13 +28,13 @@ public URI getUri() {
}
}

public static final AssetType VEHICLE = new AssetType(Urn.Vehicle);
public static final AssetType VEHICLE = new AssetType(Id.Vehicle);

public static final AssetType PROPERTY = new AssetType(Urn.Property);
public static final AssetType PROPERTY = new AssetType(Id.Property);

public static final AssetType CONFIGURATION_ITEM = new AssetType(Urn.ConfigurationItem);
public static final AssetType CONFIGURATION_ITEM = new AssetType(Id.ConfigurationItem);

public AssetType(Urn urn) {
super(urn.getUri());
public AssetType(Id id) {
super(id.getUri());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

public class AvailabilityType extends ImmutableConcept {

public enum Urn {
Availability("urn:ical4j:concept:availability"),
public enum Id {
Availability("ical4j:concept:availability"),

Roster("urn:ical4j:concept:availability:roster"),
Roster("ical4j:concept:availability:roster"),

Reservable("urn:ical4j:concept:availability:reservable"),
Reservable("ical4j:concept:availability:reservable"),

Invitation("urn:ical4j:concept:availability:invitation"),
Invitation("ical4j:concept:availability:invitation"),

Offer("urn:ical4j:concept:availability:offer");
Offer("ical4j:concept:availability:offer");

private final URI uri;

Urn(String uri) {
Id(String uri) {
this.uri = URI.create(uri);
}

Expand All @@ -26,31 +26,31 @@ public URI getUri() {
}
}

public static final AvailabilityType AVAILABILITY = new AvailabilityType(Urn.Availability);
public static final AvailabilityType AVAILABILITY = new AvailabilityType(Id.Availability);

/**
* A Roster is used to schedule availability for individuals.
*/
public static final AvailabilityType ROSTER = new AvailabilityType(Urn.Roster);
public static final AvailabilityType ROSTER = new AvailabilityType(Id.Roster);

/**
* A Reservable provides availability for a finite resource such as physical assets.
*/
public static final AvailabilityType RESERVABLE = new AvailabilityType(Urn.Reservable);
public static final AvailabilityType RESERVABLE = new AvailabilityType(Id.Reservable);

/**
* Defines availability period to subscribe to
* a linked entity or resource. The definition of subscribe, and resulting actions are implementation-
* specific and not defined here.
*/
public static final AvailabilityType INVITATION = new AvailabilityType(Urn.Invitation);
public static final AvailabilityType INVITATION = new AvailabilityType(Id.Invitation);

/**
* See: <a href="https://schema.org/Offer">schema.org: Offer</a>
*/
public static final AvailabilityType OFFER = new AvailabilityType(Urn.Offer);
public static final AvailabilityType OFFER = new AvailabilityType(Id.Offer);

public AvailabilityType(Urn urn) {
super(urn.getUri());
public AvailabilityType(Id id) {
super(id.getUri());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*/
public class ContributorType extends ImmutableConcept {

public enum Urn {
Reporter("urn:ical4j:concept:contributor:reporter"),
public enum Id {
Reporter("ical4j:concept:contributor:reporter"),

Assignee("urn:ical4j:concept:contributor:assignee");
Assignee("ical4j:concept:contributor:assignee");

private final URI uri;

Urn(String uri) {
Id(String uri) {
this.uri = URI.create(uri);
}

Expand All @@ -23,11 +23,11 @@ public URI getUri() {
}
}

public static final ContributorType REPORTER = new ContributorType(Urn.Reporter);
public static final ContributorType REPORTER = new ContributorType(Id.Reporter);

public static final ContributorType ASSIGNEE = new ContributorType(Urn.Assignee);
public static final ContributorType ASSIGNEE = new ContributorType(Id.Assignee);

public ContributorType(Urn urn) {
super(urn.getUri());
public ContributorType(Id id) {
super(id.getUri());
}
}
32 changes: 16 additions & 16 deletions src/main/java/net/fortuna/ical4j/extensions/concept/EventType.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
*/
public class EventType extends ImmutableConcept {

public enum Urn {
Event("urn:ical4j:concept:event"),
public enum Id {
Event("ical4j:concept:event"),

Meeting("urn:ical4j:concept:event:meeting"),
Meeting("ical4j:concept:event:meeting"),

Appointment("urn:ical4j:concept:event:appointment"),
Appointment("ical4j:concept:event:appointment"),

Seminar("urn:ical4j:concept:event:seminar"),
Seminar("ical4j:concept:event:seminar"),

Conference("urn:ical4j:concept:event:conference"),
Conference("ical4j:concept:event:conference"),

Performance("urn:ical4j:concept:event:performance");
Performance("ical4j:concept:event:performance");

private final URI uri;

Urn(String uri) {
Id(String uri) {
this.uri = URI.create(uri);
}

Expand All @@ -32,19 +32,19 @@ public URI getUri() {
}
}

public static final EventType EVENT = new EventType(Urn.Event);
public static final EventType EVENT = new EventType(Id.Event);

public static final EventType MEETING = new EventType(Urn.Meeting);
public static final EventType MEETING = new EventType(Id.Meeting);

public static final EventType APPOINTMENT = new EventType(Urn.Appointment);
public static final EventType APPOINTMENT = new EventType(Id.Appointment);

public static final EventType SEMINAR = new EventType(Urn.Seminar);
public static final EventType SEMINAR = new EventType(Id.Seminar);

public static final EventType CONFERENCE = new EventType(Urn.Conference);
public static final EventType CONFERENCE = new EventType(Id.Conference);

public static final EventType PERFORMANCE = new EventType(Urn.Performance);
public static final EventType PERFORMANCE = new EventType(Id.Performance);

public EventType(Urn urn) {
super(urn.getUri());
public EventType(Id id) {
super(id.getUri());
}
}
Loading

0 comments on commit bd32a57

Please sign in to comment.