我需要在alfresco上创建一个类似sql表的模型

我需要在alfresco上创建一个类似sql表的模型,alfresco,alfresco-share,alfresco-webscripts,alfresco-maven,Alfresco,Alfresco Share,Alfresco Webscripts,Alfresco Maven,我需要为城市创建一个模型,该模型只包含id、city name字段,类似于sql表,但不创建不继承任何露天模型(内容、文件夹等)的文件。我能做到吗?或者必须通过查看sys:base(根对象)的定义从Alfresco模型继承: 基础 sys:可引用 sys:本地化 我想说的是,应该可以创建一个类型,而无需继承某些内容 但最好的办法是尝试一下 无论如何,您都可以从sys:base继承。您可以使用这样的数据列表来实现这一点 城市数据列表内容模型 1 城市清单项目 dl:dataListItem

我需要为城市创建一个模型,该模型只包含id、city name字段,类似于sql表,但不创建不继承任何露天模型(内容、文件夹等)的文件。我能做到吗?或者必须通过查看sys:base(根对象)的定义从Alfresco模型继承:


基础
sys:可引用
sys:本地化
我想说的是,应该可以创建一个类型,而无需继承某些内容

但最好的办法是尝试一下


无论如何,您都可以从sys:base继承。

您可以使用这样的数据列表来实现这一点

城市数据列表内容模型
1
城市清单项目
dl:dataListItem
d:文本
真的
d:int
真的
d:文本

稍后,您可以添加更多与此数据列表相关的自定义项,如下所示:
我建议使用AttributeService


数据列表是一个好主意,但它将被否定:在alfresco 4和5中它是可以的。当alfresco 6出现时,它可能不正确,但我认为它仍然有效。我不认为使用数据列表是一个好主意。它们已被弃用,而且从未得到过很好的支持。我认为使用sys:base是一个好主意。将自动添加的方面sys:referenceable非常有用。自动添加的另一个方面sys:localized不是很有用,但不会产生问题。
<type name="sys:base">
  <title>Base</title>
  <mandatory-aspects>
    <aspect>sys:referenceable</aspect>
    <aspect>sys:localized</aspect>
  </mandatory-aspects>
</type>
<description>Cities Data List Content model</description>
<version>1.0</version>

<imports>
    <!-- Import Alfresco Dictionary Definitions -->
    <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
    <!-- Import Alfresco Content Domain Model Definitions -->
    <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
    <!-- Import Alfresco Data List Model Definitions -->
    <import uri="http://www.alfresco.org/model/datalist/1.0"   prefix="dl" />
</imports>


<namespaces>
    <namespace uri="<<Your uri>>" prefix="cities"/>
</namespaces>

<types>
    <!--
        Data List Item Type for the custom cities list
        -->
    <type name="cities:cityListItem">
        <title>Cities List Item</title>
        <parent>dl:dataListItem</parent>
        <properties>
            <property name="cities:cityName">
                <type>d:text</type>
                <mandatory>true</mandatory>
            </property>
            <property name="cities:cityID">
                <type>d:int</type>
                <mandatory>true</mandatory>
            </property>
            <property name="cities:cityDescription">
                <type>d:text</type>
            </property>

        </properties>

    </type>
</types>