本文整理了Java中org.eclipse.xsd.XSDElementDeclaration.getSchema()
方法的一些代码示例,展示了XSDElementDeclaration.getSchema()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDElementDeclaration.getSchema()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDElementDeclaration
类名称:XSDElementDeclaration
方法名:getSchema
暂无
代码示例来源:origin: geotools/geotools
boolean forceQualified(XSDElementDeclaration e) {
return namespaceAware
&& (e == null
|| e.isGlobal()
|| e.getSchema() == null
|| e.getSchema().getElementFormDefault() == XSDForm.QUALIFIED_LITERAL);
}
代码示例来源:origin: geotools/geotools
/**
* Returns a list of all top level elements that are of a type derived from the type of the
* specified element.
*
* @param element The element.
* @return All elements which are of a type derived from the type of the specified element.
*/
public static final List getDerivedElementDeclarations(XSDElementDeclaration element) {
List elements = element.getSchema().getElementDeclarations();
List derived = new ArrayList();
for (Iterator itr = elements.iterator(); itr.hasNext(); ) {
XSDElementDeclaration derivee = (XSDElementDeclaration) itr.next();
if (derivee.equals(element)) {
continue; // same element
}
XSDTypeDefinition type = derivee.getType();
while (true) {
if (type.equals(element.getType())) {
derived.add(derivee);
break;
}
if (type.equals(type.getBaseType())) {
break;
}
type = type.getBaseType();
}
}
return derived;
}
代码示例来源:origin: org.geotools/gt2-xml-xsd
List elements = element.getSchema().getElementDeclarations();
List derived = new ArrayList();
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
@Override
public Object getPropertyDefaultValue(Object o)
{
return
XSDEditPlugin.INSTANCE.getString
("_UI_DefaultValue_label", new Object [] { ((XSDElementDeclaration)o).getSchema().getElementFormDefault().getName() });
}
});
代码示例来源:origin: org.geotools/gt2-xml-core
List elements = element.getSchema().getElementDeclarations();
List derived = new ArrayList();
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public IModel getModel()
{
Adapter adapter = XSDAdapterFactory.getInstance().adapt(getXSDElementDeclaration().getSchema());
return (IModel)adapter;
}
代码示例来源:origin: org.geotools.xsd/gt-core
List elements = element.getSchema().getElementDeclarations();
List derived = new ArrayList();
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public Image getImage(Object element)
{
if ( element instanceof XSDElementDeclaration){
// Workaround trick: (trung) we create a temporary Dom element and put it in the label provider
// to get the image.
String namespace = ((XSDElementDeclaration) element).getSchema().getTargetNamespace();
String name = ((XSDElementDeclaration) element).getName();
Element tempElement = tempDoc.createElementNS(namespace, name);
ILabelProvider lp = XSDEditorPlugin.getDefault().getNodeCustomizationRegistry().getLabelProvider(namespace);
if (lp != null){
Image img = lp.getImage(tempElement);
if (img != null){
return img;
}
}
return DEFAULT_ELEMENT_ICON;
}
else if ( element instanceof XSDAttributeDeclaration){
return DEFAULT_ATTRIBUTE_ICON;
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
if (component.getMetaName() == IXSDSearchConstants.ELEMENT_META_NAME)
AddXSDElementCommand command = new AddXSDElementCommand(Messages._UI_ACTION_ADD_ELEMENT, concreteComponent.getSchema());
command.setNameToAdd(component.getName());
command.execute();
Command command = new UpdateAttributeValueCommand(concreteComponent.getElement(), XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE, elementDec.getQName(concreteComponent.getSchema()));
command.execute();
Command command = new UpdateAttributeValueCommand(concreteComponent.getElement(), XSDConstants.SUBSTITUTIONGROUP_ATTRIBUTE, ((XSDElementDeclaration)component.getObject()).getQName(concreteComponent.getSchema()));
command.execute();
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
if (component.getMetaName() == IXSDSearchConstants.ELEMENT_META_NAME)
AddXSDElementCommand command = new AddXSDElementCommand(Messages._UI_ACTION_ADD_ELEMENT, concreteComponent.getSchema());
command.setNameToAdd(component.getName());
command.execute();
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
elementDeclaration.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "string") ); //$NON-NLS-1$
elementDeclaration.setAnonymousTypeDefinition(simpleType);
内容来源于网络,如有侵权,请联系作者删除!