Package org.openxri.xml

Examples of org.openxri.xml.CanonicalID


   
    // create a new CanonicalID (random)

    String localCanonicalIDString = isINumber ? subSegmentName : randomCanonicalIDString();
    String canonicalIDString = parentAuthority.getXrd().getCanonicalID().getValue() + localCanonicalIDString;
    CanonicalID canonicalID = new CanonicalID(canonicalIDString);

    // put the CanonicalID into the XRD

    xrd.setCanonicalID(canonicalID);
View Full Code Here


      }
    }

    // use the XRD's CanonicalID as the provider ID for the authority resolution service endpoint

    CanonicalID canonicalID = xrd.getCanonicalID();
    String canonicalIDString = null;

    if (canonicalID != null) {

      canonicalIDString = canonicalID.getValue();
    }

    // find out what to use as the namespace for further subsegments

    String namespace = null;
View Full Code Here

    }

    String localCanonicalIDString = isINumber ? subSegmentName : ("!" + Integer.toString(canonicalIDValue));
    canonicalIDString = parentAuthority.getXrd().getCanonicalidAt(0).getValue() + localCanonicalIDString;

    CanonicalID canonicalID = new CanonicalID(canonicalIDString);

    // write incremented authority attribute back to store
   
    if (! isINumber) {
   
View Full Code Here

  public XRD execute(Store store, XRD xrd, XRISegment segment, Authority parentAuthority, String subSegmentName, Authority authority, boolean isCreate) throws StageException {

    // use the XRD's CanonicalID as the provider ID for the service endpoint

    CanonicalID canonicalID = xrd.getCanonicalID();
    String canonicalIDString = null;

    if (canonicalID != null) {

      canonicalIDString = canonicalID.getValue();
    }

    // create elements for the service endpoint

    Vector<SEPUri> uris = new Vector<SEPUri> ();
View Full Code Here

   
    // create a new CanonicalID (random)

    String localCanonicalIDString = isINumber ? subSegmentName : randomCanonicalIDString();
    String canonicalIDString = parentAuthority.getXrd().getCanonicalID().getValue() + localCanonicalIDString;
    CanonicalID canonicalID = new CanonicalID(canonicalIDString);

    // put the CanonicalID into the XRD

    xrd.setCanonicalID(canonicalID);
View Full Code Here

   
    // create a new CanonicalID (random)

    String localCanonicalIDString = isINumber ? subSegmentName : randomCanonicalIDString();
    String canonicalIDString = parentAuthority.getXrd().getCanonicalID().getValue() + localCanonicalIDString;
    CanonicalID canonicalID = new CanonicalID(canonicalIDString);

    // put the CanonicalID into the XRD

    xrd.setCanonicalID(canonicalID);
View Full Code Here

  public XRD execute(Store store, XRD xrd, XRISegment segment, Authority parentAuthority, String subSegmentName, Authority authority, boolean isCreate) throws StageException {

    // use the XRD's CanonicalID as the provider ID and path for the XDI service endpoint

    CanonicalID canonicalID = xrd.getCanonicalID();
    String canonicalIDString = null;

    if (canonicalID != null) {

      canonicalIDString = canonicalID.getValue();
    }

    // create HTTP and HTTPS <URI> elements for the XDI service endpoint

    Vector<URI> uris = new Vector<URI> ();
View Full Code Here

      }
    }

    // use the XRD's CanonicalID as the provider ID for the authority resolution service endpoint

    CanonicalID canonicalID = xrd.getCanonicalID();
    String canonicalIDString = null;

    if (canonicalID != null) {

      canonicalIDString = canonicalID.getValue();
    }

    // find out what to use as the namespace for further subsegments

    String namespace = null;
View Full Code Here

    }

    String localCanonicalIDString = isINumber ? subSegmentName : ("!" + Integer.toString(canonicalIDValue));
    canonicalIDString = parentAuthority.getXrd().getCanonicalidAt(0).getValue() + localCanonicalIDString;

    CanonicalID canonicalID = new CanonicalID(canonicalIDString);

    // write incremented authority attribute back to store
   
    if (! isINumber) {
   
View Full Code Here

  }
 

 
  protected String verifyCID(XRD prevXRD, XRD xrd) {
    CanonicalID parentCID = prevXRD.getCanonicalID();
    CanonicalID thisCID = xrd.getCanonicalID();
   
    if (parentCID == null) {
      log.warn("verifyCID: no parent CID!");
      return Status.CID_FAILED;
    }
   
    if (thisCID == null)
      return Status.CID_ABSENT;

    try {
      XRI parentCIDXRI = new XRI(parentCID.getValue());
      XRI thisCIDXRI   = new XRI(thisCID.getValue());
      if (parentCIDXRI.isRelative())
        return Status.CID_FAILED;
     
      if (thisCIDXRI.isRelative())
        return Status.CID_FAILED;
View Full Code Here

TOP

Related Classes of org.openxri.xml.CanonicalID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.