Tabnine Logo
XSDSimpleTypeDefinition.getTargetNamespace
Code IndexAdd Tabnine to your IDE (free)

How to use
getTargetNamespace
method
in
org.eclipse.xsd.XSDSimpleTypeDefinition

Best Java code snippets using org.eclipse.xsd.XSDSimpleTypeDefinition.getTargetNamespace (Showing top 20 results out of 315)

origin: geotools/geotools

if (!xsdType.getTargetNamespace().equals(schema.getTargetNamespace())) {
  return (AttributeType) findType(xsdType);
origin: geotools/geotools

protected AttributeType createType( XSDSimpleTypeDefinition xsdType, int depth ) {
  if (types.containsKey(xsdType)) {
    return (AttributeType) types.get(xsdType);
  }
  //import?
  if (!xsdType.getTargetNamespace().equals(schema.getTargetNamespace())) {
    return (AttributeType) findType(xsdType);
  }
  //first build super type
  AttributeType superType = null;
  XSDTypeDefinition baseType = xsdType.getBaseType();
  if ((baseType != null) && !baseType.equals(xsdType)) {
    if (baseType.getName() != null) {
      //ignore unamed types
      //superType = createType((XSDSimpleTypeDefinition)baseType);
      superType = createType(baseType, depth+1);
      assert superType != null;
    }
  }
  //TODO: actually derive valus from type
  AttributeType gtType = factory.createAttributeType(
    name(xsdType), Object.class, false, false, Collections.EMPTY_LIST, 
    superType, null
  );
  types.put(xsdType, gtType);
  return gtType;
}
origin: org.eclipse/org.eclipse.wst.xsd.ui

public boolean isFocusAllowed()
{
 XSDSimpleTypeDefinition xsdSimpleTypeDefinition = (XSDSimpleTypeDefinition) target;
 if (XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
 {
  return false;
 }
 if (xsdSimpleTypeDefinition.getName() == null)
 {
  return false;
 }
 return true;
}

origin: org.eclipse/org.eclipse.wst.xsd.ui

public List getSimpleTypes(XSDSchema schema, boolean showFromIncludes)
{
 List allTypes = schema.getTypeDefinitions();
 List list = new ArrayList();
 for (Iterator i = allTypes.iterator(); i.hasNext();)
 {
  XSDTypeDefinition td = (XSDTypeDefinition) i.next();
  if (td instanceof XSDSimpleTypeDefinition)
  {
   XSDSimpleTypeDefinition st = (XSDSimpleTypeDefinition) td;
   if (isSameNamespace(st.getTargetNamespace(),schema.getTargetNamespace()) && (st.getRootContainer() == schema || showFromIncludes))
   {
    list.add(st);
   }
  }
 }
 List adapterList = new ArrayList();
 populateAdapterList(list, adapterList);
 return adapterList;
}

origin: org.eclipse.xsd/org.eclipse.xsd

/**
 * Returns whether the type definition is a built-in type with the given name 
 * or is derived from a built-in type with that name.
 * @param xsdSimpleTypeDefinition a type definition.
 * @return whether the type definition is a built-in type with the given name 
 * or is derived from a built-in type with that name.
 * @since 2.4
 */
public static boolean isOrIsDerivedFrom(XSDSimpleTypeDefinition xsdSimpleTypeDefinition, String name)
{
 Set<XSDTypeDefinition> visited = new HashSet<XSDTypeDefinition>();
 while (xsdSimpleTypeDefinition != null)
 {
  if (isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace()) &&
     name.equals(xsdSimpleTypeDefinition.getName()))
  {
   return true;
  }
  if (!visited.add(xsdSimpleTypeDefinition = xsdSimpleTypeDefinition.getBaseTypeDefinition()))
  {
   return false;
  }
 }
 return false;
}
origin: org.eclipse.xsd/org.eclipse.xsd

public static boolean isLocalReferenceType(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
{
 while (xsdSimpleTypeDefinition != null)
 {
  if (XSDConstants.isAnySimpleType(xsdSimpleTypeDefinition))
  {
   return false;
  }
  String name = xsdSimpleTypeDefinition.getName();
  if (XSDConstants.isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace()) &&
     ("IDREF".equals(name) || "IDREFS".equals(name)))
  {
   return true;
  }
  xsdSimpleTypeDefinition = xsdSimpleTypeDefinition.getBaseTypeDefinition();
 }
 return false;
}
origin: org.eclipse/org.eclipse.xsd

public static boolean isLocalReferenceType(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
{
 while (xsdSimpleTypeDefinition != null)
 {
  if (XSDConstants.isAnySimpleType(xsdSimpleTypeDefinition))
  {
   return false;
  }
  String name = xsdSimpleTypeDefinition.getName();
  if (XSDConstants.isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace()) &&
     ("IDREF".equals(name) || "IDREFS".equals(name)))
  {
   return true;
  }
  xsdSimpleTypeDefinition = xsdSimpleTypeDefinition.getBaseTypeDefinition();
 }
 return false;
}
origin: org.eclipse/org.eclipse.wst.xsd.ui

public String getTypeNameQualifier()
{
 XSDAttributeDeclaration attr = getResolvedXSDAttributeDeclaration();
 if (attr != null)
 {
  if (attr.getTypeDefinition() != null)
  {
   return attr.getTypeDefinition().getTargetNamespace();        
  }
 }
 return null;
}
origin: org.eclipse/org.eclipse.xsd

 /**
  * Returns whether the simple type definition is the 
  * <a href="http://www.w3.org/TR/xmlschema-2/#dt-ID">ID</a>.
  * @param xsdSimpleTypeDefinition a simple type definition.
  * @return whether the simple type definition is 
  */
 public static boolean isOrIsDerivedFromID(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
 {
  while (xsdSimpleTypeDefinition != null)
  {
   if (isURType(xsdSimpleTypeDefinition))
   {
    return false;
   }

   if (isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace()) &&
      "ID".equals(xsdSimpleTypeDefinition.getName()))
   {
    return true;
   }

   xsdSimpleTypeDefinition = xsdSimpleTypeDefinition.getBaseTypeDefinition();
  }

  return false;
 }
}
origin: org.eclipse.xsd/org.eclipse.xsd

protected void checkForPrimitive(XSDSimpleTypeDefinition xsdSimpleTypeDefinition, EDataType eDataType)
{
 if (EcorePackage.eNS_URI.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
 {
  String wrapperType = ECORE_PRIMITIVE_TYPES.get(eDataType.getName());
  if (wrapperType != null)
  {
   XSDSimpleTypeDefinition wrapperTypeDefinition = xsdSimpleTypeDefinition.resolveSimpleTypeDefinition(wrapperType);
   if (wrapperTypeDefinition.getContainer() != null)
   {
    EDataType eDataTypeObject = (EDataType)getEClassifier(wrapperTypeDefinition);
    extendedMetaData.setName(eDataTypeObject, eDataType.getName() + ":Object");
    extendedMetaData.setBaseType(eDataTypeObject, eDataType);
    typeToTypeObjectMap.put(eDataType, eDataTypeObject);
    return;
   }
  }
 }
 checkForPrimitive(eDataType);
}
origin: org.eclipse/org.eclipse.xsd

protected void checkForPrimitive(XSDSimpleTypeDefinition xsdSimpleTypeDefinition, EDataType eDataType)
{
 if (EcorePackage.eNS_URI.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
 {
  String wrapperType = ECORE_PRIMITIVE_TYPES.get(eDataType.getName());
  if (wrapperType != null)
  {
   XSDSimpleTypeDefinition wrapperTypeDefinition = xsdSimpleTypeDefinition.resolveSimpleTypeDefinition(wrapperType);
   if (wrapperTypeDefinition.getContainer() != null)
   {
    EDataType eDataTypeObject = (EDataType)getEClassifier(wrapperTypeDefinition);
    extendedMetaData.setName(eDataTypeObject, eDataType.getName() + ":Object");
    extendedMetaData.setBaseType(eDataTypeObject, eDataType);
    typeToTypeObjectMap.put(eDataType, eDataTypeObject);
    return;
   }
  }
 }
 checkForPrimitive(eDataType);
}
origin: org.eclipse/org.eclipse.wst.xsd.ui

if (!XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
origin: org.eclipse.xsd/org.eclipse.xsd

if (value.contains("child:") && xsdSimpleTypeDefinition != null && XSDUtil.isSchemaForSchemaNamespace(xsdSimpleTypeDefinition.getTargetNamespace()))
origin: org.eclipse/org.eclipse.wst.xsd.ui

public void setInput(IWorkbenchPart part, ISelection selection)
{
 super.setInput(part, selection);
 init();
 
 XSDSchema schemaOfType = null;
 if (!isReadOnly)
 {
  schemaOfType = xsdSimpleTypeDefinition.getSchema();
 }
 if (schemaOfType == owningEditor.getAdapter(XSDSchema.class))
 {
  isReadOnly = false;
 }
 else
 {
  if (!XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
   isReadOnly = true;
 }
 if (hasMaxMinFacets)
 {
  title.setText(titleString + (isReadOnly ? " - " + Messages._UI_LABEL_READONLY : "")); //$NON-NLS-1$ //$NON-NLS-2$
 }
 relayout();
 constraintsWidget.setCommandStack(getCommandStack());
}
origin: org.eclipse/org.eclipse.wst.xsd.ui

while (!XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001.equals(targetST.getTargetNamespace()) && targetST != null)
origin: org.eclipse/org.eclipse.xsd

@Override
protected void patch()
{
 super.patch();
 XSDAttributeDeclaration theResolvedAttributeDeclaration = getResolvedAttributeDeclaration();
 if (theResolvedAttributeDeclaration == this)
 {
  XSDSimpleTypeDefinition typeDefinition = getTypeDefinition();
  if (typeDefinition != null && (forceResolve && typeDefinition.getName() != null || typeDefinition.getContainer() == null))
  {
   XSDSimpleTypeDefinition newTypeDefinition = 
    resolveSimpleTypeDefinition(typeDefinition.getTargetNamespace(), typeDefinition.getName());
   if (forceResolve || newTypeDefinition.getContainer() != null & newTypeDefinition != typeDefinition)
   {
    setTypeDefinitionGen(newTypeDefinition);
   }
  }
 }
 else
 {
  XSDAttributeDeclaration newResolvedAttributeDeclaration = 
   resolveAttributeDeclaration(theResolvedAttributeDeclaration.getTargetNamespace(), theResolvedAttributeDeclaration.getName());
  if (newResolvedAttributeDeclaration != theResolvedAttributeDeclaration)
  {
   setResolvedAttributeDeclaration(newResolvedAttributeDeclaration);
  }
 }
}
origin: org.eclipse.xsd/org.eclipse.xsd

@Override
protected void patch()
{
 super.patch();
 XSDAttributeDeclaration theResolvedAttributeDeclaration = getResolvedAttributeDeclaration();
 if (theResolvedAttributeDeclaration == this)
 {
  XSDSimpleTypeDefinition typeDefinition = getTypeDefinition();
  if (typeDefinition != null && (forceResolve && typeDefinition.getName() != null || typeDefinition.getContainer() == null))
  {
   XSDSimpleTypeDefinition newTypeDefinition = 
    resolveSimpleTypeDefinition(typeDefinition.getTargetNamespace(), typeDefinition.getName());
   if (forceResolve || newTypeDefinition.getContainer() != null & newTypeDefinition != typeDefinition)
   {
    setTypeDefinitionGen(newTypeDefinition);
   }
  }
 }
 else
 {
  XSDAttributeDeclaration newResolvedAttributeDeclaration = 
   resolveAttributeDeclaration(theResolvedAttributeDeclaration.getTargetNamespace(), theResolvedAttributeDeclaration.getName());
  if (newResolvedAttributeDeclaration != theResolvedAttributeDeclaration)
  {
   setResolvedAttributeDeclaration(newResolvedAttributeDeclaration);
  }
 }
}
origin: org.eclipse/org.eclipse.wst.xsd.ui

if (!XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001.equals(xsdSimpleTypeDefinition.getTargetNamespace()))
origin: org.eclipse.xsd/org.eclipse.xsd

clonedAttributeDeclaration.setTypeDefinition
 (createUnresolvedSimpleTypeDefinition
  (theTypeDefinition.getTargetNamespace(), theTypeDefinition.getName()));
origin: org.eclipse/org.eclipse.xsd

clonedAttributeDeclaration.setTypeDefinition
 (createUnresolvedSimpleTypeDefinition
  (theTypeDefinition.getTargetNamespace(), theTypeDefinition.getName()));
org.eclipse.xsdXSDSimpleTypeDefinitiongetTargetNamespace

Popular methods of XSDSimpleTypeDefinition

  • getItemTypeDefinition
    Returns the value of the 'Item Type Definition' reference. This represents theitem type definition [
  • getVariety
    Returns the value of the 'Variety' attribute. The literals are from the enumeration org.eclipse.xsd.
  • getMaxLengthFacet
    Returns the value of the 'Max Length Facet' reference. This represents the org.eclipse.xsd.XSDMaxLen
  • getMinLengthFacet
    Returns the value of the 'Min Length Facet' reference. This represents the org.eclipse.xsd.XSDMinLen
  • getEnumerationFacets
    Returns the value of the 'Enumeration Facets' reference list. The list contents are of type org.ecli
  • getFacets
    Returns the value of the 'Facets' reference list. The list contents are of type org.eclipse.xsd.XSDC
  • getLengthFacet
    Returns the value of the 'Length Facet' reference. This represents the org.eclipse.xsd.XSDLengthFace
  • getName
  • getBaseType
  • getBaseTypeDefinition
    Returns the value of the 'Base Type Definition' reference. This represents thebase type definition [
  • getContainer
  • getContents
    Returns the value of the 'Contents' containment reference list. The list contents are of type org.ec
  • getContainer,
  • getContents,
  • getMaxFacet,
  • getMemberTypeDefinitions,
  • getValidFacets,
  • setBaseTypeDefinition,
  • setItemTypeDefinition,
  • setName,
  • setVariety

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Menu (java.awt)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now