ibrokerkit.iname4java.store.impl.openxri
Class OpenxriXri

java.lang.Object
  extended by ibrokerkit.iname4java.store.impl.AbstractXri
      extended by ibrokerkit.iname4java.store.impl.openxri.OpenxriXri
All Implemented Interfaces:
Xri, java.io.Serializable, java.lang.Comparable<Xri>
Direct Known Subclasses:
GrsXri

public class OpenxriXri
extends AbstractXri

An i-name that exists in OpenXRI. In ibrokerKit, both top-level and community i-names are stored in OpenXRI.

See Also:
Serialized Form

Field Summary
protected  java.util.List<java.lang.String> aliases
           
protected  org.openxri.store.Authority authority
           
protected  java.util.Map<java.lang.String,java.lang.String> authorityAttributes
           
protected  java.lang.String authorityId
           
protected  org.openxri.xml.CanonicalEquivID canonicalEquivID
           
protected  org.openxri.xml.CanonicalID canonicalID
           
protected  java.util.Date date
           
protected  java.util.List<org.openxri.xml.EquivID> equivIDs
           
protected  java.lang.String extension
           
protected  org.openxri.store.Store openxriStore
           
protected  java.util.List<java.lang.String> parentAliases
           
protected  org.openxri.store.Authority parentAuthority
           
protected  java.util.List<org.openxri.xml.Redirect> redirects
           
protected  java.util.List<org.openxri.xml.Ref> refs
           
protected  java.util.List<org.openxri.xml.Service> services
           
protected  org.openxri.store.SubSegment subSegment
           
protected  java.util.Map<java.lang.String,java.lang.String> subSegmentAttributes
           
protected  org.openxri.xml.XRD xrd
           
 
Constructor Summary
protected OpenxriXri(OpenxriXri xri)
           
protected OpenxriXri(org.openxri.store.Store openxriStore, org.openxri.store.SubSegment subSegment)
           
protected OpenxriXri(org.openxri.store.Store openxriStore, org.openxri.store.SubSegment subSegment, org.openxri.store.Authority authority)
           
 
Method Summary
 void addEquivID(org.openxri.xml.EquivID equivID)
           
 void addRedirect(org.openxri.xml.Redirect redirect)
           
 void addRef(org.openxri.xml.Ref ref)
           
 void addService(org.openxri.xml.Service service)
           
 void addServices(org.openxri.xml.Service[] services)
           
 void deleteAllServices()
           
 void deleteCanonicalEquivID()
           
 void deleteEquivID(org.openxri.xml.EquivID equivID)
           
 void deleteExtension()
           
 void deleteRedirect(org.openxri.xml.Redirect redirect)
           
 void deleteRef(org.openxri.xml.Ref ref)
           
 void deleteService(org.openxri.xml.Service service)
           
 void deleteStandardServices()
           
 java.util.List<java.lang.String> getAliases()
          Returns a list of "full names" of i-names that resolve to the authority of this i-name.
 org.openxri.store.Authority getAuthority()
           
 java.lang.String getAuthorityAttribute(java.lang.String key)
           
 java.lang.String getAuthorityId()
          Returns the ID of the OpenXRI authority of this i-name.
 org.openxri.xml.CanonicalEquivID getCanonicalEquivID()
           
 org.openxri.xml.CanonicalID getCanonicalID()
           
 java.util.Date getDate()
          Returns the registration date of this i-name.
 java.util.List<org.openxri.xml.EquivID> getEquivIDs()
           
 java.lang.String getExtension()
           
 java.lang.String getFullName()
          Returns a single "full name" of this i-name.
 java.util.List<java.lang.String> getFullNames()
          Returns all "full names" of this i-name.
 java.lang.String getLocalName()
          Returns the "local name" of this i-name.
 java.util.List<java.lang.String> getParentAliases()
          Returns a list of "full names" of i-names that resolve to the parent authority of this i-name.
 org.openxri.store.Authority getParentAuthority()
           
 java.util.List<org.openxri.xml.Redirect> getRedirects()
           
 java.util.List<org.openxri.xml.Ref> getRefs()
           
 java.util.List<org.openxri.xml.Service> getServices()
           
 org.openxri.store.SubSegment getSubSegment()
           
 java.lang.String getXriAttribute(java.lang.String key)
           
 boolean hasAuthorityAttribute(java.lang.String key)
           
 boolean hasXriAttribute(java.lang.String key)
           
 boolean isStale()
          Returns true, if the i-name is "stale".
 void setAuthorityAttribute(java.lang.String key, java.lang.String value)
           
 void setCanonicalEquivID(org.openxri.xml.CanonicalEquivID canonicalEquivID)
           
 void setCanonicalID(org.openxri.xml.CanonicalID canonicalID)
           
 void setExtension(java.lang.String extension)
           
 void setXriAttribute(java.lang.String key, java.lang.String value)
           
 
Methods inherited from class ibrokerkit.iname4java.store.impl.AbstractXri
compareTo, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

openxriStore

protected org.openxri.store.Store openxriStore

subSegment

protected org.openxri.store.SubSegment subSegment

authority

protected org.openxri.store.Authority authority

parentAuthority

protected org.openxri.store.Authority parentAuthority

xrd

protected org.openxri.xml.XRD xrd

authorityId

protected java.lang.String authorityId

subSegmentAttributes

protected java.util.Map<java.lang.String,java.lang.String> subSegmentAttributes

authorityAttributes

protected java.util.Map<java.lang.String,java.lang.String> authorityAttributes

date

protected java.util.Date date

parentAliases

protected java.util.List<java.lang.String> parentAliases

aliases

protected java.util.List<java.lang.String> aliases

canonicalID

protected org.openxri.xml.CanonicalID canonicalID

canonicalEquivID

protected org.openxri.xml.CanonicalEquivID canonicalEquivID

extension

protected java.lang.String extension

equivIDs

protected java.util.List<org.openxri.xml.EquivID> equivIDs

refs

protected java.util.List<org.openxri.xml.Ref> refs

redirects

protected java.util.List<org.openxri.xml.Redirect> redirects

services

protected java.util.List<org.openxri.xml.Service> services
Constructor Detail

OpenxriXri

protected OpenxriXri(org.openxri.store.Store openxriStore,
                     org.openxri.store.SubSegment subSegment)

OpenxriXri

protected OpenxriXri(org.openxri.store.Store openxriStore,
                     org.openxri.store.SubSegment subSegment,
                     org.openxri.store.Authority authority)

OpenxriXri

protected OpenxriXri(OpenxriXri xri)
Method Detail

getSubSegment

public org.openxri.store.SubSegment getSubSegment()

getAuthority

public org.openxri.store.Authority getAuthority()
                                         throws org.openxri.exceptions.StoreException
Throws:
org.openxri.exceptions.StoreException

getParentAuthority

public org.openxri.store.Authority getParentAuthority()
                                               throws org.openxri.exceptions.StoreException
Throws:
org.openxri.exceptions.StoreException

getLocalName

public java.lang.String getLocalName()
Description copied from interface: Xri
Returns the "local name" of this i-name. In the case of a top-level i-name, this is simply the i-name itself (e.g. =myname) In the case of a community i-name, this is the subsegment (e.g. *myname)


getFullName

public java.lang.String getFullName()
Description copied from interface: Xri
Returns a single "full name" of this i-name. In the case of a top-level i-name, this is simply the i-name itself (e.g. =myname) In the case of a community i-name, this is the whole i-name (e.g. =mycommunity*myname)


getFullNames

public java.util.List<java.lang.String> getFullNames()
Description copied from interface: Xri
Returns all "full names" of this i-name. This can be more than one if the i-name is a community i-name, and if one or more parent i-names higher up in the hierarchy have synonyms. For example, if =mycommunity and =myothercommunity are synonyms, then there could be a community i-name *myname which has two "full names": =mycommunity*myname and =myothercommunity*myname


getAuthorityId

public java.lang.String getAuthorityId()
Description copied from interface: Xri
Returns the ID of the OpenXRI authority of this i-name.


getDate

public java.util.Date getDate()
Description copied from interface: Xri
Returns the registration date of this i-name.


getXriAttribute

public java.lang.String getXriAttribute(java.lang.String key)
                                 throws XriStoreException
Throws:
XriStoreException

hasXriAttribute

public boolean hasXriAttribute(java.lang.String key)
                        throws XriStoreException
Throws:
XriStoreException

setXriAttribute

public void setXriAttribute(java.lang.String key,
                            java.lang.String value)
                     throws XriStoreException
Throws:
XriStoreException

getAuthorityAttribute

public java.lang.String getAuthorityAttribute(java.lang.String key)
                                       throws XriStoreException
Throws:
XriStoreException

hasAuthorityAttribute

public boolean hasAuthorityAttribute(java.lang.String key)
                              throws XriStoreException
Throws:
XriStoreException

setAuthorityAttribute

public void setAuthorityAttribute(java.lang.String key,
                                  java.lang.String value)
                           throws XriStoreException
Throws:
XriStoreException

getParentAliases

public java.util.List<java.lang.String> getParentAliases()
Description copied from interface: Xri
Returns a list of "full names" of i-names that resolve to the parent authority of this i-name.


getAliases

public java.util.List<java.lang.String> getAliases()
Description copied from interface: Xri
Returns a list of "full names" of i-names that resolve to the authority of this i-name.


isStale

public boolean isStale()
Description copied from interface: Xri
Returns true, if the i-name is "stale". An i-name is "stale" if it has a parent authority (i.e. is a community i-name) but the parent authority has no "full name". For example, let's assume we have a community i-name @free*earth*moon. If someone deletes the community i-name *earth, then *moon still exists, but its parent authority has no "full name" anymore. Therefore *moon is stale.


getCanonicalID

public org.openxri.xml.CanonicalID getCanonicalID()
                                           throws XriStoreException
Throws:
XriStoreException

getCanonicalEquivID

public org.openxri.xml.CanonicalEquivID getCanonicalEquivID()
                                                     throws XriStoreException
Throws:
XriStoreException

getExtension

public java.lang.String getExtension()
                              throws XriStoreException
Throws:
XriStoreException

getEquivIDs

public java.util.List<org.openxri.xml.EquivID> getEquivIDs()
                                                    throws XriStoreException
Throws:
XriStoreException

getRefs

public java.util.List<org.openxri.xml.Ref> getRefs()
                                            throws XriStoreException
Throws:
XriStoreException

getRedirects

public java.util.List<org.openxri.xml.Redirect> getRedirects()
                                                      throws XriStoreException
Throws:
XriStoreException

getServices

public java.util.List<org.openxri.xml.Service> getServices()
                                                    throws XriStoreException
Throws:
XriStoreException

setCanonicalID

public void setCanonicalID(org.openxri.xml.CanonicalID canonicalID)
                    throws XriStoreException
Throws:
XriStoreException

setCanonicalEquivID

public void setCanonicalEquivID(org.openxri.xml.CanonicalEquivID canonicalEquivID)
                         throws XriStoreException
Throws:
XriStoreException

setExtension

public void setExtension(java.lang.String extension)
                  throws XriStoreException
Throws:
XriStoreException

addEquivID

public void addEquivID(org.openxri.xml.EquivID equivID)
                throws XriStoreException
Throws:
XriStoreException

addRef

public void addRef(org.openxri.xml.Ref ref)
            throws XriStoreException
Throws:
XriStoreException

addRedirect

public void addRedirect(org.openxri.xml.Redirect redirect)
                 throws XriStoreException
Throws:
XriStoreException

addService

public void addService(org.openxri.xml.Service service)
                throws XriStoreException
Throws:
XriStoreException

addServices

public void addServices(org.openxri.xml.Service[] services)
                 throws XriStoreException
Throws:
XriStoreException

deleteCanonicalEquivID

public void deleteCanonicalEquivID()
                            throws XriStoreException
Throws:
XriStoreException

deleteExtension

public void deleteExtension()
                     throws XriStoreException
Throws:
XriStoreException

deleteEquivID

public void deleteEquivID(org.openxri.xml.EquivID equivID)
                   throws XriStoreException
Throws:
XriStoreException

deleteRef

public void deleteRef(org.openxri.xml.Ref ref)
               throws XriStoreException
Throws:
XriStoreException

deleteRedirect

public void deleteRedirect(org.openxri.xml.Redirect redirect)
                    throws XriStoreException
Throws:
XriStoreException

deleteService

public void deleteService(org.openxri.xml.Service service)
                   throws XriStoreException
Throws:
XriStoreException

deleteAllServices

public void deleteAllServices()
                       throws XriStoreException
Throws:
XriStoreException

deleteStandardServices

public void deleteStandardServices()
                            throws XriStoreException
Throws:
XriStoreException


Copyright © 2009. All Rights Reserved.