@Override
	public Resource objectToJena(Model toAddTo, Alert alert)
			throws IllegalArgumentException {
		if (alert.getResourceURL() == null) {
			throw new IllegalArgumentException(String.format(msg_ResourceWithoutURI, "alerts"));
		}
		Resource res = toAddTo.createResource(alert.getResourceURL().toString());
		toAddTo.add(res, RDF.type, NCAL.Event);
		if (alert.getTitle()!=null)
			toAddTo.add(res, DCTerms.title, alert.getTitle());
		//category, e.g. freetext search
		if (alert.getQuery().getType()!=null)
			toAddTo.add(res, NCAL.categories, alert.getQuery().getType().name());
		//this could be better a category parameter, but ncal:category is a string ...
		if (alert.getQuery().getContent()!=null)
			toAddTo.add(res, DCTerms.subject, alert.getQuery().getContent());
		//recurrence rule
		Resource rrule = toAddTo.createResource();
		toAddTo.add(rrule, RDF.type, NCAL.RecurrenceRule);
		//frequency, e.g. weekly
		Resource frequency = toAddTo.createResource(String.format("%s%s",NCAL.URI,alert.getRecurrenceFrequency().name())).addProperty(RDF.type, NCAL.RecurrenceFrequency);
		toAddTo.add(rrule,NCAL.freq,frequency);
		//interval , e.g. 2 means every second week
		toAddTo.addLiteral(rrule,NCAL.interval,alert.getRecurrenceInterval());
		toAddTo.add(res,NCAL.rrule, rrule);
		//the user
		if ((alert.getUser()!=null) && (alert.getUser().getResourceURL()!=null)) {
			Resource user = toAddTo.createResource(alert.getUser().getResourceURL().toString());
			toAddTo.add(user, RDF.type, NCAL.Attendee);
			toAddTo.add(user, RDF.type, TOXBANK.USER);
			toAddTo.add(res,NCAL.attendee,user);
		}
		return res;
	}