First backup, just before starting to develop in a new image (this one became slow).
This commit is contained in:
parent
0820bd8ed7
commit
1e699ea334
|
@ -0,0 +1,12 @@
|
|||
"
|
||||
I model several actions that can be taken regarding ethical or unethical events, like
|
||||
public acknowledge for the first ones or law actions for the second ones.
|
||||
"
|
||||
Class {
|
||||
#name : #EtiAction,
|
||||
#superclass : #Object,
|
||||
#instVars : [
|
||||
'description'
|
||||
],
|
||||
#category : #'Etico-Model'
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
"
|
||||
I model the agents for the Etico web site, which tries to map ethical behavior of agents
|
||||
in the private and public sectors.
|
||||
For more information (in Spanish) look at:
|
||||
|
||||
http://mutabit.com/repos.fossil/etico/
|
||||
"
|
||||
Class {
|
||||
#name : #EtiAgent,
|
||||
#superclass : #Object,
|
||||
#instVars : [
|
||||
'name',
|
||||
'sector',
|
||||
'type',
|
||||
'events'
|
||||
],
|
||||
#category : #'Etico-Model'
|
||||
}
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> events [
|
||||
^ events ifNil: [ ^ OrderedCollection new ]
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> events: anObject [
|
||||
events := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> name [
|
||||
^ name
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> name: anObject [
|
||||
name := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> sector [
|
||||
^ sector
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> sector: anObject [
|
||||
sector := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> type [
|
||||
^ type
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiAgent >> type: anObject [
|
||||
type := anObject
|
||||
]
|
|
@ -0,0 +1,43 @@
|
|||
"
|
||||
I model the ethical an unethical events that an EtiAgent can do.
|
||||
"
|
||||
Class {
|
||||
#name : #EtiEvent,
|
||||
#superclass : #Object,
|
||||
#instVars : [
|
||||
'overview',
|
||||
'details',
|
||||
'actions'
|
||||
],
|
||||
#category : #'Etico-Model'
|
||||
}
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiEvent >> actions [
|
||||
^ actions ifNil: [ ^OrderedCollection new ]
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiEvent >> actions: anObject [
|
||||
actions := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiEvent >> details [
|
||||
^ details
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiEvent >> details: anObject [
|
||||
details := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiEvent >> overview [
|
||||
^ overview
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
EtiEvent >> overview: anObject [
|
||||
overview := anObject
|
||||
]
|
|
@ -0,0 +1,13 @@
|
|||
"
|
||||
I model the sectors where an Agent can belong to.
|
||||
"
|
||||
Class {
|
||||
#name : #EtiSector,
|
||||
#superclass : #Object,
|
||||
#category : #'Etico-Model'
|
||||
}
|
||||
|
||||
{ #category : #initializing }
|
||||
EtiSector class >> list [
|
||||
^ #('privado' 'publico' 'fundaciones / ONG')
|
||||
]
|
|
@ -0,0 +1,28 @@
|
|||
"
|
||||
I provide functionality to add data to some instances of the Etico package.
|
||||
"
|
||||
Class {
|
||||
#name : #EtiWeb,
|
||||
#superclass : #Object,
|
||||
#category : #'Etico-WebSite'
|
||||
}
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
EtiWeb class >> addAgentForm: request [
|
||||
|
||||
| input page |
|
||||
input := request uri queryAt: #input ifAbsent: [ 'Entrada' ].
|
||||
page := ZnHtmlOutputStream streamContents: [ :html |
|
||||
html page: 'Entrada sencilla' do: [
|
||||
html
|
||||
tag: #form
|
||||
attributes: #(#action 'form-test-1' 'accept-charset' 'utf-8' method GET)
|
||||
do: [
|
||||
html
|
||||
str: 'Entrada'; space;
|
||||
tag: #input attributes: { #type. #input. #name. #input. #value. input }; space;
|
||||
tag: #input attributes: #(type submit);
|
||||
str: 'La entrada fue:'; space; tag: #em with: input]
|
||||
]
|
||||
]
|
||||
]
|
|
@ -0,0 +1 @@
|
|||
Package { #name : #Etico }
|
Loading…
Reference in New Issue