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

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: apache/axis2-java

private void updateSchemaLocation(XmlSchema schema) throws AxisFault {
  for (XmlSchemaExternal xmlSchemaExternal : schema.getExternals()) {
    XmlSchema s = xmlSchemaExternal.getSchema();
    updateSchemaLocation(s, xmlSchemaExternal);
  }
}
origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

private static void updateSchemaRefs(XmlSchema parentSchema, String name) {
  for (Iterator iter = parentSchema.getIncludes().getIterator(); iter.hasNext();) {
    Object obj = iter.next();
    if (obj instanceof XmlSchemaExternal) {
      XmlSchemaExternal extSchema = (XmlSchemaExternal)obj;
      String location = extSchema.getSchemaLocation();
      if (location.length() > 0 && location.indexOf(":/") < 0 && location.indexOf("?xsd=") < 0) {
        extSchema.setSchemaLocation(name + "?xsd=" + location);
      }
      if (extSchema.getSchema() != null) {
        updateSchemaRefs(extSchema.getSchema(), name);
      }
    }
  }
}    

origin: org.apache.axis2/axis2-kernel

private void updateSchemaLocation(XmlSchema s, XmlSchemaExternal xmlSchemaExternal) throws AxisFault {
  if (s != null) {
    String schemaLocation = xmlSchemaExternal.getSchemaLocation();
    if (schemaLocation.indexOf("://") == -1 && schemaLocation.indexOf("?xsd=") == -1) {
      String newscheamlocation = this.getServiceEPR() + "?xsd=" + schemaLocation;
      xmlSchemaExternal.setSchemaLocation(newscheamlocation);
    }
  }
}
  
origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

private XmlSchema getSchema(XmlSchema parentSchema, String name) {
  for (Iterator iter = parentSchema.getIncludes().getIterator(); iter.hasNext();) {
    Object obj = iter.next();
    if (obj instanceof XmlSchemaExternal) {
      XmlSchemaExternal extSchema = (XmlSchemaExternal)obj;
      if (extSchema.getSchemaLocation().endsWith(name)) {
        return extSchema.getSchema();
      } else {
        XmlSchema schema = getSchema(extSchema.getSchema(), name);
        if (schema != null) {
          return schema;
        }
      }
    }
  }
  return null;
}
origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

if (externalComponent instanceof XmlSchemaExternal) {
  XmlSchemaExternal xmlSchemaExternal = (XmlSchemaExternal)externalComponent;
  XmlSchema schema1 = xmlSchemaExternal.getSchema();
  if (schema1 != null) {
    String sourceURI = getAbsoluteSchemaURL(schema1.getSourceURI());
      SchemaInfo info = schemas.get(sourceURI);
      String relativeSchemaPath = WSDLUtil.computeRelativePathWithVersion(schemaInfo.getProposedRegistryURL(), info.getProposedRegistryURL(), registry);
      xmlSchemaExternal.setSchemaLocation(relativeSchemaPath);
origin: spring-projects/spring-ws

private void findImports(XmlSchema schema, Set<XmlSchema> processedImports, Set<XmlSchema> processedIncludes) {
  processedImports.add(schema);
  List<XmlSchemaExternal> externals = schema.getExternals();
  for (XmlSchemaExternal external : externals) {
    if (external instanceof XmlSchemaImport) {
      XmlSchemaImport schemaImport = (XmlSchemaImport) external;
      XmlSchema importedSchema = schemaImport.getSchema();
      if (!"http://www.w3.org/XML/1998/namespace".equals(schemaImport.getNamespace()) &&
          importedSchema != null && !processedImports.contains(importedSchema)) {
        inlineIncludes(importedSchema, processedIncludes, processedImports);
        findImports(importedSchema, processedImports, processedIncludes);
        xmlSchemas.add(importedSchema);
      }
      // remove the schemaLocation
      external.setSchemaLocation(null);
    }
  }
}
origin: org.wso2.carbon.governance/org.wso2.carbon.governance.registry.extensions

if (externalComponent instanceof XmlSchemaExternal) {
  XmlSchemaExternal xmlSchemaExternal = (XmlSchemaExternal)externalComponent;
  XmlSchema schema1 = xmlSchemaExternal.getSchema();
  if (schema1 != null) {
    String sourceURI = getAbsoluteSchemaURL(schema1.getSourceURI());
          WSDLUtil.computeRelativePathWithVersion(schemaInfo.getProposedRegistryURL(),
              info.getProposedRegistryURL(), registry);
      xmlSchemaExternal.setSchemaLocation(relativeSchemaPath);
origin: apache/axis2-java

private void updateSchemaLocation(XmlSchema s, XmlSchemaExternal xmlSchemaExternal) throws AxisFault {
  if (s != null) {
    String schemaLocation = xmlSchemaExternal.getSchemaLocation();
    if (schemaLocation.indexOf("://") == -1 && schemaLocation.indexOf("?xsd=") == -1) {
      String newscheamlocation = this.getServiceEPR() + "?xsd=" + schemaLocation;
      xmlSchemaExternal.setSchemaLocation(newscheamlocation);
    }
  }
}
  
origin: apache/servicemix-bundles

private void findImports(XmlSchema schema, Set<XmlSchema> processedImports, Set<XmlSchema> processedIncludes) {
  processedImports.add(schema);
  List<XmlSchemaExternal> externals = schema.getExternals();
  for (XmlSchemaExternal external : externals) {
    if (external instanceof XmlSchemaImport) {
      XmlSchemaImport schemaImport = (XmlSchemaImport) external;
      XmlSchema importedSchema = schemaImport.getSchema();
      if (!"http://www.w3.org/XML/1998/namespace".equals(schemaImport.getNamespace()) &&
          importedSchema != null && !processedImports.contains(importedSchema)) {
        inlineIncludes(importedSchema, processedIncludes, processedImports);
        findImports(importedSchema, processedImports, processedIncludes);
        xmlSchemas.add(importedSchema);
      }
      // remove the schemaLocation
      external.setSchemaLocation(null);
    }
  }
}
origin: org.apache.axis2/axis2-kernel

private void updateSchemaLocation(XmlSchema schema) throws AxisFault {
  for (XmlSchemaExternal xmlSchemaExternal : schema.getExternals()) {
    XmlSchema s = xmlSchemaExternal.getSchema();
    updateSchemaLocation(s, xmlSchemaExternal);
  }
}
origin: org.wso2.registry/wso2registry-extensions

if (externalComponent instanceof XmlSchemaExternal) {
  XmlSchemaExternal xmlSchemaExternal = (XmlSchemaExternal)externalComponent;
  String sourceURI = xmlSchemaExternal.getSchema().getSourceURI();
  if (!visitedSchemas.contains(sourceURI)) {
    saveSchemaFileToRegistry(xmlSchemaExternal.getSchema(),
                 processedSchemaMap, null, visitedSchemas,
                 false, registryBasePath, processIncludes,
    changeSchemaNames.put(xmlSchemaExternal.getSchemaLocation(),
               newLocation);
  } else {
  xmlSchemaExternal.setSchemaLocation(newLocation);
  String innerFileNameToSave = (String)processedSchemaMap.get(sourceURI);
  String innerXSDPath = getXSDPath(registryBasePath, innerFileNameToSave);
origin: org.apache.axis2/axis2-kernel

/**
 * Adjusts a given schema location
 * 
 * @param s
 * @param xmlSchemaExternal
 * @param nameTable
 */
private void adjustSchemaLocation(XmlSchema s,
                 XmlSchemaExternal xmlSchemaExternal, Hashtable nameTable,
                 Hashtable importedScheams, Hashtable sourceURIToNewLocationMap) {
  if (s != null) {
    String schemaLocation = xmlSchemaExternal.getSchemaLocation();
    String newscheamlocation = customSchemaNamePrefix == null ?
        // use the default mode
        (this.getServiceEPR() + "?xsd=" + getScheamLocationWithDot(
            sourceURIToNewLocationMap, s))
        :
        // custom prefix is present - add the custom prefix
        (customSchemaNamePrefix + getScheamLocationWithDot(
            sourceURIToNewLocationMap, s));
    xmlSchemaExternal.setSchemaLocation(newscheamlocation);
    importedScheams.put(schemaLocation, newscheamlocation);
  }
}
origin: org.springframework.ws/org.springframework.xml

private void findImports(XmlSchema schema, Set<XmlSchema> processedImports, Set<XmlSchema> processedIncludes) {
  processedImports.add(schema);
  XmlSchemaObjectCollection includes = schema.getIncludes();
  for (int i = 0; i < includes.getCount(); i++) {
    XmlSchemaExternal external = (XmlSchemaExternal) includes.getItem(i);
    if (external instanceof XmlSchemaImport) {
      XmlSchemaImport schemaImport = (XmlSchemaImport) external;
      XmlSchema importedSchema = schemaImport.getSchema();
      if (!"http://www.w3.org/XML/1998/namespace".equals(schemaImport.getNamespace()) &&
          importedSchema != null && !processedImports.contains(importedSchema)) {
        inlineIncludes(importedSchema, processedIncludes, processedImports);
        findImports(importedSchema, processedImports, processedIncludes);
        xmlSchemas.add(importedSchema);
      }
      // remove the schemaLocation
      external.setSchemaLocation(null);
    }
  }
}
origin: org.apache.axis2/axis2-kernel

/**
 * Adjust a single schema
 * 
 * @param parentSchema
 * @param nameTable
 */
private void adjustSchemaName(XmlSchema parentSchema, Hashtable nameTable,
               Hashtable importedScheams, Hashtable sourceURIToNewLocationMap) {
  for (XmlSchemaExternal xmlSchemaExternal : parentSchema.getExternals()) {
    XmlSchema s = xmlSchemaExternal.getSchema();
    adjustSchemaLocation(s, xmlSchemaExternal, nameTable,
               importedScheams, sourceURIToNewLocationMap);
  }
}
origin: org.wso2.carbon.registry/org.wso2.carbon.registry.extensions

if (externalComponent instanceof XmlSchemaExternal) {
  XmlSchemaExternal xmlSchemaExternal = (XmlSchemaExternal)externalComponent;
  String sourceURI = xmlSchemaExternal.getSchema().getSourceURI();
  if (!visitedSchemas.contains(sourceURI)) {
    saveSchemaFileToRegistry(xmlSchemaExternal.getSchema(),
                 processedSchemaMap, null, visitedSchemas,
                 false, registryBasePath, processIncludes,
    changeSchemaNames.put(xmlSchemaExternal.getSchemaLocation(),
               newLocation);
  } else {
  xmlSchemaExternal.setSchemaLocation(newLocation);
  String innerFileNameToSave = (String)processedSchemaMap.get(sourceURI);
  String innerXSDPath = getXSDPath(registryBasePath, innerFileNameToSave);
origin: apache/axis2-java

/**
 * Adjusts a given schema location
 * 
 * @param s
 * @param xmlSchemaExternal
 * @param nameTable
 */
private void adjustSchemaLocation(XmlSchema s,
                 XmlSchemaExternal xmlSchemaExternal, Hashtable nameTable,
                 Hashtable importedScheams, Hashtable sourceURIToNewLocationMap) {
  if (s != null) {
    String schemaLocation = xmlSchemaExternal.getSchemaLocation();
    String newscheamlocation = customSchemaNamePrefix == null ?
        // use the default mode
        (this.getServiceEPR() + "?xsd=" + getScheamLocationWithDot(
            sourceURIToNewLocationMap, s))
        :
        // custom prefix is present - add the custom prefix
        (customSchemaNamePrefix + getScheamLocationWithDot(
            sourceURIToNewLocationMap, s));
    xmlSchemaExternal.setSchemaLocation(newscheamlocation);
    importedScheams.put(schemaLocation, newscheamlocation);
  }
}
origin: apache/axis2-java

/**
 * Adjust a single schema
 * 
 * @param parentSchema
 * @param nameTable
 */
private void adjustSchemaName(XmlSchema parentSchema, Hashtable nameTable,
               Hashtable importedScheams, Hashtable sourceURIToNewLocationMap) {
  for (XmlSchemaExternal xmlSchemaExternal : parentSchema.getExternals()) {
    XmlSchema s = xmlSchemaExternal.getSchema();
    adjustSchemaLocation(s, xmlSchemaExternal, nameTable,
               importedScheams, sourceURIToNewLocationMap);
  }
}
origin: apache/cxf

public static boolean isElementFormQualified(XmlSchema schema, QName type) {
  if (type != null) {
    String uri = type.getNamespaceURI();
    if (uri.equals(schema.getTargetNamespace())) {
      return schema.getElementFormDefault() == XmlSchemaForm.QUALIFIED;
    }
    for (XmlSchemaExternal extSchema : schema.getExternals()) {
      return isElementFormQualified(extSchema.getSchema(), type);
    }
  }
  return false;
}
origin: apache/cxf

private static boolean isElementFormQualified(XmlSchema schema, String uri) {
  if (uri.equals(schema.getTargetNamespace())) {
    return schema.getElementFormDefault() == XmlSchemaForm.QUALIFIED;
  }
  for (XmlSchemaExternal extSchema : schema.getExternals()) {
    return isElementFormQualified(extSchema.getSchema(), uri);
  }
  return false;
}
origin: apache/cxf

private static boolean isAttributeFormQualified(XmlSchema schema, String uri) {
  if (uri.equals(schema.getTargetNamespace())) {
    return schema.getAttributeFormDefault() == XmlSchemaForm.QUALIFIED;
  }
  for (XmlSchemaExternal extSchema : schema.getExternals()) {
    return isAttributeFormQualified(extSchema.getSchema(), uri);
  }
  return false;
}
org.apache.ws.commons.schemaXmlSchemaExternal

Javadoc

An abstract class. Provides information about the included schema.

Most used methods

  • getSchema
  • setSchemaLocation
  • getSchemaLocation

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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