/** * {@inheritDoc} */ @Override public void validate() throws ValidationException { for (Parameter param : getParameters()) { try { assertTextParameter(param); } catch (ValidationException ve) { assertPidParameter(param); } } }
/** * Factory constructor. * * @param params property parameters * @param value string representation of an agent value * @throws URISyntaxException if the string value is an invalid URI */ public Agent(List<Parameter> params, String value) throws URISyntaxException { super(Id.AGENT, params); if (Value.TEXT.equals(getParameter(Parameter.Id.VALUE))) { this.text = value; } else { this.uri = new URI(value); } }
private void createAgent(URI uri, URI prop, Agent agent) throws RDFHandlerException, RDFParseException { if(agent.getUri() != null) { URI r_agent = createURI(agent.getUri().toString()); rdfHandler.handleStatement(createStatement(uri,prop,r_agent)); } else { log.warn("ignoring agent relation, since agent cannot be resolved"); } }
/** * {@inheritDoc} */ public Agent createProperty(final List<Parameter> params, final String value) throws URISyntaxException { return new Agent(params, unescape(value)); }
/** * @param text agent text value */ public Agent(final String text) { super(Id.AGENT); this.text = text; getParameters().add(Value.TEXT); }
/** * Factory constructor. * @param params property parameters * @param value string representation of an agent value * @throws URISyntaxException if the string value is an invalid URI */ public Agent(final List<Parameter> params, final String value) throws URISyntaxException { super(Id.AGENT, params); if (Value.TEXT.equals(getParameter(Parameter.Id.VALUE))) { this.text = value; } else { this.uri = new URI(value); } }
private void createAgent(URI uri, URI prop, Agent agent) throws RDFHandlerException, RDFParseException { if(agent.getUri() != null) { URI r_agent = createURI(agent.getUri().toString()); rdfHandler.handleStatement(createStatement(uri,prop,r_agent)); } else { log.warn("ignoring agent relation, since agent cannot be resolved"); } }
/** * {@inheritDoc} */ public Agent createProperty(final List<Parameter> params, final String value) throws URISyntaxException { return new Agent(params, unescape(value)); }
/** * @param text agent text value */ public Agent(String text) { super(Id.AGENT); this.text = text; getParameters().add(Value.TEXT); }
/** * {@inheritDoc} */ @Override public void validate() throws ValidationException { for (Parameter param : getParameters()) { try { assertTextParameter(param); } catch (ValidationException ve) { assertPidParameter(param); } } }
/** * {@inheritDoc} */ @Override public String getValue() { if (Value.TEXT.equals(getParameter(Parameter.Id.VALUE))) { return text; } return Strings.valueOf(uri); }
/** * {@inheritDoc} */ @Override public String getValue() { if (Value.TEXT.equals(getParameter(Parameter.Id.VALUE))) { return text; } return Strings.valueOf(uri); }