gpt4 book ai didi

org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 17:45:05 28 4
gpt4 key购买 nike

本文整理了Java中org.eclipse.xsd.impl.XSDSchemaImpl.getSchemaForSchema()方法的一些代码示例,展示了XSDSchemaImpl.getSchemaForSchema()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDSchemaImpl.getSchemaForSchema()方法的具体详情如下:
包路径:org.eclipse.xsd.impl.XSDSchemaImpl
类名称:XSDSchemaImpl
方法名:getSchemaForSchema

XSDSchemaImpl.getSchemaForSchema介绍

[英]This returns (String)getQNamePrefixToNamespaceMap().get(getSchemaForSchemaQNamePrefix()); you can't set this directly.
[中]这将返回(字符串)getQNamePrefixToNamespaceMap()。get(getSchemaForSchemaQNamePrefix());你不能直接设置。

代码示例

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

/**
 * Returns the singleton instance of the schema for schemas.
 */
public static XSDSchema getSchemaForSchema(String schemaForSchemaURI)
{
 return XSDSchemaImpl.getSchemaForSchema(schemaForSchemaURI);
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

public XSDSchema getSchemaForSchema()
{
 return getSchemaForSchema(getSchemaForSchemaNamespace());
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

/**
 * Returns the singleton instance of the schema for schemas.
 */
public static XSDSchema getSchemaForSchema(String schemaForSchemaURI)
{
 return XSDSchemaImpl.getSchemaForSchema(schemaForSchemaURI);
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

public XSDSchema getSchemaForSchema()
{
 return getSchemaForSchema(getSchemaForSchemaNamespace());
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

public static XSDSchema createSchema(Node node)
{
 XSDSchema xsdSchema = XSDFactory.eINSTANCE.createXSDSchema();
 // if (XSDConstants.nodeType(node) == XSDConstants.SCHEMA_ELEMENT)
 {
  // Force the loading of the "meta" schema for schema instance instance.
  //
  String schemaForSchemaNamespace = node.getNamespaceURI();
  getSchemaForSchema(schemaForSchemaNamespace);
  xsdSchema.setElement((Element)node);
 }
 return xsdSchema;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

public static XSDSchema createSchema(Node node)
{
 XSDSchema xsdSchema = XSDFactory.eINSTANCE.createXSDSchema();
 // if (XSDConstants.nodeType(node) == XSDConstants.SCHEMA_ELEMENT)
 {
  // Force the loading of the "meta" schema for schema instance instance.
  //
  String schemaForSchemaNamespace = node.getNamespaceURI();
  getSchemaForSchema(schemaForSchemaNamespace);
  xsdSchema.setElement((Element)node);
 }
 return xsdSchema;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public java.util.List getBuiltInTypeNamesList2()
{
 List result = new ArrayList();
 if (xsdSchema != null)
 {
  List prefixes = getPrefixesForNamespace(xsdSchema.getSchemaForSchemaNamespace());
  XSDSchema schemaForSchema = XSDSchemaImpl.getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
  for (Iterator i = schemaForSchema.getSimpleTypeIdMap().values().iterator(); i.hasNext();)
  {
   XSDTypeDefinition td = (XSDTypeDefinition) i.next();  
   String localName = td.getName();
   String prefix = prefixes.size() > 0 ? (String)prefixes.get(0) : null;
   String prefixedName = (prefix != null && prefix.length() > 0) ? prefix + ":" + localName : localName; 
   result.add(prefixedName);        
  }
 }
 return result;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public java.util.List getBuiltInTypeNamesList()
{
 List items = new ArrayList();
 if (xsdSchema != null)
 {
  String prefix = xsdSchema.getSchemaForSchemaQNamePrefix();
  if (xsdSchema != null)
  {
   XSDSchema schemaForSchema = XSDSchemaImpl.getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
   for (Iterator i = schemaForSchema.getSimpleTypeIdMap().values().iterator(); i.hasNext();)
   {
    XSDTypeDefinition td = (XSDTypeDefinition) i.next();  
    String localName = td.getName(); 
    String prefixedName = (prefix != null && prefix.length() > 0) ? prefix + ":" + localName : localName; 
    items.add(prefixedName);        
   }
  }
 }
 return items;
}

代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator

/**
 * This returns set of schemas with the given namespace as it's target namespace.
 */
public Collection resolveSchema(String namespace)
{
 if ("".equals(namespace))
 {
  namespace = null;
 }
 if (XSDConstants.isSchemaForSchemaNamespace(namespace))
 {
  return Collections.singleton(XSDSchemaImpl.getSchemaForSchema(namespace));
 }
 else if (XSDConstants.isSchemaInstanceNamespace(namespace))
 {
  return Collections.singleton(XSDSchemaImpl.getSchemaInstance(namespace));
 }
 else
 {
  return getImportedOrInlinedSchemas(namespace);
 }
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

public static synchronized XSDSchema getSchemaInstance(String namespace)
{
 if (XSDConstants.SCHEMA_INSTANCE_URI_2001.equals(namespace))
 {
  if (xsdSchemaInstance2001 == null)
  {
   try
   {
    String baseURL = XSDPlugin.INSTANCE.getBaseURL().toString();
    getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
    getGlobalResourceSet().getLoadOptions().put("XSD_SCHEMA_INSTANCE", XSDConstants.SCHEMA_INSTANCE_URI_2001);
    Resource schemaInstance2001Resource = 
     getGlobalResourceSet().getResource
      (URI.createURI(baseURL + "cache/www.w3.org/2001/XMLSchema-instance.xsd"), true);
    xsdSchemaInstance2001 = ((XSDResourceImpl)schemaInstance2001Resource).getSchema();
   }
   catch (Exception exception)
   {
    exception.printStackTrace();
   }
   finally
   {
    getGlobalResourceSet().getLoadOptions().remove("XSD_SCHEMA_INSTANCE");
   }
  }
  return xsdSchemaInstance2001;
 }
 return null;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

public static synchronized XSDSchema getSchemaInstance(String namespace)
{
 if (XSDConstants.SCHEMA_INSTANCE_URI_2001.equals(namespace))
 {
  if (xsdSchemaInstance2001 == null)
  {
   try
   {
    String baseURL = XSDPlugin.INSTANCE.getBaseURL().toString();
    getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
    getGlobalResourceSet().getLoadOptions().put("XSD_SCHEMA_INSTANCE", XSDConstants.SCHEMA_INSTANCE_URI_2001);
    Resource schemaInstance2001Resource = 
     getGlobalResourceSet().getResource
      (URI.createURI(baseURL + "cache/www.w3.org/2001/XMLSchema-instance.xsd"), true);
    xsdSchemaInstance2001 = ((XSDResourceImpl)schemaInstance2001Resource).getSchema();
   }
   catch (Exception exception)
   {
    exception.printStackTrace();
   }
   finally
   {
    getGlobalResourceSet().getLoadOptions().remove("XSD_SCHEMA_INSTANCE");
   }
  }
  return xsdSchemaInstance2001;
 }
 return null;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

XSDSchema schemaForSchema = XSDSchemaImpl.getSchemaForSchema(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001);
for (Iterator i = schemaForSchema.getSimpleTypeIdMap().values().iterator(); i.hasNext();)

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

@Override
public XSDTypeDefinition getBaseType()
{
 XSDTypeDefinition result = getBaseTypeDefinition();
 if (result == this && XSDConstants.isAnyType(this))
 {
  XSDSchema xsdSchema = getSchema();
  if (xsdSchema != null)
  {
   String schemaForSchemaNamespace = xsdSchema.getSchemaForSchemaNamespace();
   XSDSchemaImpl.getSchemaForSchema(schemaForSchemaNamespace).resolveComplexTypeDefinition("anyType");
  }
 }
 return result;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

@Override
public XSDTypeDefinition getBaseType()
{
 XSDTypeDefinition result = getBaseTypeDefinition();
 if (result == this && XSDConstants.isAnyType(this))
 {
  XSDSchema xsdSchema = getSchema();
  if (xsdSchema != null)
  {
   String schemaForSchemaNamespace = xsdSchema.getSchemaForSchemaNamespace();
   XSDSchemaImpl.getSchemaForSchema(schemaForSchemaNamespace).resolveComplexTypeDefinition("anyType");
  }
 }
 return result;
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

XSDSchema schemaForSchema = getSchemaForSchema(namespace);
result = schemaForSchema.resolveSimpleTypeDefinition(namespace, localName);

代码示例来源:origin: org.eclipse/org.eclipse.xsd

XSDSchema schemaForSchema = getSchemaForSchema(namespace);
result = schemaForSchema.resolveSimpleTypeDefinition(namespace, localName);

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

@Override
public XSDTypeDefinition resolveTypeDefinition(String namespace, String localName)
{
 XSDTypeDefinition result = 
  (XSDTypeDefinition)resolveNamedComponent(XSDPackage.Literals.XSD_SCHEMA__TYPE_DEFINITIONS, namespace, localName);
 if (result == null && 
    XSDConstants.isSchemaForSchemaNamespace(namespace) &&
    !XSDConstants.isSchemaForSchemaNamespace(getTargetNamespace()))
 {
  result = getSchemaForSchema(namespace).resolveTypeDefinition(namespace, localName);
 }
 if (result == null)
 {
  result =  createUnresolvedTypeDefinition(namespace, localName);
 }
 return result;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

@Override
public XSDTypeDefinition resolveTypeDefinition(String namespace, String localName)
{
 XSDTypeDefinition result = 
  (XSDTypeDefinition)resolveNamedComponent(XSDPackage.Literals.XSD_SCHEMA__TYPE_DEFINITIONS, namespace, localName);
 if (result == null && 
    XSDConstants.isSchemaForSchemaNamespace(namespace) &&
    !XSDConstants.isSchemaForSchemaNamespace(getTargetNamespace()))
 {
  result = getSchemaForSchema(namespace).resolveTypeDefinition(namespace, localName);
 }
 if (result == null)
 {
  result =  createUnresolvedTypeDefinition(namespace, localName);
 }
 return result;
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

@Override
public XSDComplexTypeDefinition resolveComplexTypeDefinition(String namespace, String localName)
{
 XSDTypeDefinition xsdTypeDefinition = 
  (XSDTypeDefinition)resolveNamedComponent(XSDPackage.Literals.XSD_SCHEMA__TYPE_DEFINITIONS, namespace, localName);
 XSDComplexTypeDefinition result =
  xsdTypeDefinition instanceof XSDComplexTypeDefinition ? (XSDComplexTypeDefinition)xsdTypeDefinition : null;
 if (result == null &&
    XSDConstants.isSchemaForSchemaNamespace(namespace) && 
    !XSDConstants.isSchemaForSchemaNamespace(getTargetNamespace()))
 {
  result = getSchemaForSchema(namespace).resolveComplexTypeDefinition(namespace, localName);
 }
 if (result == null)
 {
  result =  createUnresolvedComplexTypeDefinition(namespace, localName);
 }
 return result;
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

@Override
public XSDComplexTypeDefinition resolveComplexTypeDefinition(String namespace, String localName)
{
 XSDTypeDefinition xsdTypeDefinition = 
  (XSDTypeDefinition)resolveNamedComponent(XSDPackage.Literals.XSD_SCHEMA__TYPE_DEFINITIONS, namespace, localName);
 XSDComplexTypeDefinition result =
  xsdTypeDefinition instanceof XSDComplexTypeDefinition ? (XSDComplexTypeDefinition)xsdTypeDefinition : null;
 if (result == null &&
    XSDConstants.isSchemaForSchemaNamespace(namespace) && 
    !XSDConstants.isSchemaForSchemaNamespace(getTargetNamespace()))
 {
  result = getSchemaForSchema(namespace).resolveComplexTypeDefinition(namespace, localName);
 }
 if (result == null)
 {
  result =  createUnresolvedComplexTypeDefinition(namespace, localName);
 }
 return result;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com