@Override protected Schema buildTypeSchema() { return new XSSchema(); }
public XSConfiguration() { super(XS.getInstance()); }
/** Look into "builtin" schema for schema (aka xsd ?) */ public void testXSDSimpleTypes() throws Exception { XSDSimpleTypeDefinition any = xsdSimple("anySimpleType"); assertNotNull("Found", any); }
@Override protected void setUp() throws Exception { XSConfiguration xs = new XSConfiguration(); p = new Parser(xs); }
public TestConfiguration() { super(new TEST()); addDependency(new XSConfiguration()); } }
/** The dependencies of this schema. */ public final Set<XSD> getDependencies() { if (dependencies == null) { synchronized (this) { if (dependencies == null) { Set<XSD> newDeps = new LinkedHashSet(); // bootstrap, every xsd depends on XS newDeps.add(XS.getInstance()); // call subclass hook addDependencies(newDeps); dependencies = newDeps; } } } return dependencies; }
public void testElement() { ElementInstance element = element(" hello world ", XS.ANYSIMPLETYPE); assertEquals(" hello world ", element.getText()); assertEquals( xsdSimple(XS.ANYSIMPLETYPE.getLocalPart()), element.getElementDeclaration().getType()); }
public PropertyValueCollection( FeatureCollection delegate, AttributeDescriptor descriptor, PropertyName propName) { this.delegate = delegate; this.descriptor = descriptor; this.typeMappingProfiles.add(XS.getInstance().getTypeMappingProfile()); this.typeMappingProfiles.add(GML.getInstance().getTypeMappingProfile()); this.propertyName = propName; // fallback for gml:id "property" if (descriptor == null) { this.descriptor = ID_DESCRIPTOR; } }
public ApplicationSchemaConfiguration(String namespace, String schemaLocation) { super(new ApplicationSchemaXSD(namespace, schemaLocation)); addDependency(new XSConfiguration()); addDependency(new GMLConfiguration()); }
/** * Will call the parse method on the strategy object, passing it <code>given</code> to use as a * value. It will then perform <code>assertEquals(expected, result);</code> * * @param given the value to pass to the parse method * @param expected used to compare against the result of the parse method * @throws Exception */ public void validateValues(String given, Object expected) throws Exception { Object result = strategy.parse(element(given, qname), given); assertEquals(expected, result); }
public Binding stratagy(String name) throws Exception { return factory.loadBinding(xs(name), new DefaultPicoContainer()); }
public void testXS() throws Exception { assertEquals(XS.ANYSIMPLETYPE, xs("anySimpleType")); try { xs("bork"); fail("bork should not be found"); } catch (Exception expected) { // good! } }
public void testStratagyName() throws Exception { assertNotNull(stratagy("anySimpleType")); try { stratagy("bork"); fail("bork should not be found"); } catch (Exception expected) { // good! } }
public void testSetUp() { if (getQName() != null) { assertNotNull("XSD typedef", typeDef); assertNotNull(strategy); } } }
public void testStratagyQName() throws Exception { assertNotNull(stratagy(XS.ANYSIMPLETYPE)); }
public void testSchemaIdentiy() { assertNotNull(schema); assertNotNull(xsd); assertEquals("1.0", xsd.getVersion()); }
public void testInitialize() { assertNotNull(url); assertNotNull(schema); assertNotNull(factory); }
/** Look into parsed schema - should agree with XMLSchema */ public void testSchemaSimpleTypes() throws Exception { XSDSimpleTypeDefinition any = xsdSimple("anySimpleType"); assertNotNull("Found", any); }