
	1. Sort out core RefData and Text.

	2. Create an XML-based schema definition for Chores.

	3. Generate all the artifacts for the Chores system from the XML files.


Points of focus

	* Building the first machine.

	* Fitness and weight loss.

	* Tan

	* House stuff

	* Food ...in an app...

	* Chores ...in an app...

	* Trippy ...in an app...

	* Tendering


To Do - Now

	1. Regenerate

	2. Load system model


	1. System Object Model

	2. Generate server-side and client-side artifacts.

		Server

			SQL scripts to create and populate database.

			Create the database itself.

		Client

			SQL scripts to create and populate database.

			The XML defining: entities, ref-data, text-groups & text-elements.

	3. Finalise the client-side code that properly handles the WebData package.





	* We might be able to make the DataType of the RecordStatus system field RefData.

	* Change how my xml files are located on the classpath.

	* Sort out the timezone parameters for temporal DataTypes.

	* Need to do the implementation that picks up system field exclusions, additions and amendments.

	* Can &lt; and &gt; be used in attribute values?

	* Need a project module - Xml Definitions

	* CompoundPrimaryKey --> CustomPrimaryKey

		* IDPK - Id Primary Key (SystemManagedPrimaryKey, AutoNumberPrimaryKey)
		* CPK - Custom Primary Key (ImmutableCustomPrimaryKey, MutableCustomPrimaryKey)

		* Id Primary Key
			* SystemManaged, AutoNumber, Other
		* Custom Primary Key
			* Immutable|Mutable
			* SingleField|Compound
			* SingleFieldType

	* Virtual Field, Complex Field

		* Virtual Fields come from relationship.

		* Complex Fields are defined within an entity. They specify one field (and its CodeType) that fronts 2..n fields.
		  The fronted fields are usually have no setter access.

	* For RepeatConfiguration, the following need to be considered,

		* A CompletionDate.

		* Or DateRanges.


	* The Timestamp data type should always have a SYSTEM timezone.  ???


	* Timezone options for Date, DateTime and TimeOfDay fields,

		System, Explicit, Implicit, ???


	* RefData

		* Day

			* DayNumber

		* Month

			* MonthNumber


	* Core Entities

		* User

		* Person

		* GeoLocation

		* RepeatConfiguration

		* RepeatConfigurationAdditional


	* Sort out NameFormat.

	* Authentication

		* Authentication is executed by an Authentication Service.

		* The AS returns a token. The token is encrypted by the AS's public (or private) key. The token is only ever
		  decrypted by the server.

		* The token includes the user's user id.

	* System Fields

	* Constraints

	* I'm not sure I have the right text for countries.

	* Type up my notes to summarise my activities over the past few days.

		GDrive. oDesk. Bubbles. SuperDoc. A better forms tool. An encryption interceptor for GDrive. Selling components.

	Identifiers to be replaced with system-generated ids:

		RefData files

			ref-data/item/properties/property/value (for 'regions' property)

	SQL Lite - Create Temp Table ??

	Should the region ref data items in the Countries ref data category be ids rather than identifiers? I think so.



To Do - Future

	Integration of security, system roles, etc.

	RefDataItem Date Ranges

		General support for the DateRanges/expiry concept.

	Get all the globalRegion values inserted into the Country RefDataItems.

	Need to support the idea of a text element inheriting from another text element.

	Change all usages of <template> to <xml-definition>.

	RepeatTypes should have finer granularity than week.

	Factor in RefData status, date-ranges and sub-categories.






Old Code




			names = new NullFreeImmutableSet<String>(
				new String[]{"Country", "CountryRegion", "CountryRegionLabel", "DataType", "Gender", "GlobalRegion",
					"Language", "LanguageVariation", "Month", "RecordStatus", "RefDataPropertyType", "Timezone"});
			projects.getProject("Core").reverseRefDataSkeleton(names);


https://docs.google.com/document/d/1CIcFKXhy561X60nR7WGU8oFPu5_0Ul6UM-wwD17niww/pub

<iframe src="https://docs.google.com/document/d/1CIcFKXhy561X60nR7WGU8oFPu5_0Ul6UM-wwD17niww/pub?embedded=true"></iframe>

Hi Pavel

I am a developer myself who often needs assistance from other developers to take on sub-portions of projects I am working on.

I am after a developer with the following skills,

- Strong JavaScript.

- Experience writing code that interacts with Google Drive.

- An understanding of how to configure, assemble, and deploy a Google App.

In addition to the above, I am after a developer with the following attributes,

- Charges $20/hour (Australian dollars)

- Available, at hourly rate on a pro-rata basis, to respond to ad hoc emails with technical questions and ad hoc requests to write code where such code requests may take anywhere from 30 minutes to a handful of hours to complete.

The duration of the work would be open-ended into the future.

I'm very much interested in hearing back from you. If you are interested, please let me know and I'll send you a few follow-up questions.

Cheers,
Rob




	/**
	 * This method is a helper for <code>cloneElement(String)</code>.
	 */
	private void add(XmlElement element, XmlElement newElement) {

		Collection<XmlElement> elements = null;
		Node cdataNode = null;

		/* @todo This method has a flaw. The implementation assumes that an element either contains child elements OR it
		 * contains text. In other words, this implementation does not support elements that contain both text and child
		 * elements.
		 */

		elements = element.getOptionalElements("/");

		if(elements.isEmpty()) {

			cdataNode = XmlUtils.getCDataNode((Element)(((XmlElementImpl)element).node));

			if(cdataNode == null) newElement.setText(element.getText());
			else {
				((((XmlElementImpl)newElement).node))
					.appendChild(this.document.createCDATASection(element.getText()));
			}
		}
		else for(XmlElement el : elements) add(el, newElement.addElement(el.getName()));

		return;
	}



<keys>
		<key>
        <name>Name_OwnedByUserId</name>
			<fields>
				<field-name>Name</field-name>
				<field-name>OwnedByUserId</field-name>
			</fields>
		</key>
	</keys>

<entity>
    <id>66031</id>
    <name>Location</name>
    <display-text-identifier>entities.Location</display-text-identifier>
    <persistence-name>LOCATIONS</persistence-name>
    <fields/>
    <primary-key>
        <type>Sequence</type>
        <fields>
            <field-name>Id</field-name>
        </fields>
    </primary-key>
    <keys>
        <key>
            <fields>
                <field-name>Name</field-name>
                <field-name>OwnedByUserId</field-name>
            </fields>
        </key>
    </keys>
</entity>


<entity>
    <id>66031</id>
    <name>Location</name>
    <display-text-identifier>entities.Location</display-text-identifier>
    <persistence-name>LOCATIONS</persistence-name>
    <fields>
        <field>
            <id>66032</id>
            <name>Name</name>
            <display-text-identifier>entity.Location.fields.Name</display-text-identifier>
            <persistence-name>NAME</persistence-name>
            <type>
                <data-type>VariableLengthText</data-type>
                <code-type>String</code-type>
                <data-source-types>
                    <data-source-type>
                        <engine>MySQL</engine>
                        <type>VarChar(32)</type>
                    </data-source-type>
                </data-source-types>
            </type>
            <default-value>${none}</default-value>
        </field>
        <field>
            <id>66033</id>
            <name>OwnerUserId</name>
            <display-text-identifier>entity.Location.fields.OwnerUserId</display-text-identifier>
            <persistence-name>OWNER_USER_ID</persistence-name>
            <type>
                <data-type>WholeNumber8</data-type>
                <code-type>Long</code-type>
                <data-source-types>
                    <data-source-type>
                        <engine>MySQL</engine>
                        <type>BigInt</type>
                    </data-source-type>
                </data-source-types>
            </type>
            <default-value>${none}</default-value>
        </field>
        <field>
            <id>66034</id>
            <name>Timezone</name>
            <display-text-identifier>entity.Location.fields.Timezone</display-text-identifier>
            <persistence-name>TIMEZONE</persistence-name>
            <type>
                <data-type>RefData(RefDataCategory(Timezone))</data-type>
                <code-type>Integer</code-type>
                <data-source-types>
                    <data-source-type>
                        <engine>MySQL</engine>
                        <type>TinyInt</type>
                    </data-source-type>
                </data-source-types>
            </type>
            <default-value>${none}</default-value>
        </field>
    </fields>
    <primary-key>
        <type>Sequence</type>
        <fields>
            <field-name>Id</field-name>
        </fields>
    </primary-key>
    <keys>
        <key>
            <fields>
                <field-name>Name</field-name>
                <field-name>OwnedByUserId</field-name>
            </fields>
        </key>
    </keys>
    <constraint-sets>
        <constraint-set>
            <name>Default</name>
            <fields>
                <field>
                    <field-name>Name</field-name>
                    <constraints>
                        <constraint>
                            <name>NOT_NULL</name>
                        </constraint>
                        <constraint>
                            <name>MIN</name>
                            <value>1</value>
                        </constraint>
                        <constraint>
                            <name>MAX</name>
                            <value>32</value>
                        </constraint>
                    </constraints>
                </field>
                <field>
                    <field-name>OwnerUserId</field-name>
                    <constraints>
                        <constraint>
                            <name>NOT_NULL</name>
                        </constraint>
                    </constraints>
                </field>
                <field>
                    <field-name>Timezone</field-name>
                    <constraints>
                        <constraint>
                            <name>NOT_NULL</name>
                        </constraint>
                    </constraints>
                </field>
            </fields>
        </constraint-set>
    </constraint-sets>
</entity>


<keys>
		<key>
        <name>Name_OwnedByUserId</name>
			<fields>
				<field-name>Name</field-name>
				<field-name>OwnedByUserId</field-name>
			</fields>
		</key>
	</keys>




	private static class DataTypeBreakdown {

		private String dataTypeString;
		private String dataSourceType;

		private DataType dataType;
		private String codeType;


		/**
		 * @param dataTypeString Will not be <code>null</code>.
		 * @param dataSourceType Can be <code>null</code>.
		 * @param max Can be <code>null</code>.
		 */
		DataTypeBreakdown(String dataTypeString, String dataSourceType, String max) {

			this.dataTypeString = dataTypeString;
			this.dataSourceType = dataSourceType;

			init(max);

		}


		private void init(String max) {

			StringWrapper sw = null;
			String dataTypeName = null;

			sw = new StringWrapper(this.dataTypeString);

			dataTypeName = sw.before("(", true, false);
			if(dataTypeName == null) dataTypeName = this.dataTypeString;
			dataTypeName = dataTypeName.trim();

			this.dataType = DataType.getDataType(dataTypeName);

			if(this.dataSourceType == null) this.dataSourceType = this.dataType.getDefaultPersistenceType("MySQL");

			if(max != null && this.dataSourceType.equalsIgnoreCase("VarChar")) this.dataSourceType += "(" + max + ")";

			if(this.dataType.isRefData()) if(!this.dataSourceType.equalsIgnoreCase("BigInt")) this.codeType = "Integer";
			if(this.codeType == null) this.codeType = this.dataType.getDefaultCodeType();

			return;
		}

		String getDataTypeString() {
			return this.dataTypeString;
		}

		DataType getDataType() {
			return this.dataType;
		}

		String getCodeType() {
			return this.codeType;
		}

		String getDataSourceType() {
			return this.dataSourceType;
		}

	}




	/**
	 * @param typeElement Can be <code>null</code>.
	 * @return A new instance that is based on a <code>TypeDefinition</code> instance held by this instance but modified
	 * on the basis of the content of <code>typeElement</code>.
	 */
	public TypeDefinition cloneInstance(XmlElement typeElement) {

		TypeDefinition returnValue = null;

		returnValue = new TypeDefinition();
		returnValue.dataType = this.dataType;
		returnValue.codeType = this.codeType;
		returnValue.capacity = this.capacity;
		returnValue.characterSet = this.characterSet;
		returnValue.collation = this.collation;
		returnValue.precision = this.precision;
		returnValue.scale = this.scale;
		returnValue.databaseType = this.databaseType;
		returnValue.parameters = CollectionUtils.getOrderedMap(this.parameters);

		if(typeElement != null) {

			returnValue.dataType = this.dataType;
		}

		return returnValue;
	}





	<referer-to-referee>
		<referer>RepeatConfiguration</referer>
		<referee>RepeatConfigurationAdditional</referee>
		<ownership>true</ownership>
		<owner-type-multiplicity-is-many>true</owner-type-multiplicity-is-many>
		<referer-to-referee-is-many>true</referer-to-referee-is-many>
		<referee-is-instance-dedicated>true</referee-is-instance-dedicated>
		<bi-directional>false</bi-directional>
		<min>0</min>
	</entity-to>





	<ownership>
		<parent>RepeatConfiguration</parent>
		<child>RepeatConfigurationAdditional</child>
		<owner-type-multiplicity-is-many>true</owner-type-multiplicity-is-many>
		<forward-multiplicity-is-many>true</forward-multiplicity-is-many>
		<min>0</min>
	</ownership>

	<reference>
		<referer>Person</referer>
		<referee>Chore</referee>
		<forward-multiplicity-is-many>true</forward-multiplicity-is-many>
		<backward-multiplicity-is-many>false</backward-multiplicity-is-many>
		<is-bi-directional>true</is-bi-directional>
		<min>1</min>
		<max>5</max>
	</reference>

	<reference>
		<referer>Person</referer>
		<referee>Car</referee>
		<forward-multiplicity-is-many>false</forward-multiplicity-is-many>
		<backward-multiplicity-is-many>false</backward-multiplicity-is-many>
		<is-bi-directional>true</is-bi-directional>
	</reference>

	<reference>
		<referer>Person</referer>
		<referee>Award</referee>
		<forward-multiplicity-is-many>true</forward-multiplicity-is-many>
		<backward-multiplicity-is-many>true</backward-multiplicity-is-many>
		<is-bi-directional>false</is-bi-directional>
	</reference>

	<reference>
		<referer>Group</referer>
		<referee>User</referee>
		<forward-multiplicity-is-many>true</forward-multiplicity-is-many>
		<backward-multiplicity-is-many>true</backward-multiplicity-is-many>
		<is-bi-directional>true</is-bi-directional>
	</reference>



<!--
		   <p>A GroupingLink can use one of two strategies.</p>
		   <ol>
		   		<li>
		   			It specifies a LinkEntity. The LinkEntity will have the fields Id followed by one field for each
		   			field that participates in the ChildEntity's primary key. In this case there will
		   			be at least two mappings,
		   			<ul>
		   				<li>A mapping will map a field of the ParentEntity to LinkEntity.Id</li>
		   				<li>1..n mappings mapping a primary key field of ChildEntity to a field of the LinkEntity</li>
		   			</ul>
		   			In the cases where the ChildEntity has a Primary Key consisting of one field, the LinkEntity will
		   			use the generic field name ChildId by default. This default can be overridden.
		   		</li>
		   		<li>
		   			It does NOT specify a LinkEntity. In this case there will be one mapping,
		   			<ul>
		   				<li>
		   					The first member of the mapping specifies the field within the ParentEntity that holds the
		   					GroupingId.
		   				</li>
		   				<li>
		   					The second member of the mapping specifies the field within the ChildEntity that holds the
		   					GroupingId.
		   				</li>
		   			</ul>
		   		</li>
		   	</ol>
		  -->



13/6	987LNO		51320	51368	1700	1830			1.5		1.5
16/6	987LNO		51368	51412	1645	1815			1.5		3.0
17/6	987LNO		51510	51555	1100	1200			1.0		4.0
20/6	987LNO		51582	51637	1510	1710			2.0		6.0
21/6	987LNO		51637	51680	1830	1930			1.0		7.0		N
24/6	987LNO		51705	51781	1400	1600			2.0		9.0
25/6	987LNO		51781	51815	1000	1100			1.0		10.0
28/6	987LNO		51912	51980	1400	1530			1.5		11.5
28/6	987LNO		51980	52001	1900	1930			0.5		12.0	N

01/7	521LIY		103111	103147	1030	1130			1.0		31.0
06/7	521LIY		103147	103215	1530	1730			2.0		33.0
08/7	521LIY		103228	103310	1315	1515			2.0		35.0
15/7	521LIY		103310	103333	1715	1745			0.5		35.5	N
19/7	521LIY		103349	103378	1600	1700			1.0		36.5
24/7	521LIY		103394	103451	1320	1520			2.0		38.5
04/8	521LIY		103451	103537	1200	1430			2.5		41.0
06/8	521LIY		103562	103646	1200	1430			2.5		41.0
11/8	521LIY		103646	103688	1600	1700			1.0		42.0

18/8	521LIY		103688	103725	1615	1715			1.0		43.0
22/8	521LIY		103747	103801	0930	1100			1.5		44.5
23/8	521LIY		103857	103934	1330	1530			2.0		46.5
27/8	521LIY		103934	104018	1530	1800			2.5		49.0
28/8	521LIY		104042	104080	1700	1800			1.0		50.0
08/9	521LIY		104080	104117	1700	1800			1.0		51.0
12/9	521LIY		104117	104182	1500	1630			1.5		52.5
15/9	521LIY		104225	104279	1100	1230			1.5		54.0
21/9	521LIY		104279	104316	1830	1930			1.0		55.0 	N

08/10	521LIY		104380	104417	1600	1700			1.0		56.0
17/10	521LIY		104417	104474	1340	1515			1.5		57.5
22/10	521LIY		104538	104586	1530	1700			1.5		59.0
26/10	910KPK		25821	25939	1530	1830			3.0		68.0
29/10	910KPK		25939	25972	0930	1030			1.0		69.0
29/10	910KPK		25972	26058	1500	1730			2.5		71.5
01/11	910KPK		26058	26074	1015	1045			0.5		73.0
01/11	910KPK		26088	26114	1530	1600			0.5		73.5
04/11	910KPK		26114	26137	1315	1345			0.5		74.0

04/11	910KPK		26146	26162	1830	1900			0.5		75.0	N
05/11	910KPK		26162	26183	1345	1415			0.5		75.5
05/11	910KPK		26192	26210	2000	2030			0.5		76.0	N
08/11	910KPK		26210	26229	0945	1015			0.5		76.0
08/11	910KPK		26238	26259	1430	1500			0.5		76.5
10/11	910KPK		26259	26274	1345	1415			0.5		77.0
10/11	910KPK		26283	26301	1900	1930			0.5		77.5	N
14/11	910KPK		26301	26318	0945	1015			0.5		78.0
14/11	910KPK		26327	26344	1415	1445			0.5		78.5



18/11	910KPK		26344	26361	1345	1415			0.5		79.0
18/11	910KPK		26370	26387	1900	1930			0.5		79.5	N
20/11	910KPK		26387	26404	1315	1345			0.5		80.0
20/11	910KPK		26413	26430	1800	1830			0.5		80.5
21/11	910KPK		26430	26535	1300	1500			2.0		82.5
22/11	910KPK		26535	26601	1300	1500			2.0		82.5
23/11	910KPK		26601	26618	0945	1015			0.5		83.0
23/11	910KPK		26627	26644	1530	1400			0.5		83.5
24/11	910KPK		26644	26661	1315	1345			0.5		84.0

24/11	910KPK		26670	26687	1800	1830			0.5		84.5

Famished



The issue here is not Mitch. The issue here is not Mitchs employment. The issue here is not us. The issue here is not
that we contacted you. The issue here is that you have done something that you should not have done. As a measure of that
statement, I would put it to you that I would not find a single person of regard on the planet who would agree to the
correctness of putting a person of Mitchs age and context in the position where they feel like they would be doing the
wrong thing to discuss things with their parents if they so chose. Why you would think that it is ok to create a
situation where Mitch did not feel free to talk to his parents about anything he wanted to talk about is something I
cannot comprehend. Why would you want an outcome for Mitch where he felt conflicted because he could not discuss what he
wants to discuss with his parents? Why would you want to create a situation for Tania and I where our son felt that way?
Even if we went with the assumption that this was a solely Streamline issue, which it is not, why would you feel it is
ok to use that fact to create these outcomes for Mitch and his parents when you could go about it differently and avoid
these outcomes whilst simultaneously taking an approach that demonstrates to Mitch the concepts of frankness and
openness and their role in building trust? Instead, of dealing with this with a theme of positiveness, openness, trust,
vibrancy, advancement your response has a theme of vehemency, punishment, threats, insult, negativity and bad outcomes
all round. I will never understand that.

I have never heard of a single instance of anyone, let alone another family member, attempting to make a person in Mitchs context feel as if he could not discuss something with his parents if he so chose.




<element keys="[{KEY_CONFIG}]">

where,

KEY_CONFIG="([SELECTOR][{KEY_DEFINITION}])"

SELECTOR="(selector=[selector-path])"

KEY_DEFINITION="({KEY_FIELD_DEFINITION})"

KEY_FIELD_DEFINITION="([KEY_FIELD_IDENTIFIER][CASE_DIRECTIVE])"

KEY_FIELD_IDENTIFIER="${element=element-name|attribute=attributeName}"

CASE_DIRECTIVE=":cd=${CI|CS}"

to give,

<element keys="[
	{(
		[(selector=selector-path)]
		[{(
			[{(
				[${element=element-name|attribute=attributeName}][:cd=${CI|CS}]
			)}]
		)}]
	)}
]"

The explicit specification of an attribute value specifies,

	0..n key configurations, where each configuration specifies,

		0..1 selectors

		and

		0..n keys, where each key specifies,

			0..n key fields, where each key field specifies,

				0..1 field identifiers

				and

				0..1 case directives



<element keys="[
	{(
		[(selector=selector-path)]
		[{(
			[{(
				[${element=element-name|attribute=attributeName}][:cd=${CI|CS}]
			)}]
		)}]
	)}
]"




Without doubt, a high percentage of people I meet consciously conclude that they do not like me and/or want anything to
do with me. These people specifically ensure that they do no have anything to do with me.

I have never seen any ongoing indication from anyone to suggest anything other than 100% of the remainder never have the
feeling, "I would like to see more of that guy."

So, any time I have been involved with other people on some kind of ongoing basis, it has never been because they
specifically have decided, "Hey, I want Rob here". In fact, when people actually get down to the point where they
finally have to broach the internal question of "Do I want this guy in my life?", every single one of them has concluded,
"No, I don't".

Without doubt, I have been a burden on every single person I have ever met.

However, the following did just occur to me... When it comes to the question of, "Do I add to anyone's life?", I can see
that the answer is definitely "yes" in the case of Tan and Peta. However, that answer may not be "yes" when it comes to
Mitch. And the answer is most definitely "no" when it comes to Tod.

If the answer to the question of, "Do I add to this person's life?", is "no", that is another way in which my presence
in that person's life equates to a burden. It's hard to believe that any such person would be choosing to not terminate
the relationship for any other reason than something like a sense of obligation.

Not only do I have to do everyone a favour and release them from the burden of having me in their lives, I have to
relieve myself of the burden of knowing/feeling that I am, or may be, an ongoing burden in specific people's lives.

The means by which I achieve releasing people from the burden of having me in their lives will have to be different for
each specific person. The persons in question are,

	Tan and Peta

		I cannot physically remove myself from Tan and Peta's lives. Instead, I will have to work very hard to reduce
		greatly the extent to which I am a burden and increase greatly the benefits I bring to their lives.

	Mitch

		This is a really tough one. I am totally prepared to physically remove myself if that would be the best outcome
		for him. However, I am not yet sure if this is the best outcome for him. I need to put a lot more thought into
		this and continue to monitor how things are progressing for him and between him and I.

	Tod

		To my mind, it is clear cut what I must do. I must physically remove myself from Tod's life.

		I am not 100% sure that I am a burden to Tod but I think there is a very good chance that I am, and a very good
		chance that he actually views me as a burden he cannot see how to disengage from whilst staying true to his
		values.

		One thing I do no for sure - if I totally remove myself from his life he will without doubt not be worse of, to
		any degree, and he may very well be better off. It's a no-brainer. I have to remove myself from Tod's life for
		his own benefit.



In the greater social sense,

1. I am not going about things as I should.

2. I am not involving myself in some of the interpersonal activities that I should, activities that involve meeting new
people, meeting people with different set of traits, standards and values than I have been interacting with to this
point, and meeting people in different interpersonal contexts.

						Pills		Australia
Piracetam				  Y			   Y
Aniracetam
Phenylpiracetam

Wayto in an app

reply
ask

Ask For An Answer

Ask The Question, Answer The Question


Can you describe to me, in your words, what you think I have said?

What aspects of my comments do you agree with?

What aspects of my comments do you disagree with?

Tell Me What You Think


Inviting Thoughts




A topic is a combination of a dialog and raised questions.



An 'expression' is a topic or a reply to a question.


A topic can be launched. A topic does not contain criticisms of previous e


1. You can only respond to questions.






