Erste Dateien fuer ResearchNetwork

git-svn-id: https://svn.libreccm.org/ccm/trunk@220 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2009-07-29 11:50:29 +00:00
parent d0f493d2bf
commit 8ba0e3c32b
9 changed files with 187 additions and 1 deletions

View File

@ -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 // This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License // modify it under the terms of the GNU Lesser General Public License

View File

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-types-organizationalunit"
prettyName="Red Hat CCM Content Types"
version="6.6.0"
release="1"
webapp="ROOT">
<ccm:dependencies>
<ccm:requires name="ccm-core" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-cms" version="6.6.0" relation="ge"/>
<ccm:requires name="ccm-cms-types-person" version="6.6.0" relation="ge"/>
</ccm:dependencies>
<ccm:directories>
<ccm:directory name="pdl"/>
<ccm:directory name="sql"/>
<ccm:directory name="src"/>
</ccm:directories>
<ccm:contacts>
<ccm:contact uri="mailto:ccm@barkhof.uni-bremen.de" type="support"/>
</ccm:contacts>
<ccm:description>
Content type for representing a research network.
</ccm:description>
</ccm:application>

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -0,0 +1,3 @@
begin;
\i ddl/postgres/create.sql
end;

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type label="ResearchNetwork"
description="Research Network"
objectType="com.arsdigita.cms.contenttypes.ResearchNetwork"
classname="com.arsdigita.cms.contenttypes.ResearchNetwork">
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
<ctd:authoring-step labelKey="researchnetwork.authoring.basic_properties.title"
labelBundle="com.arsdigita.cms.contenttypes.ResearchNetworkResources"
descriptionKey="researchnetwork.authoring.basic_properties.description"
descriptionBundle="com.arsdigita.cms.contenttypes.ResearchnetworkResources"
component="com.arsdigita.cms.contenttypes.ui.researchnetwork.ResearchNetworkPropertiesStep"
ordering="1"/>
<ctd:include href="/WEB-INF/content-types/assign-categories-step.xml"/>
</ctd:authoring-kit>
</ctd:content-type>
</ctd:content-types>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<registry>
</registry>

View File

@ -0,0 +1,18 @@
<load>
<requires>
<table name="inits" />
<table name="acs_objects" />
<table name="cms_items" />
<table name="ct_persons" />
<initializer class="com.arsdigita.cms.Initializer" />
</requires>
<provides>
<table name="ct_researchnetworks" />
<table name="ct_researchnetworkmembers" />
<initializer class="com.arsdigita.cms.contenttypes.ResearchNetworkInitializer"/>
</provides>
<scripts>
<schema directory="ccm-cms-types-researchnetwork" />
<data class="com.arsdigita.cms.contenttypes.ResearchNetworkLoader" />
</scripts>
</load>

View File

@ -0,0 +1,34 @@
<!DOCTYPE stylesheet [
<!ENTITY nbsp "&#160;" ><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
]>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cms="http://www.arsdigita/com/cms/1.0"
version="1.0">
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.ResearchNetwork']"
mode="cms:CT_graphics"
name="cms:CT_graphics_com_arsdigita_cms_contenttypes_ResearchNetwork">
<p>
<xsl:value-of select="./title" />
<xsl:value-of select="./description" />
</p>
</xsl:template>
<xsl:template match="cms:item[objectType='com.arsdigita.cms.contenttypes.ResearchNetwork']"
mode="cms:CT_text"
name="cms:CT_text_com_arsdigita_cms_contenttypes_ResearchNetwork">
<p>
<xsl:value-of select="./title" />
<xsl:value-of select="./description" />
</p>
</xsl:template>
</xsl:stylesheet>