diff --git a/repository/OP-XMI-GTExtensions/OPXMIElement.extension.st b/repository/OP-XMI-GTExtensions/OPXMIElement.extension.st index d1a2726..279c441 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIElement.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OPXMIElement } +Extension { #name : 'OPXMIElement' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIElement >> writeXMLOn: aWriter [ aWriter tag: self xmiName ] diff --git a/repository/OP-XMI-GTExtensions/OPXMIInfoItems.extension.st b/repository/OP-XMI-GTExtensions/OPXMIInfoItems.extension.st index 81a76ab..3c46f7c 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIInfoItems.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIInfoItems.extension.st @@ -1,15 +1,15 @@ -Extension { #name : #OPXMIInfoItems } +Extension { #name : 'OPXMIInfoItems' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIInfoItems >> treeViewLabelText [ ^ self asHighlightedTextWrittenWith: [ :writer | self writeTreeViewLabelXMLOn: writer ] ] -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIInfoItems >> writeTreeViewLabelXMLOn: aWriter [ self writeXMLOn: aWriter ] -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIInfoItems >> writeXMLOn: aWriter [ ] diff --git a/repository/OP-XMI-GTExtensions/OPXMIObjectElement.extension.st b/repository/OP-XMI-GTExtensions/OPXMIObjectElement.extension.st index 4686f97..94f1864 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIObjectElement.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIObjectElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OPXMIObjectElement } +Extension { #name : 'OPXMIObjectElement' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIObjectElement >> inspectionProperties [ "" @@ -17,7 +17,7 @@ OPXMIObjectElement >> inspectionProperties [ yourself ] -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIObjectElement >> writeXMLOn: aWriter [ aWriter tag: self xmiName diff --git a/repository/OP-XMI-GTExtensions/OPXMIReferenceAttribute.extension.st b/repository/OP-XMI-GTExtensions/OPXMIReferenceAttribute.extension.st index ba5d2f8..8ecd78e 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIReferenceAttribute.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIReferenceAttribute.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OPXMIReferenceAttribute } +Extension { #name : 'OPXMIReferenceAttribute' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIReferenceAttribute >> writeXMLOn: aWriter [ aWriter tag: self xmiName diff --git a/repository/OP-XMI-GTExtensions/OPXMIReferenceElement.extension.st b/repository/OP-XMI-GTExtensions/OPXMIReferenceElement.extension.st index d7d0e75..602f24b 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIReferenceElement.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIReferenceElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OPXMIReferenceElement } +Extension { #name : 'OPXMIReferenceElement' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIReferenceElement >> writeXMLOn: aWriter [ href ifNil: [ aWriter tag: self xmiName ] diff --git a/repository/OP-XMI-GTExtensions/OPXMIValueAttribute.extension.st b/repository/OP-XMI-GTExtensions/OPXMIValueAttribute.extension.st index 44ef281..189feed 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIValueAttribute.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIValueAttribute.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OPXMIValueAttribute } +Extension { #name : 'OPXMIValueAttribute' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIValueAttribute >> writeXMLOn: aWriter [ aWriter tag: self xmiName with: self value ] diff --git a/repository/OP-XMI-GTExtensions/OPXMIValueElement.extension.st b/repository/OP-XMI-GTExtensions/OPXMIValueElement.extension.st index d4e0d5a..cd41c23 100644 --- a/repository/OP-XMI-GTExtensions/OPXMIValueElement.extension.st +++ b/repository/OP-XMI-GTExtensions/OPXMIValueElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OPXMIValueElement } +Extension { #name : 'OPXMIValueElement' } -{ #category : #'*OP-XMI-GTExtensions' } +{ #category : '*OP-XMI-GTExtensions' } OPXMIValueElement >> writeXMLOn: aWriter [ aWriter tag: self xmiName with: self value ] diff --git a/repository/OP-XMI-GTExtensions/package.st b/repository/OP-XMI-GTExtensions/package.st index e30e8b6..5006cb6 100644 --- a/repository/OP-XMI-GTExtensions/package.st +++ b/repository/OP-XMI-GTExtensions/package.st @@ -1 +1 @@ -Package { #name : #'OP-XMI-GTExtensions' } +Package { #name : 'OP-XMI-GTExtensions' } diff --git a/repository/OP-XMI/OPXMIAttribute.class.st b/repository/OP-XMI/OPXMIAttribute.class.st index ef14459..2cdf1a2 100644 --- a/repository/OP-XMI/OPXMIAttribute.class.st +++ b/repository/OP-XMI/OPXMIAttribute.class.st @@ -1,28 +1,30 @@ Class { - #name : #OPXMIAttribute, - #superclass : #OPXMIInfoItems, + #name : 'OPXMIAttribute', + #superclass : 'OPXMIInfoItems', #instVars : [ 'xmiName' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #testing } +{ #category : 'testing' } OPXMIAttribute class >> isAbstract [ ^ self = OPXMIAttribute ] -{ #category : #testing } +{ #category : 'testing' } OPXMIAttribute >> isAttribute [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIAttribute >> xmiName [ ^ xmiName ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIAttribute >> xmiName: aString [ xmiName := aString ] diff --git a/repository/OP-XMI/OPXMIElement.class.st b/repository/OP-XMI/OPXMIElement.class.st index c2e5640..353e09e 100644 --- a/repository/OP-XMI/OPXMIElement.class.st +++ b/repository/OP-XMI/OPXMIElement.class.st @@ -1,28 +1,30 @@ Class { - #name : #OPXMIElement, - #superclass : #OPXMIInfoItems, + #name : 'OPXMIElement', + #superclass : 'OPXMIInfoItems', #instVars : [ 'xmiName' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #testing } +{ #category : 'testing' } OPXMIElement class >> isAbstract [ ^ self = OPXMIElement ] -{ #category : #testing } +{ #category : 'testing' } OPXMIElement >> isElement [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIElement >> xmiName [ ^ xmiName ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIElement >> xmiName: aString [ xmiName := aString ] diff --git a/repository/OP-XMI/OPXMIInfoItems.class.st b/repository/OP-XMI/OPXMIInfoItems.class.st index 526e394..3d53be5 100644 --- a/repository/OP-XMI/OPXMIInfoItems.class.st +++ b/repository/OP-XMI/OPXMIInfoItems.class.st @@ -1,55 +1,57 @@ Class { - #name : #OPXMIInfoItems, - #superclass : #Object, - #category : 'OP-XMI-DOM' + #name : 'OPXMIInfoItems', + #superclass : 'Object', + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems class >> isAbstract [ ^ self = OPXMIInfoItems ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isAttribute [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isElement [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isObjectElement [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isReferenceAttribute [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isReferenceElement [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isReferenceItem [ ^ self isReferenceAttribute | self isReferenceElement ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isValueAttribute [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isValueElement [ ^ false ] -{ #category : #testing } +{ #category : 'testing' } OPXMIInfoItems >> isValueItem [ ^ self isValueAttribute | self isValueElement ] diff --git a/repository/OP-XMI/OPXMIObjectElement.class.st b/repository/OP-XMI/OPXMIObjectElement.class.st index 5a7ef2e..b9c889f 100644 --- a/repository/OP-XMI/OPXMIObjectElement.class.st +++ b/repository/OP-XMI/OPXMIObjectElement.class.st @@ -2,35 +2,37 @@ XMIObjectElement is an XML element that can contain other information items (XML elements and attributes). " Class { - #name : #OPXMIObjectElement, - #superclass : #OPXMIElement, + #name : 'OPXMIObjectElement', + #superclass : 'OPXMIElement', #instVars : [ 'containedItems' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #visiting } +{ #category : 'visiting' } OPXMIObjectElement >> accept: aVisitor [ aVisitor visitObjectElement: self ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIObjectElement >> containedItem [ ^ containedItems ifEmpty: [ ^ nil ] ifNotEmpty: #first ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIObjectElement >> containedItems [ ^ containedItems ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIObjectElement >> containedItems: aCollection [ containedItems := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIObjectElement >> elementNamed: aName [ "return the first element with the given name" @@ -40,7 +42,7 @@ OPXMIObjectElement >> elementNamed: aName [ ifNone: [ nil ] ] -{ #category : #searching } +{ #category : 'searching' } OPXMIObjectElement >> findElementWithXmiId: aXmiId [ self xmiId = aXmiId ifTrue: [ ^ self ]. @@ -50,25 +52,25 @@ OPXMIObjectElement >> findElementWithXmiId: aXmiId [ ^ nil ] -{ #category : #initialization } +{ #category : 'initialization' } OPXMIObjectElement >> initialize [ super initialize. containedItems := OrderedCollection new ] -{ #category : #testing } +{ #category : 'testing' } OPXMIObjectElement >> isObjectElement [ ^ true ] -{ #category : #'accessing - shortcuts' } +{ #category : 'accessing - shortcuts' } OPXMIObjectElement >> nameValue [ "Retrieve the value of child element. Throw up if none is present." ^ (self containedItems detect: [ :each | each xmiName = #name ]) value ] -{ #category : #printing } +{ #category : 'printing' } OPXMIObjectElement >> printOn: aStream [ aStream << 'XMIObjectElement('; @@ -88,7 +90,7 @@ OPXMIObjectElement >> printOn: aStream [ aStream << ')' ] -{ #category : #'accessing - shortcuts' } +{ #category : 'accessing - shortcuts' } OPXMIObjectElement >> xmiId [ ^ self containedItems detect: [ :each | each xmiName = #xmi:id ] @@ -96,7 +98,7 @@ OPXMIObjectElement >> xmiId [ ifNone: [ nil ] ] -{ #category : #'accessing - shortcuts' } +{ #category : 'accessing - shortcuts' } OPXMIObjectElement >> xmiType [ ^ self containedItems detect: [ :each | each xmiName = #xmi:type ] diff --git a/repository/OP-XMI/OPXMIObjectElementTest.class.st b/repository/OP-XMI/OPXMIObjectElementTest.class.st index d518ad7..0caeda4 100644 --- a/repository/OP-XMI/OPXMIObjectElementTest.class.st +++ b/repository/OP-XMI/OPXMIObjectElementTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #OPXMIObjectElementTest, - #superclass : #TestCase, - #category : 'OP-XMI-Tests' + #name : 'OPXMIObjectElementTest', + #superclass : 'TestCase', + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIObjectElementTest >> nestedObjects [ ^ OPXMIObjectElement new xmiName: 'aaa'; @@ -32,7 +34,7 @@ OPXMIObjectElementTest >> nestedObjects [ value: 'DDD'}}} ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testElementNamed [ | el | (el := OPXMIObjectElement new) @@ -42,7 +44,7 @@ OPXMIObjectElementTest >> testElementNamed [ self assert: (el elementNamed: 'none') equals: nil ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testFindElementWithXmiId1 [ | root result | root := self nestedObjects. @@ -50,7 +52,7 @@ OPXMIObjectElementTest >> testFindElementWithXmiId1 [ self assert: result equals: root ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testFindElementWithXmiId2 [ | root result | root := self nestedObjects. @@ -58,7 +60,7 @@ OPXMIObjectElementTest >> testFindElementWithXmiId2 [ self assert: result xmiName equals: 'bbb' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testFindElementWithXmiId3 [ | root result | root := self nestedObjects. @@ -66,7 +68,7 @@ OPXMIObjectElementTest >> testFindElementWithXmiId3 [ self assert: result xmiName equals: 'ccc' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testFindElementWithXmiId4 [ | root result | root := self nestedObjects. @@ -74,7 +76,7 @@ OPXMIObjectElementTest >> testFindElementWithXmiId4 [ self assert: result xmiName equals: 'ddd' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testFindElementWithXmiId5 [ | root result | root := self nestedObjects. @@ -82,7 +84,7 @@ OPXMIObjectElementTest >> testFindElementWithXmiId5 [ self assert: result equals: nil ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testId [ | element | element := OPXMIObjectElement new. @@ -95,7 +97,7 @@ OPXMIObjectElementTest >> testId [ self assert: element xmiId equals: 'ID' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testNameValue [ | element | element := OPXMIObjectElement new @@ -104,7 +106,7 @@ OPXMIObjectElementTest >> testNameValue [ self should: [ OPXMIObjectElement new nameValue ] raise: NotFound ] -{ #category : #tests } +{ #category : 'tests' } OPXMIObjectElementTest >> testType [ | element | element := OPXMIObjectElement new. diff --git a/repository/OP-XMI/OPXMIReader.class.st b/repository/OP-XMI/OPXMIReader.class.st index a522ac9..9846952 100644 --- a/repository/OP-XMI/OPXMIReader.class.st +++ b/repository/OP-XMI/OPXMIReader.class.st @@ -1,31 +1,33 @@ Class { - #name : #OPXMIReader, - #superclass : #Object, + #name : 'OPXMIReader', + #superclass : 'Object', #instVars : [ 'document' ], - #category : #'OP-XMI-Reader' + #category : 'OP-XMI-Reader', + #package : 'OP-XMI', + #tag : 'Reader' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader class >> read: aStream mapping: aMapping [ aMapping at: 'result' put: aStream contents. ^ (self readFromMapping: aMapping) at: 'result' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader class >> readFrom: aStream [ ^ self new readFrom: aStream ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader class >> readFromMapping: aMapping [ "aMapping is a Dictionary of HREF URI -> XMI contents" ^ self new readFromMapping: aMapping ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader >> readFrom: aStream [ | dom root | dom := XMLDOMParser parse: aStream usingNamespaces: false. @@ -33,7 +35,7 @@ OPXMIReader >> readFrom: aStream [ ^ root ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader >> readFromMapping: aMapping [ | graphs | graphs := OrderedDictionary new. @@ -42,7 +44,7 @@ OPXMIReader >> readFromMapping: aMapping [ ^ graphs ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader >> resolveHrefIn: aReferenceItem with: aMapping [ | parts ref | aReferenceItem href ifNil: [ ^ self ]. @@ -61,7 +63,7 @@ OPXMIReader >> resolveHrefIn: aReferenceItem with: aMapping [ ref ifNotNil: [ aReferenceItem referencedElements: {ref} ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReader >> resolveHrefsIn: anElement with: aMapping [ anElement isReferenceElement ifTrue: [ ^ self resolveHrefIn: anElement with: aMapping ]. diff --git a/repository/OP-XMI/OPXMIReaderTest.class.st b/repository/OP-XMI/OPXMIReaderTest.class.st index 3979873..2780c3f 100644 --- a/repository/OP-XMI/OPXMIReaderTest.class.st +++ b/repository/OP-XMI/OPXMIReaderTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #OPXMIReaderTest, - #superclass : #TestCase, - #category : 'OP-XMI-Tests' + #name : 'OPXMIReaderTest', + #superclass : 'TestCase', + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderTest >> fileAAContents [ ^ ' @@ -13,7 +15,7 @@ OPXMIReaderTest >> fileAAContents [ ' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderTest >> fileBBContents [ ^ ' @@ -22,14 +24,14 @@ OPXMIReaderTest >> fileBBContents [ ' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderTest >> fileCCContents [ ^ ' ' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderTest >> testReadFromMapping [ | mapping result aaItem bbItem ccItem | "ordered to have both forward (B->C) and backward (B<-A) lookup" @@ -45,7 +47,7 @@ OPXMIReaderTest >> testReadFromMapping [ self assert: bbItem containedItems second referencedElement equals: ccItem ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderTest >> testReadFromTypedMapping [ | mapping result uml type | mapping := OrderedDictionary @@ -57,7 +59,7 @@ OPXMIReaderTest >> testReadFromTypedMapping [ self assert: uml containedItems first referencedElement equals: type ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderTest >> testResolveHref [ | reference map someFileXmi | reference := OPXMIReferenceElement new @@ -78,14 +80,14 @@ OPXMIReaderTest >> testResolveHref [ self assert: reference referencedElement equals: someFileXmi containedItem ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderTest >> umlTypedElementContents [ ^ ' ' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderTest >> umlTypesContents [ ^ ' diff --git a/repository/OP-XMI/OPXMIReaderVisitor.class.st b/repository/OP-XMI/OPXMIReaderVisitor.class.st index 7f460fa..e587cf1 100644 --- a/repository/OP-XMI/OPXMIReaderVisitor.class.st +++ b/repository/OP-XMI/OPXMIReaderVisitor.class.st @@ -1,6 +1,6 @@ Class { - #name : #OPXMIReaderVisitor, - #superclass : #XMLDOMVisitor, + #name : 'OPXMIReaderVisitor', + #superclass : 'XMLDOMVisitor', #instVars : [ 'document', 'root', @@ -8,22 +8,24 @@ Class { 'unresolved', 'refIdMapping' ], - #category : 'OP-XMI-Reader' + #category : 'OP-XMI-Reader', + #package : 'OP-XMI', + #tag : 'Reader' } -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> attributeFor: aXMLAttribute [ (self isReferenceAttribute: aXMLAttribute) ifTrue: [ ^ self referenceAttributeFor: aXMLAttribute ]. ^ self valueAttributeFor: aXMLAttribute ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReaderVisitor >> elementAt: aXMLElement [ ^ mapping at: aXMLElement ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> elementFor: aXMLElement [ (self isValueElement: aXMLElement) ifTrue: [ ^ self valueElementFor: aXMLElement ]. @@ -32,7 +34,7 @@ OPXMIReaderVisitor >> elementFor: aXMLElement [ ^ self objectElementFor: aXMLElement ] -{ #category : #initialization } +{ #category : 'initialization' } OPXMIReaderVisitor >> initialize [ super initialize. mapping := Dictionary new. @@ -40,7 +42,7 @@ OPXMIReaderVisitor >> initialize [ unresolved := OrderedCollection new ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> isReferenceAttribute: aXMLAttribute [ (aXMLAttribute parent isNotNil and: [ aXMLAttribute value = (self elementAt: aXMLAttribute parent) xmiId ]) @@ -51,7 +53,7 @@ OPXMIReaderVisitor >> isReferenceAttribute: aXMLAttribute [ allSatisfy: [ :each | refIdMapping includesKey: each ] ] -{ #category : #testing } +{ #category : 'testing' } OPXMIReaderVisitor >> isReferenceElement: aXMLElement [ | names | aXMLElement hasAttributes not | aXMLElement hasElements @@ -60,7 +62,7 @@ OPXMIReaderVisitor >> isReferenceElement: aXMLElement [ ^ names allSatisfy: [ :each | #('xmi:idref' 'href' 'xmi:type') includes: each ] ] -{ #category : #testing } +{ #category : 'testing' } OPXMIReaderVisitor >> isValueElement: aXMLElement [ aXMLElement hasAttributes ifTrue: [ ^ false ]. @@ -69,7 +71,7 @@ OPXMIReaderVisitor >> isValueElement: aXMLElement [ ^ aXMLElement nodes size = 1 and: [ aXMLElement nodes first isStringNode ] ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> objectElementFor: aXMLElement [ | element | element := OPXMIObjectElement new @@ -87,7 +89,7 @@ OPXMIReaderVisitor >> objectElementFor: aXMLElement [ ^ element ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> referenceAttributeFor: aXMLAttribute [ ^ OPXMIReferenceAttribute new xmiName: aXMLAttribute name; @@ -95,7 +97,7 @@ OPXMIReaderVisitor >> referenceAttributeFor: aXMLAttribute [ yourself ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> referenceElementFor: aXMLElement [ | el attribute | (el := OPXMIReferenceElement new) xmiName: aXMLElement localName. @@ -110,12 +112,12 @@ OPXMIReaderVisitor >> referenceElementFor: aXMLElement [ ^ el ] -{ #category : #actions } +{ #category : 'actions' } OPXMIReaderVisitor >> resolveAll [ unresolved do: #value ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> valueAttributeFor: aXMLAttribute [ ^ OPXMIValueAttribute new xmiName: aXMLAttribute name; @@ -123,7 +125,7 @@ OPXMIReaderVisitor >> valueAttributeFor: aXMLAttribute [ yourself ] -{ #category : #factory } +{ #category : 'factory' } OPXMIReaderVisitor >> valueElementFor: aXMLElement [ ^ OPXMIValueElement new xmiName: aXMLElement localName; @@ -131,14 +133,14 @@ OPXMIReaderVisitor >> valueElementFor: aXMLElement [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIReaderVisitor >> visitDocument: aDocument [ self visit: aDocument root. self resolveAll. ^ self elementAt: aDocument root ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIReaderVisitor >> visitElement: aXMLElement [ | element | element := self elementFor: aXMLElement. diff --git a/repository/OP-XMI/OPXMIReaderVisitorExtraRulesTest.class.st b/repository/OP-XMI/OPXMIReaderVisitorExtraRulesTest.class.st index 393a046..f725e22 100644 --- a/repository/OP-XMI/OPXMIReaderVisitorExtraRulesTest.class.st +++ b/repository/OP-XMI/OPXMIReaderVisitorExtraRulesTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #OPXMIReaderVisitorExtraRulesTest, - #superclass : #TestCase, + #name : 'OPXMIReaderVisitorExtraRulesTest', + #superclass : 'TestCase', #instVars : [ 'visitor', 'result' ], - #category : 'OP-XMI-Tests' + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderVisitorExtraRulesTest >> elementNamed: aName [ ^ XMLElement named: aName ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderVisitorExtraRulesTest >> elementNamed: aName attributes: aCollection [ ^ (XMLElement named: aName) usesNamespaces: false; @@ -21,13 +23,13 @@ OPXMIReaderVisitorExtraRulesTest >> elementNamed: aName attributes: aCollection yourself ] -{ #category : #running } +{ #category : 'running' } OPXMIReaderVisitorExtraRulesTest >> setUp [ super setUp. visitor := OPXMIReaderVisitor new ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorExtraRulesTest >> testNoSelfReference [ " the name attribute should be ValueAttribute because it refers to itself" @@ -46,7 +48,7 @@ the name attribute should be ValueAttribute because it refers to itself" self assert: result containedItems last isValueAttribute ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorExtraRulesTest >> testNoSelfReferenceIsReferenceAttributeNot [ "goes with testNoSelfReference" diff --git a/repository/OP-XMI/OPXMIReaderVisitorTest.class.st b/repository/OP-XMI/OPXMIReaderVisitorTest.class.st index f77060c..a428927 100644 --- a/repository/OP-XMI/OPXMIReaderVisitorTest.class.st +++ b/repository/OP-XMI/OPXMIReaderVisitorTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #OPXMIReaderVisitorTest, - #superclass : #TestCase, + #name : 'OPXMIReaderVisitorTest', + #superclass : 'TestCase', #instVars : [ 'visitor', 'result' ], - #category : 'OP-XMI-Tests' + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderVisitorTest >> elementNamed: aName [ ^ XMLElement named: aName ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReaderVisitorTest >> elementNamed: aName attributes: aCollection [ ^ (XMLElement named: aName) usesNamespaces: false; @@ -21,20 +23,20 @@ OPXMIReaderVisitorTest >> elementNamed: aName attributes: aCollection [ yourself ] -{ #category : #running } +{ #category : 'running' } OPXMIReaderVisitorTest >> setUp [ super setUp. visitor := OPXMIReaderVisitor new ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceAttribute [ self deny: (visitor isReferenceAttribute: (XMLAttribute name: 'name' value: 'ID')). visitor visitElement: (self elementNamed: 'whatever' attributes: {#xmi:id -> 'ID'}). self assert: (visitor isReferenceAttribute: (XMLAttribute name: 'name' value: 'ID')) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceAttributeMulti [ self deny: (visitor isReferenceAttribute: (XMLAttribute name: 'name' value: 'ID1 ID2')). @@ -44,19 +46,19 @@ OPXMIReaderVisitorTest >> testIsReferenceAttributeMulti [ assert: (visitor isReferenceAttribute: (XMLAttribute name: 'name' value: 'ID1 ID2')) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceAttributeNotXmi [ self deny: (visitor isReferenceAttribute: (XMLAttribute name: 'xmi:idref' value: 'value')). self deny: (visitor isReferenceAttribute: (XMLAttribute name: 'xmi:id' value: 'value')) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceElementHref [ self assert: (visitor isReferenceElement: (self elementNamed: 'el' attributes: {#href -> #content})) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceElementHref2 [ self assert: @@ -69,19 +71,19 @@ OPXMIReaderVisitorTest >> testIsReferenceElementHref2 [ #href -> #content})) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceElementIdRef [ self assert: (visitor isReferenceElement: (self elementNamed: 'el' attributes: {#xmi:idref -> #value})) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsReferenceElementNot [ self deny: (visitor isReferenceElement: (self elementNamed: 'el' attributes: {#other -> #sth})) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsValueElement [ self assert: @@ -93,12 +95,12 @@ OPXMIReaderVisitorTest >> testIsValueElement [ yourself)) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsValueElementNot [ self deny: (visitor isValueElement: (XMLElement name: 'el' attributes: {#key -> #value})) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testIsValueElementNot2 [ self deny: @@ -109,14 +111,14 @@ OPXMIReaderVisitorTest >> testIsValueElementNot2 [ yourself)) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testObjectElement [ result := visitor objectElementFor: (self elementNamed: 'el'). self assert: result isObjectElement. self assert: result xmiName equals: 'el' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testObjectElementWithAttributes [ result := visitor objectElementFor: (self elementNamed: 'el' attributes: {#name -> #value}). @@ -127,7 +129,7 @@ OPXMIReaderVisitorTest >> testObjectElementWithAttributes [ self assert: result containedItems first value equals: 'value' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testReferenceAttribute [ | target reference attribute | target := self elementNamed: 'Target' attributes: {#xmi:id -> #target}. @@ -143,7 +145,7 @@ OPXMIReaderVisitorTest >> testReferenceAttribute [ self assert: attribute referencedElement equals: (visitor elementAt: target) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testReferenceAttributeMulti [ | target1 target2 reference attribute | target1 := self elementNamed: 'Target' attributes: {#xmi:id -> #target1}. @@ -162,7 +164,7 @@ OPXMIReaderVisitorTest >> testReferenceAttributeMulti [ self assert: attribute referencedElements second equals: (visitor elementAt: target2) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testReferenceElement [ | target reference | target := self elementNamed: 'Target' attributes: {#xmi:id -> #target}. @@ -176,7 +178,7 @@ OPXMIReaderVisitorTest >> testReferenceElement [ self assert: result referencedElement equals: (visitor elementAt: target) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testReferenceElementHrefUnresolved [ | reference | reference := self @@ -190,7 +192,7 @@ OPXMIReaderVisitorTest >> testReferenceElementHrefUnresolved [ self assert: result referencedElements size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testReferenceElementHrefUnresolvedWithType [ | reference | reference := self @@ -207,7 +209,7 @@ OPXMIReaderVisitorTest >> testReferenceElementHrefUnresolvedWithType [ self assert: result referencedElements size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testValueAttribute [ result := visitor valueAttributeFor: (XMLAttribute name: 'name' value: 'value'). self assert: result isValueAttribute. @@ -215,7 +217,7 @@ OPXMIReaderVisitorTest >> testValueAttribute [ self assert: result value equals: 'value' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testValueElement [ result := visitor valueElementFor: @@ -228,7 +230,7 @@ OPXMIReaderVisitorTest >> testValueElement [ self assert: result value equals: 'content' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReaderVisitorTest >> testVisitObjectElementWithChild [ | node | node := (self elementNamed: 'parent' attributes: {#xmi:type -> 'type'}) diff --git a/repository/OP-XMI/OPXMIReferenceAttribute.class.st b/repository/OP-XMI/OPXMIReferenceAttribute.class.st index 1e95d61..7f65076 100644 --- a/repository/OP-XMI/OPXMIReferenceAttribute.class.st +++ b/repository/OP-XMI/OPXMIReferenceAttribute.class.st @@ -2,16 +2,18 @@ XMIReferenceAttribute is an XML attribute that references an XMIElement by id. " Class { - #name : #OPXMIReferenceAttribute, - #superclass : #OPXMIAttribute, + #name : 'OPXMIReferenceAttribute', + #superclass : 'OPXMIAttribute', #instVars : [ 'referencedElements', 'href' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReferenceAttribute class >> xmiName: aName referencedElements: aCollection [ ^ self new xmiName: aName; @@ -19,33 +21,33 @@ OPXMIReferenceAttribute class >> xmiName: aName referencedElements: aCollection yourself ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIReferenceAttribute >> accept: aVisitor [ aVisitor visitReferenceAttribute: self ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceAttribute >> href [ ^ href ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceAttribute >> href: anObject [ href := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } OPXMIReferenceAttribute >> initialize [ super initialize. referencedElements := OrderedCollection new ] -{ #category : #testing } +{ #category : 'testing' } OPXMIReferenceAttribute >> isReferenceAttribute [ ^ true ] -{ #category : #printing } +{ #category : 'printing' } OPXMIReferenceAttribute >> printOn: aStream [ aStream << 'XMIReferenceAttribute('; @@ -53,17 +55,17 @@ OPXMIReferenceAttribute >> printOn: aStream [ << '")' ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceAttribute >> referencedElement [ ^ referencedElements ifEmpty: [ nil ] ifNotEmpty: [ referencedElements first ] ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceAttribute >> referencedElements [ ^ referencedElements ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceAttribute >> referencedElements: aCollection [ referencedElements := aCollection ] diff --git a/repository/OP-XMI/OPXMIReferenceElement.class.st b/repository/OP-XMI/OPXMIReferenceElement.class.st index 9c478ab..78006fa 100644 --- a/repository/OP-XMI/OPXMIReferenceElement.class.st +++ b/repository/OP-XMI/OPXMIReferenceElement.class.st @@ -2,17 +2,19 @@ XMIReferenceElement is an XML element with an idref or href attribute that references another XMIElement, by id, URI, or URI and XPointer. " Class { - #name : #OPXMIReferenceElement, - #superclass : #OPXMIElement, + #name : 'OPXMIReferenceElement', + #superclass : 'OPXMIElement', #instVars : [ 'referencedElements', 'href', 'xmiType' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIReferenceElement class >> xmiName: aName referencedElements: aCollection [ ^ self new xmiName: aName; @@ -20,53 +22,53 @@ OPXMIReferenceElement class >> xmiName: aName referencedElements: aCollection [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIReferenceElement >> accept: aVisitor [ aVisitor visitReferenceElement: self ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> href [ ^ href ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> href: anObject [ href := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } OPXMIReferenceElement >> initialize [ super initialize. referencedElements := OrderedCollection new ] -{ #category : #testing } +{ #category : 'testing' } OPXMIReferenceElement >> isReferenceElement [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> referencedElement [ ^ referencedElements ifEmpty: [ nil ] ifNotEmpty: [ referencedElements first ] ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> referencedElements [ ^ referencedElements ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> referencedElements: aCollection [ referencedElements := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> xmiType [ ^ xmiType ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIReferenceElement >> xmiType: anObject [ xmiType := anObject ] diff --git a/repository/OP-XMI/OPXMIReferenceItemTest.class.st b/repository/OP-XMI/OPXMIReferenceItemTest.class.st index fede46e..cc54245 100644 --- a/repository/OP-XMI/OPXMIReferenceItemTest.class.st +++ b/repository/OP-XMI/OPXMIReferenceItemTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #OPXMIReferenceItemTest, - #superclass : #TestCase, - #category : 'OP-XMI-Tests' + #name : 'OPXMIReferenceItemTest', + #superclass : 'TestCase', + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } OPXMIReferenceItemTest >> testConstructorAttribute [ | element | element := OPXMIReferenceAttribute xmiName: 'NAME' referencedElements: #(1). @@ -12,7 +14,7 @@ OPXMIReferenceItemTest >> testConstructorAttribute [ self assert: element referencedElements equals: #(1) ] -{ #category : #tests } +{ #category : 'tests' } OPXMIReferenceItemTest >> testConstructorElement [ | element | element := OPXMIReferenceElement xmiName: 'NAME' referencedElements: #(1). diff --git a/repository/OP-XMI/OPXMITest.class.st b/repository/OP-XMI/OPXMITest.class.st index 13f4d29..4c4624c 100644 --- a/repository/OP-XMI/OPXMITest.class.st +++ b/repository/OP-XMI/OPXMITest.class.st @@ -1,17 +1,19 @@ Class { - #name : #OPXMITest, - #superclass : #TestCase, - #category : #'OP-XMI-Tests' + #name : 'OPXMITest', + #superclass : 'TestCase', + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } OPXMITest >> normalized: aString [ ^ (aString copyReplaceAll: String cr with: String lf) copyReplaceAll: String tab with: ' ' ] -{ #category : #tests } +{ #category : 'tests' } OPXMITest >> testReadWrite [ | in root out | in := ' diff --git a/repository/OP-XMI/OPXMIValueAttribute.class.st b/repository/OP-XMI/OPXMIValueAttribute.class.st index c3c5e59..6c88137 100644 --- a/repository/OP-XMI/OPXMIValueAttribute.class.st +++ b/repository/OP-XMI/OPXMIValueAttribute.class.st @@ -2,15 +2,17 @@ XMIValueAttribute is simply an XML attribute with a value. " Class { - #name : #OPXMIValueAttribute, - #superclass : #OPXMIAttribute, + #name : 'OPXMIValueAttribute', + #superclass : 'OPXMIAttribute', #instVars : [ 'value' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIValueAttribute class >> xmiName: aName value: aValue [ ^ self new xmiName: aName; @@ -18,7 +20,7 @@ OPXMIValueAttribute class >> xmiName: aName value: aValue [ yourself ] -{ #category : #comparing } +{ #category : 'comparing' } OPXMIValueAttribute >> = aValueAttribute [ self species = aValueAttribute species ifFalse: [ ^ false ]. @@ -29,22 +31,22 @@ OPXMIValueAttribute >> = aValueAttribute [ ^ true ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIValueAttribute >> accept: aVisitor [ aVisitor visitValueAttribute: self ] -{ #category : #comparing } +{ #category : 'comparing' } OPXMIValueAttribute >> hash [ ^ self species hash bitXor: (self xmiName hash bitXor: self value hash) ] -{ #category : #testing } +{ #category : 'testing' } OPXMIValueAttribute >> isValueAttribute [ ^ true ] -{ #category : #printing } +{ #category : 'printing' } OPXMIValueAttribute >> printOn: aStream [ aStream << 'XMIValueAttribute('; @@ -54,12 +56,12 @@ OPXMIValueAttribute >> printOn: aStream [ << '")' ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIValueAttribute >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIValueAttribute >> value: aString [ value := aString ] diff --git a/repository/OP-XMI/OPXMIValueElement.class.st b/repository/OP-XMI/OPXMIValueElement.class.st index b19edbd..65c09e0 100644 --- a/repository/OP-XMI/OPXMIValueElement.class.st +++ b/repository/OP-XMI/OPXMIValueElement.class.st @@ -2,15 +2,17 @@ XMIValueElement is an XML element that can have a value, but cannot contain other XML elements or attributes. " Class { - #name : #OPXMIValueElement, - #superclass : #OPXMIElement, + #name : 'OPXMIValueElement', + #superclass : 'OPXMIElement', #instVars : [ 'value' ], - #category : 'OP-XMI-DOM' + #category : 'OP-XMI-DOM', + #package : 'OP-XMI', + #tag : 'DOM' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } OPXMIValueElement class >> xmiName: aName value: aValue [ ^ self new xmiName: aName; @@ -18,22 +20,22 @@ OPXMIValueElement class >> xmiName: aName value: aValue [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIValueElement >> accept: aVisitor [ aVisitor visitValueElement: self ] -{ #category : #testing } +{ #category : 'testing' } OPXMIValueElement >> isValueElement [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIValueElement >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIValueElement >> value: aString [ value := aString ] diff --git a/repository/OP-XMI/OPXMIValueItemTest.class.st b/repository/OP-XMI/OPXMIValueItemTest.class.st index 0ba93be..cfb9a54 100644 --- a/repository/OP-XMI/OPXMIValueItemTest.class.st +++ b/repository/OP-XMI/OPXMIValueItemTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #OPXMIValueItemTest, - #superclass : #TestCase, - #category : 'OP-XMI-Tests' + #name : 'OPXMIValueItemTest', + #superclass : 'TestCase', + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #tests } +{ #category : 'tests' } OPXMIValueItemTest >> testConstructorAttribute [ | element | element := OPXMIValueAttribute xmiName: 'NAME' value: 'VALUE'. @@ -12,7 +14,7 @@ OPXMIValueItemTest >> testConstructorAttribute [ self assert: element value equals: 'VALUE' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIValueItemTest >> testConstructorElement [ |element| element := OPXMIValueElement xmiName: 'NAME' value: 'VALUE'. diff --git a/repository/OP-XMI/OPXMIWriter.class.st b/repository/OP-XMI/OPXMIWriter.class.st index d521b5e..9704d89 100644 --- a/repository/OP-XMI/OPXMIWriter.class.st +++ b/repository/OP-XMI/OPXMIWriter.class.st @@ -1,10 +1,12 @@ Class { - #name : #OPXMIWriter, - #superclass : #Object, - #category : #'OP-XMI-Writer' + #name : 'OPXMIWriter', + #superclass : 'Object', + #category : 'OP-XMI-Writer', + #package : 'OP-XMI', + #tag : 'Writer' } -{ #category : #writing } +{ #category : 'writing' } OPXMIWriter class >> toString: anXMI [ | visitor | @@ -13,7 +15,7 @@ OPXMIWriter class >> toString: anXMI [ ^ visitor contents ] -{ #category : #writing } +{ #category : 'writing' } OPXMIWriter class >> write: anXMI toStream: aStream [ aStream << (self toString: anXMI) diff --git a/repository/OP-XMI/OPXMIWriterVisitor.class.st b/repository/OP-XMI/OPXMIWriterVisitor.class.st index 18518db..0e826f9 100644 --- a/repository/OP-XMI/OPXMIWriterVisitor.class.st +++ b/repository/OP-XMI/OPXMIWriterVisitor.class.st @@ -1,18 +1,20 @@ Class { - #name : #OPXMIWriterVisitor, - #superclass : #Object, + #name : 'OPXMIWriterVisitor', + #superclass : 'Object', #instVars : [ 'writer' ], - #category : #'OP-XMI-Writer' + #category : 'OP-XMI-Writer', + #package : 'OP-XMI', + #tag : 'Writer' } -{ #category : #accessing } +{ #category : 'accessing' } OPXMIWriterVisitor >> contents [ ^ writer contents ] -{ #category : #initialization } +{ #category : 'initialization' } OPXMIWriterVisitor >> initialize [ super initialize. writer := XMLWriter new. @@ -21,12 +23,12 @@ OPXMIWriterVisitor >> initialize [ writer xml encoding: 'UTF-8' ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIWriterVisitor >> visit: anElement [ anElement accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIWriterVisitor >> visitObjectElement: anObjectElement [ "2a:XMIObjectElement ::= ( ""<"" 2k:QName 2d:XMIAttributes ""/>"" ) | ( ""<"" 2k:QName 2d:XMIAttributes "">"" @@ -46,14 +48,14 @@ OPXMIWriterVisitor >> visitObjectElement: anObjectElement [ anObjectElement containedItems select: #isElement thenDo: [ :each | self visit: each ] ] ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIWriterVisitor >> visitReferenceAttribute: aReferenceAttribute [ "2j:XMIReferenceAttribute ::= //xmiName// ""=’"" ( //refId// )+ ""’" writer writeAttributeName: aReferenceAttribute xmiName value: ((aReferenceAttribute referencedElements collect: #xmiId) joinUsing: ' ') ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIWriterVisitor >> visitReferenceElement: aReferenceElement [ " 2c:XMIReferenceElement::= ""<"" //xmiName// 2l:LinkAttribs ""/>"" @@ -74,14 +76,14 @@ Additionally every modeling tool adds xmi:type information, even though the spec ifNotNil: [ "href" writer writeAttributeName: 'href' value: aReferenceElement href ] ] ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIWriterVisitor >> visitValueAttribute: aValueAttribute [ "2i:XMIValueAttribute ::= //xmiName// ""=’"" value ""’""" writer writeAttributeName: aValueAttribute xmiName value: aValueAttribute value ] -{ #category : #visiting } +{ #category : 'visiting' } OPXMIWriterVisitor >> visitValueElement: aValueElement [ "2b:XMIValueElement ::= ( ""<"" //xmiName// "">"" //value// """" ) @@ -92,7 +94,7 @@ OPXMIWriterVisitor >> visitValueElement: aValueElement [ writer tag: aValueElement xmiName with: aValueElement value ] -{ #category : #accessing } +{ #category : 'accessing' } OPXMIWriterVisitor >> writer [ ^ writer ] diff --git a/repository/OP-XMI/OPXMIWriterVisitorTest.class.st b/repository/OP-XMI/OPXMIWriterVisitorTest.class.st index c640091..abcd01f 100644 --- a/repository/OP-XMI/OPXMIWriterVisitorTest.class.st +++ b/repository/OP-XMI/OPXMIWriterVisitorTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #OPXMIWriterVisitorTest, - #superclass : #TestCase, + #name : 'OPXMIWriterVisitorTest', + #superclass : 'TestCase', #instVars : [ 'visitor' ], - #category : 'OP-XMI-Tests' + #category : 'OP-XMI-Tests', + #package : 'OP-XMI', + #tag : 'Tests' } -{ #category : #running } +{ #category : 'running' } OPXMIWriterVisitorTest >> setUp [ super setUp. visitor := OPXMIWriterVisitor new ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitObjectElement [ visitor visitObjectElement: @@ -35,7 +37,7 @@ OPXMIWriterVisitorTest >> testVisitObjectElement [ ' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitReferenceAttribute [ visitor writer tag: 'outer' @@ -53,7 +55,7 @@ OPXMIWriterVisitorTest >> testVisitReferenceAttribute [ self assert: visitor contents lines last equals: '' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitReferenceElement [ visitor visitReferenceElement: @@ -69,7 +71,7 @@ OPXMIWriterVisitorTest >> testVisitReferenceElement [ self assert: visitor contents lines last equals: '' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitReferenceElementHref [ visitor visitReferenceElement: @@ -79,7 +81,7 @@ OPXMIWriterVisitorTest >> testVisitReferenceElementHref [ self assert: visitor contents lines last equals: '' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitReferenceElementHrefType [ visitor visitReferenceElement: @@ -92,7 +94,7 @@ OPXMIWriterVisitorTest >> testVisitReferenceElementHrefType [ equals: '' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitValueAttribute [ visitor writer tag: 'outer' @@ -104,13 +106,13 @@ OPXMIWriterVisitorTest >> testVisitValueAttribute [ self assert: visitor contents lines last equals: '' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitValueElement [ visitor visitValueElement: (OPXMIValueElement new xmiName: 'name'; value: 'VALUE'). self assert: visitor contents lines last equals: 'VALUE' ] -{ #category : #tests } +{ #category : 'tests' } OPXMIWriterVisitorTest >> testVisitXmiElement [ visitor visitObjectElement: (OPXMIObjectElement new xmiName: 'XMI'). self diff --git a/repository/OP-XMI/OPXMLPrettyPrintingWriterFormatter.class.st b/repository/OP-XMI/OPXMLPrettyPrintingWriterFormatter.class.st index ec0ae3f..8434367 100644 --- a/repository/OP-XMI/OPXMLPrettyPrintingWriterFormatter.class.st +++ b/repository/OP-XMI/OPXMLPrettyPrintingWriterFormatter.class.st @@ -1,18 +1,20 @@ Class { - #name : #OPXMLPrettyPrintingWriterFormatter, - #superclass : #XMLPrettyPrintingWriterFormatter, + #name : 'OPXMLPrettyPrintingWriterFormatter', + #superclass : 'XMLPrettyPrintingWriterFormatter', #instVars : [ 'lineBreak' ], - #category : #'OP-XMI-Writer' + #category : 'OP-XMI-Writer', + #package : 'OP-XMI', + #tag : 'Writer' } -{ #category : #writing } +{ #category : 'writing' } OPXMLPrettyPrintingWriterFormatter >> lineBreak: aCharacterOrString [ lineBreak := aCharacterOrString asString ] -{ #category : #writing } +{ #category : 'writing' } OPXMLPrettyPrintingWriterFormatter >> writeLineBreak [ self writer atBeginning ifFalse: [ self writer nextPutAll: lineBreak. @@ -20,7 +22,7 @@ OPXMLPrettyPrintingWriterFormatter >> writeLineBreak [ ifTrue: [ self writeIndent ] ] ] -{ #category : #writing } +{ #category : 'writing' } OPXMLPrettyPrintingWriterFormatter >> writer: aWriter [ super writer: aWriter. lineBreak ifNil: [ lineBreak := aWriter lineBreak ] diff --git a/repository/OP-XMI/package.st b/repository/OP-XMI/package.st index 69d16c5..e2582aa 100644 --- a/repository/OP-XMI/package.st +++ b/repository/OP-XMI/package.st @@ -1 +1 @@ -Package { #name : #'OP-XMI' } +Package { #name : 'OP-XMI' }