diff --git a/ccm-cms-types-organizationalunit/pdl/com/arsdigita/content-types/OrganizationalUnit.pdl b/ccm-cms-types-organizationalunit/pdl/com/arsdigita/content-types/OrganizationalUnit.pdl index 5247452ba..bf513311b 100644 --- a/ccm-cms-types-organizationalunit/pdl/com/arsdigita/content-types/OrganizationalUnit.pdl +++ b/ccm-cms-types-organizationalunit/pdl/com/arsdigita/content-types/OrganizationalUnit.pdl @@ -1,5 +1,5 @@ // -// Copyright (C) 2009 Jens Pelzetter, for the Center of Social Politics of the University of Bremen +// Copyright (C) 2009 Jens Pelzetter, for the Center for Social Policy Research of the University of Bremen // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License diff --git a/ccm-cms-types-researchnetwork/application.xml b/ccm-cms-types-researchnetwork/application.xml new file mode 100644 index 000000000..bd93c6dc3 --- /dev/null +++ b/ccm-cms-types-researchnetwork/application.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + Content type for representing a research network. + + \ No newline at end of file diff --git a/ccm-cms-types-researchnetwork/pdl/com/arsdigita/content-types/ResearchNetwork.pdl b/ccm-cms-types-researchnetwork/pdl/com/arsdigita/content-types/ResearchNetwork.pdl new file mode 100644 index 000000000..b029d2f80 --- /dev/null +++ b/ccm-cms-types-researchnetwork/pdl/com/arsdigita/content-types/ResearchNetwork.pdl @@ -0,0 +1,34 @@ +// +// Copyright (C) 2009 Jens Pelzetter, for the Center for Social Policy Research of the University of Bremen +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// + +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.ContentPage; +import com.arsdigita.cms.DomainObject; + +object type type ResearchNetwork extends ContentPage { + String[0..1] researchNetworkTitle = ct_researchNetworks.researchnetwork_title VARCHAR(512); + String[0..1] researchNetworkDirection = ct_researchnetwork.researchnetwork_direction VARCHAR(1024); + String[0..1] researchNetworkCoordination = ct_researchnetwork.researchnetwork_coordination VARCHAR(1024); + String[0..1] researchNetworkDescription = ct_researchnetwork.researchnetwork_description VARCHAR(4096); + String[0..1] researchNetworkWebsite = ct_researchnetwork.researchnetwork_website VARCHAR(512); + + reference key (ct_researchnetworks.researchnetwork_id); +} \ No newline at end of file diff --git a/ccm-cms-types-researchnetwork/pdl/com/arsdigita/content-types/ResearchNetworkMembers.pdl b/ccm-cms-types-researchnetwork/pdl/com/arsdigita/content-types/ResearchNetworkMembers.pdl new file mode 100644 index 000000000..d7496ed7d --- /dev/null +++ b/ccm-cms-types-researchnetwork/pdl/com/arsdigita/content-types/ResearchNetworkMembers.pdl @@ -0,0 +1,43 @@ +// +// Copyright (C) 2009 Center for Social Policy Reseearch, University of Bremen +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; either version 2.1 of +// the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +model com.arsdigita.cms.contenttypes; + +import com.arsdigita.cms.ContentItem; +import com.arsdigita.kernel.ACSObject; + +object type ResearchNetworkMembers extends ACSObject { + Person[0..1] targetItem = join ct_researchnetworkmembers_target_item_id to ct_persons.person_id; + + reference key(ct_researchnetworkmembers.member_id); + aggressive load (memberOwner.id); +} + +association { + composite ResearchNetwork[0..1] memberOwner = join ct_researchnetworkmembers.owner_id to ct_researchnetworks_researchnetwork_id; + composite ResearchNetworkMembers[0..n] members = join ct_researchnetworks.researchnetwork.id to ct_researchnetworkmembers.owner_id; +} + +query getResearchNetworkMemberReferingToResearchNetworks { + BigDecimal id; + + do { + select m.member_id from ResearchNetworkMembers m where m.target_item_id = :itemID; + } map { + id = m.researchnetworkmember_id; + } +} \ No newline at end of file diff --git a/ccm-cms-types-researchnetwork/sql/ccm-cms-types-researchnetwork/postgres-create.sql b/ccm-cms-types-researchnetwork/sql/ccm-cms-types-researchnetwork/postgres-create.sql new file mode 100644 index 000000000..28a403e1f --- /dev/null +++ b/ccm-cms-types-researchnetwork/sql/ccm-cms-types-researchnetwork/postgres-create.sql @@ -0,0 +1,3 @@ +begin; +\i ddl/postgres/create.sql +end; diff --git a/ccm-cms-types-researchnetwork/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ResearchNetwork.xml b/ccm-cms-types-researchnetwork/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ResearchNetwork.xml new file mode 100644 index 000000000..45b4331d9 --- /dev/null +++ b/ccm-cms-types-researchnetwork/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/ResearchNetwork.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-cms-types-researchnetwork/src/ccm-cms-types-researchnetwork.config b/ccm-cms-types-researchnetwork/src/ccm-cms-types-researchnetwork.config new file mode 100644 index 000000000..b6865e594 --- /dev/null +++ b/ccm-cms-types-researchnetwork/src/ccm-cms-types-researchnetwork.config @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ccm-cms-types-researchnetwork/src/ccm-cms-types-researchnetwork.load b/ccm-cms-types-researchnetwork/src/ccm-cms-types-researchnetwork.load new file mode 100644 index 000000000..95e48ef45 --- /dev/null +++ b/ccm-cms-types-researchnetwork/src/ccm-cms-types-researchnetwork.load @@ -0,0 +1,18 @@ + + + +
+
+
+ + + +
+
+ + + + + + + \ No newline at end of file diff --git a/ccm-cms-types-researchnetwork/web/static/content-types/com/arsdigita/cms/contenttypes/ResearchNetwork.xsl b/ccm-cms-types-researchnetwork/web/static/content-types/com/arsdigita/cms/contenttypes/ResearchNetwork.xsl new file mode 100644 index 000000000..b705cf97b --- /dev/null +++ b/ccm-cms-types-researchnetwork/web/static/content-types/com/arsdigita/cms/contenttypes/ResearchNetwork.xsl @@ -0,0 +1,34 @@ + +]> + + + + + +

+ + +

+ +
+ + + +

+ + +

+ +
+ + + +
\ No newline at end of file