source: trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSLocation.java@ 5945

Last change on this file since 5945 was 5945, checked in by cs025, 20 years ago

Extensive additions to metadata

  • Property svn:keywords set to Author Date Id Revision
File size: 740 bytes
Line 
1package org.greenstone.gsdl3.gs3build.metadata;
2
3import java.io.File;
4import java.net.URL;
5
6public class METSLocation
7{
8 String type;
9 URL location;
10
11 public METSLocation(String type, String location) throws java.net.MalformedURLException
12 { this.type = type;
13 this.location = new URL(location);
14 }
15
16 public METSLocation(URL url)
17 { this.type = "URL";
18 this.location = url;
19 }
20
21 public METSLocation(File file) throws java.net.MalformedURLException
22 { this.type = "URL";
23 this.location = new URL("file://" + file.toString());
24 }
25
26 public boolean equals(URL url)
27 { return this.location.equals(url);
28 }
29
30 public URL getLocation()
31 { return this.location;
32 }
33
34 public String getType()
35 { return this.type;
36 }
37}
Note: See TracBrowser for help on using the repository browser.