Project

General

Profile

« Previous | Next » 

Revision 3725

Added by Jing Tao almost 17 years ago

Add server url to system id.

View differences:

src/edu/ucsb/nceas/metacat/DBTransform.java
86 86
  private String 	configDir = null;
87 87
  private String	defaultStyle = null;
88 88
  private Logger logMetacat = Logger.getLogger(DBTransform.class);
89
  private String contextURL = null;
89 90
  
90 91
  /**
91 92
   * construct a DBTransform instance.
......
103 104
    util = new MetaCatUtil();
104 105
    configDir = util.getOption("config-dir");
105 106
    defaultStyle = util.getOption("default-style");
107
    contextURL = util.getOption("httpserver")+"/"+util.getOption("context")+"/";
106 108
  }
107 109

  
108 110
  /**
......
449 451
      System.out.println("Error parsing style-set file: " + e.getMessage());
450 452
      e.printStackTrace();
451 453
    }
452

  
454
    
455
    //Check if the systemId is relative path, add a postfix - the contextULR to systemID. 
456
    if (systemId != null && systemId.indexOf("http://" ) == -1)
457
    {
458
    	systemId = contextURL+systemId;
459
    }
453 460
    // Return the system ID for this particular source document type
454 461
    logMetacat.info("style system id is: "+systemId);
455 462
    return systemId;

Also available in: Unified diff