Project

General

Profile

« Previous | Next » 

Revision 5929

Added by berkley almost 14 years ago

fixed node response bug

View differences:

src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
734 734
    private void createNodeResponse() 
735 735
        throws JiBXException, IOException
736 736
    {
737
        String nodeName = null;
738
        String nodeId = null;
739
        String nodeUrl = null;
740
        String nodeDesc = null;
741
        
742
        try
743
        {
744
            nodeId = PropertyService.getProperty("dataone.memberNodeId");
745
            nodeName = PropertyService.getProperty("dataone.nodeName");
746
            nodeUrl = PropertyService.getProperty("application.knbSiteURL") + "/" +
747
                PropertyService.getProperty("application.context") + "/d1/";
748
            nodeDesc = PropertyService.getProperty("dataone.nodeDescription");
749
        }
750
        catch(PropertyNotFoundException pnfe)
751
        {
752
            logMetacat.error("createNodeResponse: " +
753
                    "property not found: " + pnfe.getMessage());
754
        }
755
        
737 756
        NodeList nl = new NodeList();
738 757
        Node n = new Node();
739 758
        NodeReference nr = new NodeReference();
740
        nr.setValue(request.getRequestURL().toString());
759
        nr.setValue(nodeId);
741 760
        n.setIdentifier(nr);
742
        n.setBaseURL(request.getRequestURL().toString());
743
        n.setDescription("Metacat DataONE Node");
744
        n.setName("Metacat WAR version WARVERSION");
761
        n.setBaseURL(nodeUrl);
762
        n.setDescription(nodeDesc);
763
        n.setName(nodeName + " -- WAR version WARVERSION");
745 764
        n.setType(NodeType.convert("mn"));
746 765
        
747 766
        //create the services

Also available in: Unified diff