本文整理了Java中org.eclipse.xsd.XSDFactory.createXSDAnnotation()
方法的一些代码示例,展示了XSDFactory.createXSDAnnotation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDFactory.createXSDAnnotation()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDFactory
类名称:XSDFactory
方法名:createXSDAnnotation
[英]Returns a new object of class 'Annotation'.
[中]返回类“Annotation”的新对象。
代码示例来源:origin: org.eclipse/org.eclipse.xsd
public static XSDAnnotation createAnnotation(Node node)
{
if (XSDConstants.nodeType(node) == XSDConstants.ANNOTATION_ELEMENT)
{
XSDAnnotation xsdAnnotation = XSDFactory.eINSTANCE.createXSDAnnotation();
xsdAnnotation.setElement((Element)node);
return xsdAnnotation;
}
return null;
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
public static XSDAnnotation createAnnotation(Node node)
{
if (XSDConstants.nodeType(node) == XSDConstants.ANNOTATION_ELEMENT)
{
XSDAnnotation xsdAnnotation = XSDFactory.eINSTANCE.createXSDAnnotation();
xsdAnnotation.setElement((Element)node);
return xsdAnnotation;
}
return null;
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDWildcard_Annotation(), xsdFactory.createXSDAnnotation()));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDInclude_Annotation(), xsdFactory.createXSDAnnotation()));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDFacet_Annotation(), xsdFactory.createXSDAnnotation()));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDXPathDefinition_Annotation(), xsdFactory.createXSDAnnotation()));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDImport_Annotation(), xsdFactory.createXSDAnnotation()));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDNotationDeclaration_Annotation(), xsdFactory.createXSDAnnotation()));
}
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
if (xsdComponent instanceof XSDTypeDefinition)
xsdAnnotation = XSDFactory.eINSTANCE.createXSDAnnotation();
((XSDTypeDefinition)xsdComponent).setAnnotation(xsdAnnotation);
applicationInformation = xsdAnnotation.createApplicationInformation(EcorePackage.eNS_URI);
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
XSDAttributeDeclaration ad = (XSDAttributeDeclaration) object;
if (!ad.isAttributeDeclarationReference())
{
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDAttributeDeclaration_Annotation(), xsdFactory.createXSDAnnotation()));
// atomic, list, and union simple type definitions
addSimpleTypeDefinitionChildParameters(newChildDescriptors, ad, xsdPackage.getXSDAttributeDeclaration_AnonymousTypeDefinition(), true, true, true);
}
}
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
@Override
public XSDConcreteComponent cloneConcreteComponent(boolean deep, boolean shareDOM)
{
XSDAnnotationImpl clonedAnnotation = (XSDAnnotationImpl)getXSDFactory().createXSDAnnotation();
clonedAnnotation.isReconciling = true;
if (shareDOM)
{
Element element = getElement();
if (element != null)
{
clonedAnnotation.setElement(element);
}
clonedAnnotation.getApplicationInformation().addAll(getApplicationInformation());
clonedAnnotation.getUserInformation().addAll(getUserInformation());
clonedAnnotation.getAttributes().addAll(getAttributes());
}
clonedAnnotation.isReconciling = shareDOM;
return clonedAnnotation;
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
XSDModelGroupDefinition mgd = (XSDModelGroupDefinition) object;
if (!mgd.isModelGroupDefinitionReference())
{
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDModelGroupDefinition_Annotation(), xsdFactory.createXSDAnnotation()));
// all, choice, and sequence model groups
addModelGroupChildParameters(newChildDescriptors, xsdPackage.getXSDModelGroupDefinition_ModelGroup(), true, false);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.xsd
@Override
public XSDConcreteComponent cloneConcreteComponent(boolean deep, boolean shareDOM)
{
XSDAnnotationImpl clonedAnnotation = (XSDAnnotationImpl)getXSDFactory().createXSDAnnotation();
clonedAnnotation.isReconciling = true;
if (shareDOM)
{
Element element = getElement();
if (element != null)
{
clonedAnnotation.setElement(element);
}
clonedAnnotation.getApplicationInformation().addAll(getApplicationInformation());
clonedAnnotation.getUserInformation().addAll(getUserInformation());
clonedAnnotation.getAttributes().addAll(getAttributes());
}
clonedAnnotation.isReconciling = shareDOM;
return clonedAnnotation;
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDIdentityConstraintDefinition_Annotation(), xsdFactory.createXSDAnnotation()));
// selector xpath
XSDXPathDefinition xpd = xsdFactory.createXSDXPathDefinition();
xpd.setVariety(XSDXPathVariety.SELECTOR_LITERAL);
xpd.setValue("");
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDIdentityConstraintDefinition_Selector(), xpd));
// field xpath
xpd = xsdFactory.createXSDXPathDefinition();
xpd.setVariety(XSDXPathVariety.FIELD_LITERAL);
xpd.setValue("");
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDIdentityConstraintDefinition_Fields(), xpd));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
{
super.collectNewChildDescriptors(newChildDescriptors, object);
XSDRedefine r = (XSDRedefine) object;
// annotation
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), xsdFactory.createXSDAnnotation()));
// model group definition
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), createModelGroupDefinition(r)));
// attribute group definition
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), createAttributeGroupDefinition(r)));
// atomic, list, and union simple type definitions
addSimpleTypeDefinitionChildParameters(newChildDescriptors, r, xsdPackage.getXSDRedefine_Contents(), true, true, true);
// complex type definition
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDRedefine_Contents(), createComplexTypeDefinition(r)));
}
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
newChildDescriptors.add(createChildParameter(schemaContents, xsdFactory.createXSDAnnotation()));
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDTypeDefinition_Annotation(), xsdFactory.createXSDAnnotation()));
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDTypeDefinition_DerivationAnnotation(), xsdFactory.createXSDAnnotation()));
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDModelGroup_Annotation(), xsdFactory.createXSDAnnotation()));
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
(createChildParameter
(xsdPackage.getXSDAttributeGroupDefinition_Annotation(),
xsdFactory.createXSDAnnotation()));
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
newChildDescriptors.add(createChildParameter(xsdPackage.getXSDElementDeclaration_Annotation(), xsdFactory.createXSDAnnotation()));
内容来源于网络,如有侵权,请联系作者删除!