org.jdom.IllegalAddException Java Examples
The following examples show how to use
org.jdom.IllegalAddException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TermDefinition.java From rice with Educational Community License v2.0 | 6 votes |
/** * static factory for creating a {@link Builder} from a {@link TermDefinitionContract}. * * @param term must be non-null. */ public static Builder create(TermDefinitionContract term) { if (term == null) throw new IllegalAddException("term may not be null"); // Convert TermParameterDefinitionContract to TermParameterDefinition: List<TermParameterDefinition.Builder> outParams = BuilderUtils.transform(term.getParameters(), TermParameterDefinition.Builder.toBuilder); Builder builder = create(term.getId(), // doing my TermSpecificationDefinitionContract conversion inline: TermSpecificationDefinition.Builder.create(term.getSpecification()), // this is made immutable in the setter outParams ); builder.setDescription(term.getDescription()); builder.setVersionNumber(term.getVersionNumber()); return builder; }
Example #2
Source File: JDOMUtils.java From geowave with Apache License 2.0 | 5 votes |
public static Element writeElementList(final String tag, final Collection<?> c) { final Element el = new Element(tag); try { el.addContent(c); } catch (final IllegalAddException e) { LOGGER.warn(e + ": " + el.toString(), e); } return el; }
Example #3
Source File: XML2Database.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private void addAttribute(final String attribute, final String value){ if (elementOpened) { buffer.append(" " + attribute + "=\"" + value + "\""); } else { throw new IllegalAddException(""); } }