Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openxri
Class XRI

    java.lang.Object
      org.openxri.Parsable
          org.openxri.XRI

All Implemented Interfaces:
  java.lang.Comparable, XRIReference

    public class XRI

extends Parsable
implements XRIReference

This class provides a strong typing for a XRI. Any object of this class that appears outside of the package is a valid XRI. THERE ARE INTENTIONALLY NO SET METHODS. Use this class like java.lang.String or java.net.URI

Author:
  =chetan

Field Summary
`static char` | `PDELIM`
`static java.lang.String` | `PDELIM_S`
`static char` | `RDELIM`
`static java.lang.String` | `RDELIM_S`
`static java.lang.String` | `XRI_SCHEME`
`static int` | `XRI_SCHEME_LENGTH`

Constructor Summary
`XRI(AuthorityPath oAuthority)` Constructs an XRI from the provided AuthorityPath
`XRI(AuthorityPath oAuthority, XRIPath oPath)` Constructs an XRI from the provided AuthorityPath and LocalPath
`XRI(AuthorityPath oAuthority, XRIPath oPath, XRIQuery query, XRIFragment fragment)` Constructs an XRI from the provided AuthorityPath, LocalPath, Query and Fragment
`XRI(java.lang.String sXRI)` Constructs XRI from String
`XRI(XRI oXRI)` Constructs an XRI from the provided XRI

Method Summary
`boolean` | `equals(XRI x)`
`static XRI` | `fromIRINormalForm(java.lang.String iri)` Constructs an XRI from the provided XRI reference in IRI Normal Form
`static XRI` | `fromURINormalForm(java.lang.String uri)` Constructs an XRI from the provided XRI reference in URI Normal Form
`AuthorityPath` | `getAuthorityPath()` Returns the AuthorityPath component of this XRI Reference
`XRIFragment` | `getFragment()`
`XRIQuery` | `getQuery()`
`XRIAbsolutePath` | `getXRIAbsolutePath()`
`XRIPath` | `getXRIPath()` Returns the XRI Path component of this XRI Reference
`boolean` | `isAbsolute()` returns returns true if the XRI is absolute
`boolean` | `isRelative()` returns returns true if the XRI is relative
`java.lang.String` | `toIRINormalForm()`
`java.lang.String` | `toString(boolean wantScheme, boolean caseFoldAuthority)`
`java.lang.String` | `toURINormalForm()` Serialzes the XRI into IRI normal from

Methods inherited from class org.openxri.Parsable
`compareTo, equals, hashCode, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### PDELIM_S

    public static final java.lang.String PDELIM_S

See Also:
  Constant Field Values

### RDELIM_S

    public static final java.lang.String RDELIM_S

See Also:
  Constant Field Values

### PDELIM

    public static final char PDELIM

See Also:
  Constant Field Values

### RDELIM

    public static final char RDELIM

See Also:
  Constant Field Values

### XRI_SCHEME

    public static final java.lang.String XRI_SCHEME

See Also:
  Constant Field Values

### XRI_SCHEME_LENGTH

    public static final int XRI_SCHEME_LENGTH

Constructor Detail

### XRI

    public XRI(XRI oXRI)

  Constructs an XRI from the provided XRI

### XRI

    public XRI(java.lang.String sXRI)

  Constructs XRI from String

### XRI

    public XRI(AuthorityPath oAuthority)

  Constructs an XRI from the provided AuthorityPath

### XRI

    public XRI(AuthorityPath oAuthority,
               XRIPath oPath)

  Constructs an XRI from the provided AuthorityPath and LocalPath

  Parameters:
    `oAuthority` -
    `oPath` -

### XRI

    public XRI(AuthorityPath oAuthority,
               XRIPath oPath,
               XRIQuery query,
               XRIFragment fragment)

  Constructs an XRI from the provided AuthorityPath, LocalPath, Query and Fragment

  Parameters:
    `oAuthority` -
    `oPath` -
    `query` -
    `fragment` -

Method Detail

### getXRIAbsolutePath

    public XRIAbsolutePath getXRIAbsolutePath()

  Returns:
    absolute path

### fromIRINormalForm

    public static XRI fromIRINormalForm(java.lang.String iri)

  Constructs an XRI from the provided XRI reference in IRI Normal Form

  Parameters:
    `iri` -
  Returns:

### fromURINormalForm

    public static XRI fromURINormalForm(java.lang.String uri)

  Constructs an XRI from the provided XRI reference in URI Normal Form

  Parameters:
    `iri` -
  Returns:

### isAbsolute

    public boolean isAbsolute()

  returns returns true if the XRI is absolute

  Returns:
    boolean returns true if the XRI is absolute

### isRelative

    public boolean isRelative()

  returns returns true if the XRI is relative

  Returns:
    boolean returns true if the XRI is relative

### toString

    public java.lang.String toString(boolean wantScheme,
                                     boolean caseFoldAuthority)

### equals

    public boolean equals(XRI x)

### toIRINormalForm

    public java.lang.String toIRINormalForm()

### toURINormalForm

    public java.lang.String toURINormalForm()

  Serialzes the XRI into IRI normal from

  Returns:
    The IRI normal form of the XRI

### getAuthorityPath

    public AuthorityPath getAuthorityPath()

  Description copied from interface: `XRIReference`
  Returns the AuthorityPath component of this XRI Reference

  Specified by:
    `getAuthorityPath` in interface `XRIReference`

### getXRIPath

    public XRIPath getXRIPath()

  Description copied from interface: `XRIReference`
  Returns the XRI Path component of this XRI Reference

  Specified by:
    `getXRIPath` in interface `XRIReference`

### getQuery

    public XRIQuery getQuery()

  Returns:
    Returns the query.

### getFragment

    public XRIFragment getFragment()

  Returns:
    Returns the fragment.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2009. All Rights Reserved.