Java 类javax.xml.bind.annotation.XmlElements 实例源码

项目:cadastrapp    文件:RelevePropriete.java   
@XmlElementWrapper(name="comptesCommunaux")
   @XmlElements({@XmlElement(name="compteCommunal",     type=CompteCommunal.class)})
/**
 * @param comptesCommunaux the comptesCommunaux to set
 */
public void setComptesCommunaux(List<CompteCommunal> comptesCommunaux) {
    this.comptesCommunaux = comptesCommunaux;
}
项目:cadastrapp    文件:ProprietesBaties.java   
@XmlElementWrapper(name="proprietes")
   @XmlElements({@XmlElement(name="propriete",   type=ProprieteBatie.class)})
/**
 * @param proprietes
 */
public void setProprietes(List<ProprieteBatie> proprietes) {
    this.proprietes = proprietes;
}
项目:cadastrapp    文件:BordereauParcellaire.java   
@XmlElementWrapper(name="parcelles")
   @XmlElements({@XmlElement(name="parcelle",     type=Parcelle.class)})
/**
 * @param parcelleList the parcelleList to set
 */
public void setParcelleList(List<Parcelle> parcelleList) {
    this.parcelleList = parcelleList;
}
项目:kc-rice    文件:CriteriaSupportUtils.java   
static boolean supportsCriteriaValue(Class<? extends SingleValuedPredicate> simplePredicateClass, CriteriaValue<?> value) {
    if (simplePredicateClass == null) {
        throw new IllegalArgumentException("simplePredicateClass was null");
    }
    if (value == null) {
        throw new IllegalArgumentException("valueClass was null");
    }
    XmlElements elementsAnnotation = CriteriaSupportUtils.findXmlElementsAnnotation(simplePredicateClass);
    if (elementsAnnotation != null) {
        XmlElement[] elements = elementsAnnotation.value();
        for (XmlElement element : elements) {
            if (value.getClass().equals(element.type())) {
                return true;
            }
        }
    }
    return false;
}
项目:rice    文件:CriteriaSupportUtils.java   
static boolean supportsCriteriaValue(Class<? extends SingleValuedPredicate> simplePredicateClass, CriteriaValue<?> value) {
    if (simplePredicateClass == null) {
        throw new IllegalArgumentException("simplePredicateClass was null");
    }
    if (value == null) {
        throw new IllegalArgumentException("valueClass was null");
    }
    XmlElements elementsAnnotation = CriteriaSupportUtils.findXmlElementsAnnotation(simplePredicateClass);
    if (elementsAnnotation != null) {
        XmlElement[] elements = elementsAnnotation.value();
        for (XmlElement element : elements) {
            if (value.getClass().equals(element.type())) {
                return true;
            }
        }
    }
    return false;
}
项目:kuali_rice    文件:CriteriaSupportUtils.java   
static boolean supportsCriteriaValue(Class<? extends SingleValuedPredicate> simplePredicateClass, CriteriaValue<?> value) {
    if (simplePredicateClass == null) {
        throw new IllegalArgumentException("simplePredicateClass was null");
    }
    if (value == null) {
        throw new IllegalArgumentException("valueClass was null");
    }
    XmlElements elementsAnnotation = CriteriaSupportUtils.findXmlElementsAnnotation(simplePredicateClass);
    if (elementsAnnotation != null) {
        XmlElement[] elements = elementsAnnotation.value();
        for (XmlElement element : elements) {
            if (value.getClass().equals(element.type())) {
                return true;
            }
        }
    }
    return false;
}
项目:AndroTickler    文件:Application.java   
@XmlElements({
        @XmlElement(name="activity"),
        @XmlElement(name="activity-alias")
})
public void setActivites(List<Activity> activites) {
    this.activites = activites;
}
项目:stroom-query    文件:Key.java   
@XmlElementWrapper(name = "values")
@XmlElements({
        @XmlElement(name = "byte", type = Byte.class),
        @XmlElement(name = "double", type = Double.class),
        @XmlElement(name = "float", type = Float.class),
        @XmlElement(name = "short", type = Short.class),
        @XmlElement(name = "integer", type = Integer.class),
        @XmlElement(name = "long", type = Long.class),
        @XmlElement(name = "string", type = String.class)
})
public List<Object> getValues() {
    return values;
}
项目:mycore    文件:MCRViewerConfiguration.java   
@XmlElements({ @XmlElement(name = "resource") })
@XmlElementWrapper(name = "resources")
public final List<MCRIViewClientResource> getResources() {
    return resources.entries()
        .stream()
        .map(entry -> new MCRIViewClientResource(entry.getKey(), entry.getValue()))
        .collect(Collectors.toList());
}
项目:mycore    文件:MCRViewerConfiguration.java   
@XmlElements({ @XmlElement(name = "property") })
@XmlElementWrapper(name = "properties")
public final List<MCRIViewClientProperty> getProperties() {
    return properties.entrySet()
        .stream()
        .map(entry -> new MCRIViewClientProperty(entry.getKey(), entry.getValue()))
        .collect(Collectors.toList());
}
项目:cloudkeeper    文件:MutableParentModule.java   
@XmlElementWrapper(name = "connections")
@XmlElements({
    @XmlElement(type = MutableSiblingConnection.class, name = "sibling-connection"),
    @XmlElement(type = MutableParentInToChildInConnection.class, name = "parent-to-child-connection"),
    @XmlElement(type = MutableChildOutToParentOutConnection.class, name = "child-to-parent-connection"),
    @XmlElement(type = MutableShortCircuitConnection.class, name = "short-circuit-connection")
})
@Override
public final List<MutableConnection<?>> getConnections() {
    return connections;
}
项目:cloudkeeper    文件:MutableOverride.java   
@XmlElementWrapper(name = "targets")
@XmlElements({
    @XmlElement(type = JAXBAdapters.JAXBElementPatternTarget.class, name = "element-regex"),
    @XmlElement(type = JAXBAdapters.JAXBElementTarget.class, name = "element"),
    @XmlElement(type = JAXBAdapters.JAXBExecutionTracePatternTarget.class, name = "execution-trace-regex"),
    @XmlElement(type = JAXBAdapters.JAXBExecutionTraceTarget.class, name = "execution-trace")
})
@Override
public List<MutableOverrideTarget<?>> getTargets() {
    return overrideTargets;
}
项目:dhis2-core    文件:SmsConfiguration.java   
@JsonProperty( value = "gateways" )
@XmlElementWrapper( name = "gateways" )
@XmlElements( { @XmlElement( name = "bulksms", type = BulkSmsGatewayConfig.class ),
    @XmlElement( name = "clickatell", type = ClickatellGatewayConfig.class ),
    @XmlElement( name = "http", type = GenericHttpGatewayConfig.class ) })
public List<SmsGatewayConfig> getGateways()
{
    return gateways;
}
项目:documentum-rest-client-java    文件:JaxbSearchTemplate.java   
@XmlElementWrapper(name = "external-variables")
@XmlElements({@XmlElement(name="property-list-variable", type=JaxbPropertyListVariable.class),
    @XmlElement(name="relative-date-variable", type=JaxbRelativeDateVariable.class),
    @XmlElement(name="property-variable", type=JaxbPropertyValueVariable.class),
    @XmlElement(name="fulltext-variable", type=JaxbFullTextVariable.class)})
@Override
public List<ExternalVariable<?>> getExternalVariables() {
    return externalVariables;
}
项目:documentum-rest-client-java    文件:JaxbSearch.java   
@XmlElementWrapper
@XmlElements({@XmlElement(name="expression-set", type=JaxbExpressionSet.class),
    @XmlElement(name="fulltext", type=JaxbFullTextExpression.class),
    @XmlElement(name="property", type=JaxbPropertyExpression.class),
    @XmlElement(name="property-list", type=JaxbPropertyListExpression.class),
    @XmlElement(name="property-range", type=JaxbPropertyRangeExpression.class),
    @XmlElement(name="relative-date", type=JaxbRelativeDateExpression.class)})
public List<Expression> getExpressions() {
    return expressions;
}
项目:Camel    文件:EipAnnotationProcessor.java   
private void processElements(RoundEnvironment roundEnv, TypeElement classElement, XmlElements elements, VariableElement fieldElement,
                             Set<EipOption> eipOptions, String prefix) {
    Elements elementUtils = processingEnv.getElementUtils();

    String fieldName;
    fieldName = fieldElement.getSimpleName().toString();
    if (elements != null) {
        String kind = "element";
        String name = fieldName;
        name = prefix + name;

        TypeMirror fieldType = fieldElement.asType();
        String fieldTypeName = fieldType.toString();

        String defaultValue = findDefaultValue(fieldElement, fieldTypeName);
        String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, true);

        boolean required = true;
        required = findRequired(fieldElement, required);

        // gather oneOf of the elements
        Set<String> oneOfTypes = new TreeSet<String>();
        for (XmlElement element : elements.value()) {
            String child = element.name();
            oneOfTypes.add(child);
        }

        EipOption ep = new EipOption(name, kind, fieldTypeName, required, defaultValue, docComment, false, false, null, true, oneOfTypes);
        eipOptions.add(ep);
    }
}
项目:cadastrapp    文件:CompteCommunal.java   
@XmlElementWrapper(name="proprietaires")
   @XmlElements({@XmlElement(name="proprietaire",     type=Proprietaire.class)})
/**
 * @param proprietaires the proprietaires to set
 */
public void setProprietaires(List<Proprietaire> proprietaires) {
    this.proprietaires = proprietaires;
}
项目:cadastrapp    文件:CompteCommunal.java   
@XmlElements({@XmlElement(name="proprietesBaties", type=ProprietesBaties.class, nillable = true)})
/**
 * @param proprieteBaties the proprieteBaties to set
 */
public void setProprietesBaties(ProprietesBaties proprieteBaties) {
    this.proprieteBaties = proprieteBaties;
}
项目:cadastrapp    文件:CompteCommunal.java   
@XmlElements({@XmlElement(name="proprietesNonBaties",     type=ProprietesNonBaties.class, nillable = true)})
/**
 * @param proprieteNonBaties the proprieteNonBaties to set
 */
public void setProprietesNonBaties(ProprietesNonBaties proprieteNonBaties) {
    this.proprieteNonBaties = proprieteNonBaties;
}
项目:cadastrapp    文件:ProprietesNonBaties.java   
@XmlElementWrapper(name="proprietes")
   @XmlElements({@XmlElement(name="propriete",   type=ProprieteNonBatie.class)})
/**
 * @param proprietes
 */
public void setProprietes(List<ProprieteNonBatie> proprietes) {
    this.proprietes = proprietes;
}
项目:cadastrapp    文件:Propriete.java   
@XmlElementWrapper(name="exonerations")
   @XmlElements({@XmlElement(name="exoneration",   type=Exoneration.class)})
/**
 * @param exonerations the exonerations to set
 */
public void setExonerations(List<Exoneration> exonerations) {
    this.exonerations = exonerations;
}
项目:cadastrapp    文件:Lot.java   
@XmlElementWrapper(name = "proprietaires")
@XmlElements({ @XmlElement(name = "Proprietaire", type = Proprietaire.class) })
/**
 * @param proprietaires
 */
public void setProprietaires(List<Proprietaire> proprietaires) {
    this.proprietaires = proprietaires;
}
项目:cadastrapp    文件:Lot.java   
@XmlElements({ @XmlElement(name = "Propriete", type = ProprieteBatie.class) })
/**
 * @param proprieteDescription the proprieteDescription to set
 */
public void setProprieteDescription(ProprieteBatie proprieteDescription) {
    this.proprieteDescription = proprieteDescription;
}
项目:cadastrapp    文件:Parcelle.java   
@XmlElementWrapper(name="proprietaires")
   @XmlElements({@XmlElement(name="proprietaire",   type=Proprietaire.class)})
/**
 * @param proprietaires the proprietaires List to set
 */
public void setProprietaires(List<Proprietaire> proprietaires) {
    this.proprietaires = proprietaires;
}
项目:cadastrapp    文件:Parcelle.java   
@XmlElementWrapper(name="proprieteBaties")
   @XmlElements({@XmlElement(name="proprieteBatie",   type=ProprieteBatie.class)})
/**
 * @param proprieteBaties the proprieteBaties to set
 */
public void setProprieteBaties(List<ProprieteBatie> proprieteBaties) {
    this.proprieteBaties = proprieteBaties;
}
项目:cadastrapp    文件:Parcelle.java   
@XmlElementWrapper(name="proprieteNonBaties")
   @XmlElements({@XmlElement(name="proprieteNonBatie",   type=ProprieteNonBatie.class)})
/**
 * @param proprieteNonBaties the proprieteNonBaties to set
 */
public void setProprieteNonBaties(List<ProprieteNonBatie> proprieteNonBaties) {
    this.proprieteNonBaties = proprieteNonBaties;
}
项目:cadastrapp    文件:ProprieteBatie.java   
@XmlElementWrapper(name="lots")
   @XmlElements({@XmlElement(name="lot",   type=Lot.class)})
/**
 * @param lots the lots to set
 */
public void setLots(List<Lot> lots) {
    this.lots = lots;
}
项目:cadastrapp    文件:InformationLots.java   
@XmlElementWrapper(name = "lots")
@XmlElements({ @XmlElement(name = "Lot", type = Lot.class) })
/**
 * @param lots
 */
public void setLots(List<Lot> lots) {
    this.lots = lots;
}
项目:performance-test-harness-for-geoevent    文件:Simulation.java   
@XmlElements( { 
    @XmlElement( name="RampTest", type = RampTest.class ),
    @XmlElement( name="StressTest", type = StressTest.class),
    @XmlElement( name="TimeTest", type = TimeTest.class ) } )
public Test getTest()
{
    return test;
}
项目:AgileAlligators    文件:SmsConfiguration.java   
@XmlElementWrapper( name = "gateways" )
@XmlElements( { @XmlElement( name = "bulksms", type = BulkSmsGatewayConfig.class ),
    @XmlElement( name = "clickatell", type = ClickatellGatewayConfig.class ),
    @XmlElement( name = "http", type = GenericHttpGatewayConfig.class ),
    @XmlElement( name = "modem", type = ModemGatewayConfig.class ) } )
public List<SmsGatewayConfig> getGateways()
{
    return gateways;
}
项目:appverse-server    文件:Page.java   
@XmlElementWrapper
@XmlElements({ @XmlElement(name = "sampleBean", type = SampleBean.class) })
/*  
 * If SampleBean is generic, use this sintax
 * 
    @XmlElements({ @XmlElement(name = "ledger", type = SampleBean.class),
        @XmlElement(name = "settlement", type = SettlementDTO.class),
        @XmlElement(name = "inventory", type = InventoryDTO.class),
        @XmlElement(name = "statement", type = ClientDocumentDTO.class) })
*/
public List<SampleBean> getData() {
    return data;
}
项目:grafikon    文件:LSLibraryItem.java   
@XmlElements({
    @XmlElement(name = "node", type = LSNode.class),
    @XmlElement(name = "output_template", type = LSOutputTemplate.class),
    @XmlElement(name = "engine_class", type = LSEngineClass.class),
    @XmlElement(name = "train_type", type = LSTrainType.class),
    @XmlElement(name = "line_class", type = LSLineClass.class),
    @XmlElement(name = "train_type_category", type = LSTrainTypeCategory.class)
})
public Object getObject() {
    return object;
}
项目:grafikon    文件:LSTrain.java   
@XmlElementWrapper
@XmlElements({
    @XmlElement(name = "node", type = LSTrainRoutePartNode.class),
    @XmlElement(name = "line", type = LSTrainRoutePartLine.class)
})
public List<Object> getRoute() {
    return route;
}
项目:grafikon    文件:LSTrain.java   
@XmlElementWrapper
@XmlElements({
    @XmlElement(name = "node", type = LSTrainRoutePartNode.class),
    @XmlElement(name = "line", type = LSTrainRoutePartLine.class)
})
public List<Object> getRoute() {
    return route;
}
项目:jrs-rest-java-client    文件:ReportJobModel.java   
@Override
@XmlElements({
        @XmlElement(name = "simpleTriggerModel", type = ReportJobSimpleTriggerModel.class),
        @XmlElement(name = "calendarTriggerModel", type = ReportJobCalendarTriggerModel.class)})
public JobTrigger getTrigger() {
    JobTrigger model = super.getTrigger();
    if (model == null) return null;
    if ((model instanceof ReportJobSimpleTriggerModel) || (model instanceof ReportJobCalendarTriggerModel))
        return model;
    else
        throw new JSClientException("Please useReportJobTriggerModel instead of JobTrigger in ReportJobModel class.");
}
项目:modules    文件:OrganizationContact.java   
@XmlElements(value = {
        @XmlElement(name = "provider", type = UniqueID.class),
        @XmlElement(name = "person", type = Person.class),
})
public Object getContact() {
    if (contact != null) {
        return contact;
    } else {
        if (providerEntityID != null && !providerEntityID.isEmpty()) {
            return new UniqueID(providerEntityID);
        } else {
            return person;
        }
    }
}
项目:hyperjaxb3    文件:Job.java   
@XmlElementWrapper(name = "tasks", namespace = "urn:test")
@XmlElements( {
        @XmlElement(name = "usertask", namespace = "urn:test", type = UserTask.class),
        @XmlElement(name = "autotask", namespace = "urn:test", type = AutoTask.class) })
public Collection<Node> getNodes() {
    return nodes;
}
项目:cats    文件:PowerInfo.java   
@XmlElementWrapper(name="PowerStatsList")
@XmlElements({
    @XmlElement(name="PowerStats", type=PowerStatistics.class)
})
public List<PowerStatistics> getPowerStatistics() {
    return powerStatistics;
}
项目:geofence    文件:RESTBatchOperation.java   
@XmlElements({
    @XmlElement(name="user",        type=RESTInputUser.class),
    @XmlElement(name="userGroup",   type=RESTInputGroup.class),
    @XmlElement(name="instance",    type=RESTInputInstance.class),
    @XmlElement(name="rule",        type=RESTInputRule.class)
})
public AbstractRESTPayload getPayload() {
    return payload;
}
项目:jaxb-visitor    文件:ClassDiscoverer.java   
/**
 * Parse the annotations on the field to see if there is an XmlElements
 * annotation on it. If so, we'll check this annotation to see if it
 * refers to any classes that are external from our code schema compile.
 * If we find any, then we'll add them to our visitor.
 * @param outline root of the generated code
 * @param field parses the xml annotations looking for an external class
 * @param directClasses set of direct classes to append to
 * @throws IllegalAccessException throw if there's an error introspecting the annotations
 */
private static void parseXmlAnnotations(Outline outline, FieldOutline field, Set<String> directClasses) throws IllegalAccessException {
    if (field instanceof UntypedListField) {
        JFieldVar jfv = (JFieldVar) FieldHack.listField.get(field);
        for(JAnnotationUse jau : jfv.annotations()) {
            JClass jc = jau.getAnnotationClass();
            if (jc.fullName().equals(XmlElements.class.getName())) {
                JAnnotationArrayMember value = (JAnnotationArrayMember) jau.getAnnotationMembers().get("value");
                for(JAnnotationUse anno : value.annotations()) {
                    handleXmlElement(outline, directClasses, anno.getAnnotationMembers().get("type"));
                }
            }
        }
    }
}