private void setRDFAsDatastream ( StringBuffer buf ) { DatastreamXMLMetadata ds = new DatastreamXMLMetadata ( ) ; // set the attrs common to all datastream versions ds . DatastreamID = "RELS-INT" ; ds . DSVersionable = false ; ds . DSFormatURI = m_dsFormatURI ; ds . DatastreamAltIDs = m_dsAltIDs ; ds . DSVersionID = "RELS-INT.0" ; ds . DSLabel = "DO NOT EDIT: System-generated datastream to preserve METS DMDID/ADMID relationships." ; ds . DSCreateDT = new Date ( ) ; ds . DSMIME = "application/rdf+xml" ; // set the attrs specific to datastream version ds . DSControlGrp = "X" ; ds . DSState = "A" ; ds . DSLocation = m_obj . getPid ( ) + "+" + ds . DatastreamID + "+" + ds . DSVersionID ; ds . DSLocationType = Datastream . DS_LOCATION_TYPE_INTERNAL ; ds . DSInfoType = "DATA" ; ds . DSMDClass = DatastreamXMLMetadata . TECHNICAL ; // now set the xml content stream itself... try { ds . xmlContent = buf . toString ( ) . getBytes ( m_characterEncoding ) ; ds . DSSize = ds . xmlContent . length ; } catch ( UnsupportedEncodingException uee ) { logger . error ( "Encoding error when creating RELS-INT datastream" , uee ) ; } // FINALLY! add the RDF and an inline xml datastream in the digital object m_obj . addDatastreamVersion ( ds , true ) ; }
DMDID and ADMID relationships found in the METS file .