Codota Logo
XmlSchemaInclude
Code IndexAdd Codota to your IDE (free)

How to use
XmlSchemaInclude
in
org.apache.ws.commons.schema

Best Java code snippets using org.apache.ws.commons.schema.XmlSchemaInclude (Showing top 20 results out of 315)

  • Common ways to obtain XmlSchemaInclude
private void myMethod () {
XmlSchemaInclude x =
  • Codota Iconnew XmlSchemaInclude()
  • Smart code suggestions by Codota
}
origin: org.apache.ws.commons.schema/XmlSchema

/**
 * Get a schema from an import
 * 
 * @param includeOrImport
 * @return return the schema object.
 */
private XmlSchema getSchema(Object includeOrImport) {
  XmlSchema schema;
  if (includeOrImport instanceof XmlSchemaImport) {
    schema = ((XmlSchemaImport) includeOrImport).getSchema();
  } else if (includeOrImport instanceof XmlSchemaInclude) {
    schema = ((XmlSchemaInclude) includeOrImport).getSchema();
  } else {
    // skip ?
    schema = null;
  }
  return schema;
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

  continue;
XmlSchemaInclude include = new XmlSchemaInclude();
include.setSchema(d);
include.setSourceURI(d.getSourceURI());
include.setSchemaLocation(d.getSourceURI());
facade.getIncludes().add(include);
facade.getItems().add(include);
origin: org.apache.ws.commons.schema/XmlSchema

  Element schemaEl) {
XmlSchemaInclude include = new XmlSchemaInclude();
  include.setAnnotation(includeAnnotation);
origin: apache/cxf

} else if (ext instanceof XmlSchemaInclude) {
  SchemaReference imp = schemaImpl.createInclude();
  imp.setSchemaLocationURI(((XmlSchemaInclude)ext).getSchemaLocation());
origin: org.apache.tuscany.sca/tuscany-xsd

  continue;
XmlSchemaInclude include = new XmlSchemaInclude();
include.setSchema(d);
include.setSourceURI(d.getSourceURI());
include.setSchemaLocation(d.getSourceURI());
facade.getIncludes().add(include);
facade.getItems().add(include);
origin: org.apache.ws.schema/XmlSchema

  Element schemaEl) {
XmlSchemaInclude include = new XmlSchemaInclude();
  include.setAnnotation(includeAnnotation);
origin: org.apache.cxf/cxf-rt-core

} else if (ext instanceof XmlSchemaInclude) {
  SchemaReference imp = schemaImpl.createInclude();
  imp.setSchemaLocationURI(((XmlSchemaInclude)ext).getSchemaLocation());
origin: org.apache.ws.schema/XmlSchema

/**
 * Get a schema from an import
 * 
 * @param includeOrImport
 * @return return the schema object.
 */
private XmlSchema getSchema(Object includeOrImport) {
  XmlSchema schema;
  if (includeOrImport instanceof XmlSchemaImport) {
    schema = ((XmlSchemaImport) includeOrImport).getSchema();
  } else if (includeOrImport instanceof XmlSchemaInclude) {
    schema = ((XmlSchemaInclude) includeOrImport).getSchema();
  } else {
    // skip ?
    schema = null;
  }
  return schema;
}
origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

              Element includeEl, Element schemaEl) {
XmlSchemaInclude include = new XmlSchemaInclude();
  XmlSchemaAnnotation includeAnnotation =
      handleAnnotation(annotationEl);
  include.setAnnotation(includeAnnotation);
origin: org.apache.cxf/cxf-bundle-jaxrs

} else if (ext instanceof XmlSchemaInclude) {
  SchemaReference imp = schemaImpl.createInclude();
  imp.setSchemaLocationURI(((XmlSchemaInclude)ext).getSchemaLocation());
origin: spring-projects/spring-ws

private void inlineIncludes(XmlSchema schema, Set<XmlSchema> processedIncludes, Set<XmlSchema> processedImports) {
  processedIncludes.add(schema);
  List<XmlSchemaObject> schemaItems = schema.getItems();
  for (int i = 0; i < schemaItems.size(); i++) {
    XmlSchemaObject schemaObject = schemaItems.get(i);
    if (schemaObject instanceof XmlSchemaInclude) {
      XmlSchema includedSchema = ((XmlSchemaInclude) schemaObject).getSchema();
      if (!processedIncludes.contains(includedSchema)) {
        inlineIncludes(includedSchema, processedIncludes, processedImports);
        findImports(includedSchema, processedImports, processedIncludes);
        List<XmlSchemaObject> includeItems = includedSchema.getItems();
        for (XmlSchemaObject includedItem : includeItems) {
          schemaItems.add(includedItem);
        }
      }
      // remove the <include/>
      schemaItems.remove(i);
      i--;
    }
  }
}
origin: apache/servicemix-bundles

private void inlineIncludes(XmlSchema schema, Set<XmlSchema> processedIncludes, Set<XmlSchema> processedImports) {
  processedIncludes.add(schema);
  List<XmlSchemaObject> schemaItems = schema.getItems();
  for (int i = 0; i < schemaItems.size(); i++) {
    XmlSchemaObject schemaObject = schemaItems.get(i);
    if (schemaObject instanceof XmlSchemaInclude) {
      XmlSchema includedSchema = ((XmlSchemaInclude) schemaObject).getSchema();
      if (!processedIncludes.contains(includedSchema)) {
        inlineIncludes(includedSchema, processedIncludes, processedImports);
        findImports(includedSchema, processedImports, processedIncludes);
        List<XmlSchemaObject> includeItems = includedSchema.getItems();
        for (XmlSchemaObject includedItem : includeItems) {
          schemaItems.add(includedItem);
        }
      }
      // remove the <include/>
      schemaItems.remove(i);
      i--;
    }
  }
}
origin: org.apache.tuscany.sca/tuscany-xsd

private static <T extends XmlSchemaObject> T getXmlSchemaObject(XmlSchema schema, QName name, Class<T> type) {
  if (schema != null) {
    XmlSchemaObject object = null;
    if (type == XmlSchemaElement.class) {
      object = schema.getElementByName(name);
    } else if (type == XmlSchemaType.class) {
      object = schema.getTypeByName(name);
    }
    if (object != null) {
      return type.cast(object);
    }
    for (Iterator<?> i = schema.getIncludes().getIterator(); i.hasNext();) {
      XmlSchemaObject obj = (XmlSchemaObject)i.next();
      XmlSchema ext = null;
      if (obj instanceof XmlSchemaInclude) {
        ext = ((XmlSchemaInclude)obj).getSchema();
      }
      if (obj instanceof XmlSchemaImport) {
        ext = ((XmlSchemaImport)obj).getSchema();
      }
      object = getXmlSchemaObject(ext, name, type);
      if (object != null) {
        return type.cast(object);
      }
    }
  }
  return null;
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

private static <T extends XmlSchemaObject> T getXmlSchemaObject(XmlSchema schema, QName name, Class<T> type) {
  if (schema != null) {
    XmlSchemaObject object = null;
    if (type == XmlSchemaElement.class) {
      object = schema.getElementByName(name);
    } else if (type == XmlSchemaType.class) {
      object = schema.getTypeByName(name);
    }
    if (object != null) {
      return type.cast(object);
    }
    for (Iterator<?> i = schema.getIncludes().getIterator(); i.hasNext();) {
      XmlSchemaObject obj = (XmlSchemaObject)i.next();
      XmlSchema ext = null;
      if (obj instanceof XmlSchemaInclude) {
        ext = ((XmlSchemaInclude)obj).getSchema();
      }
      if (obj instanceof XmlSchemaImport) {
        ext = ((XmlSchemaImport)obj).getSchema();
      }
      object = getXmlSchemaObject(ext, name, type);
      if (object != null) {
        return type.cast(object);
      }
    }
  }
  return null;
}
origin: org.apache.tuscany.sca/tuscany-base-runtime

XmlSchema ext = null;
if (obj instanceof XmlSchemaInclude) {
  ext = ((XmlSchemaInclude)obj).getSchema();
origin: org.apache.ws/com.springsource.org.apache.ws.commons.schema

XmlSchema includedSchemaObj = includeObj.getSchema();
if (includedSchemaObj != null && serializeIncluded) {
  XmlSchemaSerializer includeSeri = new XmlSchemaSerializer();
origin: org.apache.ws.schema/XmlSchema

XmlSchema includedSchemaObj = includeObj.getSchema();
if (includedSchemaObj != null && serializeIncluded) {
  XmlSchemaSerializer includeSeri = new XmlSchemaSerializer();
origin: org.apache.ws.commons.schema/XmlSchema

XmlSchema includedSchemaObj = includeObj.getSchema();
if (includedSchemaObj != null && serializeIncluded) {
  XmlSchemaSerializer includeSeri = new XmlSchemaSerializer();
origin: org.apache.axis2/axis2-kernel

private XmlSchemaElement getSchemaElement(XmlSchema schema) {
  XmlSchemaElement xmlSchemaElement = null;
  if (schema != null) {
    xmlSchemaElement = schema.getElementByName(this.elementQname);
    if (xmlSchemaElement == null) {
      // try to find in an import or an include
      for (XmlSchemaObject external : schema.getExternals()) {
        if (external instanceof XmlSchemaImport) {
          XmlSchema schema1 = ((XmlSchemaImport) external).getSchema();
          xmlSchemaElement = getSchemaElement(schema1);
        }
        if (external instanceof XmlSchemaInclude) {
          XmlSchema schema1 = ((XmlSchemaInclude) external).getSchema();
          xmlSchemaElement = getSchemaElement(schema1);
        }
        if (xmlSchemaElement != null) {
          break;
        }
      }
    }
  }
  return xmlSchemaElement;
}
origin: org.apache.axis2/axis2-adb-codegen

private static XmlSchemaType getSchemaType(XmlSchema schema, QName typeName) {
  XmlSchemaType xmlSchemaType = null;
  if (schema != null) {
    xmlSchemaType = schema.getTypeByName(typeName);
    if (xmlSchemaType == null) {
      // try to find in an import or an include) {
      for (XmlSchemaObject object : schema.getExternals()) {
        if (object instanceof XmlSchemaImport) {
          XmlSchema schema1 = ((XmlSchemaImport) object).getSchema();
          xmlSchemaType = getSchemaType(schema1, typeName);
        }
        if (object instanceof XmlSchemaInclude) {
          XmlSchema schema1 = ((XmlSchemaInclude) object).getSchema();
          xmlSchemaType = getSchemaType(schema1, typeName);
        }
        if (xmlSchemaType != null) {
          break;
        }
      }
    }
  }
  return xmlSchemaType;
}
org.apache.ws.commons.schemaXmlSchemaInclude

Javadoc

Class to include declarations and definitions from an external schema. Allows them to be available for processing in the containing schema. Represents the World Wide Web Consortium (W3C) include element.

Most used methods

  • getSchema
  • <init>
    Creates new XmlSchemaInclude
  • getSchemaLocation
  • setAnnotation
  • setSchema
  • setSchemaLocation
  • setSourceURI

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • orElseThrow (Optional)
  • getExternalFilesDir (Context)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now