-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-0.4' - Added graph view to master
- Loading branch information
Showing
23 changed files
with
1,410 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.uniovi.nmapgui.model; | ||
|
||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
@XmlRootElement(name="address") | ||
public class Address { | ||
|
||
private String address; | ||
|
||
public Address(String address) { | ||
setAddress(address); | ||
} | ||
public Address(){} | ||
|
||
@XmlAttribute(name="addr") | ||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public void setAddress(String address) { | ||
this.address = address; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Address [address=" + getAddress() + "]"; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
Address other = (Address) obj; | ||
if (address == null) { | ||
if (other.address != null) | ||
return false; | ||
} else if (!address.equals(other.address)) | ||
return false; | ||
return true; | ||
} | ||
|
||
|
||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.uniovi.nmapgui.model; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import javax.xml.bind.annotation.XmlAttribute; | ||
|
||
public class Hop { | ||
|
||
private String address; | ||
private String host; | ||
|
||
@XmlAttribute(name="ipaddr") | ||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public void setAddress(String address) { | ||
this.address = address; | ||
} | ||
|
||
@XmlAttribute(name="host") | ||
public String getHost() { | ||
return host; | ||
} | ||
|
||
public void setHost(String host) { | ||
this.host = host; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Hop [address=" + getAddress() + ", host=" + getHost() + "]"; | ||
} | ||
|
||
public Host toHost(){ | ||
Host host = new Host(); | ||
host.setAddress(new Address(address)); | ||
Set<Hostname> set = new HashSet<Hostname>(); | ||
if (host!=null) | ||
set.add(new Hostname(this.host)); | ||
host.setHostNames(set); | ||
|
||
return host; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.