Examples of fromString()


Examples of org.geoserver.config.util.XStreamPersister.CRSConverter.fromString()

        CRSConverter c = new CRSConverter();

        assertEquals(crs.toWKT(), c.toString(crs));
        assertEquals(DefaultGeographicCRS.WGS84.toWKT(), c.toString(DefaultGeographicCRS.WGS84));

        CoordinateReferenceSystem crs2 = (CoordinateReferenceSystem) c.fromString(crs.toWKT());
        assertTrue(CRS.equalsIgnoreMetadata(crs, crs2));

        crs2 = (CoordinateReferenceSystem) c.fromString("EPSG:4326");
        assertTrue(CRS.equalsIgnoreMetadata(crs, crs2));
    }
View Full Code Here

Examples of org.glassfish.jersey.message.internal.CacheControlProvider.fromString()

    }

    private void checkRoundTrip(String s) {
        CacheControlProvider p = new CacheControlProvider();

        CacheControl cc1 = p.fromString(s);
        CacheControl cc2 = p.fromString(cc1.toString());
        cc2.toString();

        cc1.equals(cc2);
View Full Code Here

Examples of org.glassfish.jersey.message.internal.EntityTagProvider.fromString()

        assertEquals(result, instance.toString(e));
    }

    public void checkFromString(final String e, final EntityTag result) throws Exception {
        final EntityTagProvider instance = new EntityTagProvider();
        assertEquals(result, instance.fromString(e));
    }
}
View Full Code Here

Examples of org.glassfish.jersey.message.internal.LocaleProvider.fromString()

    }

    @Test
    public void testFromString() throws Exception {
        final LocaleProvider instance = new LocaleProvider();
        assertEquals(new Locale("en"), instance.fromString("en"));
        assertEquals(new Locale("en", "us"), instance.fromString("en-us"));
    }

}
View Full Code Here

Examples of org.glassfish.jersey.message.internal.MediaTypeProvider.fromString()

    @Test
    public void testFromString() throws Exception {
        final MediaTypeProvider instance = new MediaTypeProvider();

        final String header = "application/xml";
        final MediaType result = instance.fromString(header);
        assertEquals(result.getType(), "application");
        assertEquals(result.getSubtype(), "xml");
        assertEquals(result.getParameters().size(), 0);
    }
View Full Code Here

Examples of org.infinispan.query.Transformer.fromString()

            int indexOfSecondDelimiter = s.indexOf(":", 2);
            String keyClassName = s.substring(2, indexOfSecondDelimiter);
            String keyAsString = s.substring(indexOfSecondDelimiter + 1);
            Transformer t = getCustomTransformer(keyClassName, classLoader);
            if (t == null) throw new CacheException("Cannot find an appropriate Transformer for key type " + keyClassName);
            return t.fromString(keyAsString);
      }
      throw new CacheException("Unknown type metadata " + type);
   }

   private Transformer getCustomTransformer(final String keyClassName, final ClassLoader classLoader) {
View Full Code Here

Examples of org.jacorb.orb.iiop.IIOPAddress.fromString()

            throw new BAD_PARAM("Invalid protocol " + address_str);
        }
        address.setProtocol(proto);
        final int addresss_start_ofs = proto_delim + 3;

        if (!address.fromString(address_str.substring(addresss_start_ofs)))
        {
            throw new org.omg.CORBA.INTERNAL("Invalid protocol address string: " + address_str);
        }

        // set protocol string
View Full Code Here

Examples of org.jboss.resteasy.plugins.delegates.CacheControlDelegate.fromString()

         cc.setNoTransform(true);
         cc.setPrivate(true);
         cc.setMustRevalidate(true);
         cc.setProxyRevalidate(true);
         System.out.println(delegate.toString(cc));
         CacheControl cc2 = delegate.fromString(delegate.toString(cc));
         assertEqual(cc, cc2);

      }

      {
View Full Code Here

Examples of org.jboss.resteasy.plugins.delegates.CacheControlDelegate.fromString()

         cc.getPrivateFields().add("yo");
         cc.getCacheExtension().put("foo", "bar");
         cc.setMaxAge(25);
         cc.setSMaxAge(25);
         System.out.println(delegate.toString(cc));
         CacheControl cc2 = delegate.fromString(delegate.toString(cc));
         assertEqual(cc, cc2);

      }
   }
View Full Code Here

Examples of org.jboss.resteasy.plugins.delegates.LinkHeaderDelegate.fromString()

      }
      List<String> links = headers.get("Link");
      LinkHeaderDelegate delegate = new LinkHeaderDelegate();
      for (String link : links)
      {
         LinkHeader tmp = delegate.fromString(link);
         linkHeader.getLinks().addAll(tmp.getLinks());
         linkHeader.getLinksByRelationship().putAll(tmp.getLinksByRelationship());
         linkHeader.getLinksByTitle().putAll(tmp.getLinksByTitle());

      }
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.