Search in sources :

Example 6 with JenaUUID

use of org.apache.jena.shared.uuid.JenaUUID in project jena by apache.

the class TestUUID_JRE method testU5_1.

public void testU5_1() {
    JenaUUID u1 = JenaUUID.generate();
    UUID u2 = UUID.fromString(u1.asString());
    assertEquals(u1.getVersion(), u2.version());
    assertEquals(u1.getVariant(), u2.variant());
}
Also used : JenaUUID(org.apache.jena.shared.uuid.JenaUUID) JenaUUID(org.apache.jena.shared.uuid.JenaUUID) UUID(java.util.UUID)

Example 7 with JenaUUID

use of org.apache.jena.shared.uuid.JenaUUID in project jena by apache.

the class TestUUID_JRE method check.

private void check(String uuidString) {
    JenaUUID uuid = JenaUUID.parse(uuidString);
    // assertFalse(u.equals(JenaUUID.nil())) ;
    String s2 = uuid.asString();
    String s = uuidString;
    if (s.matches("[uU][rR][nN]:"))
        s = s.substring(4);
    if (s.startsWith("[uU][uU][iI][dD]:"))
        s = s.substring(5);
    assertTrue(uuidString.equalsIgnoreCase(s));
}
Also used : JenaUUID(org.apache.jena.shared.uuid.JenaUUID)

Aggregations

JenaUUID (org.apache.jena.shared.uuid.JenaUUID)7 UUID (java.util.UUID)4 IOException (java.io.IOException)1 OutputStream (java.io.OutputStream)1 InternalErrorException (org.apache.jena.atlas.lib.InternalErrorException)1 ContentType (org.apache.jena.atlas.web.ContentType)1 DatasetDescriptionRegistry (org.apache.jena.fuseki.build.DatasetDescriptionRegistry)1 StreamRDF (org.apache.jena.riot.system.StreamRDF)1