remove obsolete kontor.py

This commit is contained in:
2025-04-30 17:31:18 +02:00
parent 304005822c
commit 931b4a0aba
1043 changed files with 61259 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
apply plugin: 'war'
version = '0.0.1'
dependencies {
compile project(':KontorEJB')
compile project(':ComicsWeb')
compile project(':MedienWeb')
compile project(':LibraryWeb')
compile project(':TradingCardsWeb')
}
@@ -0,0 +1,88 @@
package com.peetz.kontor.data;
import java.util.Collection;
import java.util.Iterator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.peetz.comics.entity.ArtistEntity;
import com.peetz.comics.entity.ComicEntity;
import com.peetz.comics.entity.IssueEntity;
import com.peetz.comics.entity.PublisherEntity;
import com.peetz.comics.entity.StoryArcEntity;
import com.peetz.comics.service.ComicService;
public class ExportComics
{
public Element backupComics(Document document)
{
Element comics = document.createElement("comics");
ComicService comicService = getComicService();
if (comicService == null) return comics;
Collection<PublisherEntity> publishers = comicService.getAllPublisher();
Iterator<PublisherEntity> publisher_iterator = publishers.iterator();
while (publisher_iterator.hasNext()) {
PublisherEntity publisher = publisher_iterator.next();
Element publisherNode = document.createElement("publisher");
publisherNode.setAttribute("id", publisher.getId().toString());
publisherNode.setAttribute("name", publisher.getName());
comics.appendChild(publisherNode);
comics.appendChild(document.createTextNode("\n"));
}
Collection<ArtistEntity> artists = comicService.getAllArtists();
Iterator<ArtistEntity> artist_iterator = artists.iterator();
while(artist_iterator.hasNext()) {
ArtistEntity artist = artist_iterator.next();
Element artistNode = document.createElement("artist");
artistNode.setAttribute("id", artist.getId().toString());
artistNode.setAttribute("name", artist.getName());
comics.appendChild(artistNode);
comics.appendChild(document.createTextNode("\n"));
}
Collection<ComicEntity> comicList = comicService.getAllComics();
Iterator<ComicEntity> comics_iterator = comicList.iterator();
while(comics_iterator.hasNext()) {
ComicEntity comic = comics_iterator.next();
Element comicNode = document.createElement("comic");
comicNode.setAttribute("id", comic.getId().toString());
comicNode.setAttribute("title", comic.getTitle());
String completed = "false";
if (comic.getCompleted() != null) completed = comic.getCompleted().toString();
comicNode.setAttribute("complete", completed);
String currentOrder = "false";
if (comic.getCurrentOrder() != null) currentOrder = comic.getCurrentOrder().toString();
comicNode.setAttribute("order", currentOrder);
Collection<IssueEntity> issues = comicService.getAllIssuesForComic(comic);
Iterator<IssueEntity> issues_iterator = issues.iterator();
comicNode.appendChild(document.createTextNode("\n"));
while(issues_iterator.hasNext()) {
IssueEntity issue = issues_iterator.next();
Element issueNode = document.createElement("issue");
issueNode.setAttribute("id", issue.getId().toString());
issueNode.setAttribute("number", issue.getNumber());
comicNode.appendChild(issueNode);
comicNode.appendChild(document.createTextNode("\n"));
}
comics.appendChild(comicNode);
comics.appendChild(document.createTextNode("\n"));
}
Collection<StoryArcEntity> storyArcs = comicService.getAllStoryArcs();
Iterator<StoryArcEntity> iterator_storyArcsIterator = storyArcs.iterator();
while(iterator_storyArcsIterator.hasNext()) {
StoryArcEntity storyArc = iterator_storyArcsIterator.next();
Element storyNode = document.createElement("storyArc");
storyNode.setAttribute("id", storyArc.getId().toString());
storyNode.setAttribute("title", storyArc.getTitle());
comics.appendChild(storyNode);
comics.appendChild(document.createTextNode("\n"));
}
return comics;
}
private ComicService getComicService()
{
return null;
}
}
@@ -0,0 +1,100 @@
package com.peetz.kontor.data;
import java.util.Collection;
import java.util.Iterator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.peetz.library.entity.ArticleEntity;
import com.peetz.library.entity.BookEntity;
import com.peetz.library.entity.BookshelfEntity;
import com.peetz.library.entity.ShelfboardEntity;
import com.peetz.library.service.LibraryService;
public class ExportLibrary
{
public Element backupLibrary(Document document)
{
Element library = document.createElement("library");
library.appendChild(document.createTextNode("\n"));
LibraryService libraryService = getLibraryService();
Collection<BookEntity> books = libraryService.getAllBooks();
Iterator<BookEntity> iterator_books = books.iterator();
while(iterator_books.hasNext()) {
BookEntity book = iterator_books.next();
Element bookNode = document.createElement("book");
bookNode.setAttribute("id", book.getId().toString());
bookNode.setAttribute("title", book.getTitle());
bookNode.setAttribute("author", book.getAuthor());
bookNode.setAttribute("edition", book.getEdition());
bookNode.setAttribute("isbn", book.getIsbn());
bookNode.setAttribute("pages", book.getPage().toString());
bookNode.setAttribute("publisher", book.getPublisher());
library.appendChild(bookNode);
library.appendChild(document.createTextNode("\n"));
}
Collection<BookshelfEntity> bookshelfs = libraryService.getAllBookshelfs();
Iterator<BookshelfEntity> iterator_bookshelfs = bookshelfs.iterator();
while(iterator_bookshelfs.hasNext()) {
BookshelfEntity bookshelf = iterator_bookshelfs.next();
Element shelfNode = document.createElement("shelf");
shelfNode.setAttribute("id", bookshelf.getId().toString());
shelfNode.setAttribute("title", bookshelf.getTitle());
shelfNode.appendChild(document.createTextNode("\n"));
Collection<ShelfboardEntity> shelfboards = bookshelf.getShelfBoards();
Iterator<ShelfboardEntity> iterator_shelfboards = shelfboards.iterator();
while(iterator_shelfboards.hasNext()) {
ShelfboardEntity shelfboard = iterator_shelfboards.next();
Element boardNode = document.createElement("board");
boardNode.setAttribute("id", shelfboard.getId().toString());
boardNode.setAttribute("title", shelfboard.getTitle());
shelfNode.appendChild(boardNode);
shelfNode.appendChild(document.createTextNode("\n"));
}
library.appendChild(shelfNode);
library.appendChild(document.createTextNode("\n"));
}
Collection<ArticleEntity> articles = libraryService.getAllArticles();
Iterator<ArticleEntity> iterator_articles = articles.iterator();
while(iterator_articles.hasNext()) {
ArticleEntity article = iterator_articles.next();
Element articleNode = document.createElement("article");
articleNode.setAttribute("id", article.getId().toString());
articleNode.setAttribute("title", article.getTitle());
Collection<ArticleEntity> origins = article.getOriginArticles();
Iterator<ArticleEntity> iterator_origins = origins.iterator();
while(iterator_origins.hasNext()) {
ArticleEntity origin = iterator_origins.next();
Element originNode = document.createElement("article");
originNode.setAttribute("id", origin.getId().toString());
articleNode.appendChild(originNode);
articleNode.appendChild(document.createTextNode("\n"));
}
Collection<ArticleEntity> relateds = article.getRelatedArticles();
Iterator<ArticleEntity> iterator_relateds = relateds.iterator();
articleNode.appendChild(document.createTextNode("\n"));
while(iterator_relateds.hasNext()) {
ArticleEntity related = iterator_relateds.next();
Element relatedNode = document.createElement("article");
relatedNode.setAttribute("id", related.getId().toString());
articleNode.appendChild(relatedNode);
articleNode.appendChild(document.createTextNode("\n"));
}
library.appendChild(articleNode);
library.appendChild(document.createTextNode("\n"));
}
return library;
}
private LibraryService getLibraryService()
{
return null;
}
}
@@ -0,0 +1,75 @@
package com.peetz.kontor.data;
import java.util.Collection;
import java.util.Iterator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.peetz.medien.entity.AudioCDEntity;
import com.peetz.medien.entity.BoxSetEntity;
import com.peetz.medien.entity.FilmEntity;
import com.peetz.medien.service.MedienService;
public class ExportMedien
{
public Element backupMedien(Document document)
{
Element medien = document.createElement("medien");
medien.appendChild(document.createTextNode("\n"));
MedienService medienService = getMedienService();
Collection<AudioCDEntity> cds = medienService.getAllCDs();
Iterator<AudioCDEntity> iterator_cds = cds.iterator();
while(iterator_cds.hasNext()) {
AudioCDEntity cd = iterator_cds.next();
Element cdNode = document.createElement("audioCD");
//cdNode.setAttribute("id", cd.getId());
//cdNode.setAttribute("album", cd.getAlbum());
//cdNode.setAttribute("artist", cd.getArtist());
medien.appendChild(cdNode);
medien.appendChild(document.createTextNode("\n"));
}
Collection<FilmEntity> films = medienService.getAllDVDs();
Iterator<FilmEntity> iterator_films = films.iterator();
while(iterator_films.hasNext()) {
FilmEntity film = iterator_films.next();
Element filmNode = document.createElement("film");
//filmNode.setAttribute("id", film.getId());
//filmNode.setAttribute("title", film.getTitle());
medien.appendChild(filmNode);
medien.appendChild(document.createTextNode("\n"));
}
Collection<BoxSetEntity> boxsets = medienService.getAllBoxSets();
Iterator<BoxSetEntity> iterator_boxsets = boxsets.iterator();
while(iterator_boxsets.hasNext()) {
BoxSetEntity boxSet = iterator_boxsets.next();
Element boxNode = document.createElement("boxSet");
boxNode.setAttribute("id", boxSet.getId().toString());
boxNode.setAttribute("title", boxSet.getTitle());
films = boxSet.getFilms();
iterator_films = films.iterator();
if (iterator_films.hasNext()) {
boxNode.appendChild(document.createTextNode("\n"));
}
while(iterator_films.hasNext()) {
FilmEntity film = iterator_films.next();
Element filmNode = document.createElement("film");
//filmNode.setAttribute("id", film.getId());
boxNode.appendChild(filmNode);
boxNode.appendChild(document.createTextNode("\n"));
}
medien.appendChild(boxNode);
medien.appendChild(document.createTextNode("\n"));
}
return medien;
}
private MedienService getMedienService()
{
return null;
}
}
@@ -0,0 +1,175 @@
package com.peetz.kontor.data;
import java.util.Collection;
import java.util.Iterator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.peetz.tradingcards.entity.BaseSetEntity;
import com.peetz.tradingcards.entity.InsertEntity;
import com.peetz.tradingcards.entity.ManufacturerEntity;
import com.peetz.tradingcards.entity.ParallelSetEntity;
import com.peetz.tradingcards.entity.PositionEntity;
import com.peetz.tradingcards.entity.SportCardEntity;
import com.peetz.tradingcards.entity.SportEntity;
import com.peetz.tradingcards.entity.TeamEntity;
import com.peetz.tradingcards.service.SportService;
import com.peetz.tradingcards.service.TradingcardService;
public class ExportTradingCards
{
public Element backupTradingCards(Document document)
{
Element tradingcards = document.createElement("tradingcards");
tradingcards.appendChild(document.createTextNode("\n"));
SportService sportService = getSportService();
backupSports(sportService, document, tradingcards);
backupCards(document, tradingcards);
return tradingcards;
}
private void backupSports(SportService sportService, Document document, Element tradingcards)
{
Collection<SportEntity> sports = sportService.getAllSports();
Iterator<SportEntity> iterator_sports = sports.iterator();
while(iterator_sports.hasNext()) {
SportEntity sport = iterator_sports.next();
Element sportNode = document.createElement("sport");
sportNode.setAttribute("id", sport.getId().toString());
sportNode.setAttribute("name", sport.getName());
Collection<TeamEntity> teams = sportService.getTeams(sport);
backupTeams(teams, document, sportNode);
Collection<PositionEntity> positions = sportService.getPositions(sport);
backupPositions(positions, document, sportNode);
tradingcards.appendChild(sportNode);
tradingcards.appendChild(document.createTextNode("\n"));
}
}
private void backupTeams(Collection<TeamEntity> teams, Document document, Element sportNode)
{
Iterator<TeamEntity> iterator_teams = teams.iterator();
while(iterator_teams.hasNext()) {
TeamEntity team = iterator_teams.next();
Element teamNode = document.createElement("team");
teamNode.setAttribute("id", team.getId().toString());
teamNode.setAttribute("name", team.getName());
//TODO what happens with null attributes?
//teamNode.setAttribute("short", teamView.getShortname());
sportNode.appendChild(teamNode);
}
}
private void backupPositions(Collection<PositionEntity> positions, Document document, Element sportNode)
{
Iterator<PositionEntity> iterator_positions = positions.iterator();
while(iterator_positions.hasNext()) {
PositionEntity position = iterator_positions.next();
Element positionNode = document.createElement("position");
positionNode.setAttribute("id", position.getId().toString());
positionNode.setAttribute("name", position.getName());
positionNode.setAttribute("short", position.getShortName());
sportNode.appendChild(positionNode);
}
sportNode.appendChild(document.createTextNode("\n"));
}
private void backupCards(Document document, Element tradingcards)
{
Collection<ManufacturerEntity> manufacturers = getTradingcardService().getAllManufacturers();
Iterator<ManufacturerEntity> iterator_manufacturers = manufacturers.iterator();
while(iterator_manufacturers.hasNext()) {
ManufacturerEntity manufacturer = iterator_manufacturers.next();
Element manufacturerNode = document.createElement("manufacturer");
manufacturerNode.setAttribute("id", manufacturer.getId().toString());
manufacturerNode.setAttribute("name", manufacturer.getName());
Collection<BaseSetEntity> baseSets = getTradingcardService().getBaseSetsByManufacturer(manufacturer);
backupBaseSets(baseSets, document, manufacturerNode);
Collection<ParallelSetEntity> parallelSets = getTradingcardService().getParallelSetsByManufacturer(manufacturer);
backupParallelSets(parallelSets, document, manufacturerNode);
Collection<InsertEntity> inserts = getTradingcardService().getInsertsByManufacturer(manufacturer);
backupInserts(inserts, document, manufacturerNode);
manufacturerNode.appendChild(document.createTextNode("\n"));
tradingcards.appendChild(manufacturerNode);
tradingcards.appendChild(document.createTextNode("\n"));
}
Collection<SportCardEntity> sportCards = getTradingcardService().getAllSportCards();
Iterator<SportCardEntity> iterator_sportCards = sportCards.iterator();
while(iterator_sportCards.hasNext()) {
SportCardEntity sportCard = iterator_sportCards.next();
Element cardNode = document.createElement("sportCard");
cardNode.setAttribute("id", sportCard.getId().toString());
cardNode.setAttribute("player", sportCard.getPlayer().getId().toString());
cardNode.setAttribute("baseSet", sportCard.getBaseSet().getId().toString());
if (sportCard.getParallelSet().getId() != null)
{
cardNode.setAttribute("parallelSet", sportCard.getParallelSet().getId().toString());
}
if (sportCard.getInsert().getId() != null)
{
cardNode.setAttribute("insert", sportCard.getInsert().getId().toString());
}
tradingcards.appendChild(cardNode);
tradingcards.appendChild(document.createTextNode("\n"));
}
}
private void backupBaseSets(Collection<BaseSetEntity> baseSets, Document document, Element manufacturerNode)
{
Iterator<BaseSetEntity> iterator_baseSets= baseSets.iterator();
while(iterator_baseSets.hasNext()) {
BaseSetEntity baseSet = iterator_baseSets.next();
manufacturerNode.appendChild(document.createTextNode("\n"));
Element baseSetNode = document.createElement("baseSet");
baseSetNode.setAttribute("id", baseSet.getId().toString());
baseSetNode.setAttribute("name", baseSet.getName());
manufacturerNode.appendChild(baseSetNode);
}
}
private void backupParallelSets(Collection<ParallelSetEntity> parallelSets, Document document, Element manufacturerNode)
{
Iterator<ParallelSetEntity> iterator_parallelSets = parallelSets.iterator();
while(iterator_parallelSets.hasNext()) {
ParallelSetEntity parallelSet = iterator_parallelSets.next();
manufacturerNode.appendChild(document.createTextNode("\n"));
Element parallelSetNode = document.createElement("parallelSet");
parallelSetNode.setAttribute("id", parallelSet.getId().toString());
parallelSetNode.setAttribute("name", parallelSet.getName());
parallelSetNode.setAttribute("baseSet", parallelSet.getBaseSet().getId().toString());
manufacturerNode.appendChild(parallelSetNode);
}
}
private void backupInserts(Collection<InsertEntity> inserts, Document document, Element manufacturerNode)
{
Iterator<InsertEntity> iterator_inserts = inserts.iterator();
while(iterator_inserts.hasNext()) {
InsertEntity insert = iterator_inserts.next();
manufacturerNode.appendChild(document.createTextNode("\n"));
Element insertNode = document.createElement("insert");
insertNode.setAttribute("id", insert.getId().toString());
insertNode.setAttribute("name", insert.getName());
insertNode.setAttribute("baseSet", insert.getBaseSet().getId().toString());
manufacturerNode.appendChild(insertNode);
}
}
private SportService getSportService()
{
return null;
}
private TradingcardService getTradingcardService()
{
return null;
}
}
@@ -0,0 +1,64 @@
package com.peetz.kontor.data;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class FileExport
{
public void exportFile(java.io.PrintWriter out)
{
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
ExportComics exportComics = new ExportComics();
ExportMedien exportMedien = new ExportMedien();
ExportLibrary exportLibrary = new ExportLibrary();
ExportTradingCards exportTradingCards = new ExportTradingCards();
Element root = document.createElement("kontor");
document.appendChild(root);
root.appendChild(document.createTextNode("\n"));
root.appendChild(exportComics.backupComics(document));
root.appendChild(document.createTextNode("\n"));
root.appendChild(exportMedien.backupMedien(document));
root.appendChild(document.createTextNode("\n"));
root.appendChild(exportLibrary.backupLibrary(document));
root.appendChild(document.createTextNode("\n"));
root.appendChild(exportTradingCards.backupTradingCards(document));
root.appendChild(document.createTextNode("\n"));
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
DOMSource source = new DOMSource(document);
StreamResult result = new StreamResult(out);
transformer.transform(source, result);
} catch (DOMException e) {
System.out.println(e.getMessage());
} catch (TransformerConfigurationException e) {
System.out.println(e.getMessage());
} catch (FactoryConfigurationError e) {
System.out.println(e.getMessage());
} catch (ParserConfigurationException e) {
System.out.println(e.getMessage());
} catch (TransformerFactoryConfigurationError e) {
System.out.println(e.getMessage());
} catch (TransformerException e) {
System.out.println(e.getMessage());
}
}
}
@@ -0,0 +1,72 @@
package com.peetz.kontor.data;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class FileImport
{
public void importFile(File file)
{
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(file);
Node xmlNode = document.getFirstChild();
if (!xmlNode.getNodeName().equals("kontor")) return;
NodeList nodeList = xmlNode.getChildNodes();
for (int i=0; i<nodeList.getLength(); i++)
{
Node node = nodeList.item(i);
parseNode(node);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (FactoryConfigurationError e) {
e.printStackTrace();
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
public void parseNode(Node xmlNode)
{
if (xmlNode.getNodeType() == Node.TEXT_NODE) return;
if (xmlNode.getNodeName().equals("comics"))
{
System.out.println("comics");
new ImportComics().parseNode(xmlNode);
}
if (xmlNode.getNodeName().equals("medien"))
{
System.out.println("medien");
new ImportMedien().parseNode(xmlNode);
}
if (xmlNode.getNodeName().equals("library"))
{
System.out.println("library");
new ImportLibrary().parseNode(xmlNode);
}
if (xmlNode.getNodeName().equals("tradingcards"))
{
System.out.println("tradingcards");
new ImportTradingCards().parseNode(xmlNode);
}
}
}
@@ -0,0 +1,81 @@
package com.peetz.kontor.data;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.peetz.comics.entity.ComicEntity;
import com.peetz.comics.entity.PublisherEntity;
import com.peetz.comics.service.ComicService;
public class ImportComics
{
public void parseNode(Node xmlNode)
{
NodeList childNodes = xmlNode.getChildNodes();
for (int i=0; i<childNodes.getLength(); i++)
{
Node node = childNodes.item(i);
if (node.getNodeName().equals("publisher")) parsePublisher(node);
if (node.getNodeName().equals("comic")) parseComic(node);
if (node.getNodeName().equals("storyArc")) parseStoryArc(node);
}
}
public void parsePublisher(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node nameNode = attr.getNamedItem("name");
String name = nameNode.getNodeValue();
System.out.println("Publisher: " + id + ", " + name);
getComicService().addPublisher(name);
}
public void parseComic(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node nameNode = attr.getNamedItem("title");
String title = nameNode.getNodeValue();
Node completeNode = attr.getNamedItem("complete");
Node orderNode = attr.getNamedItem("order");
Node publisherNode = attr.getNamedItem("publisher");
System.out.println("Comic: " + id + ", " + title);
ComicEntity comic = getComicService().addComic(title);
comic.setCompleted(completeNode.equals("true"));
comic.setCurrentOrder(orderNode.equals("true"));
if (publisherNode != null)
{
PublisherEntity publisher = getComicService().getPublisherById(publisherNode.getNodeValue());
getComicService().assignPublisher(comic, publisher);
}
}
public void parseStoryArc(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node nameNode = attr.getNamedItem("title");
String title = nameNode.getNodeValue();
System.out.println("StoryArc: "+ id + ", " + title);
getComicService().addStoryArc(title);
}
private ComicService getComicService()
{
return null;
}
}
@@ -0,0 +1,88 @@
package com.peetz.kontor.data;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.peetz.library.entity.BookEntity;
import com.peetz.library.service.LibraryService;
public class ImportLibrary
{
public void parseNode(Node xmlNode)
{
NodeList childNodes = xmlNode.getChildNodes();
for (int i=0; i<childNodes.getLength(); i++)
{
Node node = childNodes.item(i);
if (node.getNodeName().equals("book")) parseBook(node);
if (node.getNodeName().equals("article")) parseArticle(node);
if (node.getNodeName().equals("shelf")) parseShelf(node);
}
}
public void parseBook(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node titleNode = attr.getNamedItem("title");
String title = titleNode.getNodeValue();
Node authorNode = attr.getNamedItem("author");
String author = authorNode.getNodeValue();
Node publisherNode = attr.getNamedItem("publisher");
String publisher = publisherNode.getNodeValue();
Node isbnNode = attr.getNamedItem("isbn");
String isbn = isbnNode.getNodeValue();
Node pagesNode = attr.getNamedItem("pages");
String pages = pagesNode.getNodeValue();
Node editionNode = attr.getNamedItem("edition");
String edition = editionNode.getNodeValue();
System.out.println("Book: " + id + ", " + title);
BookEntity book = getLibraryService().addBook(title);
book.setAuthor(author);
book.setPublisher(publisher);
book.setIsbn(isbn);
book.setPage(Long.valueOf(pages));
book.setEdition(edition);
getLibraryService().saveBook(book);
}
public void parseArticle(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node titleNode = attr.getNamedItem("title");
String title = titleNode.getNodeValue();
System.out.println("Article: " + id + ", " + title);
getLibraryService().addArticle(title);
}
public void parseShelf(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node titleNode = attr.getNamedItem("title");
String title = titleNode.getNodeValue();
System.out.println("Shelf: " + id + ", " + title);
getLibraryService().addBookshelf(title);
}
private LibraryService getLibraryService()
{
return null;
}
}
@@ -0,0 +1,91 @@
package com.peetz.kontor.data;
import java.util.ArrayList;
import java.util.Collection;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.peetz.medien.entity.AudioCDEntity;
import com.peetz.medien.service.MedienService;
public class ImportMedien
{
public void parseNode(Node xmlNode)
{
NodeList childNodes = xmlNode.getChildNodes();
for (int i=0; i<childNodes.getLength(); i++)
{
Node node = childNodes.item(i);
if (node.getNodeName().equals("audioCD")) parseAudioCD(node);
if (node.getNodeName().equals("film")) parseFilm(node);
if (node.getNodeName().equals("boxSet")) parseBoxSet(node);
}
}
public void parseAudioCD(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node albumNode = attr.getNamedItem("album");
String album = albumNode.getNodeValue();
Node artistNode = attr.getNamedItem("artist");
String artist = artistNode.getNodeValue();
String category = null;
String year = null;
Boolean wantList = Boolean.FALSE;
Collection<String> songs = new ArrayList<String>();
System.out.println("AudioCD: " + id + ", " + album + "/" + artist);
AudioCDEntity audioCD = getMedienService().addCD(album);
audioCD.setArtist(artist);
audioCD.setCategory(category);
audioCD.setReleaseYear(year);
audioCD.setWantList(wantList);
audioCD.getSongs().addAll(songs);
getMedienService().saveCD(audioCD);
}
public void parseFilm(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node titleNode = attr.getNamedItem("title");
String title = titleNode.getNodeValue();
System.out.println("DVD: " + id + ", " + title);
MedienService service = getMedienService();
service.addDVD(title);
}
public void parseBoxSet(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node idNode = attr.getNamedItem("id");
String id = idNode.getNodeValue();
Node titleNode = attr.getNamedItem("title");
String title = titleNode.getNodeValue();
System.out.println("BoxSet: " + id + ", " + title);
MedienService service = getMedienService();
service.addBoxSet(title);
}
private MedienService getMedienService()
{
return null;
}
}
@@ -0,0 +1,52 @@
package com.peetz.kontor.data;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.peetz.tradingcards.service.SportService;
import com.peetz.tradingcards.service.TradingcardService;
public class ImportTradingCards
{
public void parseNode(Node xmlNode)
{
NodeList childNodes = xmlNode.getChildNodes();
for (int i=0; i<childNodes.getLength(); i++)
{
Node node = childNodes.item(i);
if (node.getNodeName().equals("sport")) parseSport(node);
if (node.getNodeName().equals("manufacturer")) parseManufacturer(node);
}
}
public void parseSport(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node nameNode = attr.getNamedItem("name");
String name = nameNode.getNodeValue();
getSportService().addSport(name);
}
public void parseManufacturer(Node node)
{
NamedNodeMap attr = node.getAttributes();
Node nameNode = attr.getNamedItem("name");
String name = nameNode.getNodeValue();
getCardService().addManufacturer(name);
}
private SportService getSportService()
{
return null;
}
private TradingcardService getCardService()
{
return null;
}
}
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="kontor" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/kontor</jta-data-source>
<!--<exclude-unlisted-classes>false</exclude-unlisted-classes>-->
<!-- KontorImpl -->
<class>com.peetz.kontor.entity.KontorUserEntity</class>
<!-- ComicsImpl -->
<class>com.peetz.comics.entity.ArtistEntity</class>
<class>com.peetz.comics.entity.ComicEntity</class>
<class>com.peetz.comics.entity.IssueEntity</class>
<class>com.peetz.comics.entity.PublisherEntity</class>
<class>com.peetz.comics.entity.StoryArcEntity</class>
<class>com.peetz.comics.entity.VolumeEntity</class>
<!-- LibraryImpl -->
<class>com.peetz.library.entity.ArticleEntity</class>
<class>com.peetz.library.entity.BookEntity</class>
<class>com.peetz.library.entity.BookshelfEntity</class>
<class>com.peetz.library.entity.FileEntity</class>
<class>com.peetz.library.entity.MagazineEntity</class>
<class>com.peetz.library.entity.ShelfObjectEntity</class>
<class>com.peetz.library.entity.ShelfboardEntity</class>
<!-- MedienImpl -->
<class>com.peetz.medien.entity.AudioCDEntity</class>
<class>com.peetz.medien.entity.BoxSetEntity</class>
<class>com.peetz.medien.entity.FilmEntity</class>
<!-- TradingCardsImpl -->
<class>com.peetz.tradingcards.entity.BaseSetEntity</class>
<class>com.peetz.tradingcards.entity.InsertEntity</class>
<class>com.peetz.tradingcards.entity.ManufacturerEntity</class>
<class>com.peetz.tradingcards.entity.ParallelSetEntity</class>
<class>com.peetz.tradingcards.entity.PlayerEntity</class>
<class>com.peetz.tradingcards.entity.PositionEntity</class>
<class>com.peetz.tradingcards.entity.SportCardEntity</class>
<class>com.peetz.tradingcards.entity.SportEntity</class>
<class>com.peetz.tradingcards.entity.TeamEntity</class>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<!--
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
-->
</properties>
</persistence-unit>
</persistence>
@@ -0,0 +1,77 @@
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">
<navigation-rule>
<navigation-case>
<from-outcome>kontor</from-outcome>
<to-view-id>/index.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>comics</from-outcome>
<to-view-id>/comics.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>library</from-outcome>
<to-view-id>/library.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>medien</from-outcome>
<to-view-id>/medien.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>tradingcards</from-outcome>
<to-view-id>/tradingcards.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>sport</from-outcome>
<to-view-id>/sport.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>sportAdd</from-outcome>
<to-view-id>/sport/sportAdd.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/sport/sportAdd.xhtml</from-view-id>
<navigation-case>
<from-outcome>addSport</from-outcome>
<to-view-id>/sport/sportDetails.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>saveSport</from-outcome>
<to-view-id>/sport/sportDetails.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>now</managed-bean-name>
<managed-bean-class>java.util.Date</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>comicView</managed-bean-name>
<managed-bean-class>com.peetz.comics.view.ComicView</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>libraryView</managed-bean-name>
<managed-bean-class>com.peetz.library.view.LibraryView</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>medienView</managed-bean-name>
<managed-bean-class>com.peetz.medien.view.MedienView</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>tradingCardsView</managed-bean-name>
<managed-bean-class>com.peetz.tradingcards.view.TradingCardsView</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>sportView</managed-bean-name>
<managed-bean-class>com.peetz.tradingcards.view.SportView</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<context-root>/kontor</context-root>
<jsp-config>
</jsp-config>
</glassfish-web-app>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Comics Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
</div>
<div>
<div id="right">Add comic, publisher</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="Comics:"></h:outputLabel>
<h:outputText value="#{comicView.comicsNumber}"></h:outputText>
<h:outputLabel value="Publisher:"></h:outputLabel>
<h:outputText value="#{comicView.publisherNumber}"></h:outputText>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>
+145
View File
@@ -0,0 +1,145 @@
.spring {
border: thin solid black;
font-size:10px;
font-family:Arial;
font-weight:normal;
background-color: #ABE7FA;
}
.myButton {
-moz-box-shadow: 0px 10px 14px -7px #276873;
-webkit-box-shadow: 0px 10px 14px -7px #276873;
box-shadow: 0px 10px 14px -7px #276873;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #599bb3), color-stop(1, #408c99));
background:-moz-linear-gradient(top, #599bb3 5%, #408c99 100%);
background:-webkit-linear-gradient(top, #599bb3 5%, #408c99 100%);
background:-o-linear-gradient(top, #599bb3 5%, #408c99 100%);
background:-ms-linear-gradient(top, #599bb3 5%, #408c99 100%);
background:linear-gradient(to bottom, #599bb3 5%, #408c99 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#599bb3', endColorstr='#408c99',GradientType=0);
background-color:#599bb3;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:12px;
font-weight:bold;
padding:7px 15px;
text-decoration:none;
text-shadow:0px 1px 0px #3d768a;
}
.myButton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #408c99), color-stop(1, #599bb3));
background:-moz-linear-gradient(top, #408c99 5%, #599bb3 100%);
background:-webkit-linear-gradient(top, #408c99 5%, #599bb3 100%);
background:-o-linear-gradient(top, #408c99 5%, #599bb3 100%);
background:-ms-linear-gradient(top, #408c99 5%, #599bb3 100%);
background:linear-gradient(to bottom, #408c99 5%, #599bb3 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#408c99', endColorstr='#599bb3',GradientType=0);
background-color:#408c99;
}
.myButton:active {
position:relative;
top:1px;
}
.tablestyle {
margin:0px;padding:0px;
width:50%;
box-shadow: 10px 10px 5px #888888;
border:1px solid #000000;
-moz-border-radius-bottomleft:0px;
-webkit-border-bottom-left-radius:0px;
border-bottom-left-radius:0px;
-moz-border-radius-bottomright:0px;
-webkit-border-bottom-right-radius:0px;
border-bottom-right-radius:0px;
-moz-border-radius-topright:0px;
-webkit-border-top-right-radius:0px;
border-top-right-radius:0px;
-moz-border-radius-topleft:0px;
-webkit-border-top-left-radius:0px;
border-top-left-radius:0px;
}.tablestyle table{
border-collapse: collapse;
border-spacing: 0;
width:100%;
height:100%;
margin:0px;padding:0px;
}.tablestyle tr:last-child td:last-child {
-moz-border-radius-bottomright:0px;
-webkit-border-bottom-right-radius:0px;
border-bottom-right-radius:0px;
}
.tablestyle table tr:first-child td:first-child {
-moz-border-radius-topleft:0px;
-webkit-border-top-left-radius:0px;
border-top-left-radius:0px;
}
.tablestyle table tr:first-child td:last-child {
-moz-border-radius-topright:0px;
-webkit-border-top-right-radius:0px;
border-top-right-radius:0px;
}.tablestyle tr:last-child td:first-child{
-moz-border-radius-bottomleft:0px;
-webkit-border-bottom-left-radius:0px;
border-bottom-left-radius:0px;
}.tablestyle tr:hover td{
}
.tablestyle tr:nth-child(odd){ background-color:#aad4ff; }
.tablestyle tr:nth-child(even) { background-color:#ffffff; }.tablestyle td{
vertical-align:middle;
border:1px solid #000000;
border-width:0px 1px 1px 0px;
text-align:left;
padding:7px;
font-size:10px;
font-family:Arial;
font-weight:normal;
color:#000000;
}.tablestyle tr:last-child td{
border-width:0px 1px 0px 0px;
}.tablestyle tr td:last-child{
border-width:0px 0px 1px 0px;
}.tablestyle tr:last-child td:last-child{
border-width:0px 0px 0px 0px;
}
.tablestyle tr:first-child td{
background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) );
background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f);
background-color:#005fbf;
border:0px solid #000000;
text-align:center;
border-width:0px 0px 1px 1px;
font-size:14px;
font-family:Arial;
font-weight:bold;
color:#ffffff;
}
.tablestyle tr:first-child:hover td{
background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) );
background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f);
background-color:#005fbf;
}
.tablestyle tr:first-child td:first-child{
border-width:0px 0px 1px 0px;
}
.tablestyle tr:first-child td:last-child{
border-width:0px 0px 1px 1px;
}
+48
View File
@@ -0,0 +1,48 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:head>
<style type="text/css">
@import url("css/store.css");
</style>
</h:head>
<h:body>
<h:form id="jsfexample">
<h:panelGrid columns="2" styleClass="tablestyle">
<h:outputText value="Hibernate OGM example on WildFly" />
<br/>
<h:outputText value="Enter key:" />
<h:inputText value="#{controller.key}" />
<h:outputText value="Enter value:" />
<h:inputText value="#{controller.value}" />
<h:commandButton actionListener="#{controller.save}"
value="Save key/value" />
<h:messages />
</h:panelGrid>
<h:outputText value="No data yet!" rendered="#{empty controller.propertyList}" />
<br/>
<h:dataTable value="#{controller.propertyList}" var="item" styleClass="tablestyle" rendered="#{not empty controller.propertyList}">
<h:column>
<f:facet name="header">Key</f:facet>
<h:outputText value="#{item.key}" />
</h:column>
<h:column>
<f:facet name="header">Value</f:facet>
<h:outputText value="#{item.value}" />
</h:column>
</h:dataTable>
</h:form>
</h:body>
</html>
@@ -0,0 +1,44 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">
<ui:insert name="top">Top</ui:insert>
</div>
<div>
<div id="left">
<ui:insert name="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
</ui:insert>
</div>
<div>
<div id="right">
<ui:insert name="right">Right</ui:insert>
</div>
<div id="content" class="right_content">
<ui:insert name="content">Content</ui:insert>
</div>
</div>
</div>
<div id="bottom">
<ui:insert name="bottom">Ingenieurbüro Thomas Peetz</ui:insert>
</div>
</h:body>
</html>
@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Library Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
</div>
<div>
<div id="right">Right</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="Books:"></h:outputLabel>
<h:outputText value="#{libraryView.bookNumber}"></h:outputText>
<h:outputLabel value="Articles:"></h:outputLabel>
<h:outputText value="#{libraryView.articleNumber}"></h:outputText>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>
@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Medien Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
</div>
<div>
<div id="right">Right</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="CD:"></h:outputLabel>
<h:outputText value="#{medienView.cdNumber}"></h:outputText>
<h:outputLabel value="DVD:"></h:outputLabel>
<h:outputText value="#{medienView.dvdNumber}"></h:outputText>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>
@@ -0,0 +1,71 @@
#top {
position: relative;
background-color: lightgrey;
text-align: center;
width: 100%;
height: 30px;
color: white;
padding: 5px;
//margin: 0px 0px 10px 0px;
}
#bottom {
position: relative;
background-color: lightgrey;
width: 100%;
height: 30px;
padding: 5px;
//margin: 10px 0px 0px 0px;
}
#left {
float: left;
background-color: tan;
padding: 5px;
width: 150px;
height: 50%;
}
#right {
float: right;
background-color: tan;
//padding: 5px;
width: 150px;
height: 50%;
}
.center_content {
position: relative;
background-color: wheat;
padding: 5px;
height: 50%;
}
.left_content {
background-color: tan;
padding: 5px;
margin-left: 170px;
height: 50%;
}
.right_content {
background-color: wheat;
padding: 5px;
//margin: 0px 170px 0px 170px;
height: 50%;
}
#top a:link, #top a:visited {
color: white;
font-weight : bold;
text-decoration: none;
}
#top a:link:hover, #top a:visited:hover {
color: black;
font-weight : bold;
text-decoration : underline;
}
@@ -0,0 +1,29 @@
body {
background-color: #ffffff;
font-size: 12px;
font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
color: #000000;
margin: 10px;
}
h1 {
font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
border-bottom: 1px solid #AFAFAF;
font-size: 16px;
font-weight: bold;
margin: 0px;
padding: 0px;
color: #D20005;
}
a:link, a:visited {
color: #045491;
font-weight : bold;
text-decoration: none;
}
a:link:hover, a:visited:hover {
color: #045491;
font-weight : bold;
text-decoration : underline;
}
@@ -0,0 +1,17 @@
<html>
<head>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<title>Testseite</title>
</head>
<body>
<div id="window">
<div id="title">Testseite</div>
<div id="mainWindow">
<div id="navigation">Links</div>
<div id="detail">Hauptseite</div>
<div id="reference">Details</div>
</div>
<div id="footer">Ingenieurb&uuml;ro Thomas Peetz</div>
</div>
</body>
</html>
@@ -0,0 +1,40 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Trading Cards Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
<h:link outcome="sport">Sport</h:link><br></br>
</div>
<div>
<div id="right">Right</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="Sport:"></h:outputLabel>
<h:outputText value="#{sportView.sportNumber}"></h:outputText>
<h:outputLabel value="Teams:"></h:outputLabel>
<h:outputText value="#{sportView.teamNumber}"></h:outputText>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>
@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Trading Cards Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
<h:link outcome="sport">Sport</h:link><br></br>
</div>
<div>
<div id="right">Right</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="Sport:"></h:outputLabel>
<h:inputText id="name" maxlength="16" value="#{sportView.name}"></h:inputText>
<h:commandButton id="submit" value="submit" action="addSport"/>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>
@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Trading Cards Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
<h:link outcome="sport">Sport</h:link><br></br>
</div>
<div>
<div id="right">Right</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="Sport:"></h:outputLabel>
<h:outputText value="#{sportView.name}"></h:outputText>
<h:commandButton id="save" value="save" action="saveSport"/>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>
@@ -0,0 +1,40 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet name="./css/default.css"/>
<h:outputStylesheet name="./css/cssLayout.css"/>
<title>Kontor Application</title>
</h:head>
<h:body>
<div id="top">Trading Cards Application</div>
<div>
<div id="left">
<h:link outcome="kontor">Kontor</h:link><br></br>
<h:link outcome="comics">Comics</h:link><br></br>
<h:link outcome="library">Library</h:link><br></br>
<h:link outcome="medien">Medien</h:link><br></br>
<h:link outcome="tradingcards">Trading Cards</h:link><br></br>
<h:link outcome="sport">Sport</h:link><br></br>
</div>
<div>
<div id="right">Right</div>
<div id="content" class="right_content">
<f:view>
<h:form>
<h:outputLabel value="Manufacturer:"></h:outputLabel>
<h:outputText value="#{tradingCardsView.manufacturerNumber}"></h:outputText>
<h:outputLabel value="SportCards:"></h:outputLabel>
<h:outputText value="#{tradingCardsView.sportCardNumber}"></h:outputText>
</h:form>
</f:view>
</div>
</div>
</div>
<div id="bottom">Ingenieurbüro Thomas Peetz</div>
</h:body>
</html>