Ejemplo n.º 1
0
class DCTMediaTypeOrExtent(Item, DCATMixin):
    """DCTMediatypeorextent Content Type."""

    portal_type = constants.CT_DCT_MEDIATYPEOREXTENT
    content_schema = IDCTMediaTypeOrExtent
    _namespace = 'dct'
    _ns_class = 'MediaTypeOrExtent'

    dct_title = I18NTextProperty(IDCTMediaTypeOrExtent['dct_title'])
    dct_description = I18NTextProperty(
        IDCTMediaTypeOrExtent['dct_description'], )

    def Title(self):
        try:
            return self.dct_title[u'deu']
        except KeyError:
            key = list(self.dct_title.keys())[0]
            return self.dct_title[key]

    def Description(self):
        return self.desc_from_desc_field()

    def title_for_vocabulary(self):
        """Return a title suitable for vocabulary terms."""
        return self.Title()
Ejemplo n.º 2
0
class VCARDKind(Container, DCATMixin):
    """VCARDKind Content Type."""

    portal_type = constants.CT_VCARD_KIND
    content_schema = IVCARDKind
    _namespace = 'vcard'
    _ns_class = 'Kind'

    vcard_fn = I18NTextProperty(IVCARDKind['vcard_fn'])
    dct_description = I18NTextProperty(IVCARDKind['dct_description'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()
Ejemplo n.º 3
0
class DCATCatalog(Container, DCATMixin):
    """DCATCatalog Content Type."""

    portal_type = constants.CT_DCAT_CATALOG
    content_schema = IDCATCatalog
    _namespace = 'dcat'
    _ns_class = 'Catalog'

    dct_title = I18NTextProperty(IDCATCatalog['dct_title'])
    dct_description = I18NTextProperty(IDCATCatalog['dct_description'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()
Ejemplo n.º 4
0
class FOAFAgent(Item, DCATMixin):
    """FOAFAgent Content Type."""

    portal_type = constants.CT_FOAF_AGENT
    content_schema = IFOAFAgent
    _namespace = 'foaf'
    _ns_class = 'Agent'

    foaf_name = I18NTextProperty(IFOAFAgent['foaf_name'])
    dct_description = I18NTextProperty(IFOAFAgent['dct_description'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()
Ejemplo n.º 5
0
class SKOSConcept(Item, DCATMixin):
    """SKOSConcept Content Type."""

    portal_type = constants.CT_SKOS_CONCEPT
    content_schema = ISKOSConcept
    _namespace = 'skos'
    _ns_class = 'Concept'

    dct_title = I18NTextProperty(ISKOSConcept['dct_title'])
    dct_description = I18NTextProperty(ISKOSConcept['dct_description'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()
Ejemplo n.º 6
0
class DCATDistribution(Container, DCATMixin):
    """DCATDistribution Content Type."""

    portal_type = constants.CT_DCAT_DISTRIBUTION
    content_schema = IDCATDistribution
    _namespace = 'dcat'
    _ns_class = 'Distribution'

    dct_title = I18NTextProperty(IDCATDistribution['dct_title'])
    dct_description = I18NTextProperty(IDCATDistribution['dct_description'])
    dcatde_plannedAvailability = I18NTextProperty(
        IDCATDistribution['dcatde_plannedAvailability'], )
    dcatde_licenseAttributionByText = I18NTextProperty(
        IDCATDistribution['dcatde_licenseAttributionByText'], )
    dcat_byteSize = I18NTextProperty(IDCATDistribution['dcat_byteSize'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()
Ejemplo n.º 7
0
class DCTStandard(Item, DCATMixin):
    """DCTStandard Content Type."""

    portal_type = constants.CT_DCT_STANDARD
    content_schema = IDCTStandard
    _namespace = 'dct'
    _ns_class = 'Standard'

    dct_title = I18NTextProperty(IDCTStandard['dct_title'])
    dct_description = I18NTextProperty(IDCTStandard['dct_description'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()

    def title_for_vocabulary(self):
        """Return a title suitable for vocabulary terms."""
        return u'{title} ({url})'.format(
            title=self.Title(),
            url=self.rdfs_isDefinedBy,
        )
Ejemplo n.º 8
0
class RDFLiteral(Item, DCATMixin):
    """SKOSConcept Content Type."""

    portal_type = constants.CT_SKOS_CONCEPT
    content_schema = IRDFSLiteral
    _namespace = 'rdfs'
    _ns_class = 'Literal'

    dct_title = I18NTextProperty(IRDFSLiteral['dct_title'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()
Ejemplo n.º 9
0
class DCATDataset(Container, DCATMixin):
    """DCATDataset Content Type."""

    portal_type = constants.CT_DCAT_DATASET
    content_schema = IDCATDataset
    _namespace = 'dcat'
    _ns_class = 'Dataset'

    dct_title = I18NTextProperty(IDCATDataset['dct_title'])
    dct_description = I18NTextProperty(IDCATDataset['dct_description'])
    dcatde_contributorID = I18NTextProperty(
        IDCATDataset['dcatde_contributorID'], )
    dcatde_geocodingText = I18NTextProperty(
        IDCATDataset['dcatde_geocodingText'], )
    owl_versionInfo = I18NTextProperty(IDCATDataset['owl_versionInfo'])
    dcatde_legalbasisText = I18NTextProperty(
        IDCATDataset['dcatde_legalbasisText'], )
    adms_versionNotes = I18NTextProperty(IDCATDataset['adms_versionNotes'])

    def Title(self):
        return self.title_from_title_field()

    def Description(self):
        return self.desc_from_desc_field()