Examples of XSSchema


Examples of com.sun.xml.internal.xsom.XSSchema

     * @param comp
     *      The component from which the base name was taken.
     *      Used to determine how names are modified.
     */
    public String deriveName( String name, XSComponent comp ) {
        XSSchema owner = comp.getOwnerSchema();

        name = getNameConverter().toClassName(name);

        if( owner!=null ) {
            BISchemaBinding sb = getBindInfo(owner).get(BISchemaBinding.class);
View Full Code Here

Examples of com.sun.xml.xsom.XSSchema

    try {
      flds.clear();
      XSOMParser parser = new XSOMParser();
      parser.parse(fname);
      XSSchemaSet xsSchema = parser.getResult();
      XSSchema schema = xsSchema.getSchema(1);
      File file = new File(fname);

      XSElementDecl element = schema.getElementDecl(file.getName().replace(".xsd", ""));

      if(element != null) {
        log.debug("element is " + element.getName());
        bufferName = element.getName();
        XSType xtype = element.getType();
View Full Code Here

Examples of com.sun.xml.xsom.XSSchema

    assert classLink != null;
    assert altitudeModeKML != null;
    assert altitudeModeGX != null;
    final CBuiltinLeafInfo doubleValue = CBuiltinLeafInfo.DOUBLE;

    final XSSchema schema = model.schemaComponent.getSchema("http://www.opengis.net/kml/2.2");

    LOG.info(XJCJavaForKmlApiPlugin.PLUGINNAME + " -------Icon properties ------------------");
    final CClassInfoParent cClassInfoParentLink = classLink.parent();

    final CClassInfo iconClass = new CClassInfo(model, cClassInfoParentLink, "Icon", null, new QName("Icon"), null, schema, new CCustomizations());
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

            }
        }
       
        if (!generateTypesafeEnumClass  &&  pType.isGlobal()) {
            XsQName[] qNames = new XsQName[]{XSNMToken.getInstance().getName()};
            XSSchema xsSchema = xsType.getXSSchema();
            if (xsSchema instanceof JAXBSchema) {
                JAXBSchema jaxbSchema = (JAXBSchema) xsSchema;
                JAXBGlobalBindings globalBindings = jaxbSchema.getJAXBGlobalBindings();
                if (globalBindings != null) {
                    qNames = globalBindings.getTypesafeEnumBase();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

      InputSource isource = new InputSource(new StringReader(schemaSpec));
      isource.setSystemId("jira46.xsd");
      JAXBSchemaReader r = getSchemaReader();
      XSParser parser = r.getSGFactory().newXSParser();
      parser.setValidating(false);
      XSSchema schema = parser.parse(isource);
      XSAttribute[] attrs = schema.getAttributes();
      assertEquals(1, attrs.length);
      XSAttribute idAttr = attrs[0];
      assertTrue(idAttr instanceof JAXBAttribute);
      assertEquals(new XsQName(uri, "id"), idAttr.getName());
      assertEquals(XSID.getInstance(), idAttr.getType());
      assertTrue(idAttr.isOptional());
      XSElement[] elements = schema.getElements();
      assertEquals(1, elements.length);
      XSElement rifElem = elements[0];
      assertFalse(rifElem.getType().isSimple());
      XSComplexType ct = rifElem.getType().getComplexType();
      XSAttributable[] rifAttrs = ct.getAttributes();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

 
  /** <p>Redefines the given {@link XsRedefinable}.</p>
   */
  protected void redefine(XsESchema pSyntaxSchema,
      XsERedefine pRedefine, XsRedefinable pChild) throws SAXException {
    XSSchema mySchema = getSchema();
    XSContext data = getData();
    XSObjectFactory factory = data.getXSObjectFactory();
    if (pChild instanceof XsTAttributeGroup) {
      XsTAttributeGroup attributeGroup = (XsTAttributeGroup) pChild;
      mySchema.redefine(factory.newXSAttributeGroup(mySchema, attributeGroup));
    } else if (pChild instanceof XsTNamedGroup) {
      XsTNamedGroup group = (XsTNamedGroup) pChild;
      mySchema.redefine(factory.newXSGroup(mySchema, group));
    } else if (pChild instanceof XsETopLevelSimpleType) {
      XsETopLevelSimpleType type = (XsETopLevelSimpleType) pChild;
      mySchema.redefine(factory.newXSType(mySchema, type));
    } else if (pChild instanceof XsTComplexType) {
      XsTComplexType type = (XsTComplexType) pChild;
      mySchema.redefine(factory.newXSType(mySchema, type));
    } else {
      Locator locator = (pChild instanceof XsObject) ? ((XsObject) pChild).getLocator() : pRedefine.getLocator();
      throw new LocSAXException("Unknown type for redefinition: " + pChild.getClass().getName() +
          ", perhaps you should handle this in a subclass?", locator);
    }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

 
  /** <p>Adds the given object to the schema.</p>
   *
   */
  protected void add(XsESchema pSyntaxSchema, Object pChild) throws SAXException {
    XSSchema mySchema = getSchema();
    XSContext data = getData();
    XSObjectFactory factory = data.getXSObjectFactory();
    if (pChild instanceof XsEAnnotation) {
      XsEAnnotation annotation = (XsEAnnotation) pChild;
      mySchema.add(factory.newXSAnnotation(mySchema, annotation));
    } else if (pChild instanceof XsETopLevelSimpleType) {
      XsETopLevelSimpleType type = (XsETopLevelSimpleType) pChild;
      mySchema.add(factory.newXSType(mySchema, type));
    } else if (pChild instanceof XsTComplexType) {
      XsTComplexType type = (XsTComplexType) pChild;
      mySchema.add(factory.newXSType(mySchema, type));
    } else if (pChild instanceof XsTNamedGroup) {
      XsTNamedGroup group = (XsTNamedGroup) pChild;
      mySchema.add(factory.newXSGroup(mySchema, group));
    } else if (pChild instanceof XsTAttributeGroup) {
      XsTAttributeGroup attributeGroup = (XsTAttributeGroup) pChild;
      mySchema.add(factory.newXSAttributeGroup(mySchema, attributeGroup));
    } else if (pChild instanceof XsTTopLevelElement) {
      XsTTopLevelElement element = (XsTTopLevelElement) pChild;
      mySchema.add(factory.newXSElement(mySchema, element));
    } else if (pChild instanceof XsTAttribute) {
      XsTAttribute attribute = (XsTAttribute) pChild;
      mySchema.add(factory.newXSAttribute(mySchema, attribute));
    } else if (pChild instanceof XsENotation) {
      XsENotation notation = (XsENotation) pChild;
      mySchema.add(factory.newXSNotation(mySchema, notation));
    } else {
      Locator locator = (pChild instanceof XsObject) ?
          ((XsObject) pChild).getLocator() : pSyntaxSchema.getLocator();
          throw new LocSAXException("Unknown child type: " + pChild.getClass().getName() +
              ", perhaps you should handle this in a subclass?", locator);
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

        context.setXsObjectFactory(xsObjectFactory);
        clearSyntaxSchemas();
        XsESchema syntaxSchema = new XsESchemaImpl(context){
        };
        parse(syntaxSchema, pInputSource);
        XSSchema schema = context.getXSObjectFactory().newXSSchema(context, syntaxSchema);
        setSchema(schema);
    parse(syntaxSchema, pInputSource.getSystemId());
    schema.validate();
        return schema;
    }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

*/
public class TableDetails extends ConnectionDetails {
  protected TableDetails(JaxMeJdbcSG pJdbcSG, XsObject pParent) throws SAXException {
    super(pJdbcSG, pParent);

    XSSchema schema = pParent.getXsESchema().getContext().getXSSchema();
    if (schema != null) {
      ConnectionDetails details = (ConnectionDetails)
        XSUtil.getSingleAppinfo(schema.getAnnotations(), ConnectionDetails.class);
      if (details != null) {
        cloneFrom(details);
      }
    }
  }
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSSchema

    log.finest(mName, "->", pSource.getSystemId());
    SGFactory factory = getSGFactory();
    XSParser parser = factory.newXSParser();
    log.finest(mName, "Parser = " + parser + ", validating = " + getGenerator().isValidating());
    parser.setValidating(getGenerator().isValidating());
    XSSchema schema = parser.parse(pSource);
    log.finest(mName, "Schema = " + schema);
    SchemaSG result = factory.getSchemaSG(schema);
    log.finest(mName, "<-", result);
    return result;
  }
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.