SegmentByText

Fully qualified class name: DDICDIModels::DDICDILibrary::Classes::FormatDescription::SegmentByText

Definition

Location of a segment of text through character or line counts.

Examples

The segment beginning at line 3, character 4 and ending at line 27 character 13. Alternatively the segment beginning at character 257 and ending at character 1350 of the whole body of text. StartLine of 10, endLine of 12, startCharacterPosition of 1, endCharacterPosition of 0 means all of lines 10, 11, and 12. An endCharacterPosition of 0 indicates that whole lines are specified.

Explanatory notes

An adequate description will always include a startCharacterPosition and then may include an endCharacterPosition or a characterLength. If StartLine is specified, the character counts begin within that line.

Diagram

Inheritance
  ᐊ── FormatDescription::SegmentByText
Attributes

Name

Inherited from

Description

Data Type

Multiplicity

Default value

characterLength

- own class -

The number of characters in the segment. The segment may include text from multiple lines of the resource. If it does, the length includes any line termination characters.

Integer

0..1

endCharacterPosition

- own class -

The character position of the last character of the segment. If endLine is specified, the count begins at character 1 of endLine. If startLine and endLine are not specified, the count begins at character 1 of the first line of the resource and the count includes any line termination characters. The resulting segment may include text from multiple lines of the resource.

Integer

0..1

endLine

- own class -

The last line on which to count characters. If missing this defaults to startLine.

Integer

0..1

startCharacterPosition

- own class -

The character position of the first character of the segment, with the count beginning at character 1 of startLine.

Integer

0..1

startLine

- own class -

The line number, where 1 is the first line, on which to begin counting characters. If missing this defaults to 1 (the first line).

Integer

0..1

1

catalogDetails

FormatDescription::PhysicalSegmentLocation

Bundles the information useful for a data catalog entry.

Examples would be creator, contributor, title, copyright, embargo, and license information

A set of information useful for attribution, data discovery, and access. This is information that is tied to the identity of the object. If this information changes the version of the associated object changes.

CatalogDetails

0..1

identifier

FormatDescription::PhysicalSegmentLocation

Identifier for objects requiring short- or long-lasting referencing and management.

Identifier

0..1

Associations

Direction

Association

Description

Multiplicity of SegmentByText

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

to

ValueMapping uses PhysicalSegmentLocation

Uses a physical segment location to describe where in the physical record a segment representing the data point is. This could be, for example, described as a start position and end position value for characters in a text record via the segment by text extension of physical segment location.

0..1

- own package -

ValueMapping

0..*

none

FormatDescription::PhysicalSegmentLocation

Syntax representations / encodings

All syntax representations except the Canonical XMI are provided as reference points for specific implementations, or for use as defaults if sufficient in the form presented.

Fragment for the class SegmentByText (entire model as XMI)

  1<packagedElement xmlns:StandardProfile="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard"
  2                 xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
  3                 xmlns:xmi="http://www.omg.org/spec/XMI/20131001"
  4                 xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText"
  5                 xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText"
  6                 xmi:type="uml:Class">
  7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-ownedComment"
  8                 xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-ownedComment"
  9                 xmi:type="uml:Comment">
 10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText"/>
 11      <body>Definition 
 12============ 
 13Location of a segment of text through character or line counts.  
 14
 15Examples 
 16========== 
 17The segment beginning at line 3, character 4 and ending at line 27 character 13. Alternatively the segment beginning at character 257 and ending at character 1350 of the whole body of text. StartLine of 10, endLine of 12, startCharacterPosition of 1, endCharacterPosition of 0 means all of lines 10, 11, and 12.  An endCharacterPosition of 0 indicates that whole lines are specified.  
 18
 19Explanatory notes 
 20=================== 
 21An adequate description will always include a startCharacterPosition and then may include an endCharacterPosition or a characterLength. If StartLine is specified, the character counts begin within that line.</body>
 22   </ownedComment>
 23   <name>SegmentByText</name>
 24   <generalization xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-generalization"
 25                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-generalization"
 26                   xmi:type="uml:Generalization">
 27      <general xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-PhysicalSegmentLocation"/>
 28   </generalization>
 29   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-characterLength"
 30                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-characterLength"
 31                   xmi:type="uml:Property">
 32      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-characterLength-ownedComment"
 33                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-characterLength-ownedComment"
 34                    xmi:type="uml:Comment">
 35         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-characterLength"/>
 36         <body>The number of characters in the segment. The segment may include text from multiple lines of the resource. If it does, the length includes any line termination characters.</body>
 37      </ownedComment>
 38      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-characterLength-lowerValue"
 39                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-characterLength-lowerValue"
 40                  xmi:type="uml:LiteralInteger"/>
 41      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-characterLength-upperValue"
 42                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-characterLength-upperValue"
 43                  xmi:type="uml:LiteralUnlimitedNatural">
 44         <value>1</value>
 45      </upperValue>
 46      <name>characterLength</name>
 47      <type href="http://www.eclipse.org/uml2/5.0.0/UML/PrimitiveTypes.xmi#Integer"
 48            xmi:type="uml:PrimitiveType"/>
 49   </ownedAttribute>
 50   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endCharacterPosition"
 51                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endCharacterPosition"
 52                   xmi:type="uml:Property">
 53      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endCharacterPosition-ownedComment"
 54                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endCharacterPosition-ownedComment"
 55                    xmi:type="uml:Comment">
 56         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endCharacterPosition"/>
 57         <body>The character position of the last character of the segment.  If endLine is specified, the count begins at character 1 of endLine. If startLine and endLine are not specified, the count begins at character 1 of the first line of the resource and the count includes any line termination characters. The resulting segment may include text from multiple lines of the resource.</body>
 58      </ownedComment>
 59      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endCharacterPosition-lowerValue"
 60                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endCharacterPosition-lowerValue"
 61                  xmi:type="uml:LiteralInteger"/>
 62      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endCharacterPosition-upperValue"
 63                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endCharacterPosition-upperValue"
 64                  xmi:type="uml:LiteralUnlimitedNatural">
 65         <value>1</value>
 66      </upperValue>
 67      <name>endCharacterPosition</name>
 68      <type href="http://www.eclipse.org/uml2/5.0.0/UML/PrimitiveTypes.xmi#Integer"
 69            xmi:type="uml:PrimitiveType"/>
 70   </ownedAttribute>
 71   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endLine"
 72                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endLine"
 73                   xmi:type="uml:Property">
 74      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endLine-ownedComment"
 75                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endLine-ownedComment"
 76                    xmi:type="uml:Comment">
 77         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endLine"/>
 78         <body>The last line on which to count characters. If missing this defaults to startLine.</body>
 79      </ownedComment>
 80      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endLine-lowerValue"
 81                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endLine-lowerValue"
 82                  xmi:type="uml:LiteralInteger"/>
 83      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-endLine-upperValue"
 84                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-endLine-upperValue"
 85                  xmi:type="uml:LiteralUnlimitedNatural">
 86         <value>1</value>
 87      </upperValue>
 88      <name>endLine</name>
 89      <type href="http://www.eclipse.org/uml2/5.0.0/UML/PrimitiveTypes.xmi#Integer"
 90            xmi:type="uml:PrimitiveType"/>
 91   </ownedAttribute>
 92   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startCharacterPosition"
 93                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startCharacterPosition"
 94                   xmi:type="uml:Property">
 95      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startCharacterPosition-ownedComment"
 96                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startCharacterPosition-ownedComment"
 97                    xmi:type="uml:Comment">
 98         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startCharacterPosition"/>
 99         <body>The character position of the first character of the segment, with the count beginning at character 1 of startLine.</body>
100      </ownedComment>
101      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startCharacterPosition-lowerValue"
102                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startCharacterPosition-lowerValue"
103                  xmi:type="uml:LiteralInteger"/>
104      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startCharacterPosition-upperValue"
105                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startCharacterPosition-upperValue"
106                  xmi:type="uml:LiteralUnlimitedNatural">
107         <value>1</value>
108      </upperValue>
109      <name>startCharacterPosition</name>
110      <type href="http://www.eclipse.org/uml2/5.0.0/UML/PrimitiveTypes.xmi#Integer"
111            xmi:type="uml:PrimitiveType"/>
112   </ownedAttribute>
113   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startLine"
114                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startLine"
115                   xmi:type="uml:Property">
116      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startLine-ownedComment"
117                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startLine-ownedComment"
118                    xmi:type="uml:Comment">
119         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startLine"/>
120         <body>The line number, where 1 is the first line, on which to begin counting characters. If missing this defaults to 1 (the first line).</body>
121      </ownedComment>
122      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startLine-lowerValue"
123                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startLine-lowerValue"
124                  xmi:type="uml:LiteralInteger"/>
125      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startLine-upperValue"
126                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startLine-upperValue"
127                  xmi:type="uml:LiteralUnlimitedNatural">
128         <value>1</value>
129      </upperValue>
130      <name>startLine</name>
131      <defaultValue xmi:id="DDICDIModels-DDICDILibrary-Classes-FormatDescription-SegmentByText-startLine-defaultValue"
132                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#SegmentByText-startLine-defaultValue"
133                    xmi:type="uml:LiteralInteger">
134         <value>1</value>
135      </defaultValue>
136      <type href="http://www.eclipse.org/uml2/5.0.0/UML/PrimitiveTypes.xmi#Integer"
137            xmi:type="uml:PrimitiveType"/>
138   </ownedAttribute>
139</packagedElement>

Fragment for the class SegmentByText (entire XML Schema)

 1<xs:element name="SegmentByText"
 2            type="SegmentByTextXsdType"
 3            xml:id="SegmentByText">
 4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::FormatDescription::SegmentByText -->
 5  <xs:annotation>
 6    <xs:documentation>Definition 
 7          ============ 
 8          Location of a segment of text through character or line counts.  
 9          
10          Examples 
11          ========== 
12          The segment beginning at line 3, character 4 and ending at line 27 character 13. Alternatively the segment beginning at character 257 and ending at character 1350 of the whole body of text. StartLine of 10, endLine of 12, startCharacterPosition of 1, endCharacterPosition of 0 means all of lines 10, 11, and 12.  An endCharacterPosition of 0 indicates that whole lines are specified.  
13          
14          Explanatory notes 
15          =================== 
16          An adequate description will always include a startCharacterPosition and then may include an endCharacterPosition or a characterLength. If StartLine is specified, the character counts begin within that line.</xs:documentation>
17  </xs:annotation>
18</xs:element>
19<xs:complexType name="SegmentByTextXsdType"
20                xml:id="SegmentByTextXsdType">
21  <xs:annotation>
22    <xs:documentation>Definition 
23          ============ 
24          Location of a segment of text through character or line counts.  
25          
26          Examples 
27          ========== 
28          The segment beginning at line 3, character 4 and ending at line 27 character 13. Alternatively the segment beginning at character 257 and ending at character 1350 of the whole body of text. StartLine of 10, endLine of 12, startCharacterPosition of 1, endCharacterPosition of 0 means all of lines 10, 11, and 12.  An endCharacterPosition of 0 indicates that whole lines are specified.  
29          
30          Explanatory notes 
31          =================== 
32          An adequate description will always include a startCharacterPosition and then may include an endCharacterPosition or a characterLength. If StartLine is specified, the character counts begin within that line.</xs:documentation>
33  </xs:annotation>
34  <xs:complexContent>
35    <xs:extension base="PhysicalSegmentLocationXsdType">
36      <xs:sequence>
37        <xs:element name="characterLength"
38                    type="xs:integer"
39                    minOccurs="0"
40                    maxOccurs="1"
41                    xml:id="SegmentByText-characterLength">
42          <xs:annotation>
43            <xs:documentation>The number of characters in the segment. The segment may include text from multiple lines of the resource. If it does, the length includes any line termination characters.</xs:documentation>
44          </xs:annotation>
45        </xs:element>
46        <xs:element name="endCharacterPosition"
47                    type="xs:integer"
48                    minOccurs="0"
49                    maxOccurs="1"
50                    xml:id="SegmentByText-endCharacterPosition">
51          <xs:annotation>
52            <xs:documentation>The character position of the last character of the segment.  If endLine is specified, the count begins at character 1 of endLine. If startLine and endLine are not specified, the count begins at character 1 of the first line of the resource and the count includes any line termination characters. The resulting segment may include text from multiple lines of the resource.</xs:documentation>
53          </xs:annotation>
54        </xs:element>
55        <xs:element name="endLine"
56                    type="xs:integer"
57                    minOccurs="0"
58                    maxOccurs="1"
59                    xml:id="SegmentByText-endLine">
60          <xs:annotation>
61            <xs:documentation>The last line on which to count characters. If missing this defaults to startLine.</xs:documentation>
62          </xs:annotation>
63        </xs:element>
64        <xs:element name="startCharacterPosition"
65                    type="xs:integer"
66                    minOccurs="0"
67                    maxOccurs="1"
68                    xml:id="SegmentByText-startCharacterPosition">
69          <xs:annotation>
70            <xs:documentation>The character position of the first character of the segment, with the count beginning at character 1 of startLine.</xs:documentation>
71          </xs:annotation>
72        </xs:element>
73        <xs:element name="startLine"
74                    type="xs:integer"
75                    minOccurs="0"
76                    maxOccurs="1"
77                    xml:id="SegmentByText-startLine">
78          <xs:annotation>
79            <xs:documentation>The line number, where 1 is the first line, on which to begin counting characters. If missing this defaults to 1 (the first line).</xs:documentation>
80          </xs:annotation>
81        </xs:element>
82      </xs:sequence>
83    </xs:extension>
84  </xs:complexContent>
85</xs:complexType>

Fragment for the class SegmentByText (main ontology)

 1# class SegmentByText
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::FormatDescription::SegmentByText
 3cdi:SegmentByText
 4  a rdfs:Class, owl:Class, ucmis:Class;
 5  rdfs:label "SegmentByText";
 6  rdfs:comment "Definition \n============ \nLocation of a segment of text through character or line counts.  \n\nExamples \n========== \nThe segment beginning at line 3, character 4 and ending at line 27 character 13. Alternatively the segment beginning at character 257 and ending at character 1350 of the whole body of text. StartLine of 10, endLine of 12, startCharacterPosition of 1, endCharacterPosition of 0 means all of lines 10, 11, and 12.  An endCharacterPosition of 0 indicates that whole lines are specified.  \n\nExplanatory notes \n=================== \nAn adequate description will always include a startCharacterPosition and then may include an endCharacterPosition or a characterLength. If StartLine is specified, the character counts begin within that line."@en;
 7  rdfs:subClassOf cdi:PhysicalSegmentLocation;
 8.
 9
10cdi:SegmentByText-characterLength
11  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
12  rdfs:label "characterLength";
13  rdfs:comment "The number of characters in the segment. The segment may include text from multiple lines of the resource. If it does, the length includes any line termination characters."@en;
14  rdfs:domain cdi:SegmentByText;
15  rdfs:range xsd:integer;
16.
17
18cdi:SegmentByText-endCharacterPosition
19  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
20  rdfs:label "endCharacterPosition";
21  rdfs:comment "The character position of the last character of the segment.  If endLine is specified, the count begins at character 1 of endLine. If startLine and endLine are not specified, the count begins at character 1 of the first line of the resource and the count includes any line termination characters. The resulting segment may include text from multiple lines of the resource."@en;
22  rdfs:domain cdi:SegmentByText;
23  rdfs:range xsd:integer;
24.
25
26cdi:SegmentByText-endLine
27  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
28  rdfs:label "endLine";
29  rdfs:comment "The last line on which to count characters. If missing this defaults to startLine."@en;
30  rdfs:domain cdi:SegmentByText;
31  rdfs:range xsd:integer;
32.
33
34cdi:SegmentByText-startCharacterPosition
35  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
36  rdfs:label "startCharacterPosition";
37  rdfs:comment "The character position of the first character of the segment, with the count beginning at character 1 of startLine."@en;
38  rdfs:domain cdi:SegmentByText;
39  rdfs:range xsd:integer;
40.
41
42cdi:SegmentByText-startLine
43  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
44  rdfs:label "startLine";
45  rdfs:comment "The line number, where 1 is the first line, on which to begin counting characters. If missing this defaults to 1 (the first line)."@en;
46  rdfs:domain cdi:SegmentByText;
47  rdfs:range xsd:integer;
48.

Fragment for the class SegmentByText (main JSON-LD)

 1{
 2  "@context": [
 3    "PhysicalSegmentLocation.jsonld",
 4    {
 5      "cdi": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/",
 6      "xsd": "http://www.w3.org/2001/XMLSchema#",
 7      "SegmentByText": "cdi:SegmentByText",
 8      "characterLength": {
 9        "@id": "cdi:SegmentByText-characterLength",
10        "@type": "xsd:integer"
11      },
12      "endCharacterPosition": {
13        "@id": "cdi:SegmentByText-endCharacterPosition",
14        "@type": "xsd:integer"
15      },
16      "endLine": {
17        "@id": "cdi:SegmentByText-endLine",
18        "@type": "xsd:integer"
19      },
20      "startCharacterPosition": {
21        "@id": "cdi:SegmentByText-startCharacterPosition",
22        "@type": "xsd:integer"
23      },
24      "startLine": {
25        "@id": "cdi:SegmentByText-startLine",
26        "@type": "xsd:integer"
27      },
28      
29      " comment ": "tag:json-should-support-trailing-commas" 
30    }
31  ],
32  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2024-03-16 23:40:10.",
33  "basedOn": "based on the UML data type DDICDIModels::DDICDILibrary::Classes::FormatDescription::SegmentByText"
34}