use of eu.esdihumboldt.hale.io.xsd.reader.internal.HumboldtURIResolver in project hale by halestudio.
the class HumboldtURIResolverTest method testFileRelative1.
@SuppressWarnings("javadoc")
@Test
public void testFileRelative1() {
String baseUri = "file:///C:/Test/gml/3.2.1/feature.xsd";
String location = "gml.xsd";
String expected = "/C:/Test/gml/3.2.1/gml.xsd";
HumboldtURIResolver resolver = new HumboldtURIResolver();
InputSource source = resolver.resolveEntity("ns", location, baseUri);
assertEquals(expected, source.getSystemId());
}
use of eu.esdihumboldt.hale.io.xsd.reader.internal.HumboldtURIResolver in project hale by halestudio.
the class HumboldtURIResolverTest method testJarURI.
@SuppressWarnings("javadoc")
@Test
public void testJarURI() {
String baseUri = "jar:file:/home/simon/.gradle/caches/modules-2/files-2.1/eu.esdihumboldt.hale/eu.esdihumboldt.hale.io.xsd/2.9.5-SNAPSHOT/fe32ccb0764ec0adcfab7563b3d84e46c36bd3a0/eu.esdihumboldt.hale.io.xsd-2.9.5-SNAPSHOT.jar!/schemas/";
String location = "xml.xsd";
String expected = "jar:file:/home/simon/.gradle/caches/modules-2/files-2.1/eu.esdihumboldt.hale/eu.esdihumboldt.hale.io.xsd/2.9.5-SNAPSHOT/fe32ccb0764ec0adcfab7563b3d84e46c36bd3a0/eu.esdihumboldt.hale.io.xsd-2.9.5-SNAPSHOT.jar!/schemas/xml.xsd";
HumboldtURIResolver resolver = new HumboldtURIResolver();
InputSource source = resolver.resolveEntity("ns", location, baseUri);
assertEquals(expected, source.getSystemId());
}
use of eu.esdihumboldt.hale.io.xsd.reader.internal.HumboldtURIResolver in project hale by halestudio.
the class HumboldtURIResolverTest method testHttpAbsoluteOtherHttp.
@SuppressWarnings("javadoc")
@Test
public void testHttpAbsoluteOtherHttp() {
String baseUri = "file:///C:/Test/gml/3.2.1/feature.xsd";
String location = "http://schemas.opengis.net/gml/3.2.1/gml.xsd";
String expected = location;
HumboldtURIResolver resolver = new HumboldtURIResolver();
InputSource source = resolver.resolveEntity("ns", location, baseUri);
assertEquals(expected, source.getSystemId());
}
use of eu.esdihumboldt.hale.io.xsd.reader.internal.HumboldtURIResolver in project hale by halestudio.
the class HumboldtURIResolverTest method testHttpAbsolute1.
@SuppressWarnings("javadoc")
@Test
public void testHttpAbsolute1() {
String baseUri = "http://schemas.opengis.net/gml/3.2.1/gml.xsd";
String location = "http://schemas.opengis.net/gml/3.2.1/feature.xsd";
String expected = location;
HumboldtURIResolver resolver = new HumboldtURIResolver();
InputSource source = resolver.resolveEntity("ns", location, baseUri);
assertEquals(expected, source.getSystemId());
}
use of eu.esdihumboldt.hale.io.xsd.reader.internal.HumboldtURIResolver in project hale by halestudio.
the class HumboldtURIResolverTest method testHttpAbsoluteOtherJar.
@SuppressWarnings("javadoc")
@Test
public void testHttpAbsoluteOtherJar() {
String baseUri = "http://schemas.opengis.net/gml/3.2.1/gml.xsd";
String location = "jar:file:/home/simon/.gradle/caches/modules-2/files-2.1/eu.esdihumboldt.hale/eu.esdihumboldt.hale.io.xsd/2.9.5-SNAPSHOT/fe32ccb0764ec0adcfab7563b3d84e46c36bd3a0/eu.esdihumboldt.hale.io.xsd-2.9.5-SNAPSHOT.jar!/schemas/xml.xsd";
String expected = location;
HumboldtURIResolver resolver = new HumboldtURIResolver();
InputSource source = resolver.resolveEntity("ns", location, baseUri);
assertEquals(expected, source.getSystemId());
}
Aggregations