This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASE=http://localhost:8080/$RANDOM | |
COL=$BASE/memberCollection | |
curl -X PUT -H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" $BASE && echo | |
curl -X PUT -H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" $BASE/objects && echo | |
# create a collection | |
curl -X PUT -H "Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel=\"type\"" $COL && echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialize the fedora connection if necessary | |
connection = (ActiveFedora::Base.fedora_connection[0] ||= ActiveFedora::RubydoraConnection.new(ActiveFedora.config.credentials)).connection | |
# the logger accessor is private | |
(connection.api.send :logger).level = Logger::INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use SOAP::Lite (+trace => [qw (debug)], maptype => {}); | |
use constant ENDPOINT => 'https://USER:PASSWORD@HOST:8443/fedora/services/management'; | |
use constant NAMESPACE => 'http://www.fedora.info/definitions/1/0/types/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/uohull/hyhull.git | |
$ cd hyhull | |
$ bundle install | |
$ git submodule init | |
$ git submodule update | |
$ rake db:migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns0="http://purl.org/dc/terms/" xmlns:ns1="http://www.w3.org/2003/12/exif/ns#" xmlns:ns2="http://xmlns.com/foaf/0.1/"> | |
<rdf:Description rdf:about="info:fedora/ldpd:130508/web850"> | |
<ns0:extent>2611818</ns0:extent> | |
<ns0:format>image/png</ns0:format> | |
<ns0:isFormatOf rdf:resource="info:fedora/ldpd:130508/content"/> | |
<ns1:imageLength>594</ns1:imageLength> | |
<ns1:imageWidth>850</ns1:imageWidth> | |
<ns1:resolutionUnit>3</ns1:resolutionUnit> | |
<ns1:xResolution>354</ns1:xResolution> | |
<ns1:yResolution>354</ns1:yResolution> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expected: | |
<?xml version="1.0"?> | |
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | |
<rdf:Description rdf:about="info:fedora/test:relsint/DC"> | |
<isMetadataFor xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="info:fedora/test:relsint/RELS-INT"/> | |
</rdf:Description> | |
<rdf:Description rdf:about="info:fedora/test:relsint/RELS-EXT"> | |
<asserts xmlns="http://projecthydra.org/ns/relations#">FOO</asserts> | |
</rdf:Description> | |
<rdf:Description rdf:about="info:fedora/test:relsint/RELS-INT"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARN 2012-05-03 10:26:26.872 [http-8080-2] (PhaseInterceptorChain) Interceptor for {http://fedora-commons.org/2011/07/definitions/types/}Fedora-API-A-MTOM-Service has thrown exception, unwinding now | |
java.lang.NullPointerException: null | |
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:263) [cxf-bundle-2.4.0.jar:2.4.0] | |
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:163) [cxf-bundle-2.4.0.jar:2.4.0] | |
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:126) [cxf-bundle-2.4.0.jar:2.4.0] | |
at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71) [cxf-bundle-2.4.0.jar:2.4.0] | |
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.0.jar:2.4.0] | |
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118) [cxf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveFedora | |
class ContentModel | |
# Returns an ActiveFedora Model class corresponding to the given uri if one can be found. | |
# Returns false if no corresponding model can be found. | |
def self.uri_to_model_class( uri ) | |
verify_base(rc = Model.from_class_uri(uri)) and rc | |
end | |
def self.verify_base klass | |
return false unless klass.is_a? Class | |
while (klass = klass.superclass) and klass != ActiveFedora::Base; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def xml_builder_template(extra_opts = {}) | |
extra_attributes = extra_opts.fetch(:attributes, {}) | |
node_options = [] | |
node_child_template = "" | |
if !self.default_content_path.nil? | |
node_child_options = ["\':::builder_new_value:::\'"] | |
node_child_template = " { xml.#{self.default_content_path}( #{OM::XML.delimited_list(node_child_options)} ) }" | |
else | |
node_options = ["\':::builder_new_value:::\'"] |