eulfedora.xml - Fedora XML objects (for REST API returns)

Currently, this module consists of XmlObject wrappers for the XML returned by the REST API, to simplify dealing with results.

class eulfedora.xml.AuditTrail(node=None, context=None, **kwargs)

XmlObject for the Fedora built-in audit trail that is automatically populated from any modifications made to an object.

records = <eulxml.xmlmap.fields.NodeListField>

list of AuditTrailRecord entries

class eulfedora.xml.AuditTrailRecord(node=None, context=None, **kwargs)

XmlObject for a single audit entry in an AuditTrail.

action = <eulxml.xmlmap.fields.StringField>

the particular action taken, e.g. addDatastream

component = <eulxml.xmlmap.fields.StringField>

the component that was modified, e.g. a datastream ID such as DC or RELS-EXT

date = <eulfedora.xml.FedoraDateField>

date the change was made, as datetime.datetime

id = <eulxml.xmlmap.fields.StringField>

id for this audit trail record

message = <eulxml.xmlmap.fields.StringField>

justification for the change, if any (i.e., log message passed to save method)

process_type = <eulxml.xmlmap.fields.StringField>

type of modification, e.g. Fedora API-M

user = <eulxml.xmlmap.fields.StringField>

the user or account responsible for the change (e.g., fedoraAdmin)

class eulfedora.xml.DatastreamHistory(node=None, context=None, **kwargs)

XmlObject for datastream history information returned by REST_API.getDatastreamHistory().

dsid = <eulxml.xmlmap.fields.StringField>

datastream id

pid = <eulxml.xmlmap.fields.StringField>


versions = <eulxml.xmlmap.fields.NodeListField>

list of DatastreamProfile objects for each version

class eulfedora.xml.DatastreamProfile(node=None, context=None, **kwargs)

XmlObject for datastream profile information returned by REST_API.getDatastream().

checksum = <eulxml.xmlmap.fields.StringField>

checksum for current datastream contents

checksum_type = <eulxml.xmlmap.fields.StringField>

type of checksum

checksum_valid = <eulxml.xmlmap.fields.SimpleBooleanField>

Boolean flag indicating if the current checksum is valid. Only present when profile is accessed via REST_API.compareDatastreamChecksum()

control_group = <eulxml.xmlmap.fields.StringField>

datastream control group (inline XML, Managed, etc)

created = <eulfedora.xml.FedoraDateField>

date the datastream was created

format = <eulxml.xmlmap.fields.StringField>

format URI for the datastream, if any

label = <eulxml.xmlmap.fields.StringField>

datastream label

mimetype = <eulxml.xmlmap.fields.StringField>

datastream mimetype

size = <eulxml.xmlmap.fields.IntegerField>

integer; size of the datastream content

state = <eulxml.xmlmap.fields.StringField>

datastream state (A/I/D - Active, Inactive, Deleted)

version_id = <eulxml.xmlmap.fields.StringField>

current datastream version id

versionable = <eulxml.xmlmap.fields.SimpleBooleanField>

boolean; indicates whether or not the datastream is currently being versioned

class eulfedora.xml.DsCompositeModel(node=None, context=None, **kwargs)

XmlObject for a ContentModel‘s DS-COMPOSITE-MODEL datastream

class eulfedora.xml.FedoraDateField(xpath)

Map an XPath expression to a single Python datetime.datetime. Assumes date-time format in use by Fedora, e.g. 2010-05-20T18:42:52.766Z

class eulfedora.xml.FedoraDateListField(xpath)

Map an XPath expression to a list of Python datetime.datetime. Assumes date-time format in use by Fedora, e.g. 2010-05-20T18:42:52.766Z. If the XPath expression evaluates to an empty NodeList, evaluates to an empty list.

class eulfedora.xml.FoxmlContentDigest(node=None, context=None, **kwargs)

Content digest, as stored in full foxml (e.g. object export)

digest = <eulxml.xmlmap.fields.StringField>

digest value

type = <eulxml.xmlmap.fields.StringField>

digest type, e.g. MD5

class eulfedora.xml.FoxmlDatastream(node=None, context=None, **kwargs)

Foxml datastream in full foxml, e.g. object export

id = <eulxml.xmlmap.fields.StringField>

datastream id

versions = <eulxml.xmlmap.fields.NodeListField>

list of versions

class eulfedora.xml.FoxmlDatastreamVersion(node=None, context=None, **kwargs)

Foxml datastream version in full foxml, e.g. object export

content_digest = <eulxml.xmlmap.fields.NodeListField>

content digest

id = <eulxml.xmlmap.fields.StringField>

datastream version id

mimetype = <eulxml.xmlmap.fields.StringField>


class eulfedora.xml.FoxmlDigitalObject(node=None, context=None, **kwargs)

Minimal XmlObject for Foxml DigitalObject as returned by REST_API.getObjectXML(), to provide access to the Fedora audit trail.

audit_trail = <eulxml.xmlmap.fields.NodeField>

Fedora audit trail, as instance of AuditTrail

class eulfedora.xml.NewPids(node=None, context=None, **kwargs)

XmlObject for a list of pids as returned by REST_API.getNextPID().

class eulfedora.xml.ObjectDatastream(node=None, context=None, **kwargs)

XmlObject for a single datastream as returned by REST_API.listDatastreams()

dsid = <eulxml.xmlmap.fields.StringField>

datastream id - @dsid

label = <eulxml.xmlmap.fields.StringField>

datastream label - @label

mimeType = <eulxml.xmlmap.fields.StringField>

datastream mime type - @mimeType

class eulfedora.xml.ObjectDatastreams(node=None, context=None, **kwargs)

XmlObject for the list of a single object’s datastreams, as returned by REST_API.listDatastreams()

datastreams = <eulxml.xmlmap.fields.NodeListField>

list of ObjectDatastream

pid = <eulxml.xmlmap.fields.StringField>

object pid - @pid

class eulfedora.xml.ObjectHistory(node=None, context=None, **kwargs)

XmlObject for object history information returned by REST_API.getObjectHistory().

class eulfedora.xml.ObjectMethodService(node=None, context=None, **kwargs)

XmlObject for object method services; included in ObjectMethods for data returned by REST_API.listMethods().

class eulfedora.xml.ObjectMethods(node=None, context=None, **kwargs)

XmlObject for object method information returned by REST_API.listMethods().

class eulfedora.xml.ObjectProfile(node=None, context=None, **kwargs)

XmlObject for object profile information returned by REST_API.getObjectProfile().

created = <eulfedora.xml.FedoraDateField>

date the object was created

label = <eulxml.xmlmap.fields.StringField>

object label

modified = <eulfedora.xml.FedoraDateField>

date the object was last modified

owner = <eulxml.xmlmap.fields.StringField>

object owner

state = <eulxml.xmlmap.fields.StringField>

object state (A/I/D - Active, Inactive, Deleted)

class eulfedora.xml.RepositoryDescription(node=None, context=None, **kwargs)

XmlObject for a repository description as returned by API_A_LITE.describeRepository()

access_url = <eulxml.xmlmap.fields.StringField>

sample access url

admin_email = <eulxml.xmlmap.fields.StringListField>

administrator emails

base_url = <eulxml.xmlmap.fields.StringField>

base url

name = <eulxml.xmlmap.fields.StringField>

repository name

oai_info = <eulxml.xmlmap.fields.NodeField>

RepositoryDescriptionOAI - configuration info for OAI

oai_url = <eulxml.xmlmap.fields.StringField>

sample OAI url

pid_info = <eulxml.xmlmap.fields.NodeField>

RepositoryDescriptionPid - configuration info for pids

search_url = <eulxml.xmlmap.fields.StringField>

sample search url

version = <eulxml.xmlmap.fields.StringField>

version of Fedora being run

class eulfedora.xml.RepositoryDescriptionOAI(node=None, context=None, **kwargs)

XmlObject for OAI section of RepositoryDescription

delimiter = <eulxml.xmlmap.fields.StringField>

OAI delimiter

namespace = <eulxml.xmlmap.fields.StringField>

OAI namespace

sample = <eulxml.xmlmap.fields.StringField>

sample OAI id

class eulfedora.xml.RepositoryDescriptionPid(node=None, context=None, **kwargs)

XmlObject for PID section of RepositoryDescription

delimiter = <eulxml.xmlmap.fields.StringField>

PID delimiter

namespace = <eulxml.xmlmap.fields.StringField>

PID namespace

retain_pids = <eulxml.xmlmap.fields.StringField>

list of pid namespaces configured to be retained

sample = <eulxml.xmlmap.fields.StringField>

sample PID

class eulfedora.xml.SearchResult(node=None, context=None, **kwargs)

XmlObject for a single entry in the results returned by REST_API.findObjects()

pid = <eulxml.xmlmap.fields.StringField>


class eulfedora.xml.SearchResults(node=None, context=None, **kwargs)

XmlObject for the results returned by REST_API.findObjects()

cursor = <eulxml.xmlmap.fields.IntegerField>

session cursor

expiration_date = <eulxml.xmlmap.fields.DateTimeField>

session experation date

results = <eulxml.xmlmap.fields.NodeListField>

search results - list of SearchResult

session_token = <eulxml.xmlmap.fields.StringField>

session token