revisionDate = Optional.of(SimpleDateFormatUtil.DEFAULT_DATE_REV);
}
- QNameModule qNameModule = QNameModule.create(moduleNs, revisionDate.orElse(null)).intern();
+ final QNameModule qNameModule = QNameModule.create(moduleNs, revisionDate.orElse(null)).intern();
stmt.addToNs(ModuleCtxToModuleQName.class, stmt, qNameModule);
}
@Override
public void onLinkageDeclared(final Mutable<String, ModuleStatement, EffectiveStatement<String, ModuleStatement>> stmt) {
- Optional<URI> moduleNs = Optional.ofNullable(firstAttributeOf(stmt.declaredSubstatements(),
+ final Optional<URI> moduleNs = Optional.ofNullable(firstAttributeOf(stmt.declaredSubstatements(),
NamespaceStatement.class));
SourceException.throwIf(!moduleNs.isPresent(), stmt.getStatementSourceReference(),
"Namespace of the module [%s] is missing", stmt.getStatementArgument());
revisionDate = Optional.of(SimpleDateFormatUtil.DEFAULT_DATE_REV);
}
- QNameModule qNameModule = QNameModule.create(moduleNs.get(), revisionDate.orElse(null)).intern();
- ModuleIdentifier moduleIdentifier = ModuleIdentifierImpl.create(stmt.getStatementArgument(),
+ final QNameModule qNameModule = QNameModule.create(moduleNs.get(), revisionDate.orElse(null)).intern();
+ final ModuleIdentifier moduleIdentifier = ModuleIdentifierImpl.create(stmt.getStatementArgument(),
Optional.empty(), revisionDate);
stmt.addContext(ModuleNamespace.class, moduleIdentifier, stmt);
public void onFullDefinitionDeclared(final Mutable<String, ModuleStatement,
EffectiveStatement<String, ModuleStatement>> stmt) {
super.onFullDefinitionDeclared(stmt);
- SUBSTATEMENT_VALIDATOR.validate(stmt);
+ getSubstatementValidator().validate(stmt);
+ }
+
+ protected SubstatementValidator getSubstatementValidator() {
+ return SUBSTATEMENT_VALIDATOR;
}
}