javax.xml.bind.annotation.XmlElementRef Java Examples
The following examples show how to use
javax.xml.bind.annotation.XmlElementRef.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReferencePropertyInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Reads the value of {@code XmlElementRef.required()}. * * If we are working as 2.1 RI, this defaults to true. */ private boolean isRequired(XmlElementRef ref) { if(!is2_2) return true; try { return ref.required(); } catch(LinkageError e) { is2_2 = false; return true; // the value defaults to true } }
Example #2
Source File: ReferencePropertyInfoImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private String getEffectiveNamespaceFor(XmlElementRef r) { String nsUri = r.namespace(); XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) { // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(nsUri.length()==0) nsUri = parent.builder.defaultNsUri; } return nsUri; }
Example #3
Source File: ReferencePropertyInfoImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private String getEffectiveNamespaceFor(XmlElementRef r) { String nsUri = r.namespace(); XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) { // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(nsUri.length()==0) nsUri = parent.builder.defaultNsUri; } return nsUri; }
Example #4
Source File: DirectoryScannerConfig.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Getter for property excludeFiles. * This is an array of filters identifying files that should be excluded. * A file is excluded if at least one filter matches. * @return Value of property excludeFiles. */ @XmlElementWrapper(name="ExcludeFiles", namespace=XmlConfigUtils.NAMESPACE) @XmlElementRef public FileMatch[] getExcludeFiles() { synchronized(excludeFiles) { return excludeFiles.toArray(new FileMatch[0]); } }
Example #5
Source File: CasMappings.java From biomedicus with Apache License 2.0 | 5 votes |
/** * Gets the mappings from rtf destinations to UIMA CAS views. * * @return list of the mappings. */ @XmlElementWrapper(required = true) @XmlElementRef(name = "destinationCasMapping") @Nullable public List<DestinationCasMapping> getDestinationCasMappings() { return destinationCasMappings; }
Example #6
Source File: CC_GeneralOperationParameter.java From sis with Apache License 2.0 | 5 votes |
/** * Invoked by JAXB at marshalling time for getting the actual element to write * inside the {@code <gml:parameter>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the element to be marshalled. * * @see CC_GeneralParameterValue#getElement() */ @XmlElementRef public AbstractParameterDescriptor getElement() { final GeneralParameterDescriptor metadata = this.metadata; if (metadata instanceof AbstractParameterDescriptor) { return (AbstractParameterDescriptor) metadata; } if (metadata instanceof ParameterDescriptor) { return DefaultParameterDescriptor.castOrCopy((ParameterDescriptor<?>) metadata); } if (metadata instanceof ParameterDescriptorGroup) { return DefaultParameterDescriptorGroup.castOrCopy((ParameterDescriptorGroup) metadata); } return null; // Unknown types are currently not marshalled (we may revisit that in a future SIS version). }
Example #7
Source File: ReferencePropertyInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private String getEffectiveNamespaceFor(XmlElementRef r) { String nsUri = r.namespace(); XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) { // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(nsUri.length()==0) nsUri = parent.builder.defaultNsUri; } return nsUri; }
Example #8
Source File: TestImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 5 votes |
@Override @XmlElementRef(type = org.asqatasun.entity.reference.ScopeImpl.class) @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT) @JsonSubTypes({ @JsonSubTypes.Type(value=org.asqatasun.entity.reference.ScopeImpl.class, name="Scope")}) public Scope getScope() { return this.scope; }
Example #9
Source File: SiteImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 5 votes |
@XmlElementWrapper @XmlElementRefs({ @XmlElementRef(type = org.asqatasun.entity.subject.SiteImpl.class), @XmlElementRef(type = org.asqatasun.entity.subject.PageImpl.class)}) @Override public Collection<WebResource> getComponentList() { // Bug #540 correction return (Collection) componentList; }
Example #10
Source File: DirectoryScannerConfig.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Getter for property excludeFiles. * This is an array of filters identifying files that should be excluded. * A file is excluded if at least one filter matches. * @return Value of property excludeFiles. */ @XmlElementWrapper(name="ExcludeFiles", namespace=XmlConfigUtils.NAMESPACE) @XmlElementRef public FileMatch[] getExcludeFiles() { synchronized(excludeFiles) { return excludeFiles.toArray(new FileMatch[0]); } }
Example #11
Source File: TestImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 5 votes |
@Override @XmlElementRef(type = org.asqatasun.entity.reference.CriterionImpl.class) @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT) @JsonSubTypes({ @JsonSubTypes.Type(value=org.asqatasun.entity.reference.CriterionImpl.class, name="Criterion")}) public Criterion getCriterion() { return this.criterion; }
Example #12
Source File: ReferencePropertyInfoImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Reads the value of {@code XmlElementRef.required()}. * * If we are working as 2.1 RI, this defaults to true. */ private boolean isRequired(XmlElementRef ref) { if(!is2_2) return true; try { return ref.required(); } catch(LinkageError e) { is2_2 = false; return true; // the value defaults to true } }
Example #13
Source File: ProcessResultImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 5 votes |
@Override @XmlElementWrapper @XmlElementRefs({ @XmlElementRef(type = org.asqatasun.entity.audit.DefiniteResultImpl.class), @XmlElementRef(type = org.asqatasun.entity.audit.IndefiniteResultImpl.class)}) @JsonIgnore public Collection<ProcessResult> getChildResultList() { return (Collection)childResultSet; }
Example #14
Source File: ReferencePropertyInfoImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Reads the value of {@code XmlElementRef.required()}. * * If we are working as 2.1 RI, this defaults to true. */ private boolean isRequired(XmlElementRef ref) { if(!is2_2) return true; try { return ref.required(); } catch(LinkageError e) { is2_2 = false; return true; // the value defaults to true } }
Example #15
Source File: CI_ResponsibleParty.java From sis with Apache License 2.0 | 5 votes |
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <gmd:CI_ResponsibleParty>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the metadata to be marshalled. */ @XmlElementRef public DefaultResponsibility getElement() { if (FilterByVersion.LEGACY_METADATA.accept()) { return DefaultResponsibleParty.castOrCopy(metadata); } else if (metadata != null) { final DefaultIndividual individual; final String name = metadata.getIndividualName(); Contact contact = metadata.getContactInfo(); AbstractParty party; if (name != null) { individual = new DefaultIndividual(name, metadata.getPositionName(), contact); party = individual; contact = null; } else { individual = null; party = null; } final InternationalString organisation = metadata.getOrganisationName(); if (organisation != null) { party = new DefaultOrganisation(organisation, null, individual, contact); } if (party != null) { return new DefaultResponsibility(metadata.getRole(), null, party); } } return null; }
Example #16
Source File: DirectoryScannerConfig.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Getter for property includeFiles. * This is an array of filters identifying files that should be selected. * A file is selected if at least one filter matches. * @return Value of property includeFiles. */ @XmlElementWrapper(name="IncludeFiles", namespace=XmlConfigUtils.NAMESPACE) @XmlElementRef public FileMatch[] getIncludeFiles() { synchronized(includeFiles) { return includeFiles.toArray(new FileMatch[0]); } }
Example #17
Source File: ReferencePropertyInfoImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private String getEffectiveNamespaceFor(XmlElementRef r) { String nsUri = r.namespace(); XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) { // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(nsUri.length()==0) nsUri = parent.builder.defaultNsUri; } return nsUri; }
Example #18
Source File: MD_Identifier.java From sis with Apache License 2.0 | 5 votes |
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <mcc:MD_Identifier>} or {@code RS_Identifier} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the metadata to be marshalled. */ @XmlElementRef public final DefaultIdentifier getElement() { if (FilterByVersion.LEGACY_METADATA.accept() && metadata instanceof ReferenceIdentifier) { /* * In legacy specification, "code space" and "version" were not defined in <gmd:MD_Identifier> but were * defined in <gmd:RS_Identifier> subclass. In newer specification there is no longer such special case. * Note that "description" did not existed anywhere in legacy specification. */ final ReferenceIdentifier id = (ReferenceIdentifier) metadata; if (id.getCodeSpace() != null || id.getVersion() != null) { return RS_Identifier.wrap(id); } } return DefaultIdentifier.castOrCopy(metadata); }
Example #19
Source File: DirectoryScannerConfig.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Getter for property includeFiles. * This is an array of filters identifying files that should be selected. * A file is selected if at least one filter matches. * @return Value of property includeFiles. */ @XmlElementWrapper(name="IncludeFiles", namespace=XmlConfigUtils.NAMESPACE) @XmlElementRef public FileMatch[] getIncludeFiles() { synchronized(includeFiles) { return includeFiles.toArray(new FileMatch[0]); } }
Example #20
Source File: DirectoryScannerConfig.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Getter for property excludeFiles. * This is an array of filters identifying files that should be excluded. * A file is excluded if at least one filter matches. * @return Value of property excludeFiles. */ @XmlElementWrapper(name="ExcludeFiles", namespace=XmlConfigUtils.NAMESPACE) @XmlElementRef public FileMatch[] getExcludeFiles() { synchronized(excludeFiles) { return excludeFiles.toArray(new FileMatch[0]); } }
Example #21
Source File: ReferencePropertyInfoImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private String getEffectiveNamespaceFor(XmlElementRef r) { String nsUri = r.namespace(); XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) { // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(nsUri.length()==0) nsUri = parent.builder.defaultNsUri; } return nsUri; }
Example #22
Source File: UserImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 4 votes |
@Override @XmlElementWrapper @XmlElementRef(type = org.asqatasun.webapp.entity.contract.ContractImpl.class) public Collection<Contract> getContractSet() { return (Collection)contractSet; }
Example #23
Source File: ReferencePropertyInfoImpl.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * @return * true if the reference yields at least one type */ private boolean addGenericElement(XmlElementRef r) { String nsUri = getEffectiveNamespaceFor(r); // TODO: check spec. defaulting of localName. return addGenericElement(parent.owner.getElementInfo(parent.getClazz(),new QName(nsUri,r.name()))); }
Example #24
Source File: Application.java From cxf-fediz with Apache License 2.0 | 4 votes |
@XmlElementWrapper(name = "claims") @XmlElementRef(name = "requestedClaims") public List<RequestClaim> getRequestedClaims() { return requestedClaims; }
Example #25
Source File: AuditImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 4 votes |
@Override @XmlElementWrapper @XmlElementRef(type = org.asqatasun.entity.reference.TestImpl.class) public Collection<Test> getTestList() { return (Collection)testList; }
Example #26
Source File: XmlElementRefsQuick.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public XmlElementRef[] value() { return core.value(); }
Example #27
Source File: PushRegistration.java From activemq-artemis with Apache License 2.0 | 4 votes |
@XmlElementRef public List<XmlHttpHeader> getHeaders() { return headers; }
Example #28
Source File: ReferencePropertyInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * @return * true if the reference yields at least one type */ private boolean addGenericElement(XmlElementRef r) { String nsUri = getEffectiveNamespaceFor(r); // TODO: check spec. defaulting of localName. return addGenericElement(parent.owner.getElementInfo(parent.getClazz(),new QName(nsUri,r.name()))); }
Example #29
Source File: Idp.java From cxf-fediz with Apache License 2.0 | 4 votes |
@XmlElementWrapper(name = "trustedIdps") @XmlElementRef(name = "trustedIdp") public List<TrustedIdp> getTrustedIdps() { return trustedIdpList; }
Example #30
Source File: TestImpl.java From Asqatasun with GNU Affero General Public License v3.0 | 4 votes |
@Override @XmlElementRef(type = org.asqatasun.entity.reference.DecisionLevelImpl.class) public DecisionLevel getDecisionLevel() { return this.decisionLevel; }