/branches/v3/impl/src/java/pt/estgp/estgweb/services/courses/CoursesService.java |
---|
262,11 → 262,23 |
IRepositoryFile repositoryFile = repositoryService.load(c.getStudiesPlan(),userSession); |
long lastVersion = repositoryService.loadView(c.getStudiesPlan()).getLastVersion().getId(); |
stream = repositoryFile.getInput(); |
//TODO TIRAR |
//JUST FOR DEBUG |
try { |
System.out.println(StreamsUtils.readString(stream)); |
stream.close(); |
} catch (IOException e) { |
e.printStackTrace(); |
} |
repositoryFile = repositoryService.load(c.getStudiesPlan(),userSession); |
stream = repositoryFile.getInput(); |
try { |
JAXBContext jc = JAXBContext.newInstance(Curso.class); |
Unmarshaller unmarshaller = jc.createUnmarshaller(); |
//Just in case lets update SigesCode |
Curso curso = (Curso) unmarshaller.unmarshal(stream); |
curso.setSiges(c.getCode()); |
Marshaller marshaller = jc.createMarshaller(); |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); |
/branches/v3/impl/src/xsd/planoestudos.xsd |
---|
1,6 → 1,8 |
<?xml version="1.0" encoding="UTF-8"?> |
<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Jorge Machado (BN) --> |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.estgp.pt/xsd/planoestudos/1.0/" targetNamespace="http://www.estgp.pt/xsd/planoestudos/1.0/" elementFormDefault="qualified" attributeFormDefault="unqualified"> |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.estgp.pt/xsd/planoestudos/1.0/" |
xmlns:xsl="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.estgp.pt/xsd/planoestudos/1.0/" |
elementFormDefault="qualified" attributeFormDefault="unqualified"> |
<xsd:element name="curso"> |
<xsd:annotation> |
<xsd:documentation/> |
53,7 → 55,6 |
</xsd:element> |
<xsd:complexType name="unidadeType"> |
<xsd:sequence> |
<xsd:element name="siges" type="xsd:string"/> |
<xsd:element name="urlFichaCurricular" type="xsd:string" minOccurs="0" maxOccurs="1"/> |
<xsd:element name="nome" type="xsd:string"/> |
<xsd:element name="dep" type="xsd:string"/> |
77,5 → 78,6 |
<xsd:element name="ECTS" type="xsd:string"/> |
<xsd:element name="obs" type="xsd:string"/> |
</xsd:sequence> |
<xsl:attribute name="siges" type="xsd:string" use="optional"/> |
</xsd:complexType> |
</xsd:schema> |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/courses/xsd/package-info.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.07.28 at 12:03:54 PM WEST |
// Generated on: 2016.07.29 at 04:05:35 PM WEST |
// |
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.estgp.pt/xsd/planoestudos/1.0/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/courses/xsd/Curso.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.07.28 at 12:03:54 PM WEST |
// Generated on: 2016.07.29 at 04:05:35 PM WEST |
// |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/courses/xsd/UnidadeType.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.07.28 at 12:03:54 PM WEST |
// Generated on: 2016.07.29 at 04:05:35 PM WEST |
// |
10,6 → 10,7 |
import javax.xml.bind.annotation.XmlAccessType; |
import javax.xml.bind.annotation.XmlAccessorType; |
import javax.xml.bind.annotation.XmlAttribute; |
import javax.xml.bind.annotation.XmlElement; |
import javax.xml.bind.annotation.XmlType; |
24,7 → 25,6 |
* <complexContent> |
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
* <sequence> |
* <element name="siges" type="{http://www.w3.org/2001/XMLSchema}string"/> |
* <element name="urlFichaCurricular" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> |
* <element name="nome" type="{http://www.w3.org/2001/XMLSchema}string"/> |
* <element name="dep" type="{http://www.w3.org/2001/XMLSchema}string"/> |
52,6 → 52,7 |
* <element name="ECTS" type="{http://www.w3.org/2001/XMLSchema}string"/> |
* <element name="obs" type="{http://www.w3.org/2001/XMLSchema}string"/> |
* </sequence> |
* <attribute name="siges" type="{http://www.w3.org/2001/XMLSchema}string" /> |
* </restriction> |
* </complexContent> |
* </complexType> |
61,7 → 62,6 |
*/ |
@XmlAccessorType(XmlAccessType.FIELD) |
@XmlType(name = "unidadeType", propOrder = { |
"siges", |
"urlFichaCurricular", |
"nome", |
"dep", |
72,8 → 72,6 |
}) |
public class UnidadeType { |
@XmlElement(required = true) |
protected String siges; |
protected String urlFichaCurricular; |
@XmlElement(required = true) |
protected String nome; |
86,32 → 84,10 |
protected String ects; |
@XmlElement(required = true) |
protected String obs; |
@XmlAttribute |
protected String siges; |
/** |
* Gets the value of the siges property. |
* |
* @return |
* possible object is |
* {@link String } |
* |
*/ |
public String getSiges() { |
return siges; |
} |
/** |
* Sets the value of the siges property. |
* |
* @param value |
* allowed object is |
* {@link String } |
* |
*/ |
public void setSiges(String value) { |
this.siges = value; |
} |
/** |
* Gets the value of the urlFichaCurricular property. |
* |
* @return |
271,8 → 247,32 |
this.obs = value; |
} |
/** |
* Gets the value of the siges property. |
* |
* @return |
* possible object is |
* {@link String } |
* |
*/ |
public String getSiges() { |
return siges; |
} |
/** |
* Sets the value of the siges property. |
* |
* @param value |
* allowed object is |
* {@link String } |
* |
*/ |
public void setSiges(String value) { |
this.siges = value; |
} |
/** |
* <p>Java class for anonymous complex type. |
* |
* <p>The following schema fragment specifies the expected content contained within this class. |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/courses/xsd/ObjectFactory.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.07.28 at 12:03:54 PM WEST |
// Generated on: 2016.07.29 at 04:05:35 PM WEST |
// |
37,35 → 37,35 |
} |
/** |
* Create an instance of {@link Curso } |
* Create an instance of {@link Curso.Semestre.Perfil } |
* |
*/ |
public Curso createCurso() { |
return new Curso(); |
public Curso.Semestre.Perfil createCursoSemestrePerfil() { |
return new Curso.Semestre.Perfil(); |
} |
/** |
* Create an instance of {@link UnidadeType.HorasContacto } |
* Create an instance of {@link UnidadeType } |
* |
*/ |
public UnidadeType.HorasContacto createUnidadeTypeHorasContacto() { |
return new UnidadeType.HorasContacto(); |
public UnidadeType createUnidadeType() { |
return new UnidadeType(); |
} |
/** |
* Create an instance of {@link Curso.Semestre.Perfil } |
* Create an instance of {@link Curso } |
* |
*/ |
public Curso.Semestre.Perfil createCursoSemestrePerfil() { |
return new Curso.Semestre.Perfil(); |
public Curso createCurso() { |
return new Curso(); |
} |
/** |
* Create an instance of {@link UnidadeType } |
* Create an instance of {@link UnidadeType.HorasContacto } |
* |
*/ |
public UnidadeType createUnidadeType() { |
return new UnidadeType(); |
public UnidadeType.HorasContacto createUnidadeTypeHorasContacto() { |
return new UnidadeType.HorasContacto(); |
} |
/** |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/Directory.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/RightsT.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/package-info.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.estgp.pt/baco/directory/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/GroupDeclarationT.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/NodeT.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/LeafT.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
/branches/v3/impl/gen/java/pt/estgp/estgweb/services/directories/xsd/ObjectFactory.java |
---|
2,7 → 2,7 |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-558 |
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
// Any modifications to this file will be lost upon recompilation of the source schema. |
// Generated on: 2016.03.28 at 02:59:42 PM WEST |
// Generated on: 2016.07.29 at 04:04:37 PM WEST |
// |
37,59 → 37,59 |
} |
/** |
* Create an instance of {@link GroupDeclarationT.Group } |
* Create an instance of {@link LeafT } |
* |
*/ |
public GroupDeclarationT.Group createGroupDeclarationTGroup() { |
return new GroupDeclarationT.Group(); |
public LeafT createLeafT() { |
return new LeafT(); |
} |
/** |
* Create an instance of {@link GroupDeclarationT } |
* Create an instance of {@link Directory } |
* |
*/ |
public GroupDeclarationT createGroupDeclarationT() { |
return new GroupDeclarationT(); |
public Directory createDirectory() { |
return new Directory(); |
} |
/** |
* Create an instance of {@link Directory } |
* Create an instance of {@link RightsT } |
* |
*/ |
public Directory createDirectory() { |
return new Directory(); |
public RightsT createRightsT() { |
return new RightsT(); |
} |
/** |
* Create an instance of {@link RightsT.Right } |
* Create an instance of {@link GroupDeclarationT.Group } |
* |
*/ |
public RightsT.Right createRightsTRight() { |
return new RightsT.Right(); |
public GroupDeclarationT.Group createGroupDeclarationTGroup() { |
return new GroupDeclarationT.Group(); |
} |
/** |
* Create an instance of {@link RightsT } |
* Create an instance of {@link GroupDeclarationT } |
* |
*/ |
public RightsT createRightsT() { |
return new RightsT(); |
public GroupDeclarationT createGroupDeclarationT() { |
return new GroupDeclarationT(); |
} |
/** |
* Create an instance of {@link NodeT } |
* Create an instance of {@link RightsT.Right } |
* |
*/ |
public NodeT createNodeT() { |
return new NodeT(); |
public RightsT.Right createRightsTRight() { |
return new RightsT.Right(); |
} |
/** |
* Create an instance of {@link LeafT } |
* Create an instance of {@link NodeT } |
* |
*/ |
public LeafT createLeafT() { |
return new LeafT(); |
public NodeT createNodeT() { |
return new NodeT(); |
} |
} |