chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1197328 [1/2] - in /chemistry/playground/moreq2010: moreq-tools/ moreq2010/src/main/java/org/apache/chemistry/moreq2010/util/
Date Thu, 03 Nov 2011 22:25:24 GMT
Author: jens
Date: Thu Nov  3 22:25:24 2011
New Revision: 1197328

URL: http://svn.apache.org/viewvc?rev=1197328&view=rev
Log:
Improve MoReq type definitions

Modified:
    chemistry/playground/moreq2010/moreq-tools/GenFuncDef.groovy
    chemistry/playground/moreq2010/moreq-tools/PropertyDefinitions.txt
    chemistry/playground/moreq2010/moreq-tools/TypeDefinitions.txt
    chemistry/playground/moreq2010/moreq-tools/TypesXmlGenerator.groovy
    chemistry/playground/moreq2010/moreq-tools/types.xml
    chemistry/playground/moreq2010/moreq2010/src/main/java/org/apache/chemistry/moreq2010/util/CmisClient.java

Modified: chemistry/playground/moreq2010/moreq-tools/GenFuncDef.groovy
URL: http://svn.apache.org/viewvc/chemistry/playground/moreq2010/moreq-tools/GenFuncDef.groovy?rev=1197328&r1=1197327&r2=1197328&view=diff
==============================================================================
--- chemistry/playground/moreq2010/moreq-tools/GenFuncDef.groovy (original)
+++ chemistry/playground/moreq2010/moreq-tools/GenFuncDef.groovy Thu Nov  3 22:25:24 2011
@@ -14,14 +14,14 @@ def readPropertiesFile(inputFile) {    
             while (!(lineTitle = inFile.readLine()).startsWith("Title")) {
             }
             println("    name " + lineTitle)
-              lineTitle = lineTitle.substring(6)
-              lineTitle = lineTitle.trim()
-              println("    name " + lineTitle)
-              con = lineTitle.replaceAll(" – ", "_").replaceAll(" ", "_").replaceAll("/",
"_").toUpperCase() + "_FUNC_ID"
-              enumLine = enumLine + con + ", "
-              outFileConst.println("public static final String " + con + " = \"" + lineId
+"\";")
-              outFileJava.println("put(Constants." + con + ", new FunctionDescription(\""
+ lineTitle + "\", Constants." + con + ", FunctionEnum." + con + "));")
-              outFileJava.println("put(Constants." + con + ", new FunctionDescription(\""
+ lineTitle + "\", Constants." + con + ", FunctionEnum." + con + "));")
+            lineTitle = lineTitle.substring(6)
+            lineTitle = lineTitle.trim()
+            println("    name " + lineTitle)
+            con = lineTitle.replaceAll(" – ", "_").replaceAll(" ", "_").replaceAll("/",
"_").toUpperCase() + "_FUNC_ID"
+            enumLine = enumLine + con + ", "
+            outFileConst.println("public static final String " + con + " = \"" + lineId +"\";")
+            outFileJava.println("put(Constants." + con + ", new FunctionDescription(\"" +
lineTitle + "\", Constants." + con + ", FunctionEnum." + con + "));")
+            outFileJava.println("put(Constants." + con + ", new FunctionDescription(\"" +
lineTitle + "\", Constants." + con + ", FunctionEnum." + con + "));")
        }
     }
     enumLine = enumLine + "}; "

Modified: chemistry/playground/moreq2010/moreq-tools/PropertyDefinitions.txt
URL: http://svn.apache.org/viewvc/chemistry/playground/moreq2010/moreq-tools/PropertyDefinitions.txt?rev=1197328&r1=1197327&r2=1197328&view=diff
==============================================================================
--- chemistry/playground/moreq2010/moreq-tools/PropertyDefinitions.txt (original)
+++ chemistry/playground/moreq2010/moreq-tools/PropertyDefinitions.txt Thu Nov  3 22:25:24
2011
@@ -3,538 +3,652 @@ datetime
 Aggregated Timestamp 
 05fd550b-ff6c-4fd0-b1f6-b27df905076f
 System set date and time when the child aggregation or record was created in, or added to,
its current aggregation 
+single, oncreate, optional
 
 id
 Applied Template Identifier  
 65a2d42c-dfe3-4fbf-a894-8db373ac2d45
 Template that was applied when the function was performed to add contextual metadata elements
to entities
+multi, oncreate, optional
 
 boolean
 Automatic Deletion Flag  
 4a9c44df-a9ac-4b06-8c87-d5940cd76046  
 Flag that indicates whether the content of the component can be automatically deleted by
the system when its record is destroyed 
+single, oncreate, required
 
 id
 Class Identifier 
 7d935531-e7e6-4a28-a474-431c68522cfa
 The classification of the entity, used by child aggregations and records to override the
class they inherit from their parent aggregation 
+single, readwrite, optional
 
 datetime
 Closed Timestamp  
 b0194c04-bd20-4582-af83-5da3d55c258a
 System set date and time when the aggregation was closed 
+single, oncreate, optional
 
 integer
 Confirmation Period Duration Number  
 4d99feb-2654-4c09-accd-a00417f78596
 Number of days or weeks allowed for confirming the disposal of the record 
+single, readwrite, optional
 
 string enum: 1=DAYS; 2=WEEKS;
 Confirmation Period Interval Code  
 30cd2d6f-9957-4904-b0a7-ade8f181cb68
 Unit of measurement of time as either days or weeks 
+single, readwrite, optional
 
 id
 Contextual Metadata Element Definition Identifier   
 1b4ee523-d46d-4614-a3a6-edad609f46ab
 Contextual metadata element included in a template that can be applied to entities as additional
contextual metadata 
+multi, readwrite, optional
 
 datetime
 Created Timestamp 
 466a4378-db7d-4b2c-b35e-696722f58c6b
 System set date and time when the entity was created 
+single, oncreate, required
 
 string (xml)
 Datatype
 e7f28bcc-0857-4361-b6e4-1bebffdd7578
 XML datatype definition giving the precise format required for the value of a system or contextual
metadata element 
+single, readwrite, required
 
 id
 Default Disposal Schedule Identifier 
 b5a0997f-3285-4606-a20b-1d938b1415c7 
 The disposal schedule for the class which is inherited by default by records with this classification

+single, readwrite, required
 
 id
 Default Language Identifier 
 ad13c98d-6ff4-4e0d-9ccd-a7d7238591f8
 The default language for a service or a metadata element definition, used as a default by
textual metadata elements (only)
+single, oncreate, optional
 
 string (?dynamic?)
 Default Value 
 ae0b3b8e-f6fa-49e7-b411-d03bda7013f4
 The default value for a metadata element when it is first applied to an entity 
+multi, readwrite, optional
 
 id
 Deleted Event Function Definition Identifier 
 eec57404-3539-4c24-b3f5-bf55f1a8f99e
 Function or functions indicating the type or types of event that have been deleted from the
event history of the entity 
+multi, oncreate, optional
 
 id
 Deleted Metadata Element Definition Identifier 
 bb2a7c80-a367-4734-9676-a2bb2fab2e26 
 Metadata element definition or definitions indicating the type or types  of metadata elements
that have been deleted from the entity
+multi, oncreate, optional
 
 string
 Description  
 c7e6aad5-27dd-47a4-97a6-ab541b47b37f
 Description of the entity
+single, readwrite, optional
 
 datetime
 Destroyed Timestamp 
 dbcf3076-c193-41fb-8043-635c8bc299b2
 System set date and time when the entity was destroyed 
+single, oncreate, optional
 
 string enum: 0=RETAIN ON HOLD; 1=RETAIN PERMANENTLY; 2=REVIEW; 3=TRANSFER; 4=DESTROY;
 Disposal Action Code 
 83de3514-3888-4eff-88bd-d58cfb043cc7
 Code describing the action to be taken on disposal of the record 
+single, readwrite, required
 
 datetime (date)
 Disposal Action Due Date 
 92e083e8-fe2b-4594-a287-685fad30c2b7
 The calculated date that the record is due for disposal 
+single, readwrite, optional
 
 datetime (date)
 Disposal Confirmation Due Date 
 39971796-dfd3-47b4-b36c-b2d5d0d770c7
 The calculated date by which confirmation of carrying out the disposal action is due 
+single, readwrite, optional
 
 datetime (date)
 Disposal Overdue Alert Timestamp 
 df4d965b-6e65-4131-b58b-0840c0bfd69d
 System set date and time when an alert was sent because the record was overdue for disposal
+single, oncreate, optional
 
 id
 Disposal Schedule Identifier 
 aee900e0-bb8b-4b9b-b714-738ed3bc14a3
 The disposal schedule for the record when the inherited disposal schedule from the record's
classification has been overridden
+single, readwrite, required
 	
 id
 Duplicate Identifier 
 b887bda3-f34d-4ddd-8069-630567d949d2 
 Reference to another entity that has been created by duplicating the record, component or
event, and is an exact copy up to the event of duplication, with an identical provenance 
+multi, oncreate, optional
 
 id
 Entity Reference Type Identifier 
 04ad1126-6673-4a73-a0c3-34871bb49905
 Restricts the values of a metadata element that refers to another entity to entities of a
particular type, or types 
+multi, readwrite, optional
 
 string
 Event Comment 
 1f82121e-dcb9-475b-814e-6719031ca30b
 Comment giving additional detailed information about an event, or the reason for an event
+single, oncreate, optional
 
 id
 Event Function Identifier 
 ea21de8f-1a0c-4bc5-939a-dc06dcff44c1 
 The function that was performed to generate the event 
+single, oncreate, required
 
 datetime
 Event Timestamp 
 b51c08ed-d332-4bb5-974c-7cee3cb5c753
 System set date and time for when a function was performed 
+single, oncreate, required
 
 datetime
 Export Commencing Timestamp 
 a252f442-6ab5-4325-94e5-00adaf908614
 System set date and time for when an export commenced
+multi, oncreate, optional
 
 datetime
 Export Completed Timestamp 
 4220eaa9-fc78-4e33-ae94-0394824d4616
 System set date and time for when an export completed 
+single, oncreate, optional
 
 id
 Export Identifier 
 885f5945-e724-466b-a84f-6ae3c603768b
 The system generated identifier for an individual export operation, used in the event history
of all entities that are successfully exported 
+single, oncreate, optional
 
 boolean
 Exported In Full Flag 
 633bd60f-50df-4709-ab22-32cf63790598
 Flag indicating whether an entity was exported in full or as a placeholder 
+single, oncreate, optional
 
 datetime
 First Used Timestamp 
 a937d097-856d-472f-836b-a2fae1811550
 System generated date and time indicating when an entity was first used generally taken as
the last time it can be modified or deleted without formally destroying it
+single, oncreate, optional
 
 id
 Function Definition Identifier 
 55fcb00b-1d7a-4b6b-899c-3a9a9762dbf8
 A function that is included in a role to allow users and groups assigned that role to perform
the function 
+multi, readwrite, optional
 
 boolean
 Generate Event Flag 
 50a7cd32-ed4f-47b6-bcbb-bc1112e06eb9
 Flag indicating whether an event should be generated by the system, when a function is performed

+single, readwrite, required
 
 id
 Granted Role Identifier 
 1f50d91a-dac6-42ec-bb6e-d5dd5c0f4770
 Indicator in an event of a role that was awarded to the participating user or group 
+multi, oncreate, optional
 
 id
 Group Identifier 
 1d32086d-3855-4815-a294-f7d1977ce03a
 Group which the user is a member of
+multi, readwrite, optional
 
 id
 Held Aggregation Identifier 
 93856ba9-a0dd-4cfa-b8a9-edf031774076
 Aggregation which is associated with a disposal hold and as a result no records in the aggregation,
or its descendant aggregations, may be destroyed 
+multi, readwrite, optional
 
 id
 Held Class Identifier 
 29abe491-0c58-4816-97c2-8f60be62d9fa
 Class which is associated with a disposal hold and as a result no records which have been
classified with the class, may be destroyed 
+multi, readwrite, optional
 
 id
 Held Record Identifier 
 374957cb-23ce-4987-81e9-5ccc00cfe9e3
 Record which has been associated with a disposal hold and, as a result, may not be destroyed

+multi, readwrite, optional
 
 datetime
 Historical Date Time 
 8274fbf7-3145-4c23-a748-6c4682d6b7ed
 Date and time for which a report was run to obtain historical information about a user, group
or role 
+single, oncreate, optional
 
 id
 Implements Module Identifier 
 92bddc26-aae5-493d-9278-94fbb00a2e44
 Compliance indicator providing assurance that the system implements the identified module
of MoReq2010
+multi, oncreate, optional
 
 id
 Implements Service Identifier 
 3960b7a5-624e-41e1-9976-248895b9352e 
 Compliance indicator providing assurance that the system implements the core service of MoReq2010
that is identified 
+multi, oncreate, required
 
 boolean
 Include Inherited Roles Flag 
 4ad73ab1-4df8-40b7-b863-f8d63a584037
 Flag indicating whether administrative and/or non-administrative roles are inherited by an
access control list 
+single, readwrite, required
 
 boolean
 Is Administrative Role Flag 
 d2e3b3da-a109-4ec0-ab26-5e6f53ad3673
 Flag indicating that a role is an administrative role and will, as a result, always be inherited

+single, readwrite, required
 
 boolean
 Is Entity Reference Flag 
 b52c2bbf-f27b-41c9-8885-3d906b4bd275
 Flag indicating whether a metadata element contains a reference to an entity or a different
datatype value 
+single, readwrite, required
 
 boolean
 Is Modifiable Flag 
 7ff6a66e-b137-417c-aab0-aa327a0b119b
 Flag indicating whether a metadata element is modifiable by users 
+single, readwrite, required
 
 boolean
 Is Textual Flag 
 7e5ec95d-423c-4ac9-ac94-a835d3713e91
 Flag indicating whether a text based metadata element should be accompanied by a language
identifier 
+single, readwrite, optional
 
 datetime
 Last Addition Timestamp  
 71a6cf2d-c039-4b27-bd31-dcba471081ac
 System set date and time indicating when the most recent record or child aggregation was
added to the parent aggregation 
+single, oncreate, optional
 
 string
 Last Review Comment 
 7036ec2e-644a-4309-9690-178690a6bc4f
 Comment made by the user who last reviewed the record explaining the disposal decision made
by that review
+single, oncreate, optional
 
 datetime
 Last Reviewed Timestamp 
 dbbeb8a5-b019-46e1-983e-5f728f1dcc3a
 System set date and time of when the last review was completed
+single, oncreate, optional
 
 string
 Mandate 
 a6986d60-1257-4046-bafe-fef680d5dc6c
 Textual reference to a legal or other instrument that provides the authority for a disposal
schedule or a disposal hold 
+single, readwrite, optional
 
 integer
 Max Levels Of Aggregation 
 d0da657f-9345-4965-b2a8-17a0c300a896 
 The maximum number of levels of aggregation allowed below a root aggregation 
+single, readwrite, optional
 
 integer
 Max Occurs 
 4a69e008-50df-4506-b9a7-d6279b0c21d5
 The maximum number of values that can be assigned to a metadata element for a single entity

+single, readwrite, optional
 
 integer
 MCRS Certification Identifier 
 bf8efec0-e182-47ec-bdfa-a83a24c602c8
 Compliance indicator giving the DLM Forum issued identifier for a certificate of compliance
against MoReq2010
+multi, oncreate, optional
 
 id
 Metadata Element Definition Identifier 
 8afb23cd-a741-4be0-97fd-f76aef411503
 Reference in an event to the metadata element of an entity that was changed when a function
was performed 
+single, oncreate, required
 
 integer
 Min Occurs 
 6e182700-4679-4ebf-938a-ef110828cba6
 The minimum number of values that can be assigned to a metadata element for a single entity
+single, readwrite, optional
 
 string (?dynamic?)
 New Value 
 d3d4f2ae-43f0-4567-99ae-ddd58e6cf2dd
 The value of a metadata element after a function was performed 
+single, oncreate, optional
 
 string
 Overdue Disposal Action Code
 0027dfb-2e3d-4456-b341-54737e83243c
 The disposal action that was overdue on the record at the time an alert was raised 
+single, oncreate, optional
 
 datetime
 Overdue Disposal Action Due Date 
 75491c12-0c90-4f99-85ad-b583df082b45
 The due date that was set for the disposal action that was overdue on a record at the time
an alert was raised
+single, oncreate, optional
 
 datetime
 Overdue Disposal Confirmation Due Date 
 1ac9514a-7e0e-4fd8-a543-4956c22f4089
 The due date that was set for confirmation of a disposal action that was overdue, causing
an alert to be raised
+single, oncreate, optional
 
 datetime
 Originated Date Time 
 50864023-dc92-4b1e-8e8a-66c284d40942
 The date and time of origin of a record or other entity which may vary from the creation
date of the entity in the system  
+single, readwrite, required
 
 string
 Owner Information 
 ae99f4f8-3edf-4874-aea2-ea50fa7a73f9
 Information provided by the owner of a system that may be used to identify the originating
system when entities are later exported to another system 
+single, readwrite, optional
 
 id
 Parent Aggregation Identifier 
 a74597a5-190a-4874-a350-083ac030aa55
 The parent aggregation for a child aggregation or record 
+multi, oncreate, optional
 
 id
 Participating Aggregation Identifier 
 daafbb4c-3183-40bd-9eff-759e88c725fc
 Aggregation that is a participating entity in the function that was performed that generated
an event 
+multi, oncreate, optional
 
 id
 Participating Class Identifier 
 f046bdfa-5ef5-4217-9c4f-e24d0f15ea9a
 Class that is a participating entity in the function that was performed that generated an
event
+multi, oncreate, optional
 
 id
 Participating Component Identifier 
 0686271b-b41f-40db-be27-9e6626b9ee54 
 Component that is a participating entity in the function that was performed that generated
an event 
+multi, oncreate, optional
 
 id
 Participating Disposal Hold Identifier 
 f9553093-24cb-4bd4-920e-c1341572b6f5
 Disposal hold that is a participating entity in the function that was performed that generated
an event 
+multi, oncreate, optional
 
 id
 Participating Disposal Schedule Identifier 
 dfaf8f03-b7eb-49c0-b889-2c9b61ce1e3c
 Disposal schedule that is a participating entity in the function that was performed that
generated an event
+multi, oncreate, optional
 
 id
 Participating Duplicate Identifier 
 51afb74e-8729-46be-aac2-761c56e1b7d1
 Duplicate entity that was created by duplicating a record or a component 
+multi, oncreate, optional
 
 id
 Participating Entity Type Identifier 
 7acf7c1d-d537-4548-a24d-ce92cf7cd68b
 Entity type that is a participating entity in the function that was performed that generated
an event 
+multi, oncreate, optional
 
 id
 Participating Event Identifier 
 b41e6d9c-c19d-41c1-8969-3090306b987f
 Event that is a participating entity in the function that was performed that generated an
event
+multi, oncreate, optional
 
 id
 Participating Function Definition Identifier 
 56ee4c6d-ad65-468f-9de2-b9d5cf8b0557
 Function definition that is a participating entity in the function that was performed that
generated an event 
+multi, oncreate, optional
 
 id
 Participating Group Identifier 
 a6bf28b7-334b-465f-837b-34d8d09c7f2d
 Group that is a participating entity in the function that was performed that generated an
event
+multi, oncreate, optional
 
 id
 Participating Metadata Element Definition Identifier 
 bbbef444-bf3c-49ba-8560-0b5dfaeb8a88
 Metadata element definition that is a participating entity in the function that was performed
that generated an event 
+multi, oncreate, optional
 
 id
 Participating New Parent Identifier 
 236e52dd-b117-4b6a-b60b-286d5dc5acd0
 The new parent for a child entity that has been created or moved into it 
+single, oncreate, optional
 
 id
 Participating Previous Parent Identifier 
 736b0697-2078-4e50-b740-a52d4f16f18d
 Parent entity from which a child entity was moved 
+single, oncreate, optional
 
 id
 Participating Record Identifier 
 74f1568c-bde8-45aa-895a-ac600c2de1c7
 Record that is a participating entity in the function that was performed that generated an
event
+multi, oncreate, optional
 
 id
 Participating Role Identifier 
 a55947ec-b23e-413a-a840-21566aae0b4b
 Role that is a participating entity in the function that was performed that generated an
event 
+multi, oncreate, optional
 
 id
 Participating Service Identifier 
 a5d104c2-e343-4c2b-82a3-8a30046e0e07
 Service that is a participating entity in the function that was performed that generated
an event 
+multi, oncreate, optional
 
 id
 Participating Template Identifier 
 01afa124-8a2b-422b-888a-db7829564b4f
 Template that is a participating entity in the function that was performed that generated
an event 
+multi, oncreate, optional
 
 id
 Participating User Identifier 
 35d1c4e2-4821-4e23-add8-fa14b9e38ca5
 User that is a participating entity in the function that was performed that generated an
event
+multi, oncreate, optional
 
 id
 Participating User Or Group Identifier
 2c159083-3b5b-4119-8bbd-ae39b2577ca2
 User or group that is a participating entity in an event generated by granting or rescinding
roles
+single, oncreate, optional
 
 id
 Performed By User Identifier 
 ee568750-32b5-4441-b67b-d01ae9df5820
 The user that performed the function that generated the event 
+single, oncreate, optional
 
 integer
 Presentation Order 
 92c9459d-aa29-4784-8646-6fc663d08c87
 A value used for determining the order in which items, such as metadata elements, should
be logically presented, particularly by systems that are not the originating system 
+single, readwrite, required
 
 string (?dynamic)
 Previous Value 
 ce3ec75a-7193-4fd2-9811-1c70419c7185
 The value of a metadata element prior to a function being performed 
+single, oncreate, optional
 
 id
 Record Identifier 
 87daefe3-b429-4b7d-96ea-5dc9eabd8f56
 The record that the component belongs to 
+single, readwrite, required
 
 id
 Rescinded Role Identifier 
 6c20a22d-0ca8-4dbb-a932-c950a1fce1e5
 Indicator in an event of a role that was rescinded from the participating user or group 
+multi, oncreate, optional
 
 boolean
 Retain On Destruction Flag 
 222811d2-8c74-4f47-ae3f-c68698f55e2c
 Flag that indicates whether an event generated by performing a particular function, or a
metadata element belonging to a particular metadata element definition, should be deleted
when the entity it belongs to is destroyed 
+single, readwrite, required
 
 integer
 Retention Period Duration Number 
 1cf79293-5818-4141-876e-761448ae465b
 Number of days, weeks, months or years specified for retaining a record after the retention
period is triggered 
+single, readwrite, optional
 
 string enum: 0=NO RETENTION PERIOD; 1=DAYS; 2=WEEKS; 3=MONTHS; 4=YEARS;
 Retention Period Interval Code 
 47aa0949-37a9-4f4f-ab0e-f33b0dd7d5fb
 Unit of measurement of time as either days, weeks, months or years 
+single, readwrite, optional
 
 string enum: 0=NO OFFSET;  1=START OF NEXT MONTH;  2=START OF NEXT QUARTER;  3=START OF SPECIFIED
MONTH;
 Retention Period Offset Code 
 3882b1a6-48d7-45a2-a539-5871856a1b95
 Offset for the disposal of records if they fall due for disposal in a particular period 
+multi, readwrite, optional
 
 string enum: 1=JANUARY;  2=FEBRUARY;  3=MARCH;  4=APRIL;  5=MAY;  6=JUNE;  7=JULY;  8=AUGUST;
 9=SEPTEMBER;  10=OCTOBER;  11=NOVEMBER;  12=DECEMBER;
 Retention Period Offset Month Code 
 557d941f-4be7-4dad-8113-39757547530a
 Month to offset the disposal of records to if they fall due for disposal in a particular
period
+single, readwrite, optional
 
 datetime (date)
 Retention Start Date 
 199494ea-0ca4-47ef-883a-4bcc5ccdcc02
 System generated date calculated from the record’s disposal schedule indicating the
start of its retention period 
+single, readwrite, optional
 
 string enum: 0=FROM NOW; 1=FROM DATE OF LAST REVIEW; 2=FROM RECORD ORIGINATED DATE;  3=FROM
AGGREGATION ORIGINATED DATE;  4=FROM DATE ADDED TO AGGREGATION;  5=FROM DATE OF LAST ADDITION
TO AGGREGATION; 6=FROM AGGREGATION CLOSED DATE;  7=FROM RECORD METADATA DATE;  8=FROM AGGREGATION
METADATA DATE;
 Retention Trigger Code 
 30891ecb-5b36-453d-baf0-9aaa19eba4a6
 The specific conditions required for triggering the start of the retention period for a record
+single, readwrite, optional
 
 id
 Retention Trigger Element Identifier 
 72fc68f0-5437-4d8e-a719-b4c4ecd1b649
 The metadata element associated with a record, or its parent aggregation, which contains
the trigger date for a record's retention period
+multi, readwrite, optional
 
 id
 Role Identifier 
 0394b604-5865-42e2-ab23-2e983ecdf454
 Role included in an access control entry so that it is granted to a user or a group 
+multi, readwrite, required
 
 string
 Scope Notes 
 c5c12c32-d263-44a3-91ae-26f80cb75a3c
 Guidance to authorised users indicating how best to apply a particular entity and stating
any organisational policies or constraints on its use
+single, readwrite, optional
 
 string
 Search Query 
 e7f82f8c-80de-4cb5-a28e-6761abca27b0
 Description in an event of the search query used to search for, or report on, entities in
the system
+single, oncreate, optional
 
 string
 Supplier Information 
 8276d84b-a3fe-4b49-82a4-a8a58de14a7e
 Information provided by the supplier of a system that may be used to identify the type of
the originating system, including its particular hardware and software versions and configuration,
especially when entities are exported to another system 
+single, oncreate, optional
 
 id
 System Identifier 
 01806231-2c8c-4482-9bb1-8e47e747784f
 Universally unique identifier for an entity that is generated automatically by the system
and stays with the entity forever
+single, oncreate, required
 
 id
 Template Class Identifier  
 ee03c826-39ee-4cdf-b2c7-6cc0c2782967
 Class associated with the template such that when new entities, such as aggregations or records,
are created with that classification, the template will be automatically applied to them by
the system, giving them additional contextual metadata elements 
+multi, readwrite, optional
 
 id
 Template Entity Type Identifier 
 caaaf2e6-2ed4-4a53-adba-9363385127ac
 Specifies the types of entities to which the template may be applied 
+multi, readwrite, required
 
 id
 Template Service Identifier 
 2dd54e70-5b60-4d5a-89be-5f967735d515
 Service associated with the template such that when new entities are created in that service,
the template will be automatically applied to them by the system, giving them additional contextual
metadata elements
+multi, readwrite, optional
 
 string
 Title 
 077fc367-48ba-44a8-8afb-012d05ed1a16
 The identifying name or title of the entity 
+single, readwrite, required
 
 integer
 Total Entities 
 2131929b-7c06-471d-a96c-19b3560069d8
 The total number of entities returned by a search or included in a report 
+single, oncreate, optiona
 
 datetime
 Transferred Timestamp 
 09c440b3-b040-465f-a79f-9dae3243cce6
 System set date and time indicating when the transfer of the record was confirmed
+single, oncreate, optiona
 
 id
 User Or Group Identifier 
 2b1820f7-97ef-4010-8de8-f0745e0855c0 
 Identifier for a user, or for a group, that is granted one or more roles in an access control
entry 
+single, readwrite, required
 
 string
 Metadata Change Entry
 7e32c9c9-e00a-4dbe-8c5f-c05421e632c2 
 Compound metadata structure used by events to track the changes made to metadata when functions
are performed
+multi, readwrite, optional
+
+id
+Hierarchical Parent Class Identifier
+caa1ff78-8cf9-40ac-9e2f-6ca75b87637e
+The parent class for a hierarchical class
+single, readwrite, optional

Modified: chemistry/playground/moreq2010/moreq-tools/TypeDefinitions.txt
URL: http://svn.apache.org/viewvc/chemistry/playground/moreq2010/moreq-tools/TypeDefinitions.txt?rev=1197328&r1=1197327&r2=1197328&view=diff
==============================================================================
--- chemistry/playground/moreq2010/moreq-tools/TypeDefinitions.txt (original)
+++ chemistry/playground/moreq2010/moreq-tools/TypeDefinitions.txt Thu Nov  3 22:25:24 2011
@@ -272,4 +272,10 @@ Entity representing a user of the MCRS
     Group Identifier
     Title
     Description
-    Destroyed Timestamp
\ No newline at end of file
+    Destroyed Timestamp
+
+document
+8e98092d-e20b-48ea-b3d6-ca75375590ee : 5a5240e2-939b-43dd-a50b-2d3284d81735
+Hierarchical Classification
+Definition of a hierarchical class as a sub-type of class used in hierarchically structured
classification schemes
+    Hierarchical Parent Class Identifier

Modified: chemistry/playground/moreq2010/moreq-tools/TypesXmlGenerator.groovy
URL: http://svn.apache.org/viewvc/chemistry/playground/moreq2010/moreq-tools/TypesXmlGenerator.groovy?rev=1197328&r1=1197327&r2=1197328&view=diff
==============================================================================
--- chemistry/playground/moreq2010/moreq-tools/TypesXmlGenerator.groovy (original)
+++ chemistry/playground/moreq2010/moreq-tools/TypesXmlGenerator.groovy Thu Nov  3 22:25:24
2011
@@ -20,7 +20,7 @@
 ////////////////////////////////////////////////////////////////////////
 // 
 // Groovy script to generate a types.xml file from a text file in 
-// a simplified syntax
+// a simplified syntax70
 // This script expects to files names TypeDefinitions.txt and 
 // PropertyDefinitions.txt in the same directory and generates
 // file types.xml that can be imported into the InMemoryServer
@@ -38,11 +38,34 @@ def genCommons1(name, uuid, descr) {
 
 //////////////////////////////////////////////////////////////////
 
-def genCommons2(choices) {
-	outFile.println("        <cardinality>single</cardinality>")
-	outFile.println("        <updatability>readwrite</updatability>")
+def genCommons2(choices, cardinality, updatability, required) {
+    def cardinalityStr 
+    def updatabilityStr
+    def requiredStr
+    
+    if (updatability.toLowerCase().startsWith("readonly"))  
+        updatabilityStr = "readonly"
+    else if (updatability.toLowerCase().startsWith("oncreate"))  
+        updatabilityStr = "oncreate"
+    else if (updatability.toLowerCase().startsWith("whencheckedout"))  
+        updatabilityStr = "whencheckedout"
+    else
+        updatabilityStr = "readwrite"
+    
+    if (required.toLowerCase().startsWith("true"))
+        requiredStr = "true"
+    else
+        requiredStr = "false"
+
+        if (cardinality.toLowerCase().startsWith("multi"))
+        cardinalityStr = "multi"
+    else
+        cardinalityStr = "single"
+    
+	outFile.println("        <cardinality>" +  cardinalityStr + "</cardinality>")
+	outFile.println("        <updatability>" + updatabilityStr + "</updatability>")
 	outFile.println("        <inherited>false</inherited>")
-	outFile.println("        <required>false</required>")
+	outFile.println("        <required>" + requiredStr + "</required>")
 	outFile.println("        <queryable>false</queryable>")
 	outFile.println("        <orderable>false</orderable>")
     outFile.println("        <openChoice>false</openChoice>")
@@ -52,51 +75,51 @@ def genCommons2(choices) {
 
 //////////////////////////////////////////////////////////////////
 
-def genBoolean (name, uuid, descr, choices) {
+def genBoolean (name, uuid, descr, choices, cardinality, updatability, required) {
 	outFile.println("    <propertyBooleanDefinition>")
 	genCommons1(name, uuid, descr)
 	outFile.println("        <propertyType>boolean</propertyType>")
-	genCommons2(choices)
+	genCommons2(choices, cardinality, updatability, required)
 	outFile.println("    </propertyBooleanDefinition>")
 }
 
 //////////////////////////////////////////////////////////////////
 
-def genDate (name, uuid, descr, choices) {
+def genDate (name, uuid, descr, choices, cardinality, updatability, required) {
 	outFile.println("    <propertyDateTimeDefinition>")
 	genCommons1(name, uuid, descr)
 	outFile.println("        <propertyType>datetime</propertyType>")
-	genCommons2(choices)
+	genCommons2(choices, cardinality, updatability, required)
 	outFile.println("    </propertyDateTimeDefinition>")
 }
 
 //////////////////////////////////////////////////////////////////
 
-def genId (name, uuid, descr, choices) {
+def genId (name, uuid, descr, choices, cardinality, updatability, required) {
 	outFile.println("    <propertyIdDefinition>")
 	genCommons1(name, uuid, descr)
 	outFile.println("        <propertyType>id</propertyType>")
-	genCommons2(choices)
+	genCommons2(choices, cardinality, updatability, required)
 	outFile.println("    </propertyIdDefinition>")
 }
  
-//////////////////////////////////////////////////////////////////
+45//////////////////////////////////////////////////////////////////
 
-def genInteger (name, uuid, descr, choices) {
+def genInteger (name, uuid, descr, choices, cardinality, updatability, required) {
 	outFile.println("    <propertyIntegerDefinition>")
 	genCommons1(name, uuid, descr)
 	outFile.println("        <propertyType>integer</propertyType>")
-	genCommons2(choices)
+	genCommons2(choices, cardinality, updatability, required)
 	outFile.println("    </propertyIntegerDefinition>")
 }
 
 //////////////////////////////////////////////////////////////////
 
-def genString (name, uuid, descr, choices) {
+def genString (name, uuid, descr, choices, cardinality, updatability, required) {
 	outFile.println("    <propertyStringDefinition>")
 	genCommons1(name, uuid, descr)
 	outFile.println("        <propertyType>string</propertyType>")
-	genCommons2(choices)
+	genCommons2(choices, cardinality, updatability, required)
 	outFile.println("    </propertyStringDefinition>")
 }
 
@@ -116,27 +139,26 @@ def genChoices (choices) {
 
 //////////////////////////////////////////////////////////////////
 
-def genTypeDef (name, uuid, descr, typeKind, props) {
+def genTypeDef (name, uuid, descr, typeKind, parentType, props) {
 
     String xsiType
-    String parentType
     String baseId
     
     switch (typeKind) {
         case "document":
           xsiType = "cmisTypeDocumentDefinitionType"
-          parentType = "cmis:document"
           baseId = "cmis:document"
           break;
         case "folder":
           xsiType = "cmisTypeFolderDefinitionType"
-          parentType = "cmis:folder"
           baseId = "cmis:folder"
           break;
         default:
            println("Error illegal type + " + typeKind)
     }
-    
+    if (parentType == null)
+      parentType = baseId
+      
 	outFile.println("<cmisra:type xsi:type=\"" + xsiType + "\">")
     outFile.println("    <id>" + uuid + "</id>")
 	outFile.println("    <localName>" + name + "</localName>")
@@ -161,7 +183,8 @@ def genTypeDef (name, uuid, descr, typeK
         props.each { 
             def propDef = propDefsMap.get(it)
             if (propDef != null)
-                genPropertyDef (propDef.type, propDef.name, propDef.id, propDef.descr, propDef.choices)
+                genPropertyDef (propDef.type, propDef.name, propDef.id, propDef.descr, propDef.choices,

+                   propDef.cardinality, propDef.updatability, propDef.required)
              else
                 println ("Error: unknown property definition " + it + " in type definition
" + name)
         }
@@ -172,23 +195,23 @@ def genTypeDef (name, uuid, descr, typeK
 
 //////////////////////////////////////////////////////////////////
 
-def genPropertyDef(type, name, uuid, descr, choices) {
+def genPropertyDef(type, name, uuid, descr, choices, cardinality, updatability, required)
{
         
     switch (type) {
      case "boolean":
-       genBoolean(name, uuid, descr, choices)
+       genBoolean(name, uuid, descr, choices, cardinality, updatability, required)
        break
      case "datetime":
-       genDate(name, uuid, descr, choices)
+       genDate(name, uuid, descr, choices, cardinality, updatability, required)
        break
      case "id":
-       genId(name, uuid, descr, choices)
+       genId(name, uuid, descr, choices, cardinality, updatability, required)
        break
      case "integer":
-       genInteger(name, uuid, descr, choices)
+       genInteger(name, uuid, descr, choices, cardinality, updatability, required)
        break
      case "string":
-       genString(name, uuid, descr, choices)
+       genString(name, uuid, descr, choices, cardinality, updatability, required)
        break
      default:
        println("!!!Error: unknown type " + type);
@@ -207,15 +230,23 @@ def readPropertiesFile(inputFile) {    
        def name = inFile.readLine().trim()
        def uuid = inFile.readLine().trim()
        def descr = inFile.readLine().trim()
+       def attrs = inFile.readLine().trim()
        def choices = null;
+       def cardinality, updatability, required
        
        println("Processing property: " + name)
-       
+
        type = typeLine.tokenize().get(0)
+       def arr = attrs.split(",")
+       cardinality = arr.length > 0 ? arr[0].trim() : null
+       updatability = arr.length > 1 ? arr[1].trim() : null
+       required = arr.length > 2 ? arr[2].trim() : null
+       
        if (typeLine.contains("enum:")) {
            choices = typeLine[typeLine.indexOf("enum:")+ 5..typeLine.length()-1].tokenize(";")
        }
-       propDefMap.put(name, [name:name, id:uuid, descr:descr, type:type, choices:choices])
+       propDefMap.put(name, [name:name, id:uuid, descr:descr, type:type, choices:choices,
cardinality:cardinality,
+               updatability:updatability, required:required])
     }
     
     return propDefMap;  
@@ -230,9 +261,13 @@ def readTypeDefinitions(inputFile) {
     def line = inReader.readLine()
     while (line != null) {   
        def kind = inReader.readLine().trim()
-       def uuid = inReader.readLine().trim()
+       def idLine = inReader.readLine().trim()
        def name = inReader.readLine().trim()
        def descr = inReader.readLine().trim()
+       def arr = idLine.split(":")
+       def id = arr.length>0 ? arr[0].trim() : null
+       def superType = arr.length>1 ? arr[1].trim() : null
+
        def propDefs = []
        def readProperties = true;
        while (readProperties) {
@@ -243,7 +278,7 @@ def readTypeDefinitions(inputFile) {
               readProperties = false;
        }
        println("Reading type def " + name)
-       typeDefMap.put(name, [name: name, id: uuid, kind: kind, descr: descr, props: propDefs])
+       typeDefMap.put(name, [name: name, id: id, kind: kind, super: superType, descr: descr,
props: propDefs])
     }
     return typeDefMap
 }
@@ -257,7 +292,7 @@ def writeTypes(typeDefsMap) {
     outFile.println("     xmlns:chem=\"http://chemistry.apache.org/schemas/TypeDefnitions\">")
     for ( e in typeDefsMap   ) {
         println("generating type" +  e.value.name)  
-        genTypeDef (e.value.name, e.value.id, e.value.descr, e.value.kind, e.value.props)

+        genTypeDef (e.value.name, e.value.id, e.value.descr, e.value.kind, e.value.super,
e.value.props) 
     }
     outFile.println("</chem:typeDefinitions>")
 }
@@ -267,7 +302,9 @@ def writeTypes(typeDefsMap) {
 def writePropDefs(propDefsMap) {
     for ( e in propDefsMap   ) {
         println("generating property" +  e.value.name)  
-        genPropertyDef (e.value.type, e.value.name, e.value.id, e.value.descr, e.value.choices)

+        
+        genPropertyDef (e.value.type, e.value.name, e.value.id, e.value.descr, e.value.choices,
+            e.value.cardinality, e.value.updatability, e.value.required) 
     }
 }
 



Mime
View raw message