Revision 6639
Added by ben leinfelder about 13 years ago
lib/metacat.properties | ||
---|---|---|
496 | 496 |
|
497 | 497 |
############# DataONE Section ####################################### |
498 | 498 |
D1Client.CN_URL=https://cn-dev.dataone.org/cn |
499 |
#dataone.coordinatingNodeBaseURL=https://cn-dev.dataone.org/cn |
|
499 |
# Configure the Member Node client certificate location |
|
500 |
D1Client.certificate.file=/etc/dataone/client/certs/METACAT1.pem |
|
501 |
# Member Node configuration |
|
500 | 502 |
dataone.memberNodeId=METACAT1 |
501 | 503 |
dataone.subject=CN=METACAT1, DC=dataone, DC=org |
502 | 504 |
dataone.nodeName=My Metacat Node |
... | ... | |
529 | 531 |
dataone.hazelcast.processCluster.instances=127.0.0.1 |
530 | 532 |
dataone.hazelcast.processCluster.nodesMap=hzNodes |
531 | 533 |
|
532 |
# Configure the Member Node client certificate location
|
|
533 |
D1Client.certificate.file=/etc/dataone/client/certs/METACAT1.pem
|
|
534 |
# DataONE types XSLT
|
|
535 |
dataone.types.xsl=xslt/dataone.types.v1.xsl
|
|
534 | 536 |
|
535 | 537 |
|
src/edu/ucsb/nceas/metacat/restservice/CNResourceHandler.java | ||
---|---|---|
77 | 77 |
import org.xml.sax.SAXException; |
78 | 78 |
|
79 | 79 |
import edu.ucsb.nceas.metacat.dataone.CNodeService; |
80 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
|
81 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
|
80 | 82 |
|
81 | 83 |
/** |
82 | 84 |
* CN REST service implementation handler |
... | ... | |
602 | 604 |
response.setStatus(200); |
603 | 605 |
response.setContentType("text/xml"); |
604 | 606 |
|
605 |
TypeMarshaller.marshalTypeToOutputStream(objectFormatList, out); |
|
607 |
// style the object with a processing directive |
|
608 |
String stylesheet = null; |
|
609 |
try { |
|
610 |
stylesheet = PropertyService.getProperty("dataone.types.xsl"); |
|
611 |
} catch (PropertyNotFoundException e) { |
|
612 |
logMetacat.warn("Could not locate DataONE types XSLT: " + e.getMessage()); |
|
613 |
} |
|
614 |
|
|
615 |
TypeMarshaller.marshalTypeToOutputStream(objectFormatList, out, stylesheet); |
|
606 | 616 |
|
607 | 617 |
} |
608 | 618 |
|
... | ... | |
952 | 962 |
OutputStream out = response.getOutputStream(); |
953 | 963 |
response.setStatus(200); |
954 | 964 |
response.setContentType("text/xml"); |
965 |
|
|
966 |
// style the object with a processing directive |
|
967 |
String stylesheet = null; |
|
968 |
try { |
|
969 |
stylesheet = PropertyService.getProperty("dataone.types.xsl"); |
|
970 |
} catch (PropertyNotFoundException e) { |
|
971 |
logMetacat.warn("Could not locate DataONE types XSLT: " + e.getMessage()); |
|
972 |
} |
|
973 |
|
|
955 | 974 |
// Serialize and write it to the output stream |
956 |
TypeMarshaller.marshalTypeToOutputStream(ol, out); |
|
975 |
TypeMarshaller.marshalTypeToOutputStream(ol, out, stylesheet);
|
|
957 | 976 |
} |
958 | 977 |
|
959 | 978 |
/** |
Also available in: Unified diff
lookup stylesheet from metacat.properties for CN list objects and list formats. This is used in conjunction with the CN rest service deployment where the xslt is actually kept.