Examples of XRI3Reference


Examples of org.openxri.xri3.impl.XRI3Reference

    XRIReference xriReference;
    XRIAuthority xriAuthority1, xriAuthority2;
    XRISubSegment xriSubSegment1, xriSubSegment2;

    xri1 = new XRI3("+name");
    xriReference = new XRI3Reference("+first");
    xri2 = new XRI3(xri1, xriReference);
    assertEquals(xri2, "+name+first");
    assertEquals(xri2.getAuthority().getNumSubSegments(), 2);
    assertEquals(xri2.getAuthority().getSubSegment(0), "+name");
    assertEquals(xri2.getAuthority().getSubSegment(0).getLiteral(), "name");
View Full Code Here

Examples of org.openxri.xri3.impl.XRI3Reference

    // The library can also construct new XRIs or XRI components.
    // For example, if we have an XRI +name, and a relative XRI reference +first,
    // we can construct a new XRI +name+first

    XRI xri = new XRI3("+name");
    XRIReference xriReference = new XRI3Reference("+first");

    System.out.println("Got XRI " + xri.toString());
    System.out.println("Got XRI reference " + xriReference.toString());

    XRI xriNew = new XRI3(xri, xriReference);
   
    System.out.println("Constructed new XRI " + xriNew.toString());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.