C# Class DotNetXri.Syntax.XRISegment

This class provides a strong typing for a XRI Segment. Any obj of this class that appears outside of the package is a valid XRI Segment with at least one subsegment.
Inheritance: Parsable
Datei anzeigen Open project: AArnott/dotnetxri Class Usage Examples

Public Methods

Method Description
Equals ( XRISegment segment ) : bool
EqualsIgnoreCase ( XRISegment segment ) : bool
ToString ( ) : string

String representation of the obj.

XRISegment ( string sVal ) : System

Constructs XRISegment from String

XRISegment ( string sVal, bool bAllowImpliedDelimiter, bool bAllowColon ) : System

Constructs XRISegment from String

getNumSubSegments ( ) : int

Returns the number of subsegments in the XRI segment

getParent ( ) : XRISegment

Returns the parent XRISegment for this obj. Equivalent to all but the last SubSegment.

getRemainder ( int nSkip ) : XRISegment

Returns the last part of the XRI segment. Skips over the specified number of subsegments and returns the remainder as a XRISegment. For example: This XRI Segment is "!a!b!c!d" getSegmentRemaider(0) => !a!b!c!d getSegmentRemaider(1) => !b!c!d getSegmentRemaider(2) => !c!d getSegmentRemaider(3) => !d getSegmentRemaider(4) => null

getSubSegmentAt ( int nIndex ) : XRISubSegment

Returns the subsegment at the given index

getSubSegmentIterator ( ) : IEnumerator

provides an Iterator for the subsegments

isPrefixOf ( XRISegment segment ) : bool
toIRINormalForm ( ) : string

Serializes XRISegment into IRI normal from

toIRINormalForm ( bool wantOptionalDelim ) : string

Serializes XRISegment into IRI normal from

toURINormalForm ( ) : string

Serializes XRISegment into URI normal from

toURINormalForm ( bool wantOptionalDelim ) : string

Serializes XRISegment into URI normal from

Private Methods

Method Description
XRISegment ( bool bAllowImpliedDelimiter, bool bAllowColon, bool bAllowReassignable ) : System

Protected Constructor used by package only

doScan ( ParseStream oXRISegStream ) : bool

Parses the input stream into the obj

Method Details

Equals() public method

public Equals ( XRISegment segment ) : bool
segment XRISegment
return bool

EqualsIgnoreCase() public method

public EqualsIgnoreCase ( XRISegment segment ) : bool
segment XRISegment
return bool

ToString() public method

String representation of the obj.
public ToString ( ) : string
return string

XRISegment() public method

Constructs XRISegment from String
public XRISegment ( string sVal ) : System
sVal string
return System

XRISegment() public method

Constructs XRISegment from String
public XRISegment ( string sVal, bool bAllowImpliedDelimiter, bool bAllowColon ) : System
sVal string
bAllowImpliedDelimiter bool
bAllowColon bool
return System

getNumSubSegments() public method

Returns the number of subsegments in the XRI segment
public getNumSubSegments ( ) : int
return int

getParent() public method

Returns the parent XRISegment for this obj. Equivalent to all but the last SubSegment.
public getParent ( ) : XRISegment
return XRISegment

getRemainder() public method

Returns the last part of the XRI segment. Skips over the specified number of subsegments and returns the remainder as a XRISegment. For example: This XRI Segment is "!a!b!c!d" getSegmentRemaider(0) => !a!b!c!d getSegmentRemaider(1) => !b!c!d getSegmentRemaider(2) => !c!d getSegmentRemaider(3) => !d getSegmentRemaider(4) => null
public getRemainder ( int nSkip ) : XRISegment
nSkip int
return XRISegment

getSubSegmentAt() public method

Returns the subsegment at the given index
public getSubSegmentAt ( int nIndex ) : XRISubSegment
nIndex int The index of the subsegment to return
return XRISubSegment

getSubSegmentIterator() public method

provides an Iterator for the subsegments
public getSubSegmentIterator ( ) : IEnumerator
return IEnumerator

isPrefixOf() public method

public isPrefixOf ( XRISegment segment ) : bool
segment XRISegment
return bool

toIRINormalForm() public method

Serializes XRISegment into IRI normal from
public toIRINormalForm ( ) : string
return string

toIRINormalForm() public method

Serializes XRISegment into IRI normal from
public toIRINormalForm ( bool wantOptionalDelim ) : string
wantOptionalDelim bool
return string

toURINormalForm() public method

Serializes XRISegment into URI normal from
public toURINormalForm ( ) : string
return string

toURINormalForm() public method

Serializes XRISegment into URI normal from
public toURINormalForm ( bool wantOptionalDelim ) : string
wantOptionalDelim bool
return string