Package com.sun.xml.bind.v2.runtime.property

Examples of com.sun.xml.bind.v2.runtime.property.Property


        if ((elementName != null) && (parentPI != null) && (parentPI.lastUnderlyingPI != null) && (elementName.equals(parentPI.lastUnderlyingPI.elementName))) {
            processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));
            return;
        }
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();
        final Type rt = (ri == null) ? null : ri.getRawType();
        final String dn = (ri == null) ? null : ri.getName();
        // rt is null for root elements
        if (null == rt) {
            if (writingAttr) {
View Full Code Here


        if ((elementName != null) && (parentPI != null) && (parentPI.lastUnderlyingPI != null) && (elementName.equals(parentPI.lastUnderlyingPI.elementName))) {
            processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));
            return;
        }
        final XMLSerializer xs = XMLSerializer.getInstance();
        final Property cp = (xs == null) ? null : xs.getCurrentProperty();
        final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();
        final Type rt = (ri == null) ? null : ri.getRawType();
        final String dn = (ri == null) ? null : ri.getName();
        // rt is null for root elements
        if (null == rt) {
            if (writingAttr) {
View Full Code Here

/* 166 */     Collection ps = ci.getProperties();
/* 167 */     this.properties = new Property[ps.size()];
/* 168 */     int idx = 0;
/* 169 */     boolean elementOnly = true;
/* 170 */     for (RuntimePropertyInfo info : ps) {
/* 171 */       Property p = PropertyFactory.create(owner, info);
/* 172 */       if (info.id() == ID.ID)
/* 173 */         this.idProperty = p;
/* 174 */       this.properties[(idx++)] = p;
/* 175 */       elementOnly &= info.elementOnlyContent();
/*     */     }
View Full Code Here

/*     */
/* 213 */     List attProps = new FinalArrayList();
/* 214 */     List uriProps = new FinalArrayList();
/* 215 */     for (ClassBeanInfoImpl bi = this; bi != null; bi = bi.superClazz) {
/* 216 */       for (int i = bi.properties.length - 1; i >= 0; i--) {
/* 217 */         Property p = bi.properties[i];
/* 218 */         if ((p instanceof AttributeProperty))
/* 219 */           attProps.add((AttributeProperty)p);
/* 220 */         if (p.hasSerializeURIAction())
/* 221 */           uriProps.add(p);
/*     */       }
/*     */     }
/* 224 */     if (grammar.c14nSupport) {
/* 225 */       Collections.sort(attProps);
View Full Code Here

/* 121 */     this.tagName = null;
/* 122 */     this.expectedType = null;
/* 123 */     this.scope = null;
/* 124 */     this.constructor = null;
/*     */
/* 126 */     this.property = new Property(grammar) {
/*     */       public void reset(JAXBElement o) {
/* 128 */         throw new UnsupportedOperationException();
/*     */       }
/*     */
/*     */       public void serializeBody(JAXBElement e, XMLSerializer target, Object outerPeer) throws SAXException, IOException, XMLStreamException {
View Full Code Here

        Collection<? extends RuntimePropertyInfo> ps = ci.getProperties();
        this.properties = new Property[ps.size()];
        int idx=0;
        boolean elementOnly = true;
        for( RuntimePropertyInfo info : ps ) {
            Property p = PropertyFactory.create(owner,info);
            if(info.id()==ID.ID)
                idProperty = p;
            properties[idx++] = p;
            elementOnly &= info.elementOnlyContent();
            checkOverrideProperties(p);
View Full Code Here

        // create a list of attribute/URI handlers
        List<AttributeProperty> attProps = new FinalArrayList<AttributeProperty>();
        List<Property> uriProps = new FinalArrayList<Property>();
        for (ClassBeanInfoImpl bi = this; bi != null; bi = bi.superClazz) {
            for (int i = 0; i < bi.properties.length; i++) {
                Property p = bi.properties[i];
                if(p instanceof AttributeProperty)
                    attProps.add((AttributeProperty) p);
                if(p.hasSerializeURIAction())
                    uriProps.add(p);
            }
        }
        if(grammar.c14nSupport)
            Collections.sort(attProps);
View Full Code Here

    public void serializeAttributes(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
        for( AttributeProperty<BeanT> p : attributeProperties )
            try {
                if (retainPropertyInfo) {
                final Property parentProperty = target.getCurrentProperty();
                target.currentProperty.set(p);
                p.serializeAttributes(bean,target);
                target.currentProperty.set(parentProperty);
                } else {
                    p.serializeAttributes(bean,target);
View Full Code Here

    }

    public void serializeURIs(BeanT bean, XMLSerializer target) throws SAXException {
        try {
            if (retainPropertyInfo) {
            final Property parentProperty = target.getCurrentProperty();
            for( Property<BeanT> p : uriProperties ) {
                target.currentProperty.set(p);
                p.serializeURIs(bean,target);
            }
            target.currentProperty.set(parentProperty);
View Full Code Here

     */
    public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) {
        UnmarshallerChain chain = new UnmarshallerChain(context);
        for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) {
            for (int i = bi.properties.length - 1; i >= 0; i--) {
                Property p = bi.properties[i];

                switch(p.getKind()) {
                case ATTRIBUTE:
                    if(attUnmarshallers==null)
                        attUnmarshallers = new QNameMap<TransducedAccessor>();
                    AttributeProperty ap = (AttributeProperty) p;
                    attUnmarshallers.put(ap.attName.toQName(),ap.xacc);
                    break;
                case ELEMENT:
                case REFERENCE:
                case MAP:
                case VALUE:
                    p.buildChildElementUnmarshallers(chain,childUnmarshallers);
                    break;
                }
            }
        }

View Full Code Here

TOP

Related Classes of com.sun.xml.bind.v2.runtime.property.Property

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.