コード例 #1
0
# Example of Credit/Attribution Statement

# from cromulent.model import factory
# from cromulent.vocab import Painting, CreditStatement, add_art_setter
# add_art_setter()
# obj = Painting("https://linked.art/example/object/64", "Example Painting", art=1)
# credit = CreditStatement("https://linked.art/example/text/26", value="Donation of Ms J. Smith; Example Organization")
# obj.referred_to_by = credit
# print(factory.toString(obj, compact=False))

# Example of Rights Statement

# from cromulent.model import factory
# from cromulent.vocab import Painting, RightsStatement, add_art_setter
# add_art_setter()
# obj = Painting("https://linked.art/example/object/65", "Example Painting", art=1)
# rights = RightsStatement("https://linked.art/example/text/27", value="Copyright of this object has not yet been assessed")
# obj.referred_to_by = rights
# print(factory.toString(obj, compact=False))

# Example of Rights Assertions

from cromulent.model import factory
from cromulent.vocab import Painting, RightsStatement, add_art_setter

add_art_setter()
obj = Painting("https://linked.art/example/object/66", "Object", art=1)
rights = RightsStatement("http://rightsstatements.org/vocab/NKC/1.0/",
                         "No known copyright")
obj.referred_to_by = rights
print(factory.toString(obj, compact=False))
コード例 #2
0
ファイル: europa.py プロジェクト: azaroth42/crom_project
mu.part_of = place
obj.current_location = loc

# Signature
sign = Signature(label="RHL [in ligature]. van Rÿn.1632")
bpart = BottomPart(label="Lower Right")
bpart.carries = sign
obj.part = bpart

# Description
des = Description(
    label="Description",
    value=
    "In the Metamorphoses, the ancient Roman poet Ovid told a story about the god Jupiter, who disguised himself as a white bull in order to seduce the princess Europa away from her companions and carry her across the sea to the distant land that would bear her name.\nDuring his long career Rembrandt rarely painted mythological subjects. Here he conveys a narrative story through dramatic gesture and visual effects. Bewildered, Europa grasps the bull's horn, digs her fingers into his neck, and turns back to look at her companions on the water's edge. One young woman falls to the ground and raises her arms in alarm, dropping the flower garland intended for the bull's neck into her lap, while her friend clasps her hands in consternation and watches helplessly. The carriage driver above rises to his feet and stares at the departing princess in horror. In the background, a city shrouded in mist extends along the horizon, perhaps serving as an allusion to the ancient city of Tyre as well as to contemporary Amsterdam.The dark thicket of trees to the right contrasts with the pink and blue regions of the sea and sky. Sunlight breaks through the clouds and reflects off the water, but the sky behind the trees is dark and foreboding.\nA master of visual effects, Rembrandt took pleasure in describing the varied textures of sumptuous costumes and glittering gold highlights on the carriage and dresses."
)
obj.referred_to_by = des

# IIIF digital image
dimg = InformationObject(
    "http://media.getty.edu/viewers/mirador/?manifest=https://data.getty.edu/museum/api/iiif/882/manifest.json"
)
io = InformationObject("http://iiif.io/api/presentation")
dimg.conforms_to = io
dimg.format = "application/ld+json;profile=\"http://iiif.io/api/presentation/2/context.json\""
rights = RightsStatement(
    "http://www.getty.edu/about/whatwedo/opencontent.html",
    label="Open Content Program",
    value="This image is available for download, without charge.")
dimg.referred_to_by = rights
obj.subject_of = dimg