MCPcopy Create free account
hub / github.com/apache/xmlgraphics-fop / checkId

Method checkId

fop-core/src/main/java/org/apache/fop/fo/FObj.java:234–243  ·  view source on GitHub ↗

Setup the id for this formatting object. Most formatting objects can have an id that can be referenced. This methods checks that the id isn't already used by another FO @param id the id to check @throws ValidationException if the ID is already defined elsewhere (stri

(String id)

Source from the content-addressed store, hash-verified

232 * (strict validation only)
233 */
234 private void checkId(String id) throws ValidationException {
235 if (!inMarker() && !id.equals("")) {
236 Set<String> idrefs = getBuilderContext().getIDReferences();
237 if (!idrefs.contains(id)) {
238 idrefs.add(id);
239 } else {
240 getFOValidationEventProducer().idNotUnique(this, getName(), id, true, locator);
241 }
242 }
243 }
244
245 /**
246 * Returns Out Of Line FO Descendant indicator.

Callers 1

startOfNodeMethod · 0.95

Calls 9

getIDReferencesMethod · 0.80
containsMethod · 0.80
idNotUniqueMethod · 0.80
addMethod · 0.65
getNameMethod · 0.65
inMarkerMethod · 0.45
equalsMethod · 0.45
getBuilderContextMethod · 0.45

Tested by

no test coverage detected