Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LucasChezToi/ISE
Browse files Browse the repository at this point in the history
  • Loading branch information
dc authored and dc committed Feb 22, 2014
2 parents 993dc31 + 747c243 commit 26fe45a
Show file tree
Hide file tree
Showing 187 changed files with 14,369 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ Rendu1/*.log
Rendu1/*.aux
Rendu1/*.out
Rendu1/*.toc
/bin
.classpath
.project
Empty file added .metadata/.lock
Empty file.
Binary file added .metadata/.mylyn/repositories.xml.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ise;

import java.util.HashMap;

public class Node {
HashMap<Flow, Integer> capacity;

public HashMap<Flow, Integer> getCapacity() {
return capacity;
}

public void setCapacity(HashMap<Flow, Integer> capacity) {
this.capacity = capacity;
}

public Node(HashMap<Flow, Integer> capacity) {
super();
this.capacity = capacity;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import java.io.*;

import org.jdom2.*;
import org.jdom2.input.*;
import org.jdom2.filter.*;
import org.jdom2.input.SAXBuilder;

import java.util.List;
import java.util.Iterator;

public class XmlParser {
private static org.jdom2.Document document;
private static Element racine;
private SAXBuilder sxb;

public XmlParser(String file) {
sxb = new SAXBuilder();
try {
document = sxb.build(new File("file"));
} catch(Exception e){}
}


/*racine = document.getRootElement();

List firstStep = racine.getChildren("??");

Iterator i = firstStep.iterator();
while(i.hasNext()) {
//On recrée l'Element courant à chaque tour de boucle afin de
//pouvoir utiliser les méthodes propres aux Element comme :
//sélectionner un nœud fils, modifier du texte, etc...
Element courant = (Element)i.next();
//On affiche le nom de l’élément courant
System.out.println(courant.getChild("??").getText());
}
}*/
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package ise;

import java.util.List;

public class Algorithm {
Network net;
List<Integer> integer;


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package ise;

import java.util.ArrayList;
import java.util.List;

public class Flow {
String path;
int priority;
int deadline;
int periode;
int jitter;

public Flow(String path, int priority, int deadline, int periode, int jitter) {
super();
this.path = path;
this.priority = priority;
this.deadline = deadline;
this.periode = periode;
this.jitter = jitter;
}

List<Flow> higherPriorityFlows() {
return null;
}

List<Flow> samePriorityFlows() {
return null;
}

List<Flow> LowerPriorityFlows() {
return null;
}

public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public int getDeadline() {
return deadline;
}
public void setDeadline(int deadline) {
this.deadline = deadline;
}
public int getPeriode() {
return periode;
}
public void setPeriode(int periode) {
this.periode = periode;
}
public int getJitter() {
return jitter;
}
public void setJitter(int jitter) {
this.jitter = jitter;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import java.io.*;

import org.jdom2.*;
import org.jdom2.input.*;
import org.jdom2.filter.*;
import org.jdom2.input.SAXBuilder;

import java.util.List;
import java.util.Iterator;

public class XmlParser {
static org.jdom2.Document document;
static Element racine;

public XmlParser() {

}

//On crée une instance de SAXBuilder
SAXBuilder sxb = new SAXBuilder();
try
{
//On crée un nouveau document JDOM avec en argument le fichier XML
//Le parsing est terminé ;)
document = sxb.build(new File("file.xml"));
}
catch(Exception e){}

//On initialise un nouvel élément racine avec l'élément racine du document.
racine = document.getRootElement();

List firstStep = racine.getChildren("??");

//On crée un Iterator sur notre liste
Iterator i = firstStep.iterator();
while(i.hasNext()) {
//On recrée l'Element courant à chaque tour de boucle afin de
//pouvoir utiliser les méthodes propres aux Element comme :
//sélectionner un nœud fils, modifier du texte, etc...
Element courant = (Element)i.next();
//On affiche le nom de l’élément courant
System.out.println(courant.getChild("??").getText());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package xml;

import java.io.*;

import org.jdom2.*;
import org.jdom2.input.*;
import org.jdom2.filter.*;
import org.jdom2.input.SAXBuilder;

import java.util.List;
import java.util.Iterator;

public class XmlParser {
private static org.jdom2.Document document;
private static Element racine;
private SAXBuilder sxb;

public XmlParser(String file) {
sxb = new SAXBuilder();
try {
document = sxb.build(new File(file));
} catch(Exception e){}
}


racine = document.getRootElement();

List firstStep = racine.getChildren("??");

Iterator i = firstStep.iterator();
while(i.hasNext()) {
//On recrée l'Element courant à chaque tour de boucle afin de
//pouvoir utiliser les méthodes propres aux Element comme :
//sélectionner un nœud fils, modifier du texte, etc...
Element courant = (Element)i.next();
//On affiche le nom de l’élément courant
System.out.println(courant.getChild("??").getText());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import java.io.*;

import org.jdom2.*;
import org.jdom2.input.*;
import org.jdom2.filter.*;
import org.jdom2.input.SAXBuilder;

import java.util.List;
import java.util.Iterator;

public class XmlParser {
private static org.jdom2.Document document;
private static Element racine;
private SAXBuilder sxb;

public XmlParser(String file) {
sxb = new SAXBuilder();
try {
document = sxb.build(new File("file.xml"));
} catch(Exception e){}
}




/*racine = document.getRootElement();

List firstStep = racine.getChildren("??");

Iterator i = firstStep.iterator();
while(i.hasNext()) {
//On recrée l'Element courant à chaque tour de boucle afin de
//pouvoir utiliser les méthodes propres aux Element comme :
//sélectionner un nœud fils, modifier du texte, etc...
Element courant = (Element)i.next();
//On affiche le nom de l’élément courant
System.out.println(courant.getChild("??").getText());
}
}*/
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ise;

import java.util.HashMap;

public class Node {
private HashMap<Flow, Integer> capacity;

public HashMap<Flow, Integer> getCapacity() {
return capacity;
}

public void setCapacity(HashMap<Flow, Integer> capacity) {
this.capacity = capacity;
}

public Node(HashMap<Flow, Integer> capacity) {
super();
this.capacity = capacity;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package ise;

import java.util.List;

public class Flow {
String path;
int priority;
int deadline;
int periode;
int jitter;

public Flow(String path, int priority, int deadline, int periode, int jitter) {
super();
this.path = path;
this.priority = priority;
this.deadline = deadline;
this.periode = periode;
this.jitter = jitter;
}

List<Flow> higherPriorityFlows() {

}



public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public int getDeadline() {
return deadline;
}
public void setDeadline(int deadline) {
this.deadline = deadline;
}
public int getPeriode() {
return periode;
}
public void setPeriode(int periode) {
this.periode = periode;
}
public int getJitter() {
return jitter;
}
public void setJitter(int jitter) {
this.jitter = jitter;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ise;

public class Path {
List<Nodes>
}
Loading

0 comments on commit 26fe45a

Please sign in to comment.