创新实训项目分析(一)

创新实训项目分析(一)

2021SC@SDUSC

本周,根据之前的json文档格式,并参照引擎层中的代码,结合xml文档书写规范,完成了SDUDOC的XML文档,包含基础组建元素,以及各对象对应的元素标签,后续若有拓展会进行更新

XML 元素

Header

文章的头,包含文章的基本信息

element:

字段名类型含义
_titlestring文章标题
_authorstring作者
_bookstring所属书籍
_dynastystring所属朝代

Example:

<Header>
		<_title>李克用传</_title>
		<_author>吴兢</_author>
		<_book>后唐书</_book>
		<_dynasty></_dynasty>
</Header>

PageList

编辑器用,记录页面在对象池中的线性排序。

element:

字段名类型含义
pagespagesPage 顺序数组,按顺序记录了各个 Page 的 ID,子元素为page
_current_pagenumber编辑器当前编辑的页面

pages:

element:

字段名类型含义
pagestringpage Id

Example:

<PageList>
		<pages>
    		<page>Page_1</page>
            <page>Page_2</page>
    	</pages>
		<_current_page>1</_current_page>
</PageList>

Elements

编辑器用,记录对象池的序列化信息。

Index

编辑器用,表示对应元素的生成最大值,防止出现ID重复。 这些元素都是通过插件添加的。

element:

字段名类型含义
PagenumberPage最大数量
Dot2DnumberDot2D
Line2DnumberLine2D
Polygon2DnumberPolygon2D
CharacternumberCharacter
WordnumberWord
SentencenumberSentence
ParagraphnumberParagraph
ArticlenumberArticle
BooknumberBook

Example:

<Index>
			<Page>2</Page>
			<Dot2D>99</Dot2D>
			<Line2D>22</Line2D>
			<Polygon2D>79</Polygon2D>
			<Character>64</Character>
			<Word>36</Word>
			<Sentence>11</Sentence>
			<Paragraph>3</Paragraph>
			<Article>2</Article>
			<Book>2</Book>
</Index>
Data

编辑器用,对象池所有元素的信息。

child element:

字段名类型含义
PageselementPage最大数量
Dot2DselementDot2D
Line2DselementLine2D
Polygon2DselementPolygon2D
CharacterselementCharacter
WordselementWord
SentenceselementSentence
ParagraphselementParagraph
ArticleselementArticle
BookselementBook
Pages

页面元素,子元素为具体的页面page

page:

child element:

字段名类型含义
idstringpage的唯一Id
srcstringpage对应的UR
widthnumber页面的宽度
heightnumber页面的高度

Example:

<Pages>
	<page>
		<_id>Page_1</_id>
		<_src>http://211.87.232.197:8080/img/get_by_id?id=2</_src>
		<_width>1030</_width>
		<_height>1832</_height>
	</page>
</Pages>
Dot2Ds

圆点元素,子元素为具体的圆点信息 Dot2D

Dot2D:

child element:

字段名类型含义
idstring点的唯一Id
pageselementpage元素的父元素
typenumber页面的宽度
xnumber页面的高度
ynumber
fatherstring
postionnumber
father1string
father2string

page:

  • pages元素的子元素,记录所处页面id

Example:

<Dot2Ds>
	<Dot2D>
		<_id>Dot2D_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_type>0</_type>
		<_x>34.315084818068044</_x>
		<_y>174.6949772556199</_y>
		<_father></_father>
		<_position>0</_position>
		<_father1></_father1>
		<_father2></_father2>
	</Dot2D>
    <Dot2D>
		<_id>Dot2D_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_type>0</_type>
		<_x>34.315084818068044</_x>
		<_y>174.6949772556199</_y>
		<_father></_father>
		<_position>0</_position>
		<_father1></_father1>
		<_father2></_father2>
	</Dot2D>
</Dot2Ds>
Line2Ds

线元素集合,子元素为具体的线信息 Line2D`

Line2D:

child element:

字段名类型含义
idstringline的唯一Id
pageselementpage元素的父元素
startstring起始点id
endstring终止点id

Line2D:

  • pages元素的子元素,记录所处页面id

Example:

<Line2Ds>
	<Line2D>
		<_id>Line2D_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_start>Dot2D_1</_start>
		<_end>Dot2D_2</_end>
	</Line2D>
    <Line2D>
		<_id>Line2D_2</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_start>Dot2D_3</_start>
		<_end>Dot2D_4</_end>
	</Line2D>
</Line2Ds>
Polygon2Ds

多边形元素集合,子元素为具体的线信息 Polygon2D

Polygon2D:

child element:

字段名类型含义
idstringpolygon的唯一Id
pageselementpage元素的父元素
pointselement点的集合
characterstirng文字id

point:

  • points元素的子元素,记录多边形点的id

Example:

<Polygon2Ds>
	<Polygon2D>
		<_id>Polygon2D_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_points>
        	<point>Dot2D_13</point>
            <point>Dot2D_14</point>
            <point>Dot2D_15</point>
            <point>Dot2D_16</point>
        </_points>
		<_character>Character_1</_character>
	</Polygon2D>
    <Polygon2D>
		<_id>Polygon2D_2</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_points>
        	<point>Dot2D_13</point>
            <point>Dot2D_14</point>
            <point>Dot2D_15</point>
            <point>Dot2D_16</point>
        </_points>
		<_character>Character_2</_character>
	</Polygon2D>
</Polygon2Ds>
Characters

文字元素集合,子元素为具体的文字信息 Character

Character:

child element:

字段名类型含义
idstringpolygon的唯一Id
pageselementpage元素的父元素
charstring具体文字
remarkstirng
fatherstring归属word的id
polygonstring归属多边形id

page:

  • pages元素的子元素,记录所属页面id

Example:

<Characters>
	<Character>
		<_id>Character_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
		<_char></_char>
		<_remark></_remark>
		<_father>Word_10</_father>
		<_polygon>Polygon2D_1</_polygon>
	</Character>
</Characters>
Words

词语元素集合,子元素为具体的文字信息 word

word:

child element:

字段名类型含义
idstringpolygon的唯一Id
pageselementpage元素的父元素
childrenelement包含的character集合
fatherstring归属sentence的id
pointselement点的集合

page:

  • pages元素的子元素,记录所属页面id

Example:

<Words>
	<Word>
		<_id>Word_10</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
        <children>
            <Character>Character_1</Character>
            <Character>Character_2</Character>
        </children>
		<_father>Sentence_1</_father>
		<_points>
			<page id = "Page_1">
                <point>Dot2D_2</point>
                <point>Dot2D_3</point>
                <point>Dot2D_4</point>
                <point>Dot2D_5</point>
                <point>Dot2D_6</point>
                <point>Dot2D_7</point>
            </page>
		</_points>
	</Word>
</Words>
Sentences

句子元素集合,子元素为具体的文字信息 sentence

sentence:

child element:

字段名类型含义
idstringsentence的唯一Id
pageselementpage元素的父元素
childrenelement包含的word集合
fatherstring归属paragraph的id
pointselement点的集合

page:

  • pages元素的子元素,记录所属页面id

Example:

<Sentences>
	<Sentence>
		<_id>Sentence_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
        <children>
            <Word>Word_10</Word>
            <Word>Word_11</Word>
        </children>
		<_father>Paragraph_1</_father>
		<_points>
			<page id = "Page_1">
                <point>Dot2D_2</point>
                <point>Dot2D_3</point>
                <point>Dot2D_4</point>
                <point>Dot2D_5</point>
                <point>Dot2D_6</point>
                <point>Dot2D_7</point>
            </page>
		</_points>
	</Sentence>
</Sentences>
Paragraphs

段落元素集合,子元素为具体的文字信息 Paragraph

Paragraph:

child element:

字段名类型含义
idstringsentence的唯一Id
pageselementpage元素的父元素
childrenelement包含的sentence集合
fatherstring归属article的id
pointselement点的集合

page:

  • pages元素的子元素,记录所属页面id

Example:

<Paragraphs>
	<Paragraph>
		<_id>Paragraph_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
        <children>
            <Sentence>Sentence_1</Sentence>
            <Sentence>Sentence_2</Sentence>
        </children>
		<_father>Article_1</_father>
		<_points>
			<page id = "Page_1">
                <point>Dot2D_2</point>
                <point>Dot2D_3</point>
                <point>Dot2D_4</point>
                <point>Dot2D_5</point>
                <point>Dot2D_6</point>
                <point>Dot2D_7</point>
            </page>
		</_points>
	</Paragraph>
</Paragraphs>
Articles

文章元素集合,子元素为具体的文字信息 Article

Article:

child element:

字段名类型含义
idstringsentence的唯一Id
pageselementpage元素的父元素
childrenelement包含的paragraph集合
fatherstring归属book的id
pointselement点的集合

page:

  • pages元素的子元素,记录所属页面id

Example:

<Articles>
	<Article>
		<_id>Article_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
        <children>
            <Paragraph>Paragraph_1</Paragraph>
            <Paragraph>Paragraph_2</Paragraph>
        </children>
		<_father>Book_1</_father>
		<_points>
			<page id = "Page_1">
                <point>Dot2D_2</point>
                <point>Dot2D_3</point>
                <point>Dot2D_4</point>
                <point>Dot2D_5</point>
                <point>Dot2D_6</point>
                <point>Dot2D_7</point>
            </page>
		</_points>
	</Article>
</Articles>
Books

书籍元素集合,子元素为具体的文字信息 book

book:

child element:

字段名类型含义
idstringsentence的唯一Id
pageselementpage元素的父元素
childrenelement包含的article集合
fatherstring
pointselement点的集合

page:

  • pages元素的子元素,记录所属页面id

Example:

<Books>
	<Book>
		<_id>Book_1</_id>
		<_pages>
        	<page>Page_1</page>
            <page>Page_2</page>
        </_pages>
        <children>
            <Paragraph>Article_1</Paragraph>
            <Paragraph>Article_2</Paragraph>
        </children>
		<_father></_father>
		<_points>
			<page id = "Page_1">
                <point>Dot2D_2</point>
                <point>Dot2D_3</point>
                <point>Dot2D_4</point>
                <point>Dot2D_5</point>
                <point>Dot2D_6</point>
                <point>Dot2D_7</point>
            </page>
		</_points>
	</Book>
</Books>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值