org.xwiki.rendering.internal.parser.reference
Class DefaultImageReferenceParser

java.lang.Object
  extended by org.xwiki.rendering.internal.parser.reference.DefaultImageReferenceParser
All Implemented Interfaces:
ResourceReferenceParser

@Component
@Named(value="image")
@Singleton
public class DefaultImageReferenceParser
extends Object
implements ResourceReferenceParser

Similar to DefaultResourceReferenceParser but handles the case where the resource type wasn't specified. In this case it tries to guess the type by first looking for a URL and then considering it's a reference to an attachment.

Since:
2.6M1
Version:
$Id$

Constructor Summary
DefaultImageReferenceParser()
           
 
Method Summary
 ResourceReference parse(String rawReference)
          Parses a resource reference represented (reference to a link, image, attachment, etc) as a String into a ResourceReference object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImageReferenceParser

public DefaultImageReferenceParser()
Method Detail

parse

public ResourceReference parse(String rawReference)
Parses a resource reference represented (reference to a link, image, attachment, etc) as a String into a ResourceReference object.

Specified by:
parse in interface ResourceReferenceParser
Parameters:
rawReference - the string representation of the resource reference to parse (the supported syntax depends on the parser implementation used)
Returns:
the parsed resource reference
See Also:
ResourceReferenceParser.parse(String)


Copyright © 2004-2011 XWiki. All Rights Reserved.