@Test public void parseImagesCommon() { ResourceReference reference = this.parser.parse("wiki:space.page@filename"); assertEquals(ResourceType.ATTACHMENT, reference.getType()); assertEquals("wiki:space.page@filename", reference.getReference()); assertEquals("Typed = [false] Type = [attach] Reference = [wiki:space.page@filename]", reference.toString()); assertFalse(reference.isTyped()); reference = this.parser.parse("scheme: assertEquals(ResourceType.URL, reference.getType()); assertEquals("scheme: assertEquals("Typed = [false] Type = [url] Reference = [scheme: reference.toString()); assertFalse(reference.isTyped()); }
@Override public ResourceReference parse(String rawReference) { ResourceReference reference = this.defaultResourceReferenceParser.parse(rawReference); if (reference.getType().equals(ResourceType.UNKNOWN)) { reference = this.untypedImageReferenceParser.parse(rawReference); } return reference; }
DefaultImageReferenceParser implements ResourceReferenceParser { @Override public ResourceReference parse(String rawReference) { ResourceReference reference = this.defaultResourceReferenceParser.parse(rawReference); if (reference.getType().equals(ResourceType.UNKNOWN)) { reference = this.untypedImageReferenceParser.parse(rawReference); } return reference; } }
DefaultImageReferenceParser implements ResourceReferenceParser { @Override public ResourceReference parse(String rawReference) { ResourceReference reference = this.defaultResourceReferenceParser.parse(rawReference); if (reference.getType().equals(ResourceType.UNKNOWN)) { reference = this.untypedImageReferenceParser.parse(rawReference); } return reference; }  }
DefaultImageReferenceParser implements ResourceReferenceParser { @Override public ResourceReference parse(String rawReference) { ResourceReference reference = this.defaultResourceReferenceParser.parse(rawReference); if (reference.getType().equals(ResourceType.UNKNOWN)) { reference = this.untypedImageReferenceParser.parse(rawReference); } return reference; }  @Override ResourceReference parse(String rawReference); }
DefaultImageReferenceParser implements ResourceReferenceParser { @Override public ResourceReference parse(String rawReference) { ResourceReference reference = this.defaultResourceReferenceParser.parse(rawReference); if (reference.getType().equals(ResourceType.UNKNOWN)) { reference = this.untypedImageReferenceParser.parse(rawReference); } return reference; }  @Override ResourceReference parse(String rawReference);  }