- this.input = input;
- this.content = Optional.of(inputStream);
- }
-
- @Override
- public String getCapabilityUri() {
- // FIXME capabilities in Netconf-impl need to check for NO REVISION
- final String withoutRevision = getModuleNamespace().get() + "?module=" + getModuleName().get();
- return hasRevision() ? withoutRevision + "&revision=" + Util.writeDate(input.getRevision()) : withoutRevision;
- }
-
- @Override
- public Optional<String> getModuleNamespace() {
- return Optional.of(input.getNamespace().toString());
- }
-
- @Override
- public Optional<String> getModuleName() {
- return Optional.of(input.getName());
- }
-
- @Override
- public Optional<String> getRevision() {
- return Optional.of(hasRevision() ? QName.formattedRevision(input.getRevision()) : "");
- }
-
- private boolean hasRevision() {
- return !input.getRevision().equals(NO_REVISION);