java JAXB 学习

Vivado实战:如何用BUFGMUX_CTRL实现FPGA双时钟热切换(附时序约束模板) 本文详细介绍了如何使用Xilinx FPGA中的BUFGMUX_CTRL原语实现双时钟热切换的工业级解决方案。通过分析BUFGMUX_CTRL的核心机制、PCB布局约束和电源噪声抑制方法,提供Vivado实现全流程和时序约束模板,帮助工程师在工业自动化、车载电子等场景中提升系统可靠性。 阅读详情

JAXB(Java Architecture for XML Binding)是JDK的一部分,用于Object <-> XML的转换(有点类似于.NET中的XML序列化)。

1、创建XSD

可以使用任何工具生成XSD工具,比如XMLSPY。eclipse也提供了相关的jaxb插件,File -> New -> XML Schema File

文件命名为order.xsd,eclipse中也提供了xsd可视化编辑工具

当然,你要是很NB,对xsd结构倒背如流的话,完全也可以纯手写。

复制代码
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <!-- edited with XMLSpy v2013 (http://www.altova.com) by  () -->
 3 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
 4     <xs:element name="Order">
 5         <xs:annotation>
 6             <xs:documentation>Comment describing your root element</xs:documentation>
 7         </xs:annotation>
 8         <xs:complexType>
 9             <xs:sequence>
10                 <xs:element name="OrderNo" type="xs:string"/>
11                 <xs:element name="OrderDateTime" type="xs:dateTime"/>
12                 <xs:element name="CustomerName" type="xs:string"/>
13                 <xs:element name="OrderItems">
14                     <xs:complexType>
15                         <xs:sequence>
16                             <xs:element name="Produdct" maxOccurs="unbounded">
17                                 <xs:complexType>
18                                     <xs:sequence>
19                                         <xs:element name="ProductNo" type="xs:string"/>
20                                         <xs:element name="ProductName" type="xs:string"/>
21                                         <xs:element name="Price" type="xs:float"/>
22                                         <xs:element name="Amount" type="xs:int"/>
23                                     </xs:sequence>
24                                 </xs:complexType>
25                             </xs:element>
26                         </xs:sequence>
27                     </xs:complexType>
28                 </xs:element>
29             </xs:sequence>
30         </xs:complexType>
31     </xs:element>
32 </xs:schema>
复制代码

上面是Order.xsd的内容

2、根据XSD生成示例Xml

在XSD文件上右击 -> Generate -> XmlFile

会弹出一个框:

Prefix这里,如果不需要,可以参考上图自行清空,如果一些可选节点也需要生成示例数据,上图中的Create optional attributes、Create optional elements这二项也勾选上。

生成的order.xml内容如下:

复制代码
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <!--Sample XML file generated by XMLSpy v2013 (http://www.altova.com)-->
 3 <Order xsi:noNamespaceSchemaLocation="order.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 4     <OrderNo>0000001</OrderNo>
 5     <OrderDateTime>2001-12-17T09:30:47Z</OrderDateTime>
 6     <CustomerName>jimmy</CustomerName>
 7     <OrderItems>
 8         <Produdct>
 9             <ProductNo>P-01</ProductNo>
10             <ProductName>Book</ProductName>
11             <Price>1.14159E0</Price>
12             <Amount>1</Amount>
13         </Produdct>
14         <Produdct>
15             <ProductNo>P-02</ProductNo>
16             <ProductName>iPhone 5C</ProductName>
17             <Price>3.14159E0</Price>
18             <Amount>2</Amount>
19         </Produdct>
20     </OrderItems>
21 </Order>
复制代码

3、根据xsd生成java类

同样在xsd上右击 -> Generate -> JAXB Classes... 剩下的事情,大家都知道了

复制代码
  1 //
  2 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
  3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
  4 // Any modifications to this file will be lost upon recompilation of the source schema. 
  5 // Generated on: 2014.01.24 at 11:09:15 ���� CST 
  6 //
  7 
  8 
  9 package model;
 10 
 11 import java.util.ArrayList;
 12 import java.util.List;
 13 import javax.xml.bind.annotation.XmlAccessType;
 14 import javax.xml.bind.annotation.XmlAccessorType;
 15 import javax.xml.bind.annotation.XmlElement;
 16 import javax.xml.bind.annotation.XmlRootElement;
 17 import javax.xml.bind.annotation.XmlSchemaType;
 18 import javax.xml.bind.annotation.XmlType;
 19 import javax.xml.datatype.XMLGregorianCalendar;
 20 
 21 
 22 /**
 23  * <p>Java class for anonymous complex type.
 24  * 
 25  * <p>The following schema fragment specifies the expected content contained within this class.
 26  * 
 27  * <pre>
 28  * &lt;complexType>
 29  *   &lt;complexContent>
 30  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 31  *       &lt;sequence>
 32  *         &lt;element name="OrderNo" type="{http://www.w3.org/2001/XMLSchema}string"/>
 33  *         &lt;element name="OrderDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
 34  *         &lt;element name="CustomerName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 35  *         &lt;element name="OrderItems">
 36  *           &lt;complexType>
 37  *             &lt;complexContent>
 38  *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 39  *                 &lt;sequence>
 40  *                   &lt;element name="Produdct" maxOccurs="unbounded">
 41  *                     &lt;complexType>
 42  *                       &lt;complexContent>
 43  *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 44  *                           &lt;sequence>
 45  *                             &lt;element name="ProductNo" type="{http://www.w3.org/2001/XMLSchema}string"/>
 46  *                             &lt;element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string"/>
 47  *                             &lt;element name="Price" type="{http://www.w3.org/2001/XMLSchema}float"/>
 48  *                             &lt;element name="Amount" type="{http://www.w3.org/2001/XMLSchema}int"/>
 49  *                           &lt;/sequence>
 50  *                         &lt;/restriction>
 51  *                       &lt;/complexContent>
 52  *                     &lt;/complexType>
 53  *                   &lt;/element>
 54  *                 &lt;/sequence>
 55  *               &lt;/restriction>
 56  *             &lt;/complexContent>
 57  *           &lt;/complexType>
 58  *         &lt;/element>
 59  *       &lt;/sequence>
 60  *     &lt;/restriction>
 61  *   &lt;/complexContent>
 62  * &lt;/complexType>
 63  * </pre>
 64  * 
 65  * 
 66  */
 67 @XmlAccessorType(XmlAccessType.FIELD)
 68 @XmlType(name = "", propOrder = {
 69     "orderNo",
 70     "orderDateTime",
 71     "customerName",
 72     "orderItems"
 73 })
 74 @XmlRootElement(name = "Order")
 75 public class Order {
 76 
 77     @XmlElement(name = "OrderNo", required = true)
 78     protected String orderNo;
 79     @XmlElement(name = "OrderDateTime", required = true)
 80     @XmlSchemaType(name = "dateTime")
 81     protected XMLGregorianCalendar orderDateTime;
 82     @XmlElement(name = "CustomerName", required = true)
 83     protected String customerName;
 84     @XmlElement(name = "OrderItems", required = true)
 85     protected Order.OrderItems orderItems;
 86 
 87     /**
 88      * Gets the value of the orderNo property.
 89      * 
 90      * @return
 91      *     possible object is
 92      *     {@link String }
 93      *     
 94      */
 95     public String getOrderNo() {
 96         return orderNo;
 97     }
 98 
 99     /**
100      * Sets the value of the orderNo property.
101      * 
102      * @param value
103      *     allowed object is
104      *     {@link String }
105      *     
106      */
107     public void setOrderNo(String value) {
108         this.orderNo = value;
109     }
110 
111     /**
112      * Gets the value of the orderDateTime property.
113      * 
114      * @return
115      *     possible object is
116      *     {@link XMLGregorianCalendar }
117      *     
118      */
119     public XMLGregorianCalendar getOrderDateTime() {
120         return orderDateTime;
121     }
122 
123     /**
124      * Sets the value of the orderDateTime property.
125      * 
126      * @param value
127      *     allowed object is
128      *     {@link XMLGregorianCalendar }
129      *     
130      */
131     public void setOrderDateTime(XMLGregorianCalendar value) {
132         this.orderDateTime = value;
133     }
134 
135     /**
136      * Gets the value of the customerName property.
137      * 
138      * @return
139      *     possible object is
140      *     {@link String }
141      *     
142      */
143     public String getCustomerName() {
144         return customerName;
145     }
146 
147     /**
148      * Sets the value of the customerName property.
149      * 
150      * @param value
151      *     allowed object is
152      *     {@link String }
153      *     
154      */
155     public void setCustomerName(String value) {
156         this.customerName = value;
157     }
158 
159     /**
160      * Gets the value of the orderItems property.
161      * 
162      * @return
163      *     possible object is
164      *     {@link Order.OrderItems }
165      *     
166      */
167     public Order.OrderItems getOrderItems() {
168         return orderItems;
169     }
170 
171     /**
172      * Sets the value of the orderItems property.
173      * 
174      * @param value
175      *     allowed object is
176      *     {@link Order.OrderItems }
177      *     
178      */
179     public void setOrderItems(Order.OrderItems value) {
180         this.orderItems = value;
181     }
182 
183 
184     /**
185      * <p>Java class for anonymous complex type.
186      * 
187      * <p>The following schema fragment specifies the expected content contained within this class.
188      * 
189      * <pre>
190      * &lt;complexType>
191      *   &lt;complexContent>
192      *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
193      *       &lt;sequence>
194      *         &lt;element name="Produdct" maxOccurs="unbounded">
195      *           &lt;complexType>
196      *             &lt;complexContent>
197      *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
198      *                 &lt;sequence>
199      *                   &lt;element name="ProductNo" type="{http://www.w3.org/2001/XMLSchema}string"/>
200      *                   &lt;element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string"/>
201      *                   &lt;element name="Price" type="{http://www.w3.org/2001/XMLSchema}float"/>
202      *                   &lt;element name="Amount" type="{http://www.w3.org/2001/XMLSchema}int"/>
203      *                 &lt;/sequence>
204      *               &lt;/restriction>
205      *             &lt;/complexContent>
206      *           &lt;/complexType>
207      *         &lt;/element>
208      *       &lt;/sequence>
209      *     &lt;/restriction>
210      *   &lt;/complexContent>
211      * &lt;/complexType>
212      * </pre>
213      * 
214      * 
215      */
216     @XmlAccessorType(XmlAccessType.FIELD)
217     @XmlType(name = "", propOrder = {
218         "produdct"
219     })
220     public static class OrderItems {
221 
222         @XmlElement(name = "Produdct", required = true)
223         protected List<Order.OrderItems.Produdct> produdct;
224 
225         /**
226          * Gets the value of the produdct property.
227          * 
228          * <p>
229          * This accessor method returns a reference to the live list,
230          * not a snapshot. Therefore any modification you make to the
231          * returned list will be present inside the JAXB object.
232          * This is why there is not a <CODE>set</CODE> method for the produdct property.
233          * 
234          * <p>
235          * For example, to add a new item, do as follows:
236          * <pre>
237          *    getProdudct().add(newItem);
238          * </pre>
239          * 
240          * 
241          * <p>
242          * Objects of the following type(s) are allowed in the list
243          * {@link Order.OrderItems.Produdct }
244          * 
245          * 
246          */
247         public List<Order.OrderItems.Produdct> getProdudct() {
248             if (produdct == null) {
249                 produdct = new ArrayList<Order.OrderItems.Produdct>();
250             }
251             return this.produdct;
252         }
253 
254 
255         /**
256          * <p>Java class for anonymous complex type.
257          * 
258          * <p>The following schema fragment specifies the expected content contained within this class.
259          * 
260          * <pre>
261          * &lt;complexType>
262          *   &lt;complexContent>
263          *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
264          *       &lt;sequence>
265          *         &lt;element name="ProductNo" type="{http://www.w3.org/2001/XMLSchema}string"/>
266          *         &lt;element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string"/>
267          *         &lt;element name="Price" type="{http://www.w3.org/2001/XMLSchema}float"/>
268          *         &lt;element name="Amount" type="{http://www.w3.org/2001/XMLSchema}int"/>
269          *       &lt;/sequence>
270          *     &lt;/restriction>
271          *   &lt;/complexContent>
272          * &lt;/complexType>
273          * </pre>
274          * 
275          * 
276          */
277         @XmlAccessorType(XmlAccessType.FIELD)
278         @XmlType(name = "", propOrder = {
279             "productNo",
280             "productName",
281             "price",
282             "amount"
283         })
284         public static class Produdct {
285 
286             @XmlElement(name = "ProductNo", required = true)
287             protected String productNo;
288             @XmlElement(name = "ProductName", required = true)
289             protected String productName;
290             @XmlElement(name = "Price")
291             protected float price;
292             @XmlElement(name = "Amount")
293             protected int amount;
294 
295             /**
296              * Gets the value of the productNo property.
297              * 
298              * @return
299              *     possible object is
300              *     {@link String }
301              *     
302              */
303             public String getProductNo() {
304                 return productNo;
305             }
306 
307             /**
308              * Sets the value of the productNo property.
309              * 
310              * @param value
311              *     allowed object is
312              *     {@link String }
313              *     
314              */
315             public void setProductNo(String value) {
316                 this.productNo = value;
317             }
318 
319             /**
320              * Gets the value of the productName property.
321              * 
322              * @return
323              *     possible object is
324              *     {@link String }
325              *     
326              */
327             public String getProductName() {
328                 return productName;
329             }
330 
331             /**
332              * Sets the value of the productName property.
333              * 
334              * @param value
335              *     allowed object is
336              *     {@link String }
337              *     
338              */
339             public void setProductName(String value) {
340                 this.productName = value;
341             }
342 
343             /**
344              * Gets the value of the price property.
345              * 
346              */
347             public float getPrice() {
348                 return price;
349             }
350 
351             /**
352              * Sets the value of the price property.
353              * 
354              */
355             public void setPrice(float value) {
356                 this.price = value;
357             }
358 
359             /**
360              * Gets the value of the amount property.
361              * 
362              */
363             public int getAmount() {
364                 return amount;
365             }
366 
367             /**
368              * Sets the value of the amount property.
369              * 
370              */
371             public void setAmount(int value) {
372                 this.amount = value;
373             }
374 
375         }
376 
377     }
378 
379 }
复制代码

上面是根据刚才的order.xsd生成的order类,package名称是model(当然生成java class的时候,你可以根据实际情况,设成任何自己需要的package名)

同时还会生成一个ObjectFactory类:

复制代码
 1 //
 2 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 3 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 4 // Any modifications to this file will be lost upon recompilation of the source schema. 
 5 // Generated on: 2014.01.24 at 11:09:15 ���� CST 
 6 //
 7 
 8 
 9 package model;
10 
11 import javax.xml.bind.annotation.XmlRegistry;
12 
13 
14 /**
15  * This object contains factory methods for each 
16  * Java content interface and Java element interface 
17  * generated in the model package. 
18  * <p>An ObjectFactory allows you to programatically 
19  * construct new instances of the Java representation 
20  * for XML content. The Java representation of XML 
21  * content can consist of schema derived interfaces 
22  * and classes representing the binding of schema 
23  * type definitions, element declarations and model 
24  * groups.  Factory methods for each of these are 
25  * provided in this class.
26  * 
27  */
28 @XmlRegistry
29 public class ObjectFactory {
30 
31 
32     /**
33      * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: model
34      * 
35      */
36     public ObjectFactory() {
37     }
38 
39     /**
40      * Create an instance of {@link Order.OrderItems }
41      * 
42      */
43     public Order.OrderItems createOrderOrderItems() {
44         return new Order.OrderItems();
45     }
46 
47     /**
48      * Create an instance of {@link Order }
49      * 
50      */
51     public Order createOrder() {
52         return new Order();
53     }
54 
55     /**
56      * Create an instance of {@link Order.OrderItems.Produdct }
57      * 
58      */
59     public Order.OrderItems.Produdct createOrderOrderItemsProdudct() {
60         return new Order.OrderItems.Produdct();
61     }
62 
63 }
复制代码

4、Object <-> XML 的示例代码

复制代码
 1     public void testXmlToObj() {
 2         JAXBContext jc;
 3         try {
 4             jc = JAXBContext.newInstance("model");
 5             Unmarshaller u = jc.createUnmarshaller();
 6             String xmlFilePath = AppTest.class.getResource("/").getPath()
 7                     + "order.xml";
 8             System.out.println(xmlFilePath);
 9             Order order = (Order) u.unmarshal(new File(xmlFilePath));
10             assertTrue(order.getOrderNo().equals("0000001"));
11             assertTrue(order.getCustomerName().equals("jimmy"));
12             for (int i = 0; i < order.getOrderItems().getProdudct().size(); i++) {
13                 System.out.println(getProductDesc(order.getOrderItems()
14                         .getProdudct().get(i)));
15             }
16         } catch (Exception e) {
17             e.printStackTrace();
18         }
19     }
20 
21     public void testObjToXml() {
22         try {
23             ObjectFactory of = new ObjectFactory();
24             Order order = of.createOrder();
25             Order.OrderItems orderItems = of.createOrderOrderItems();
26             
27             Order.OrderItems.Produdct product1 = new Order.OrderItems.Produdct();
28             product1.setProductNo("A-01");
29             product1.setProductName("Car");
30             product1.setPrice(1000000);
31             product1.setAmount(1);
32             
33             orderItems.getProdudct().add(product1);
34             
35             Order.OrderItems.Produdct product2 = new Order.OrderItems.Produdct();
36             product2.setProductNo("B-01");
37             product2.setProductName("Book");
38             product2.setPrice(200);
39             product2.setAmount(2);
40             
41             orderItems.getProdudct().add(product2);
42         
43             order.setOrderItems(orderItems);
44 
45             JAXBContext jc = JAXBContext.newInstance("model");
46             Marshaller ms = jc.createMarshaller();
47             ms.setProperty("jaxb.encoding", "UTF-8");
48             ms.setProperty("jaxb.formatted.output", true);
49             String xmlFilePath = AppTest.class.getResource("/").getPath()
50                     + "order_new.xml";
51             ms.marshal(order, new File(xmlFilePath));
52             
53             System.out.println("testObjToXml");
54         } catch (Exception e) {
55             e.printStackTrace();
56 
57         }
58     }
复制代码

示例源代码下载:jaxb-helloworld.zip (注:这是一个maven工程,命令行下直接mvn clean test,就可以测试)

VMware Workstation Pro 17 最新破解版安装教程(附永久激活密钥) 本文详细介绍了VMware Workstation Pro 17专业版的安装与配置指南,包括系统要求检查、官方版本安装流程、高级配置优化及常见问题排查。通过合规使用官方版本,开发者可以充分利用其强大的虚拟化能力,提升多平台开发与测试效率。 阅读详情

相关推荐

高缺失率时空数据插补实战:从随机森林到扩散模型的性能对比

数据缺失是数据分析与机器学习建模中普遍面临的挑战,尤其在时空数据领域,传感器故障、传输中断等问题常导致数据不完整。数据插补技术旨在基于已知数据的模式和关联性,合理估算缺失值,为后续分析提供可靠基础。其核心原理在于利用数据的时空相关性(如时间周期性、空间邻近性)及与外部驱动因素(如交通、气象)的关联构建预测模型。这项技术的价值在于能将不完整的数据集转化为可用于高质量分析和预测的可用资产,广泛应用于环境监测、交通流量预测、金融风控等领域。本文聚焦于一个极具挑战性的场景——PM2.5监测数据缺失率高达82%,通过

weixin_30363285的博客 544

JAXB安装与编译器使用

JAXB (Java Architecture for XML Binding) 的主要功能是根据DTD或者XML Schema将XML Element转化为Java类。将XML文本流转化为Java Object,把XML Processing转化为对类的一些属性的访问。简单的来说,它可以让你轻松解析和验证XML内容而不用去写那些繁琐的XML解析代码。   JAXB 包含两个部分: 1,...

maimode的专栏 668

7系列ZYNQ硬件调试:Vitis无法识别ARM DAP的排查与解决

本文详细分析了Xilinx 7系列ZYNQ芯片在Vitis开发环境中无法识别ARM DAP的常见问题及解决方案。从硬件设计检查(电源系统、时钟电路)、JTAG连接诊断到软件环境排查,提供了全面的调试指南。特别针对ARM DAP初始化失败的情况,给出了实用的排查步骤和预防措施,帮助开发者快速定位和解决类似问题。

weixin_33737134的博客 514

Java之JAXB的介绍与使用

Java之JAXB的介绍与使用

m0_47743175的博客 2968

同济土木非0基础三个月跨考复旦计算机攻略

跨考cs攻略前言我cs专业课如何复习How to start from zero简历其他复试 前言 建议多去工地/化工厂涡轮增压一下 我 同济土木gpa 3.2/5 挂科 * n 辣鸡项目 * n (padding 简历) 21考复旦计算机专硕 10月-12月 学习+复习 总分392 政治 68;背肖4即可 英语二 78 裸考,(高考英语140+);做点真题,建议据自己情况准备 数学二 142 ;(高考数学接近满分);做真题+模拟题,每天写一张试卷 专业课 104 ,考试生病了,下文展开。 cs专业课

piglake的博客 7238

【OpenClaw企业级智能体实战】第04篇:OpenClaw成本优化实战——Token消耗降96%!claude-mem+OpenViking从入门到精通

OpenClaw作为企业级智能体框架,凭借强大的自动化能力成为企业数字化转型的热门工具,但原生机制导致的上下文冗余问题,让众多用户面临“Token消耗失控”的困境——单周账单数千元的案例屡见不鲜。本文基于阿里云实测数据与开源工具官方文档,先深度拆解OpenClaw成本黑洞的核心成因(记忆碎片化、Token指数级膨胀),再系统讲解两款核心优化工具(claude-mem单Agent记忆管理、OpenViking多Agent集群底座)的底层原理、算法架构与实现逻辑,提供从环境搭建、工具集成、参数调优到安全部署

专注于人工智能、软件开发、工控自动化、工厂数字化及智能化等领域,希望和大家共同进步! 703

java 实体类转xml格式(jaxb 和 xstrem)(一)

1.javxb方式 定义可以接口xmlTag ,model时效表示可以转化为xml格式 /** * 描述:XmlTag * * @author 归墟 * @date 2021/2/25 20:31 */ public interface XmlTag { /** * 转换为xml格式 * * @return string 类型 失败为null */ String toXml(); } 定义jaxbXmltag标记选用的方式转化方..

foralllove的博客 892

构建OneService:打造高效、安全、灵活的企业级数据服务平台

数据服务(OneService)作为统一的数据服务出口,实现了数据的统一市场化管理,有效地降低数据开放门槛的同时,保障了数据开放的安全。

数据与算法架构提升之路专栏 2108

十分钟掌握springboot微服务架构的基本使用

前言: SSM的框架的搭建比起传统的SSH已经优化了不少,但是配置时还是挺繁琐复杂,特别是各种xml的配置,让人让人莫名所以,这也违背了我们程序开发的原则。你说如果你接手一个大型项目,光看配置都要花好久时间,那还咋玩。所以呢,微服务的出现还是很有道理的。因为每一个大型项目都可以拆分成小的项目,每个小的项目只负责各自单一的功能,每个项目可以使用不同的技术,连接不同的数据库,部署...

抓娃小兵的博客 2万+

十九、帧间预测编码_5、skip模式和direct模式

帧间预测的几种特殊模式: P_Skip: 即COPY模式,在该模式下无运动矢量残差,无像素预测残差。重建时以MVP作为实际运动矢量,以预测像素块作为重建; B_Skip:同P_Skip类似的是该模式下同样无运动矢量残差,无像素预测残差。重建时,以Direct模式获取双向MV,以预测像素块作为重建; B_Direct:B_Direct模式分为B_Direct_8x8和B_Direct_16x16,分别表示整个宏块和一个子块按照B_Direct模式编码。该模式下,无运动矢量残差,有像素预测残差。重建时,以D.

叮咚的博客 2390

手把手教你使用YOLOv11完成人脸分类识别,YOLOv11人脸识别,解决中文乱码问题,全网最详细教程

手把手教你使用YOLOv11完成人脸分类识别,YOLOv11人脸识别,解决中文乱码问题,全网最详细教程

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 4445

jaxb java_java JAXB 学习

1 //2 //This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 63 //See http://java.sun.com/xml/jaxb4 //Any modifications to this file w...

weixin_30836221的博客 201

SSE 传输过程中,丢失空格和回车符,怎么解决?

Server - Sent Events(SSE)即服务器发送事件,是 HTML5 中的一项 Web API,用于实现服务器向客户端浏览器推送实时数据的功能。

934

java jaxb_JavaEE学习之JAXB

一、前言JAXB——Java Architecture for XML Binding,是一项可以根据XML Schema产生Java类的技术。JAXB提供将XML实例文档反向生成Java对象树的方法,也能将Java对象树的内容重新写到XML实例文档。二、JAXB相关的class和interface(1)JAXBContext。 JAXBContext类提供到 JAXB API 的客户端入口点。...

weixin_36199116的博客 304

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

java学习之jaxb的学习一

:D [b]一:jaxb是什么[/b] jaxb是java architecture for xml binding的缩写,可以将java对象转换成xml,反之亦然! 这是帮助文档:[url]http://docs.jboss.org/resteasy/docs/2.3.5.Final/userguide/html_single/index.html#JAXB_+_JSON_provider...

肥猫钓鱼 192

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

java 注册jaxb_java JAXB 学习笔记

JAXB(Java Architecture for XML Binding)是JDK的一部分,用于Object XML的转换(有点类似于.NET中的XML序列化)。1、创建XSD可以使用任何工具生成XSD工具,比如XMLSPY。eclipse也提供了相关的jaxb插件,File -> New -> XML Schema File文件命名为order.xsd,eclipse中也提供了...

weixin_29424569的博客 352

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

java学习之jaxb的学习二

[b]jaxb的annotation的理解[/b] [i][b]一.Jaxb处理java对象和xml之间转换常用的annotation有:[/b][/i] @XmlType @XmlElement @XmlRootElement @XmlAttribute @XmlAccessorType ...

肥猫钓鱼 145

java学习之JAXB解析xml

时间仓促,只记录代码 //实体类 [code="java"]package com.wx.common; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElem...

肥猫钓鱼 182

for xml java_总结学习! xml与java对象转换 --- JDK自带的JAXB(Java Architecture for XML Binding)...

JAXB(Java Architecture for XML Binding) 是一个业界的标准,是一项可以根据XML Schema产生Java类的技术。该过程中,JAXB也提供了将XML实例文档反向生成Java对象树的方法,并能将Java对象树的内容重新写到XML实例文档。从另一方面来讲,JAXB提供了快速而简便的方法将XML模式绑定到Java表示,从而使得Java开发者在Java应用程序中能方...

weixin_36181282的博客 211

JAXB注解说明

java中JAXB的注解介绍的比较详细的一篇博文,特此保存,以便学习 http://blog.youkuaiyun.com/smile_lg/article/details/73327628

CaptainUsop的博客 303

JAXB小例子实记

JAXB(Java Architecture for XML Binding) 是一个业界的标准,是一项可以根据XML Schema产生Java类的技术。该过程中,JAXB也提供了将XML实例文档反向生成Java对象树的方法,并能将Java对象树的内容重新写到 XML实例文档。从另一方面来讲,JAXB提供了快速而简便的方法将XML模式绑定到Java表示,从而使得Java开发者在Java应用程序中能

czplplp_900725的专栏 1868

jaxb

<br /><br /> <br />1.可参考http://zh.wikipedia.org/zh/JAXB<br />2.可参考官方例子:http://www.oracle.com/technetwork/articles/javase/index-140168.html<br /> <br />就是一种绑定方式,从java到xml,从xml到java<br /> 

追求卓越,成功就在不经意间追上你 391

Java地图专题笔记--轻骑微信小程序部署

👋最近在学习在第二章的实操部署过程中发现之前的环境相对来说比较老旧,很多地方有了很大变动,谨以此文来记载遇到的一些坑!附上链接:运动健康与设计案例1-19.搭建项目环境之更新用户信息、token校验、通用响应_哔哩哔哩_bilibili。

weixin_46535115的博客 272
上一篇: Apache cxf JaxRs基本应用
下一篇: java 利用JAX-RS快速开发RESTful 服务
cq1982
博客等级 码龄21年 107粉丝 36原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值