this.lexer.match(TokenTypes.P_PREFERRED_SERVICE);
this.lexer.SPorHT();
this.lexer.match(':');
this.lexer.SPorHT();
PPreferredService pps = new PPreferredService();
String urn = this.lexer.getBuffer();
if(urn.contains(ParameterNamesIms.SERVICE_ID)){
if(urn.contains(ParameterNamesIms.SERVICE_ID_LABEL))
{
String serviceID = urn.split(ParameterNamesIms.SERVICE_ID_LABEL+".")[1];
if(serviceID.trim().equals(""))
try {
throw new InvalidArgumentException("URN should atleast have one sub-service");
} catch (InvalidArgumentException e) {
e.printStackTrace();
}
else
pps.setSubserviceIdentifiers(serviceID);
}
else if(urn.contains(ParameterNamesIms.APPLICATION_ID_LABEL))
{
String appID = urn.split(ParameterNamesIms.APPLICATION_ID_LABEL)[1];
if(appID.trim().equals(""))
try {
throw new InvalidArgumentException("URN should atleast have one sub-application");
} catch (InvalidArgumentException e) {
e.printStackTrace();
}
else
pps.setApplicationIdentifiers(appID);
}
else
{
try {
throw new InvalidArgumentException("URN is not well formed");