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

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

@Component
@Named(value="link")
@Singleton
public class DefaultLinkReferenceParser
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 a document.

Since:
2.6M1
Version:
$Id$

Constructor Summary
DefaultLinkReferenceParser()
           
 
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

DefaultLinkReferenceParser

public DefaultLinkReferenceParser()
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.