Commit e6dadf36 by ercsenyiandras

xxx

parents
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>telepules_CKANApplication3_JPA_inRepo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
eclipse.preferences.version=1
org.eclipse.jpt.core.platform=generic2_1
org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=true
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<root>
<facet id="jpt.jpa">
<node name="libprov">
<attribute name="provider-id" value="jpa-no-op-library-provider"/>
</node>
</facet>
</root>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="cloudfoundry.standalone.app" version="1.0"/>
<installed facet="java" version="1.8"/>
<installed facet="jpt.jpa" version="2.1"/>
</faceted-project>
eclipse.preferences.version=1
org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
package com.springjpa.repo;
import org.springframework.data.repository.CrudRepository;
import com.springjpa.model.County;
public interface CountyRepo extends CrudRepository<County, Long>, CountyRepoCustom{
County findByName(String name);
}
package com.springjpa.repo;
import com.springjpa.model.County;
public interface CountyRepoCustom {
public County saveSpec(County arg0) ;
public boolean createTable();
public void deleteTable();
}
package com.springjpa.repo;
import java.text.MessageFormat;
import org.springframework.beans.factory.annotation.Autowired;
import com.google.gson.JsonObject;
import com.springjpa.model.County;
import com.springjpa.persistence.DatastoreManager;
public class CountyRepoImpl implements CountyRepoCustom {
static final String FIELDS = "[ {\"id\": \"id\", \"type\": \"int\"}, {\"id\": \"name\", \"type\": \"text\"} ]";
static final String RECORD = "[ {\"id\": {0}, \"name\": \"{1}\"} ]"; //ebből lesz: [ {"id": 1, "name": "Heves megye"} ]
static final String TABLE = "megye";
static int ID = 1;
String resourceId;
/* CKAN-save lesz, aminek lényege, h REST-tel megy fel az adatbázisba :((
* @see com.springjpa.repo.CountyRepoCustom#saveSpec(com.springjpa.model.County)
*/
@Override
public County saveSpec(County arg) {
int id = (int)arg.getId();
String name = arg.getName();
//a fentiekből kell egy ilyen: [{"id": .. (nem kell idézőjel), "name": "..."}]
String records = createRecord(id, name);
String result = insertTableOf(TABLE, records);
County ret = getCounty(result);
return ret;
}
private County getCounty(String result) {
JsonObject jobject = getArray(result, 0);
County ret = new County();
ret.setId(jobject.get("id").getAsInt());
ret.setName(jobject.get("name").getAsString());
return ret;
}
private String createRecord(int id, String name) {
//innen: https://examples.javacodegeeks.com/core-java/text/messageformat/java-messageformat-example/
MessageFormat mf = new MessageFormat(RECORD);
Object[] objArray = {new Integer(id), name};
String record = mf.format(objArray);
return record;
}
@Override
public boolean createTable() {
boolean ret = true;
resourceId = createTableOf(FIELDS); //"[ {\"id\": \"id\", \"type\": \"int\"}, {\"id\": \"name\", \"type\": \"text\"} ]" );
if (resourceId == null) {
System.out.println("Nem sikerült az adatbázis létrehozása!");
ret = false;
}
if (ret) {
String check = renameResourceOf(resourceId, TABLE);
if (check == null) {
System.out.println("Nem sikerült az adatbázis-erőforrás átnevezése!");
ret = false;
}
}
return ret;
}
@Override
public void deleteTable() {
// TODO Auto-generated method stub
}
}
package com.springjpa.repo;
import org.springframework.data.repository.CrudRepository;
import com.springjpa.model.County;
public interface CountyRepository extends CrudRepository<County, Long>{
County findByName(String name);
}
//innen: http://www.tugay.biz/2016/06/spring-web-mvc-with-h2-database.html
package com.springjpa.persistence;
import javax.sql.DataSource;
import org.h2.server.web.WebServlet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
@Configuration
@ComponentScan(value = "hu.bme.spring")
public class DataSourceConfiguration {
@Autowired
Environment env;
@Bean
public DataSource dataSource() {
final DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName("org.h2.Driver");
// dataSource.setUrl("jdbc:h2:mem:CKAN");
dataSource.setUrl("jdbc:h2:tcp://localhost//etc/CKAN");
dataSource.setUsername("sa");
dataSource.setPassword("");
return dataSource;
}
@Bean
public ServletRegistrationBean h2servletRegistration() {
ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet());
registration.addUrlMappings("/h2-console/*");
registration.setEnabled(true);
return registration;
}
}
\ No newline at end of file
package com.springjpa.persistence;
import java.util.Properties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
@Configuration
@EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactory", transactionManagerRef = "transactionManager",
basePackages = {"com.springjpa.repo"})
public class DatabaseConfiguration extends DataSourceConfiguration {
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
vendorAdapter.setGenerateDdl(true);
vendorAdapter.setShowSql(false);
LocalContainerEntityManagerFactoryBean entityManagerFactory =
new LocalContainerEntityManagerFactoryBean();
entityManagerFactory.setJpaVendorAdapter(vendorAdapter);
entityManagerFactory.setPackagesToScan("com.springjpa.model");
entityManagerFactory.setDataSource(dataSource());
entityManagerFactory.setJpaProperties(jpaProperties());
return entityManagerFactory;
}
@Bean
public JpaTransactionManager transactionManager() {
JpaTransactionManager txManager = new JpaTransactionManager();
txManager.setEntityManagerFactory(entityManagerFactory().getObject());
return txManager;
}
@Bean
public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
return new PersistenceExceptionTranslationPostProcessor();
}
// @Bean
// public DataSource dataSource() {
// //This uses JNDI, you could create the data source in any way you want
// try {
// Context initCtx = new InitialContext();
// Context envCtx = (Context) initCtx.lookup("java:comp/env");
// return (DataSource) envCtx.lookup("jdbc/yourDS");
// } catch (Exception e) {
// e.printStackTrace();
// throw new RuntimeException("Unable to lookup datasource", e);
// }
// }
private Properties jpaProperties() {
Properties props = new Properties();
props.put("hibernate.dialect", "org.hibernate.dialect.H2Dialect");
return props;
}
}
package com.springjpa.repo;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableTransactionManagement
@EnableAutoConfiguration
@EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactory", transactionManagerRef = "transactionManager", basePackages = {
"com.springjpa.repo" })
public class RepositoryConfig {
@Autowired
JpaVendorAdapter jpaVendorAdapter;
@Autowired
DataSource dataSource;
@Bean(name = "entityManager")
public EntityManager entityManager() {
return entityManagerFactory().createEntityManager();
}
@Bean(name = "entityManagerFactory")
public EntityManagerFactory entityManagerFactory() {
LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
emf.setDataSource(dataSource);
emf.setJpaVendorAdapter(jpaVendorAdapter);
emf.setPackagesToScan("com.springjpa.model");
emf.setPersistenceUnitName("default"); // <- giving 'default' as name
emf.afterPropertiesSet();
return emf.getObject();
}
@Bean(name = "transactionManager")
public PlatformTransactionManager transactionManager() {
JpaTransactionManager tm = new JpaTransactionManager();
tm.setEntityManagerFactory(entityManagerFactory());
return tm;
}
}
\ No newline at end of file
package com.springjpa.repo;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import com.springjpa.model.County;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
public interface TownRepository extends CrudRepository<Town, Long>{
List<Town> findByName(String name);
List<Town> findAll();
@Query("SELECT t.township FROM Town t INNER JOIN t.township ts WHERE ts.county.name = :county AND t.name = :town")
TownShip findByTown(@Param("town") String town, @Param("county") String county);
}
package com.springjpa.repo;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
import com.springjpa.model.TownShip;
public interface TownShipRepository extends CrudRepository<TownShip, Long>{
List<TownShip> findByName(String name);
}
ez a jó hely:(és magyar)
http://stackoverflow.com/questions/40993532/converting-html-tables-to-bootstrap-columns-responsive-design
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springjpa</groupId>
<artifactId>springJPA-postgreSQL</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SpringJPA-PostgreSQL</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<hibernate.version>4.3.6.Final</hibernate.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.192</version>
</dependency>
<dependency>
<groupId>org.ckan.jdbc</groupId>
<artifactId>ckanjdbc</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- JPA -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- For connection pooling -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- ckan-jar miatt -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<!-- saját ckan-client -->
<dependency>
<groupId>org.ckan</groupId>
<artifactId>ckan</artifactId>
<version>2.1</version>
</dependency>
<!-- google elemeknek kell -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cloud-connectors</artifactId>
</dependency>
<!-- thymeleaf -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<description>1. Adott telepulesre megmondja, h melyik megye (megye-szekhellyel), melyik jaras (jaras-szekhellyel)
2. Terkepre teszi a telepulest, megye- ill. jaras-szekhelyet, ami adott esetben egy es uaz. is lehet :)
3. Kiirja a jaras tobbi telepulesenek nevet (valtozo oszlopszammal).
Mobile-friendly kialakitasu.
Technikailag CKAN-Datastore-t hasznal, mégpedig úgy, hogy van egy CkanJdbcDriver, amivel a JPA működik.</description>
</project>
package com.springjpa.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "\"ca33d78d-ab3e-45a0-a97b-bdfaed227274\"")
public class School implements Serializable {
private static final long serialVersionUID = -3009157732242241606L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name = "pos")
private int pos;
@Column(name = "zip", length=4)
private String zip;
@Column(name = "name", length=100)
private String name;
@Column(name = "comp_m")
private int comp_m;
@Column(name = "comp_s")
private int comp_s;
public School() {
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public int getPos() {
return pos;
}
public void setPos(int pos) {
this.pos = pos;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getComp_m() {
return comp_m;
}
public void setComp_m(int comp_m) {
this.comp_m = comp_m;
}
public int getComp_s() {
return comp_s;
}
public void setComp_s(int comp_s) {
this.comp_s = comp_s;
}
public void setAll(int pos, int zip, String name, int mat, int scr) {
this.pos = pos;
this.zip = "" + zip;
this.name = name;
this.comp_m = mat;
this.comp_s = scr;
}
@Override
public String toString() {
return String.format("%d. irsz='%s' név='%s' matek='%d' szöveg='%d'", pos, zip, name, comp_m, comp_s);
}
}
package com.springjpa.repo;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.springjpa.model.School;
public interface SchoolRepository extends CrudRepository<School, Long>{
List<School> findByName(String name);
public List<School> findAll();
@Query("SELECT t FROM School t WHERE t.id = :id")
public School findOne(@Param("id") long id);
// @Query("SELECT ts FROM TownShip ts WHERE ts.county.id = :id")
// /** A megyéhez tartozó összes járás
// * @param id
// * @return
// */
// public School findAllForCounty(@Param("id") long id);
}
package com.springjpa;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.CriteriaSpecification;
import org.hibernate.criterion.Restrictions;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import com.springjpa.model.County;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
import com.springjpa.repo.CountyRepository;
import com.springjpa.repo.TownRepository;
import com.springjpa.repo.TownShipRepository;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringJpaApplicationIntelligentTests {
@Autowired
private SessionFactory sessionFactory;
@Autowired
private TownRepository townRepo;
@Autowired
private TownShipRepository tsRepo;
@Autowired
private CountyRepository countyRepo;
@BeforeClass
public static void init() {
}
@Ignore
@Test
public void contextLoads() {
}
@Test
public void testTownsAll() {
System.out.println("\n-----testTownsAll---------");
List<Town> towns = townRepo.findAll();
for (Town town : towns) {
System.out.println(town);
}
}
@Ignore
@Test
public void testCountiesAll() {
System.out.println("\n-----testCountiesAll---------");
List<County> counties = countyRepo.findAll();
for (County county : counties) {
System.out.println(county.getName());
}
}
@Ignore
//select varos.* FROM TELEPULES2 varos join JARAS2 jaras ON jaras.id = varos.ts_id WHERE jaras.cityname = 'Mohács'
@Test
public void testTownsInTownship() {
System.out.println("\n-----testTownsInTownship: Mohácsi járás---------");
Session session = sessionFactory.openSession();
Criteria c = session.createCriteria(Town.class, "varos");
c.createAlias("varos.township", "jaras");
c.add(Restrictions.eq("jaras.cityname", "Mohács"));
c.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
List<Town> list = c.list();
if (!list.isEmpty())
for (Town town : list) {
System.out.println(town);
}
else
System.out.println("--üres--");
}
@Ignore
//select jaras.* FROM JARAS2 jaras join TELEPULES2 telepules ON telepules.ts_id = jaras.id WHERE telepules.name = 'Hímesháza'
/** Település alapján keressük az járást a megyében
* @param address benne megye és településnév
* @param plus az itteni szöveg ("- összes megye - ") is lehet a megye értéke
* @return
*/
@Test
public void testTownshipByTown() {
System.out.println("\n-----testTownshipByTown---------");
Session session = sessionFactory.openSession();
Criteria c = session.createCriteria(TownShip.class, "jaras");
c.createAlias("jaras.towns", "telepules");
c.add(Restrictions.eq("telepules.name", "Basal"));
c.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
List<TownShip> list = c.list();
if (!list.isEmpty())
System.out.println(list.get(0));
else
System.out.println("--üres--");
}
@Ignore
@Test
public void testTownShipsAll() {
System.out.println("\n-----testTownShipsAll---------");
List<TownShip> tss = tsRepo.findAll();
for (TownShip ts : tss) {
System.out.println(ts);
}
}
@Ignore
@Test
public void testTownsInTownship0() {
System.out.println("\n-----testTownsInTownship0: Mohácsi járás---------");
List<TownShip> tss = tsRepo.findByName("Mohácsi Járási Hivatal");
for (TownShip ts : tss) {
System.out.println(ts);
}
long ts_id = tss.get(0).getId();
// long ts_id = 6;
List<Town> list = townRepo.findAllForTS(ts_id);
if (!list.isEmpty())
for (Town town : list) {
System.out.println(town);
}
else
System.out.println("--üres--");
}
@Ignore
@Test
public void testTownsInCountry() {
System.out.println("\n-----testTownsInCountry---------");
String NAME = "Ercsi";
TownShip ret;
List<County> counties = countyRepo.findAll();
for (County county : counties) {
ret = townRepo.findByTownAndCounty(NAME, county.getName());
if (ret != null) {
System.out.println(NAME + " ---> " + ret);
break;
}
}
}
@Ignore
@Test
public void testTownShipsOfTown() {
System.out.println("\n-----testTownShipsOfTown---------");
TownShip ts = townRepo.findByTownAndCounty("Ercsi", "Baranya megye");
System.out.println(ts);
for (Town town : ts.getTowns()) {
System.out.println("\t" + town);
}
}
@Ignore
@Test
public void testTownsOfCounty() {
System.out.println("\n-----testTownsOfCounty---------");
int ID = 7;
List<Town> ret = new ArrayList<>();
List<TownShip> tss = tsRepo.findAllForCounty(ID);
for (TownShip ts : tss) {
List<Town> towns = townRepo.findAllForTS(ts.getId());
for(Town town : towns) {
ret.add(town);
}
}
System.out.println("Megye = " + ID);
for (Town town : ret) {
System.out.println("\t" + town);
}
}
}
package com.springjpa;
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import com.springjpa.model.County;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
import com.springjpa.repo.CountyRepository;
import com.springjpa.repo.TownRepository;
import com.springjpa.repo.TownShipRepository;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringJpaApplicationTests {
@Autowired
private TownRepository townRepo;
@Autowired
private TownShipRepository tsRepo;
@Autowired
private CountyRepository countyRepo;
@BeforeClass
public static void init() {
}
@Ignore
@Test
public void contextLoads() {
}
@Ignore
@Test
public void testTownsAll() {
System.out.println("\n-----testTownsAll---------");
List<Town> towns = townRepo.findAll();
for (Town town : towns) {
System.out.println(town);
}
}
@Ignore @Test
public void testTownsInCountry() {
System.out.println("\n-----testTownsInCountry---------");
String NAME = "Ercsi";
TownShip ret;
List<County> counties = countyRepo.findAll();
for (County county : counties) {
ret = townRepo.findByTownAndCounty(NAME, county.getName());
if (ret != null) {
System.out.println(NAME + " ---> " + ret);
break;
}
}
}
@Test //mert rossz a megye :))
public void testTownShipOfTown() {
System.out.println("\n-----testTownShipOfTown---------");
try{
TownShip ts = townRepo.findByTownAndCounty("Ercsi", "Baranya megye");
System.out.println(ts);
System.out.println(ts);
for (Town town : ts.getTowns()) {
System.out.println("\t" + town);
}
} catch(Exception ex) {
assertThat(ex.getMessage(), containsString("bad"));
}
fail("expected SQLException because of bad county-name");
}
@Test
public void testTownShipOfTown2() {
System.out.println("\n-----testTownShipOfTown2---------");
try{
TownShip ts = townRepo.findByTown("Ercsi");
System.out.println(ts);
System.out.println(ts);
for (Town town : ts.getTowns()) {
System.out.println("\t" + town);
}
} catch(Exception ex) {
assertThat(ex.getMessage(), containsString("bad"));
}
}
@Ignore @Test
public void testTownsOfCounty() {
System.out.println("\n-----testTownsOfCounty---------");
int ID = 7;
List<Town> ret = new ArrayList<>();
List<TownShip> tss = tsRepo.findAllForCounty(ID);
for (TownShip ts : tss) {
List<Town> towns = townRepo.findAllForTS(ts.getId());
for(Town town : towns) {
ret.add(town);
}
}
System.out.println("Megye = " + ID);
for (Town town : ret) {
System.out.println("\t" + town);
}
}
}
package com.springjpa.persistence;
import java.util.List;
import com.springjpa.io.AddressForm;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
public interface TableMethods {
/** Visszaadja az öszes megye nevét, de a lista végéhez hozzábiggyeszti a plus-t, ami ilyen "- összes megye -"
* @param plus
* @return
*/
List<String> getAllCountyNames(String plus);
/** Beállítja az aktuális megyét sorszáma alapján
* @param id
*/
void setCountyById(long id);
/** Beállítja az aktuális megyét név szerint
* @param district itt a megye neve
* @param plus az itteni szöveg ("- összes megye - ") is lehet a district értéke
*/
void setCountyByName(String district, String plus);
/** Az aktuáluis megyeszámot kitörli
*
*/
void deleteCounty();
/** Az aktuális megye össze települését adja vissza
* @return
*/
List<Town> getCityList();
/** Település alapján keressük az járást a megyében
* @param address benne megye és településnév
* @param plus az itteni szöveg ("- összes megye - ") is lehet a megye értéke
* @return
*/
TownShip getTownShipOf(AddressForm address, String plus);
/** Ellenőrzi, h van-e azonos nevű település az országban (pl. ékezethiba miatt)
* @return
*/
boolean checkAllTowns();
/** Megnézi, h megvan-e mind a 3 tábla: megye, járás, település
* @return meglevő táblák száma; ha 3, akkor teljesen jó
*/
int checkTables();
}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="DEV_HOME" value="/home/cloud/CKAN/telepulesek/log" />
<appender name="FILE-AUDIT"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${DEV_HOME}/debug.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} - %msg%n
</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<logger name="com.springjpa" level="debug" additivity="false">
<appender-ref ref="FILE-AUDIT" />
</logger>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="cts-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<!-- add classes -->
<class>com.springjpa.model.County</class>
<class>com.springjpa.model.Town</class>
<class>com.springjpa.model.TownShip</class>
<properties>
<!-- JDBC properties -->
<property name="javax.persistence.jdbc.url" value="jdbc:ckan:rest:vm.ik.bme.hu:10851/hu/api/3?apikey=485baae6-5394-4af9-a76a-cbd1b902bfb0"/>
<property name="javax.persistence.jdbc.driver" value="hu.bme.ckan.jdbc.rest.CkanDriver"/>
<!-- <property name="javax.persistence.jdbc.user" value="sa"/> -->
<!-- <property name="javax.persistence.jdbc.password" value=""/> -->
<!-- <property name="javax.persistence.jdbc.apikey" value="485baae6-5394-4af9-a76a-cbd1b902bfb0"/> -->
<!-- Hibernate properties -->
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<!-- ez ki kell venni, mert különben hibát ír ki -->
<!-- <property name="hibernate.hbm2ddl.auto" value="update"/> -->
<property name="hibernate.format_sql" value="false"/>
<property name="hibernate.show_sql" value="false"/>
</properties>
</persistence-unit>
</persistence>
\ No newline at end of file
package com.springjpa;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Description;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.orm.jpa.vendor.HibernateJpaSessionFactoryBean;
import org.thymeleaf.templateresolver.ServletContextTemplateResolver;
@SpringBootApplication
public class SpringJpaApplication {
public static void main(String[] args) {
SpringApplication.run(SpringJpaApplication.class, args);
}
@Bean
@Description("Thymeleaf template resolver serving HTML 5")
public ServletContextTemplateResolver templateResolver() {
ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
templateResolver.setCacheable(false);
templateResolver.setTemplateMode("HTML5");
templateResolver.setCharacterEncoding("UTF-8");
templateResolver.setPrefix("classpath*:templates/");
templateResolver.setSuffix(".html");
return templateResolver;
}
//
// @Bean
// @Description("Thymeleaf template engine with Spring integration")
// public SpringTemplateEngine templateEngine() {
// SpringTemplateEngine templateEngine = new SpringTemplateEngine();
//// templateEngine.addDialect(new SpringSecurityDialect());
//// templateEngine.addDialect(new LayoutDialect(new GroupingStrategy()));
// templateEngine.setTemplateResolver(templateResolver());
//
// return templateEngine;
// }
//
// @Bean
// @Description("Thymeleaf view resolver")
// public ViewResolver viewResolver() {
//
// ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
// viewResolver.setTemplateEngine(templateEngine());
// viewResolver.setCharacterEncoding("UTF-8");
// viewResolver.setCache(false);
// viewResolver.setOrder(1);
//
// return viewResolver;
// }
//templates-ek innen: http://stackoverflow.com/questions/39262370/spring-boot-how-to-correctly-define-template-locations
//innen: http://stackoverflow.com/questions/36545667/spring-boot-thymeleaf-not-finding-message-properties
@Bean
public MessageSource messageSource() {
final ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setBasenames("classpath:/i18n/messages");
messageSource.setUseCodeAsDefaultMessage(true);
messageSource.setDefaultEncoding("UTF-8");
messageSource.setCacheSeconds(5);
return messageSource;
}
//innen: http://stackoverflow.com/questions/29226099/access-sessionfactory-from-spring-boot-application
@Bean
public HibernateJpaSessionFactoryBean sessionFactory() {
return new HibernateJpaSessionFactoryBean();
}
}
package com.springjpa.controller;
//innen: http://javainsimpleway.com/spring-mvc-form-validation-with-custom-validator/
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;
import com.springjpa.io.AddressForm;
import com.springjpa.model.Town;
import com.springjpa.repo.TownRepository;
@Component
public class AddressFromValidator implements Validator {
@Autowired
TownRepository townRepo;
private AddressForm addressNormed;
@Override
public boolean supports(Class<?> clazz) {
return AddressForm.class.isAssignableFrom(clazz);
}
@Override
public void validate(Object target, Errors errors) {
AddressForm addr = (AddressForm)target;
String city = StringUtils.trimToNull(addr.getCity());
addressNormed = new AddressForm();
addressNormed.setCity(city);
//településnév
if (city == null)
errors.rejectValue("city", "ERROR_NOT_DEFINED", "A településnév nem lehet üres.");
else
try {
List<Town> towns = townRepo.findByName(city);
if (towns == null || towns.isEmpty() || towns.size() > 1) errors.rejectValue("city", "ERROR_NOT_DEFINED", "Érvénytelen a településnév.");
} catch (Exception e) {
// System.out.println(e); //IndexOutOfBoundException
//nem tudom, h miért kell a 2. param, de így jó :))
boolean letters = city.chars().allMatch(Character::isLetter);
errors.rejectValue("city", "ERROR_NOT_DEFINED", letters
? "Nincs az országban ilyen nevű település."
: "Érvénytelen karakter(ek) a településnévben." );
}
}
public AddressForm getNormed() {
return addressNormed;
}
}
package com.springjpa.controller;
public class SearchBean {
private String label;
private String value;
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValue() {
return value;
}
public void setValue(String id) {
this.value = id;
}
}
package com.springjpa.controller;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.springjpa.google.GoogleMapClient;
import com.springjpa.google.LatLon;
import com.springjpa.io.Address;
import com.springjpa.io.AddressForm;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
import com.springjpa.persistence.TableRepositoryImpl;
/**
* INICIÁLÁS (init): h2:mem-mel dolgozik - eldobja az eddigi táblákat; létrehoz újakat, amik persze üresek
* FELDOLGOZÁS (searchInfo): alapellenőrzés - ha hiba, vissza a beolvasásra
* kitölti a táblákat - ha eddig is ez a tábla volt, akkor semmi; ha nem, akkor törli a táblákat, feltölti azokat
* keres - ha a tábla valójában üres, akkor hibajelzés (error-ba); ha nincs ilyen cím, akkor hibajelzés (error-ba); ha van, akkor result-ba feltöltés
* továbblépés a kiírásra
*
* @author eax
*
*/
@Controller
@SessionAttributes({"actual"})
public class WebController extends WebMvcConfigurerAdapter {
//naplózáshoz
public static Logger LOG = Logger.getLogger(WebController.class);
//azonos lat-lon esetén a módosítás
static final double DELTA_LAT = 0.004;
static final double DELTA_LON = 0.003;
//log-ban ez a keresési eredményhez
static final String SEP = " ==>\t";
//korrekció, ha a település és a járási székhely azonos (pl. Mohácsi Járás <--> Mohács)
static final double KORR = 0.0000461;
//ez a végére kerül
static final String ALL_COUNTY = "- összes megye -";
//@Configuration és a @Bean kapcsolatat innen: http://stackoverflow.com/questions/26461697/spring-boot-autowired-null
@Autowired
TableRepositoryImpl tables;
//spec. validáció
@Autowired
AddressFromValidator inputValidator;
static List<String> countyList;
@PostConstruct
public void init() {
System.out.println("Application 'Telepules' started...");
LOG.info("Application started.");
// table.findAll();
int status = tables.checkTables();
if (status == 3) {
//megyék listája kell
countyList = tables.getAllCountyNames(ALL_COUNTY);
//közben összes tepelülés is beállítva
if (tables.checkAllTowns()) System.out.println("Van település név-duplikáció!");
//kezdő választás: "összes"; sőt: nincs is megyeválasztás :))
tables.setCountyById(0);
LOG.info("Initilization succeded.");
System.out.println("Initilization succeded.");
} else {
LOG.info("Initilization failed.");
System.out.println("Initilization failed.");
}
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/results").setViewName("results");
}
//kirajzolja a form-ot
@GetMapping("/")
public String showForm(AddressForm address, Model model, HttpSession session) {
model.addAttribute("dropDownDistrict", countyList);
AddressForm actual = (AddressForm)session.getAttribute("actual");
if (actual != null) model.addAttribute("addressForm", actual);
return "index"; //"form";
}
//bejön a Submit
@PostMapping("/")
public String searchInfo(@Valid @ModelAttribute AddressForm addressForm, BindingResult bindingResult, Model model) {
addressForm.setCounty(ALL_COUNTY);
// if (bindingResult.hasErrors()) {
// //alaphibák
// model.addAttribute("dropDownDistrict", countyList);
//// model.addAttribute("dropDownType", typeList);
// return "index"; //"form";
// }
inputValidator.validate(addressForm, bindingResult);
if (bindingResult.hasErrors()) {
return "index";
}
AddressForm address = inputValidator.getNormed();
LOG.info(address + SEP);
model.addAttribute("actual", address);
address.normalize();
//most már a település alapján keressük az járást a megyében
TownShip ts = tables.getTownShipOf(address, ALL_COUNTY);
if (ts == null) {
model.addAttribute("error", true);
String errorMessage = ALL_COUNTY.equals(address.getCounty())
? "-- " + address.getCity() + " nevű település nem létezik az " + "országban. --"
: "-- " + address.getCity() + " nevű település nem létezik " + address.getCounty() + " területén. --";
LOG.info(address + SEP + errorMessage);
model.addAttribute("result", errorMessage);
} else {
model.addAttribute("error", false);
//megvan a járás: ts
Address target = new Address(ts.getCounty().getName(), ts.getCityname());
Address target2 = new Address(ts.getCounty().getName(), ts.getCounty().getCityname());
LOG.info(address.getCity() + SEP + ts.getNames() + " " + ts.getCounty().getNames());
//ezen túl is '- összes megye -' lesz érvényes!!
//itt a település
Address home = new Address(address.getCounty(), address.getCity());
//a címhez hozzáadom a GPS-koordinátákat
GoogleMapClient client = new GoogleMapClient();
LatLon gps = client.getCoord(home);
if (gps != null) {
home.setGps(gps);
}
model.addAttribute("home", home); //==>> itt a település
LOG.info(address.getCity() + SEP + home.getFull());
System.out.println("\nvaros = " + home) ;
model.addAttribute("result", ts.getName()); //==>> mert ez string; ui. hibajelzés is itt megy ki!
//ha a gps 0.0/0.0, akkor gps = null!
int check = checkEquality(home.getCity(), target.getCity(), target2.getCity());
boolean homeEqTarget = false;
switch (check) {
case 111:
//valójában csak egy van :))
target.setGps(home.getGps());
target.modGps(DELTA_LAT, DELTA_LON);
target2.setGps(home.getGps());
target2.modGps(DELTA_LAT, -DELTA_LON);
homeEqTarget = true;
break;
case 112:
//település és járási székhely azonos: Mohács,Mohács,Pécs
target.setGps(home.getGps());
target.modGps(DELTA_LAT, DELTA_LON);
target2.setGps(client.getCoord(target2));
// homeEqTarget = false;
break;
case 122:
//a két székhely azonos: Pécsvárad,Pécs,Pécs
target.setGps(client.getCoord(target));
target2.setGps(target.getGps());
target2.modGps(DELTA_LAT, DELTA_LON);
// homeEqTarget = false;
break;
case 123:
//mindenki különböző
target.setGps(client.getCoord(target));
target2.setGps(client.getCoord(target2));
// homeEqTarget = false;
}
model.addAttribute("hometarget", homeEqTarget);
model.addAttribute("target", target); //==>> itt a járás
LOG.info(target.getCity() + SEP + target.toString());
System.out.println("jaras = " + target) ;
model.addAttribute("target2", target2); //==>> itt a megye
LOG.info(target2.getCity() + SEP + target2.toString());
System.out.println("megye = " + target2) ;
System.out.println("csak1 = " + homeEqTarget) ;
//továbbiak
Set<String> others = ts.getTownNames();
Set<String> removes = new HashSet<>();
removes.add(target.getCity());
removes.add(home.getCity());
others.removeAll(removes);
List<String> towns = new ArrayList<>(others);
Collections.sort(towns);
model.addAttribute("others", towns);
}
model.addAttribute("address", address); //==>> csak a visszalépés miatt
// return "redirect:/results";
return "results";
}
/** Összehasonlítja a település, járási székhely, megyei székhely neveket
* t j m t j m t j m t j m
* 111-->Pécs,Pécs,Pécs 112-->Mohács,Mohács,Pécs vagy 122-->Pécsvárad,Pécs,Pécs 123-->Babarc,Mohács,Pécs
* @param home
* @param ts
* @param county
* @return
*/
private int checkEquality(String town, String ts, String county) {
int ret = 1;
if (town.equals(ts)) {
if (ts.equals(county)) ret = 111;
else ret = 112;
} else if (ts.equals(county)) { ret = 122;
} else {
ret = 123;
}
return ret;
}
//új címhez a Submit
@PostMapping("/xxx")
public String back2ShowForm( @ModelAttribute("actual") AddressForm address, BindingResult bindingResult, Model model) {
model.addAttribute("dropDownDistrict", countyList);
//session változó feltöltése
address.setCounty(ALL_COUNTY);
model.addAttribute("addressForm", address);
return "redirect:/";
}
static final String WOVELS = "AÁEÉIÍOÓÖŐUÚÜŰ";
/** "a" vagy "az" névelőt teszi ki!
* @param full
* @return
*/
private String az(String noun) {
String ret = "a";
char char0 = noun.charAt(0);
for (int i = 0; i < WOVELS.length(); i++) {
if (WOVELS.charAt(i) == char0) {
ret = "az";
break;
}
}
return ret + " ";
}
//kirajzolja a végeredményt
@GetMapping("/results")
public String showResult(Model model) {
return "results";
}
//------------------- autocomp service számára -----------------
/** autocomplete-hez kell; visszaadja a listát
* @param term
* @param locale
* @return
*/
@ResponseBody
@RequestMapping(value = "/json/city", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE, headers="Accept=*/*")
public List<SearchBean> getCityList( @RequestParam("term") String term /*, Locale locale*/ ) {
Locale locale = new Locale("hu");
//System.out.println("---getTownList " + term);
List<Town> townList = null;
List<SearchBean> suggestTownList = null;
String townName = "";
SearchBean searchBean = null;
try {
townList = new ArrayList<Town>();
suggestTownList = new ArrayList<SearchBean>();
townList = tables.getCityList(); // load street Objects list
//System.out.println("cityNames = " + townList.size());
for ( Town town : townList ){
townName = town.getName();
if (townName.toLowerCase( locale ).startsWith( term.toLowerCase( locale ) ) ) {
searchBean = new SearchBean();
searchBean.setLabel( townName );
searchBean.setValue( townName );
suggestTownList.add( searchBean );
}
}
} catch ( /*CustomGeneric*/Exception e ) {
// returnResponse = new ResponseEntity<List<SearchBean>>((List<SearchBean>)null, HttpStatus.BAD_REQUEST );
}
return suggestTownList;
}
/** Amint a megye változik
* @param term az új megye, szövegesen
* @param locale
* @return
*/
@ResponseBody
@RequestMapping(value = "/json/district", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE, headers="Accept=*/*")
public String changeCounty( @RequestParam("term") String district /*, Locale locale*/ ) {
//System.out.println("---changeDistrict " + district);
String ret = "success";
//csak az adott megye adataiból lesz lista
tables.setCountyByName(district, ALL_COUNTY);
if ("failure".equals(ret)) tables.deleteCounty(); //deleteTables();
//System.out.println("---changeDistrict " + district + " " + ret);
return ret;
}
}
package com.springjpa.google;
import java.util.List;
import org.codehaus.jackson.annotate.JsonProperty;
class AddressComponent {
@JsonProperty("long_name")
private String longName;
@JsonProperty("short_name")
private String shortName;
private List<String> types;
public String getLongName() {
return longName;
}
public void setLongName(String longName) {
this.longName = longName;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public List<String> getTypes() {
return types;
}
public void setTypes(List<String> types) {
this.types = types;
}
}
\ No newline at end of file
package com.springjpa.google;
import org.codehaus.jackson.annotate.JsonProperty;
class Geometry {
private Location location;
@JsonProperty("location_type")
private String locationType;
@JsonProperty("viewport")
private ViewPort viewPort;
private ViewPort bounds;
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
public String getLocationType() {
return locationType;
}
public void setLocationType(String locationType) {
this.locationType = locationType;
}
public ViewPort getViewPort() {
return viewPort;
}
public void setViewPort(ViewPort viewPort) {
this.viewPort = viewPort;
}
public ViewPort getBounds() {
return bounds;
}
public void setBounds(ViewPort bounds) {
this.bounds = bounds;
}
}
//class-okat innen vettem: http://stackoverflow.com/questions/19891455/java-how-to-parse-json-for-geolocation
package com.springjpa.google;
import java.util.Arrays;
import java.util.List;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.cloud.cloudfoundry.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import com.springjpa.io.Address;
@Service
public class GoogleMapClient {
private static final String REST_SERVICE_URL = "https://maps.googleapis.com/maps/api/geocode/json?address=";
private static final String KEY = "&key=AIzaSyDGgDthmnjFGGla6vWFTBF-BgU_O0_JXQk";
private RestTemplate restTemplate = new RestTemplate();
public LatLon getCoord(Address address) {
Address ret = _getCoordAndZip(address, false);
return ret != null ? ret.getGps() : null;
}
public Address getCoordAndZip(Address address) {
return _getCoordAndZip(address, true);
}
@JsonIgnoreProperties(ignoreUnknown = true)
public Address _getCoordAndZip(Address address, boolean zipToo) {
String city = address.getCity();
String county = address.getCounty();
Address ret = new Address();
// LatLon ret1 = null;
// String ret2 = null;
//ez a minta: http://maps.googleapis.com/maps/api/geocode/json?address=Cigánd,HU
//address a vesszőig, HU automatikusan bemegy
//http://maps... fix cím
try {
HttpHeaders headers = new HttpHeaders();
headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
HttpEntity<String> entity = new HttpEntity<String>(headers);
//System.out.println(REST_SERVICE_URL + city + "," + county + ", HU");
// "Cigánd" "Heves megye"
ResponseEntity<String> result = restTemplate.exchange(REST_SERVICE_URL + city + "," + county + ",HU" + KEY, HttpMethod.GET, entity, String.class);
//System.out.println(result);
ObjectMapper mapper = new ObjectMapper();
// System.out.println(result.getBody());
Root root = mapper.readValue(result.getBody(), Root.class);
for (Result res : root.getResults()) {
List<AddressComponent> comps = res. getAddressComponents();
if (zipToo) {
for (AddressComponent comp : comps) {
String zip = getPostalCode(comp);
if (zip != null) {
System.out.print(address.getFull() + "==>");
ret.setZip(zip);
System.out.println(zip);
break;
}
}
}
if (isGoodDistrict(comps, city /*address.getDistrict()*/)) {
// System.out.print(address.getFull() + "==>");
double lat = Double.parseDouble(res.getGeometry().getLocation().getLat());
double lon = Double.parseDouble(res.getGeometry().getLocation().getLng());
// System.out.print(" lat = " + lat);
// System.out.print(" lon = " + lon);
// System.out.println();
if (Math.abs(lat) > 0.001d && Math.abs(lon) > 0.001d)
ret.setGps(new LatLon(lat, lon));
}
}
} catch (Exception e) {
System.out.println(e);
ret = null;
System.out.println(address.getFull() + ", HU" + " ->hiba");
}
return ret;
}
private String getPostalCode(AddressComponent comp) {
for (String type : comp.getTypes()) {
if ("postal_code".equals(type)) return comp.getLongName();
}
return null;
}
private String getAddress(String zip, String street, String number) {
String ret = zip + " ";
ret += "Budapest" + " ";
ret += street + " ";
ret += number;
return ret;
}
private boolean isGoodDistrict(List<AddressComponent> comps, String name) {
boolean ret = false;
for (AddressComponent comp : comps) {
if (name.equals(comp.getLongName()))
return true;
}
return ret;
}
/*
public static void main(String[] args) {
String city = "Balaton";
String county = "Heves megye";
Address address = new Address();
address.setCity(city);
address.setCounty(county);
// address.setZip(zipcode);
GoogleMapClient client = new GoogleMapClient();
Address ok = client.getCoordAndZip(address);
System.out.println(address.getFull() + "-->" + ok.getFull());
}
*/
}
package com.springjpa.google;
public class LatLon {
private double lat;
private double lon;
public LatLon(){
}
public LatLon(double lat, double lon){
this.lat = lat;
this.lon = lon;
}
public double getLat() {
return lat;
}
public void setLat(double lat) {
this.lat = lat;
}
public double getLon() {
return lon;
}
public void setLon(double lon) {
this.lon = lon;
}
public String toString() {
String ret = "";
ret += " " + this.getLat();
ret += "/" + this.getLon();
return ret;
}
}
package com.springjpa.google;
class Location {
private String lat;
private String lng;
public String getLat() {
return lat;
}
public void setLat(String lat) {
this.lat = lat;
}
public String getLng() {
return lng;
}
public void setLng(String lng) {
this.lng = lng;
}
}
package com.springjpa.google;
import java.util.List;
import org.codehaus.jackson.annotate.JsonProperty;
class Result {
@JsonProperty("address_components")
private List<AddressComponent> addressComponents;
@JsonProperty("formatted_address")
private String formattedAddress;
private Geometry geometry;
private List<String> types;
private boolean partial_match;
private String place_id;
public boolean isPartial_match() {
return partial_match;
}
public void setPartial_match(boolean partial_match) {
this.partial_match = partial_match;
}
public String getPlace_id() {
return place_id;
}
public void setPlace_id(String place_id) {
this.place_id = place_id;
}
public List<AddressComponent> getAddressComponents() {
return addressComponents;
}
public void setAddressComponents(List<AddressComponent> addressComponents) {
this.addressComponents = addressComponents;
}
public String getFormattedAddress() {
return formattedAddress;
}
public void setFormattedAddress(String formattedAddress) {
this.formattedAddress = formattedAddress;
}
public Geometry getGeometry() {
return geometry;
}
public void setGeometry(Geometry geometry) {
this.geometry = geometry;
}
public List<String> getTypes() {
return types;
}
public void setTypes(List<String> types) {
this.types = types;
}
}
\ No newline at end of file
package com.springjpa.google;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown=true)
class Root {
private List<Result> results;
private String status;
public List<Result> getResults() {
return results;
}
public void setResults(List<Result> results) {
this.results = results;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}
package com.springjpa.google;
class ViewPort {
private Location northeast;
private Location southwest;
public Location getNortheast() {
return northeast;
}
public void setNortheast(Location northeast) {
this.northeast = northeast;
}
public Location getSouthwest() {
return southwest;
}
public void setSouthwest(Location southwest) {
this.southwest = southwest;
}
}
package com.springjpa.io;
import com.springjpa.google.LatLon;
public class Address extends AddressForm {
protected String zip = "";
protected LatLon gps;
public Address() {
}
public Address(String county, String city) {
this.city = city;
this.county = county;
}
public String getZip() {
return zip;
}
public void setZip(String zip) {
this.zip = zip;
}
public LatLon getGps() {
return gps;
}
public void setGps(LatLon gps) {
LatLon x = new LatLon();
if (gps != null) {
x.setLat(gps.getLat());
x.setLon(gps.getLon());
}
this.gps = x;
}
public void modGps(double dlat, double dlon) {
this.gps.setLat(this.gps.getLat() + dlat);
this.gps.setLon(this.gps.getLon() + dlon);
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
/**
* @return "1134 Budapest XIII. BP" VAGY "2081 Budaörs Pest megye 18.343567/34.98765"
*/
public String getFull() {
String ret = "";
if (this.zip != "") ret += this.zip + " ";
ret += this.city + " ";
ret += this.county;
if (gps != null) {
// ret += " " + gps.getLat();
// ret += "/" + gps.getLon();
ret += " " + gps.toString();
}
return ret;
}
public String toString() {
return this.getFull();
}
}
package com.springjpa.io;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
public class AddressForm {
// @NotNull
//innen: http://forum.spring.io/forum/spring-projects/roo/65364-roo-jsr-303-validations-and-localization
// @Size(min=2, max=5, message="A beírás hossza minimum {min}, maximum {max} karakter, mint pl. XII vagy 1124")
protected String county;
@NotNull
@Size(min=3, max=30, message="A település nevét kell beírni, aminek hossza minimum {min}, maximum {max} karakter, mint pl. Mohács")
protected String city;
/** A beírtakról levágjuk a felesleges space-eket.
*
*/
public void normalize() {
if (city != null) city = city.trim();
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String toString() {
return this.city + ", " + this.county;
}
}
\ No newline at end of file
package com.springjpa.json;
public class Key {
//{"name":"Baranyajeno"}
private String key; //de ez változhat: "name"
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
package com.springjpa.json;
public class KeyInt extends Key {
//{"id":"5"}
//stringként kell, bár számérték!!!
private String id; //ez lehet: "id", "ts_id", "county_id", stb.
public int getId() {
return Integer.parseInt(id);
}
public void setId(int id) {
this.id = String.valueOf(id);
}
}
package com.springjpa.json;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
public class Query {
//{"resource_id":"8a0c31ee-0c36-450f-96e7-8bbfe967ae22","q":{"name":"Nemeske"},"limit":1000,"sort":"name"}
private String resource_id;
private Key q;
private int limit; //string legyen!!!
private String sort; //vesszővel több is
private Boolean distinct;
private String fields; //,-vel több is
public String getResource_id() {
return resource_id;
}
public void setResource_id(String resource_id) {
this.resource_id = resource_id;
}
public Key getQ() {
return q;
}
public void setQ(Key q) {
this.q = q;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
}
package com.springjpa.json;
public class Rename {
//{"id": "...", "name": "..."}
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.springjpa.model;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
//@Table(name="megye2")
@Table(name="\"c63e6780-4f9b-494f-b456-8cf86251929c\"")
public class County implements java.io.Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name="name", length=100, unique=true)
private String name;
@Column(name="cityname", length=100, unique=true)
private String cityname;
// @OneToMany(fetch=FetchType.EAGER) //(cascade = {CascadeType.PERSIST})
// @JoinTable(
// name="Megye_Jarasok",
// joinColumns = @JoinColumn( name="county_id"),
// inverseJoinColumns = @JoinColumn( name="ts_id")
// )
@OneToMany(cascade = CascadeType.ALL, mappedBy = "county", fetch=FetchType.LAZY)
private Set<TownShip> townships = new HashSet<>(0);
public County() {
}
public County(String name) {
this.name = name;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCityname() {
return cityname;
}
public void setCityname(String cityname) {
this.cityname = cityname;
}
public Set<TownShip> getTownShips() {
return townships;
}
public void setTownShips(Set<TownShip> tss) {
townships = tss;
}
public void setTownShips(List<TownShip> tss) {
townships = new HashSet(tss);
}
public void addTownShip(TownShip ts) {
townships.add(ts);
}
public String toString() {
return "MEGYE " + this.name + " " + (this.townships == null || this.townships.isEmpty() ? "null" : this.townships.size());
}
public String getNames() {
return this.getName() + "/" + this.getCityname();
}
}
package com.springjpa.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
//@Table(name="telepules2")
@Table(name="\"9419355b-4322-437e-8e5f-33bea21e3b00\"")
public class Town implements java.io.Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name="name", length=100, unique=true)
private String name;
@ManyToOne
// @JoinColumn(name = "ts_id", nullable = false)
@JoinColumn(name="ts_id")
private TownShip township;
public Town() {
}
public Town(String name) {
this.name = name;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public TownShip getTownship() {
return township;
}
public void setTownship(TownShip township) {
this.township = township;
}
public String toString() {
return "TELEPÜLÉS " + this.name + "/" + (this.township == null ? "null" : this.township.getName());
}
}
package com.springjpa.model;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
//@Table(name="jaras2")
@Table(name="\"26bf4d5b-2b92-41cb-9b28-394aed57344f\"")
public class TownShip implements java.io.Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
@Column(name="name", length=100, unique=true)
private String name;
@Column(name="cityname", length=100, unique=true)
private String cityname;
// @OneToMany(fetch=FetchType.EAGER) //(cascade = {CascadeType.PERSIST})
// @JoinTable(
// name="Jaras_Telepulesek",
// joinColumns = @JoinColumn( name="ts_id"),
// inverseJoinColumns = @JoinColumn( name="town_id")
// )
@OneToMany(cascade = CascadeType.ALL, mappedBy = "township", fetch = FetchType.EAGER)
private Set<Town> towns = new HashSet<Town>(0);
@ManyToOne(fetch=FetchType.LAZY)
// @JoinColumn(name = "county_id", nullable = false)
@JoinColumn(name="county_id")
private County county;
public TownShip() {
}
public TownShip(String name) {
this.name = name;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Set<Town> getTowns() {
return towns;
}
public Set<String> getTownNames() {
Set<String> ret = new HashSet<>();
for (Town town : this.towns) {
ret.add(town.getName());
}
return ret;
}
public void setTowns(Set<Town> towns) {
this.towns = towns;
}
public void addTown(Town town) {
this.towns.add(town);
}
public County getCounty() {
return county;
}
public void setCounty(County county) {
this.county = county;
}
public String getCityname() {
return cityname;
}
public void setCityname(String cityname) {
this.cityname = cityname;
}
public String toString() {
return "JÁRÁS " + this.name + "/" + this.cityname + " " + (this.towns == null || this.towns.isEmpty() ? "null" : this.towns.size());
}
public String getNames() {
return this.getName() + "/" + this.getCityname();
}
}
package com.springjpa.persistence;
import java.util.List;
import com.springjpa.io.AddressForm;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
public interface TableRepo {
/** Visszaadja az öszes megye nevét, de a lista végéhez hozzábiggyeszti a plus-t, ami ilyen "- összes megye -"
* @param plus
* @return
*/
List<String> getAllCountyNames(String plus);
/** Beállítja az aktuális megyét sorszáma alapján
* @param id
*/
void setCountyById(long id);
/** Beállítja az aktuális megyét név szerint
* @param district itt a megye neve
* @param plus az itteni szöveg ("- összes megye - ") is lehet a district értéke
*/
void setCountyByName(String district, String plus);
/** Az aktuáluis megyeszámot kitörli
*
*/
void deleteCounty();
/** Az aktuális megye össze települését adja vissza
* @return
*/
List<Town> getCityList();
/** Az aktuális megye össze települését adja vissza
* @return
*/
List<String> getCountyNames();
/** Település alapján keressük az járást a megyében
* @param address benne megye és településnév
* @param plus az itteni szöveg ("- összes megye - ") is lehet a megye értéke
* @return
*/
TownShip getTownShipOf(AddressForm address, String plus);
/** Ellenőrzi, h van-e azonos nevű település az országban (pl. ékezethiba miatt)
* @return
*/
boolean checkAllTowns();
/** Megnézi, h megvan-e mind a 3 tábla: megye, járás, település
* @return meglevő táblák száma; ha 3, akkor teljesen jó
*/
int checkTables();
}
package com.springjpa.persistence;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import com.springjpa.io.AddressForm;
import com.springjpa.model.County;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
import com.springjpa.repo.CountyRepository;
import com.springjpa.repo.TownRepository;
import com.springjpa.repo.TownShipRepository;
@Component
@ComponentScan(value = "com.springjpa")
public class TableRepositoryImpl implements TableRepo {
@Autowired
private TownRepository townRepo;
@Autowired
private TownShipRepository tsRepo;
@Autowired
private CountyRepository countyRepo;
private String county;
private long countyId; //ha 0, akkor az összes település
private static List<String> countyNames;
private static List<Town> townAll;
private List<Town> cities;
@Override
/** Kibővítés a VÉGÉRE!!!
* @param plus pl. "összes megye"
* @return
*/
public List<String> getAllCountyNames(String plus) {
List<String> ret = this.getAllCountyNames();
ret.add(plus);
return ret;
}
private List<String> getAllCountyNames() {
countyNames = new ArrayList<>();
for(County county : countyRepo.findAll()) {
countyNames.add(county.getName());
}
return countyNames;
}
@Override
public void setCountyById(long id) {
if (id == 0){
System.out.println("megye = " + "mind");
this.countyId = 0;
cities = townAll;
System.out.println("országos település adatok KÉSZ!");
} else {
System.out.println("megye = " + id);
this.countyId = id;
cities = countyRepo.findAllForCounty(id); //getTownsOf(id);
System.out.println("megyei település adatok KÉSZ!");
}
}
@Override
/** Település alapján keressük az járást a megyében
* @param address benne megye és településnév
* @param plus az itteni szöveg ("- összes megye - ") is lehet a megye értéke
* @return
*/
public TownShip getTownShipOf(AddressForm address, String plus) {
TownShip ret = null;
// if (plus.equals(address.getCounty())) {
//"összes megye" van kijelölve --> keressük a megyét
for (String county : countyNames) {
ret = townRepo.findByTown(address.getCity());
if (ret != null) {
address.setCounty(ret.getCounty().getName());
break;
}
}
// } else {
// ret = townRepo.findByTown(address.getCity());
// }
return ret;
}
@Override
public List<Town> getCityList() {
return cities;
}
@Override
public List<String> getCountyNames() {
return countyNames;
}
@Override
public void setCountyByName(String name, String plus) {
if (plus.equals(name)) {
//System.out.println("megye = " + "mind");
// this.countyId = 0;
// cities = townAll; //getTownsOfAll();
//System.out.println("országos település adatok KÉSZ!");
setCountyById(0);
} else {
// County county = countyRepo.findByName(name);
// setCountyById(county.getId());
setCountyById(countyRepo.getIdByName(name));
}
}
@Override
public void deleteCounty() {
// TODO Auto-generated method stub
}
@Override
public boolean checkAllTowns() {
Set<String> set = new HashSet<>();
// townAll = townRepo.findAll();
// int i = 1;
// for (Town town : townAll) {
// set.add(town.getName());
// i++;
// if (i % 100 == 0) System.out.println(i + " ...");
// }
// return (townAll.size() != set.size());
townAll = new ArrayList<>();
List<County> counties = countyRepo.findAll();
for (County county : counties) {
System.out.println(county.getName() + " ...");
List<Town> towns = countyRepo.findAllForCounty(county.getId());
townAll.addAll(towns);
for (Town town : towns) {
set.add(town.getName());
}
}
return true;
}
@Override
public int checkTables() {
// TODO Auto-generated method stub
return 3;
}
}
package com.springjpa.repo;
import java.util.List;
import javax.persistence.QueryHint;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.QueryHints;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import com.springjpa.model.County;
import com.springjpa.model.Town;
public interface CountyRepository extends CrudRepository<County, Long>{
List<County> findByName(String name);
@Query("SELECT t FROM County t")
List<County> findAll();
@Query("SELECT t FROM County t WHERE t.id = :id")
County findOne(@Param("id") long id);
Long getIdByName(String name);
@Query("SELECT t FROM Town t INNER JOIN t.township ts WHERE ts.county.id = :id")
/** A megyéhez tartozó összes település
* @param id megye azonosító
* @return
*/
List<Town> findAllForCounty(@Param("id") long id);
}
package com.springjpa.repo;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import com.springjpa.model.Town;
import com.springjpa.model.TownShip;
public interface TownRepository extends CrudRepository<Town, Long>{
List<Town> findByName(String name);
List<Town> findAll();
@Query("SELECT t FROM Town t WHERE t.id = :id")
Town findOne(@Param("id") long id);
@Query("SELECT t FROM Town t WHERE t.township.id = :id")
/** A járáshoz tartozó összes település
* @param id járás azonosító
* @return
*/
List<Town> findAllForTS(@Param("id") long id);
@Query("SELECT t.township FROM Town t INNER JOIN t.township ts WHERE t.name = :name" )
// @Query("SELECT t.township FROM Town t INNER JOIN t.township ts WHERE ts.county.name = :county AND t.name = :name")
/** Keressük a településhez tartozó járást
* @param town "Magyarbóly"
* @return "Bólyi Járási Hivatal"
*/
TownShip findByTown(@Param("name") String name); //, @Param("county") String county);
}
package com.springjpa.repo;
import java.util.List;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import com.springjpa.model.TownShip;
public interface TownShipRepository extends CrudRepository<TownShip, Long>{
List<TownShip> findByName(String name);
public List<TownShip> findAll();
@Query("SELECT t FROM TownShip t WHERE t.id = :id")
public TownShip findOne(@Param("id") long id);
@Query("SELECT ts FROM TownShip ts WHERE ts.county.id = :id")
/** A megyéhez tartozó összes járás
* @param id
* @return
*/
List<TownShip> findAllForCounty(@Param("id") long id);
}
#HA h2-db van
#spring.datasource.url=jdbc:h2:tcp://localhost/~/CKAN
#spring.datasource.username=sa
#spring.datasource.password=
#spring.datasource.driverClassName=org.h2.Driver
#erdekes: drive, mint org.h2.Driver nem kell megadni :))
#HA ckan-jdbc
spring.datasource.url=jdbc:ckan:rest:vm.ik.bme.hu:4339/hu/api/3?apikey=485baae6-5394-4af9-a76a-cbd1b902bfb0
spring.datasource.driverClassName=hu.bme.ckan.jdbc.rest.CkanDriver
#INNEN kzs
#spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.jpa.show-sql=false
#persistence.xml-t nem olvassa :((
#spring.h2.console.enabled=true
welcome.message: Hello CKAN!
spring.thymeleaf.check-template-location=true
spring.thymeleaf.prefix=classpath:templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
spring.thymeleaf.cache=false
server.port=8090
server.contextPath=/HU_OGD/telepulesek
logging.level.root=WARN
logging.level.org.springframework=WARN
logging.level.org.springframework.web=ERROR
#logging.level.com.springjpa=DEBUG
#logging.level.=DEBUG
logging.file=/etc/CKAN/log/log.txt
#logging.config=classpath:logback.xml
logging.level.org.hibernate.jdbc=trace
#logging.level.org.hibernate.type=trace
scan.packages=com.springjpa
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
# Root logger option
log4j.rootLogger=INFO, stdout
# Hibernate logging options (INFO only shows startup messages)
log4j.logger.org.hibernate=INFO
# Log JDBC bind parameter runtime arguments
log4j.logger.org.hibernate.jdbc=trace
log4j.logger.org.hibernate.type=trace
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=bbbf8580fc8e5eea0a168d36e150864e)
* Config saved to config.json and https://gist.github.com/bbbf8580fc8e5eea0a168d36e150864e
*/
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: #ffffff;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #337ab7;
text-decoration: none;
}
a:hover,
a:focus {
color: #23527c;
text-decoration: underline;
}
a:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
figure {
margin: 0;
}
img {
vertical-align: middle;
}
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}
.img-rounded {
border-radius: 6px;
}
.img-thumbnail {
padding: 4px;
line-height: 1.42857143;
background-color: #ffffff;
border: 1px solid #dddddd;
border-radius: 4px;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
display: inline-block;
max-width: 100%;
height: auto;
}
.img-circle {
border-radius: 50%;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eeeeee;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
[role="button"] {
cursor: pointer;
}
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
.container-fluid {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
float: left;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.col-xs-pull-12 {
right: 100%;
}
.col-xs-pull-11 {
right: 91.66666667%;
}
.col-xs-pull-10 {
right: 83.33333333%;
}
.col-xs-pull-9 {
right: 75%;
}
.col-xs-pull-8 {
right: 66.66666667%;
}
.col-xs-pull-7 {
right: 58.33333333%;
}
.col-xs-pull-6 {
right: 50%;
}
.col-xs-pull-5 {
right: 41.66666667%;
}
.col-xs-pull-4 {
right: 33.33333333%;
}
.col-xs-pull-3 {
right: 25%;
}
.col-xs-pull-2 {
right: 16.66666667%;
}
.col-xs-pull-1 {
right: 8.33333333%;
}
.col-xs-pull-0 {
right: auto;
}
.col-xs-push-12 {
left: 100%;
}
.col-xs-push-11 {
left: 91.66666667%;
}
.col-xs-push-10 {
left: 83.33333333%;
}
.col-xs-push-9 {
left: 75%;
}
.col-xs-push-8 {
left: 66.66666667%;
}
.col-xs-push-7 {
left: 58.33333333%;
}
.col-xs-push-6 {
left: 50%;
}
.col-xs-push-5 {
left: 41.66666667%;
}
.col-xs-push-4 {
left: 33.33333333%;
}
.col-xs-push-3 {
left: 25%;
}
.col-xs-push-2 {
left: 16.66666667%;
}
.col-xs-push-1 {
left: 8.33333333%;
}
.col-xs-push-0 {
left: auto;
}
.col-xs-offset-12 {
margin-left: 100%;
}
.col-xs-offset-11 {
margin-left: 91.66666667%;
}
.col-xs-offset-10 {
margin-left: 83.33333333%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-8 {
margin-left: 66.66666667%;
}
.col-xs-offset-7 {
margin-left: 58.33333333%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-5 {
margin-left: 41.66666667%;
}
.col-xs-offset-4 {
margin-left: 33.33333333%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-2 {
margin-left: 16.66666667%;
}
.col-xs-offset-1 {
margin-left: 8.33333333%;
}
.col-xs-offset-0 {
margin-left: 0%;
}
@media (min-width: 768px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.col-sm-pull-12 {
right: 100%;
}
.col-sm-pull-11 {
right: 91.66666667%;
}
.col-sm-pull-10 {
right: 83.33333333%;
}
.col-sm-pull-9 {
right: 75%;
}
.col-sm-pull-8 {
right: 66.66666667%;
}
.col-sm-pull-7 {
right: 58.33333333%;
}
.col-sm-pull-6 {
right: 50%;
}
.col-sm-pull-5 {
right: 41.66666667%;
}
.col-sm-pull-4 {
right: 33.33333333%;
}
.col-sm-pull-3 {
right: 25%;
}
.col-sm-pull-2 {
right: 16.66666667%;
}
.col-sm-pull-1 {
right: 8.33333333%;
}
.col-sm-pull-0 {
right: auto;
}
.col-sm-push-12 {
left: 100%;
}
.col-sm-push-11 {
left: 91.66666667%;
}
.col-sm-push-10 {
left: 83.33333333%;
}
.col-sm-push-9 {
left: 75%;
}
.col-sm-push-8 {
left: 66.66666667%;
}
.col-sm-push-7 {
left: 58.33333333%;
}
.col-sm-push-6 {
left: 50%;
}
.col-sm-push-5 {
left: 41.66666667%;
}
.col-sm-push-4 {
left: 33.33333333%;
}
.col-sm-push-3 {
left: 25%;
}
.col-sm-push-2 {
left: 16.66666667%;
}
.col-sm-push-1 {
left: 8.33333333%;
}
.col-sm-push-0 {
left: auto;
}
.col-sm-offset-12 {
margin-left: 100%;
}
.col-sm-offset-11 {
margin-left: 91.66666667%;
}
.col-sm-offset-10 {
margin-left: 83.33333333%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-8 {
margin-left: 66.66666667%;
}
.col-sm-offset-7 {
margin-left: 58.33333333%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-5 {
margin-left: 41.66666667%;
}
.col-sm-offset-4 {
margin-left: 33.33333333%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-2 {
margin-left: 16.66666667%;
}
.col-sm-offset-1 {
margin-left: 8.33333333%;
}
.col-sm-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 992px) {
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
float: left;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.col-md-pull-12 {
right: 100%;
}
.col-md-pull-11 {
right: 91.66666667%;
}
.col-md-pull-10 {
right: 83.33333333%;
}
.col-md-pull-9 {
right: 75%;
}
.col-md-pull-8 {
right: 66.66666667%;
}
.col-md-pull-7 {
right: 58.33333333%;
}
.col-md-pull-6 {
right: 50%;
}
.col-md-pull-5 {
right: 41.66666667%;
}
.col-md-pull-4 {
right: 33.33333333%;
}
.col-md-pull-3 {
right: 25%;
}
.col-md-pull-2 {
right: 16.66666667%;
}
.col-md-pull-1 {
right: 8.33333333%;
}
.col-md-pull-0 {
right: auto;
}
.col-md-push-12 {
left: 100%;
}
.col-md-push-11 {
left: 91.66666667%;
}
.col-md-push-10 {
left: 83.33333333%;
}
.col-md-push-9 {
left: 75%;
}
.col-md-push-8 {
left: 66.66666667%;
}
.col-md-push-7 {
left: 58.33333333%;
}
.col-md-push-6 {
left: 50%;
}
.col-md-push-5 {
left: 41.66666667%;
}
.col-md-push-4 {
left: 33.33333333%;
}
.col-md-push-3 {
left: 25%;
}
.col-md-push-2 {
left: 16.66666667%;
}
.col-md-push-1 {
left: 8.33333333%;
}
.col-md-push-0 {
left: auto;
}
.col-md-offset-12 {
margin-left: 100%;
}
.col-md-offset-11 {
margin-left: 91.66666667%;
}
.col-md-offset-10 {
margin-left: 83.33333333%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-8 {
margin-left: 66.66666667%;
}
.col-md-offset-7 {
margin-left: 58.33333333%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-5 {
margin-left: 41.66666667%;
}
.col-md-offset-4 {
margin-left: 33.33333333%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-2 {
margin-left: 16.66666667%;
}
.col-md-offset-1 {
margin-left: 8.33333333%;
}
.col-md-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 1200px) {
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
float: left;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.col-lg-pull-12 {
right: 100%;
}
.col-lg-pull-11 {
right: 91.66666667%;
}
.col-lg-pull-10 {
right: 83.33333333%;
}
.col-lg-pull-9 {
right: 75%;
}
.col-lg-pull-8 {
right: 66.66666667%;
}
.col-lg-pull-7 {
right: 58.33333333%;
}
.col-lg-pull-6 {
right: 50%;
}
.col-lg-pull-5 {
right: 41.66666667%;
}
.col-lg-pull-4 {
right: 33.33333333%;
}
.col-lg-pull-3 {
right: 25%;
}
.col-lg-pull-2 {
right: 16.66666667%;
}
.col-lg-pull-1 {
right: 8.33333333%;
}
.col-lg-pull-0 {
right: auto;
}
.col-lg-push-12 {
left: 100%;
}
.col-lg-push-11 {
left: 91.66666667%;
}
.col-lg-push-10 {
left: 83.33333333%;
}
.col-lg-push-9 {
left: 75%;
}
.col-lg-push-8 {
left: 66.66666667%;
}
.col-lg-push-7 {
left: 58.33333333%;
}
.col-lg-push-6 {
left: 50%;
}
.col-lg-push-5 {
left: 41.66666667%;
}
.col-lg-push-4 {
left: 33.33333333%;
}
.col-lg-push-3 {
left: 25%;
}
.col-lg-push-2 {
left: 16.66666667%;
}
.col-lg-push-1 {
left: 8.33333333%;
}
.col-lg-push-0 {
left: auto;
}
.col-lg-offset-12 {
margin-left: 100%;
}
.col-lg-offset-11 {
margin-left: 91.66666667%;
}
.col-lg-offset-10 {
margin-left: 83.33333333%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-8 {
margin-left: 66.66666667%;
}
.col-lg-offset-7 {
margin-left: 58.33333333%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-5 {
margin-left: 41.66666667%;
}
.col-lg-offset-4 {
margin-left: 33.33333333%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-2 {
margin-left: 16.66666667%;
}
.col-lg-offset-1 {
margin-left: 8.33333333%;
}
.col-lg-offset-0 {
margin-left: 0%;
}
}
.clearfix:before,
.clearfix:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after {
content: " ";
display: table;
}
.clearfix:after,
.container:after,
.container-fluid:after,
.row:after {
clear: both;
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
.hide {
display: none !important;
}
.show {
display: block !important;
}
.invisible {
visibility: hidden;
}
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.hidden {
display: none !important;
}
.affix {
position: fixed;
}
@-ms-viewport {
width: device-width;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
display: none !important;
}
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
display: none !important;
}
@media (max-width: 767px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table !important;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
@media (max-width: 767px) {
.visible-xs-block {
display: block !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline {
display: inline !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline-block {
display: inline-block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm {
display: block !important;
}
table.visible-sm {
display: table !important;
}
tr.visible-sm {
display: table-row !important;
}
th.visible-sm,
td.visible-sm {
display: table-cell !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-block {
display: block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline {
display: inline !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline-block {
display: inline-block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md {
display: block !important;
}
table.visible-md {
display: table !important;
}
tr.visible-md {
display: table-row !important;
}
th.visible-md,
td.visible-md {
display: table-cell !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-block {
display: block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline {
display: inline !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline-block {
display: inline-block !important;
}
}
@media (min-width: 1200px) {
.visible-lg {
display: block !important;
}
table.visible-lg {
display: table !important;
}
tr.visible-lg {
display: table-row !important;
}
th.visible-lg,
td.visible-lg {
display: table-cell !important;
}
}
@media (min-width: 1200px) {
.visible-lg-block {
display: block !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline {
display: inline !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline-block {
display: inline-block !important;
}
}
@media (max-width: 767px) {
.hidden-xs {
display: none !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.hidden-sm {
display: none !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.hidden-md {
display: none !important;
}
}
@media (min-width: 1200px) {
.hidden-lg {
display: none !important;
}
}
.visible-print {
display: none !important;
}
@media print {
.visible-print {
display: block !important;
}
table.visible-print {
display: table !important;
}
tr.visible-print {
display: table-row !important;
}
th.visible-print,
td.visible-print {
display: table-cell !important;
}
}
.visible-print-block {
display: none !important;
}
@media print {
.visible-print-block {
display: block !important;
}
}
.visible-print-inline {
display: none !important;
}
@media print {
.visible-print-inline {
display: inline !important;
}
}
.visible-print-inline-block {
display: none !important;
}
@media print {
.visible-print-inline-block {
display: inline-block !important;
}
}
@media print {
.hidden-print {
display: none !important;
}
}
h1{
color:#0000FF;
}
h2{
color:#FF0000;
}
.select_width{
width: 172px;
padding: 5px;
color: #555;
margin-top: 5px;
height: 30px;
}
.error {
color: #D8000C;
/* background-color: #FFBABA; */
}
header {
padding: 10px 20px 5px;
}
.box {
background: #f4f4f4;
padding: 20px;
color: #555;
margin-top: 30px;
}
\ No newline at end of file
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title>Település melyik járáshoz tartozik</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width initial-scale=1 maximum-scale=1 user-scalable=no" />
<!-- link rel="stylesheet" type="text/css" href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" /-->
<link rel="stylesheet" th:href="@{/css/main.css}" href="../../css/main.css" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}" href="../../css/bootstrap.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<style type="text/css">
@media screen and (device-width: 240px) and (orientation: landscape){
/* CSS for screens that are 320 pixels or less will be put in this section */
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
/*border: 1px solid #ccc;*/
}
td {
/* Behave like a "row" */
border: none;
/*border-bottom: 1px solid #eee; */
position: relative;
padding-left: 5%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 5%;
padding-right: 10px;
white-space: nowrap;
}
input[type=text], input[type=url], input[type=email], input[type=password], input[type=tel], select {
margin: 0;
width: 172px; height: 30px;
}
button[type=submit] {
-webkit-appearance: none; -moz-appearance: none;
display: block;
margin: 1.5em 0;
font-size: 1em; line-height: 2.5em;
color: #333;
font-weight: bold;
height: 2.5em;
background: #fdfdfd; background: -moz-linear-gradient(top, #fdfdfd 0%, #bebebe 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#bebebe)); background: -webkit-linear-gradient(top, #fdfdfd 0%,#bebebe 100%); background: -o-linear-gradient(top, #fdfdfd 0%,#bebebe 100%); background: -ms-linear-gradient(top, #fdfdfd 0%,#bebebe 100%); background: linear-gradient(to bottom, #fdfdfd 0%,#bebebe 100%);
border: 1px solid #bbb;
-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;
}
}
/* @media screen and (min-width: 241px) /*(min-width: 240px) and (max-width: 320)*/ { */
/* /* Generic Styling, for Desktops/Laptops */ */
/* input[type=text], select { */
/* margin: 0; */
/* width: 172px; height: 30px; */
/* } */
}
</style>
</head>
<body>
<!-- <div class="visible-xs">XS</div> -->
<!-- <div class="visible-sm">SM</div> -->
<!-- <div class="visible-md">MD</div> -->
<!-- <div class="visible-lg">LG</div> -->
<header class="container-fluid">
Település kiválasztása:
</header>
<form action="#" th:action="@{/}" th:object="${addressForm}" method="post">
<!-- <div class="container"> -->
<!-- <div class="row" > -->
<!-- <div class="col-md-1 "> -->
<!-- <label for="county">Megye:</label> -->
<!-- </div> -->
<!-- <div class="col-md-2 "> -->
<!-- <select name="county" class="select_width" th:field="*{county}" th:onchange="'updateDistrict(this);'" > -->
<!-- <option th:each="acounty : ${dropDownDistrict}" -->
<!-- th:value="${acounty}" -->
<!-- th:text="${acounty}" /> -->
<!-- </select> -->
<!-- </div> -->
<!-- <div class="col-md-9"> -->
<!-- <span th:if="${#fields.hasErrors('county')}" th:errors="*{county}">District Error</span> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div class="container">
<div class="row" >
<div class="col-md-1 ">
<label for="city">Település:</label>
</div>
<div class="col-md-2 ">
<input class="select_width" name="city" type="text" th:field="*{city}" th:placeholder="#{telepules.help}" />
</div>
<div class="col-md-9 ">
<span th:if="${#fields.hasErrors('city')}" th:errors="*{city}" class="error" >City Error</span>
</div>
</div> <!-- row -->
</div> <!-- container -->
<div class="container">
<div class="row" >
<div class="col-md-1 ">
</div>
<div class="col-md-2 ">
<b><button class="select_width" type="submit">Megye/járás keresés</button></b>
</div>
</div>
</div>
</form>
<script>
//http://xdsoft.net/jqplugins/autocomplete/ innine a limit, visiblelimit, de nem megy :((
$(document).ready(function() {
$( "#city" ).autocomplete({
source: "/HU_OGD/telepulesek/json/city"
});
})
function updateDistrict(value) {
$.ajax({
url: "/HU_OGD/telepulesek/json/district",
type : "GET",
// cache : false,
dataType: 'text',
contentType: 'application/json',
mimeType: 'application/json',
data: {
term: value.value
},
success: function(response){
$('#city').val('');
// if (response == "failure" ) {
// $('#city').autocomplete({
// delay: 10,
// source: '',
// minLength: 1,
// close: function(el){
// el.target.value = "";
// }
// });
// }
},
error: function(e){
alert('error message ' + e);
}
});
}
</script>
</body>
</html>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Település melyik megyében, járásban</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width initial-scale=1 maximum-scale=1 user-scalable=no" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="/webjars/bootstrap/3.3.7/css/bootstrap.min.css" /> -->
<link rel="stylesheet" th:href="@{/css/main.css}" href="../../css/main.css" />
<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}" href="../../css/bootstrap.css" />
<style type="text/css">
div#map{
width:100%;
height:300px;
margin:0 auto 0 auto;
}
img.centered{
display:block;
margin-left:auto;
margin-right:auto;
}
</style>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<style>
table {
width: 100%;
border-collapse: collapse;
/* font-size: 150%;*/
}
td {
/* width: 200px;*/
/* height: 50px;*/
text-align: left;
vertical-align: middle;
padding: 2px;
}
</style>
<script th:inline="javascript">
var county = [[${target2}]]; //ez a megye székhely
var ts = [[${target}]]; //ez a járás székhely
var home = [[${home}]]; //ez a település
var hteq = [[${hometarget}]] //igaz, ha valójában csak 1 település van; ilyenkor 15-ös nagyítás kell
function initMap() {
var county_gps = {lat: Number(county.gps.lat), lng: Number(county.gps.lon)};
var ts_gps = {lat: Number(ts.gps.lat), lng: Number(ts.gps.lon)};
var home_gps;
// alert(school_gps.lat + " " + school_gps.lng + "/" + home_gps.lat + " " + home_gps.lng);
map = new google.maps.Map(document.getElementById('map'), {
center: new google.maps.LatLng(ts_gps), //{lat: -34.397, lng: 150.644},
// zoom: 15
});
// if (hteq) {
//azonos a település és a járási székhely
// ts_gps.lat += 0.0004;
// ts_gps.lng += 0.0003;
// }
var marker1 = new google.maps.Marker({
position: new google.maps.LatLng(ts_gps),
label: "J",
icon: pinSymbol('orange'),
map: map
});
var marker3 = new google.maps.Marker({
position: new google.maps.LatLng(county_gps),
label: "M",
icon: pinSymbol('red'),
map: map
});
var marker2; //lehet, h nincs. Pl. I.ker Anna utca
if (home.gps != null) {
home_gps = {lat: Number(home.gps.lat), lng: Number(home.gps.lon)};
marker2 = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(home_gps),
label: "t",
icon: pinSymbol('#00FF00')
});
}
//innen: http://stackoverflow.com/questions/10268033/google-maps-api-v3-method-fitbounds
if (hteq) {
map.setZoom(12);
} else {
var bounds = new google.maps.LatLngBounds();
bounds.extend(marker1.position);
bounds.extend(marker3.position);
bounds.extend(marker2.position);
map.fitBounds(bounds);
}
}
function pinSymbol(color) {
return {
path: 'M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z',
fillColor: color,
fillOpacity: 1,
strokeColor: '#000',
strokeWeight: 1,
scale: 1,
labelOrigin: new google.maps.Point(0, -29)
};
}
</script>
</head>
<body >
<!-- <div class="visible-xs">XS</div> -->
<!-- <div class="visible-sm">SM</div> -->
<!-- <div class="visible-md">MD</div> -->
<!-- <div class="visible-lg">LG</div> -->
<header class="container-fluid">
Megye és járás kikeresése:
</header>
<header class="container-fluid">
<div th:if="${error}" >
<b><span th:text="${address.city}"></span></b> <u>t</u>elepülés <span th:text="${result}"></span>
</div>
<div th:if="!${error}" >
<b><span th:text="${address.city}"></span></b> <u>t</u>elepülés a <span th:text="${address.county}"></span>i <b><span th:text="${result}"></span></b> körzetéhez tartozik. <br/>
(<u>M</u>egye székhely: <span th:text="${target2.city}"></span>. <u>J</u>árási székhely: <span th:text="${target.city}"></span>.)
</div>
</header>
<header class="container-fluid">
<div th:if="${home} != null" >
<div class="row">
<div class="container">
<div class="row">
<h1 class="col-sm-3 hidden-xs"></h1> <!-- bal -->
<nav class="col-sm-6">
<div id="map" >
<script class="img-responsive" src="https://maps.googleapis.com/maps/api/js?v=3&amp;key=AIzaSyCBaQeNLWjURn4XV1Am9DHeG-9DLDglzTI&amp;callback=initMap" ></script>
</div>
</nav>
<h1 class="col-sm-3 hidden-xs"></h1> <!-- jobb -->
</div>
</div>
</div>
</div>
</header>
<header class="container-fluid">
<div th:if="${home} != null" >
<b>A járásnak további <span th:text="${#lists.size(others)}"></span> települése van még</b> (a térképen jelölteken kívül):
</div>
<div th:if="${home} != null" >
<div class="table-responsive col-sm-12 visible-lg-block">
<table id="cities" class="table" >
<tr th:each="city : ${others}" th:if="${cityStat.index % 5 == 0}">
<td> &nbsp; &nbsp; </td>
<td th:each="index : ${#numbers.sequence(cityStat.index, cityStat.index + 5 - 1)}"
th:if="${index lt cityStat.size}"
th:text="${others[index]}">city</td>
</tr>
</table>
</div>
<div class="table-responsive col-sm-12 visible-sm-block visible-md-block">
<table id="cities" class="table" >
<tr th:each="city : ${others}" th:if="${cityStat.index % 4 == 0}">
<td> &nbsp; &nbsp; </td>
<td th:each="index : ${#numbers.sequence(cityStat.index, cityStat.index + 4 - 1)}"
th:if="${index lt cityStat.size}"
th:text="${others[index]}">city</td>
</tr>
</table>
</div>
<div class="table-responsive col-sm-12 visible-xs-block">
<table id="cities" class="table" >
<tr th:each="city : ${others}" th:if="${cityStat.index % 2 == 0}">
<td> &nbsp; &nbsp; </td>
<td th:each="index : ${#numbers.sequence(cityStat.index, cityStat.index + 2 - 1)}"
th:if="${index lt cityStat.size}"
th:text="${others[index]}">city</td>
</tr>
</table>
</div>
</div>
</header>
<header class="container-fluid">
<form action="#" th:action="@{/xxx}" th:object="${addressForm}" method="post">
<b><button type="submit">Új településnév beadás</button></b>
</form>
</header>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Spring Boot Thymeleaf Hello World Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css"
href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" th:href="@{/css/main.css}"
href="../../css/main.css" />
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Spring Boot</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="starter-template">
<h1>Spring Boot Web Thymeleaf Example</h1>
<h2>
<span th:text="'Message: ' + ${message}"></span>
</h2>
</div>
</div>
<!-- /.container -->
<form action="#" th:action="@{/}" th:object="${personForm}" method="post">
<table>
<tr>
<td>Name:</td>
<td><input type="text" th:field="*{street}" /></td>
<td th:if="${#fields.hasErrors('street')}" th:errors="*{street}">Name Error</td>
</tr>
<tr>
<td>Age:</td>
<td><input type="text" th:field="*{number}" /></td>
<td th:if="${#fields.hasErrors('number')}" th:errors="*{number}">Age Error</td>
</tr>
<tr>
<td><button type="submit">Submit</button></td>
</tr>
</table>
</form>
<script type="text/javascript"
src="webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
\ No newline at end of file
package com.springjpa;
import static org.junit.Assert.assertNotNull;
import java.util.List;
import org.hibernate.Hibernate;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import com.springjpa.model.County;
import com.springjpa.model.Town;
import com.springjpa.repo.CountyRepository;
@RunWith(SpringRunner.class)
@SpringBootTest
public class telepules_CkanApplicationTests {
@Autowired
private CountyRepository countyRepo;
@Ignore @Test
public void contextLoads() {
}
@Ignore @Test
public void shouldGetCounties() {
List<County> list = countyRepo.findAll();
for (County county : list) {
System.out.println(county);
}
assertNotNull(list);
}
@Test
public void shouldGetTowns() {
List<Town> list = countyRepo.findAllForCounty(1);
for (Town town: list) {
System.out.println(town);
}
assertNotNull(list);
}
}
Manifest-Version: 1.0
Implementation-Title: SpringJPA-PostgreSQL
Implementation-Version: 0.0.1-SNAPSHOT
Built-By: eax
Implementation-Vendor-Id: com.springjpa
Build-Jdk: 1.8.0_101
Implementation-URL: http://projects.spring.io/spring-boot/springJPA-po
stgreSQL/
Created-By: Maven Integration for Eclipse
Implementation-Vendor: Pivotal Software, Inc.
#Generated by Maven Integration for Eclipse
#Fri Jul 13 10:46:49 CEST 2018
version=0.0.1-SNAPSHOT
groupId=com.springjpa
m2e.projectName=telepules_CKANApplication3_JPA_inRepo
m2e.projectLocation=C\:\\WSP\\eclipsedata_CKAN\\telepules_CKANApplication3_JPA_inRepo
artifactId=springJPA-postgreSQL
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.springjpa</groupId>
<artifactId>springJPA-postgreSQL</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SpringJPA-PostgreSQL</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<hibernate.version>4.3.6.Final</hibernate.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.192</version>
</dependency>
<dependency>
<groupId>org.ckan.jdbc</groupId>
<artifactId>ckanjdbc</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- JPA -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- For connection pooling -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- ckan-jar miatt -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<!-- saját ckan-client -->
<dependency>
<groupId>org.ckan</groupId>
<artifactId>ckan</artifactId>
<version>2.1</version>
</dependency>
<!-- google elemeknek kell -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cloud-connectors</artifactId>
</dependency>
<!-- thymeleaf -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<description>1. Adott telepulesre megmondja, h melyik megye (megye-szekhellyel), melyik jaras (jaras-szekhellyel)
2. Terkepre teszi a telepulest, megye- ill. jaras-szekhelyet, ami adott esetben egy es uaz. is lehet :)
3. Kiirja a jaras tobbi telepulesenek nevet (valtozo oszlopszammal).
Mobile-friendly kialakitasu.
Technikailag CKAN-Datastore-t hasznal, mégpedig úgy, hogy van egy CkanJdbcDriver, amivel a JPA működik.</description>
</project>
#HA h2-db van
#spring.datasource.url=jdbc:h2:tcp://localhost/~/CKAN
#spring.datasource.username=sa
#spring.datasource.password=
#spring.datasource.driverClassName=org.h2.Driver
#erdekes: drive, mint org.h2.Driver nem kell megadni :))
#HA ckan-jdbc
spring.datasource.url=jdbc:ckan:rest:vm.ik.bme.hu:4339/hu/api/3?apikey=485baae6-5394-4af9-a76a-cbd1b902bfb0
spring.datasource.driverClassName=hu.bme.ckan.jdbc.rest.CkanDriver
#INNEN k�z�s
#spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.jpa.show-sql=false
#persistence.xml-t nem olvassa :((
#spring.h2.console.enabled=true
welcome.message: Hello CKAN!
spring.thymeleaf.check-template-location=true
spring.thymeleaf.prefix=classpath:templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
spring.thymeleaf.cache=false
server.port=8090
server.contextPath=/HU_OGD/telepulesek
logging.level.root=WARN
logging.level.org.springframework=WARN
logging.level.org.springframework.web=ERROR
#logging.level.com.springjpa=DEBUG
#logging.level.=DEBUG
logging.file=/etc/CKAN/log/log.txt
#logging.config=classpath:logback.xml
logging.level.org.hibernate.jdbc=trace
#logging.level.org.hibernate.type=trace
scan.packages=com.springjpa
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
# Root logger option
log4j.rootLogger=INFO, stdout
# Hibernate logging options (INFO only shows startup messages)
log4j.logger.org.hibernate=INFO
# Log JDBC bind parameter runtime arguments
log4j.logger.org.hibernate.jdbc=trace
log4j.logger.org.hibernate.type=trace
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=bbbf8580fc8e5eea0a168d36e150864e)
* Config saved to config.json and https://gist.github.com/bbbf8580fc8e5eea0a168d36e150864e
*/
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: #ffffff;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #337ab7;
text-decoration: none;
}
a:hover,
a:focus {
color: #23527c;
text-decoration: underline;
}
a:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
figure {
margin: 0;
}
img {
vertical-align: middle;
}
.img-responsive {
display: block;
max-width: 100%;
height: auto;
}
.img-rounded {
border-radius: 6px;
}
.img-thumbnail {
padding: 4px;
line-height: 1.42857143;
background-color: #ffffff;
border: 1px solid #dddddd;
border-radius: 4px;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
display: inline-block;
max-width: 100%;
height: auto;
}
.img-circle {
border-radius: 50%;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eeeeee;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
[role="button"] {
cursor: pointer;
}
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
.container-fluid {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
float: left;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.col-xs-pull-12 {
right: 100%;
}
.col-xs-pull-11 {
right: 91.66666667%;
}
.col-xs-pull-10 {
right: 83.33333333%;
}
.col-xs-pull-9 {
right: 75%;
}
.col-xs-pull-8 {
right: 66.66666667%;
}
.col-xs-pull-7 {
right: 58.33333333%;
}
.col-xs-pull-6 {
right: 50%;
}
.col-xs-pull-5 {
right: 41.66666667%;
}
.col-xs-pull-4 {
right: 33.33333333%;
}
.col-xs-pull-3 {
right: 25%;
}
.col-xs-pull-2 {
right: 16.66666667%;
}
.col-xs-pull-1 {
right: 8.33333333%;
}
.col-xs-pull-0 {
right: auto;
}
.col-xs-push-12 {
left: 100%;
}
.col-xs-push-11 {
left: 91.66666667%;
}
.col-xs-push-10 {
left: 83.33333333%;
}
.col-xs-push-9 {
left: 75%;
}
.col-xs-push-8 {
left: 66.66666667%;
}
.col-xs-push-7 {
left: 58.33333333%;
}
.col-xs-push-6 {
left: 50%;
}
.col-xs-push-5 {
left: 41.66666667%;
}
.col-xs-push-4 {
left: 33.33333333%;
}
.col-xs-push-3 {
left: 25%;
}
.col-xs-push-2 {
left: 16.66666667%;
}
.col-xs-push-1 {
left: 8.33333333%;
}
.col-xs-push-0 {
left: auto;
}
.col-xs-offset-12 {
margin-left: 100%;
}
.col-xs-offset-11 {
margin-left: 91.66666667%;
}
.col-xs-offset-10 {
margin-left: 83.33333333%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-8 {
margin-left: 66.66666667%;
}
.col-xs-offset-7 {
margin-left: 58.33333333%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-5 {
margin-left: 41.66666667%;
}
.col-xs-offset-4 {
margin-left: 33.33333333%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-2 {
margin-left: 16.66666667%;
}
.col-xs-offset-1 {
margin-left: 8.33333333%;
}
.col-xs-offset-0 {
margin-left: 0%;
}
@media (min-width: 768px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.col-sm-pull-12 {
right: 100%;
}
.col-sm-pull-11 {
right: 91.66666667%;
}
.col-sm-pull-10 {
right: 83.33333333%;
}
.col-sm-pull-9 {
right: 75%;
}
.col-sm-pull-8 {
right: 66.66666667%;
}
.col-sm-pull-7 {
right: 58.33333333%;
}
.col-sm-pull-6 {
right: 50%;
}
.col-sm-pull-5 {
right: 41.66666667%;
}
.col-sm-pull-4 {
right: 33.33333333%;
}
.col-sm-pull-3 {
right: 25%;
}
.col-sm-pull-2 {
right: 16.66666667%;
}
.col-sm-pull-1 {
right: 8.33333333%;
}
.col-sm-pull-0 {
right: auto;
}
.col-sm-push-12 {
left: 100%;
}
.col-sm-push-11 {
left: 91.66666667%;
}
.col-sm-push-10 {
left: 83.33333333%;
}
.col-sm-push-9 {
left: 75%;
}
.col-sm-push-8 {
left: 66.66666667%;
}
.col-sm-push-7 {
left: 58.33333333%;
}
.col-sm-push-6 {
left: 50%;
}
.col-sm-push-5 {
left: 41.66666667%;
}
.col-sm-push-4 {
left: 33.33333333%;
}
.col-sm-push-3 {
left: 25%;
}
.col-sm-push-2 {
left: 16.66666667%;
}
.col-sm-push-1 {
left: 8.33333333%;
}
.col-sm-push-0 {
left: auto;
}
.col-sm-offset-12 {
margin-left: 100%;
}
.col-sm-offset-11 {
margin-left: 91.66666667%;
}
.col-sm-offset-10 {
margin-left: 83.33333333%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-8 {
margin-left: 66.66666667%;
}
.col-sm-offset-7 {
margin-left: 58.33333333%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-5 {
margin-left: 41.66666667%;
}
.col-sm-offset-4 {
margin-left: 33.33333333%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-2 {
margin-left: 16.66666667%;
}
.col-sm-offset-1 {
margin-left: 8.33333333%;
}
.col-sm-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 992px) {
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
float: left;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.col-md-pull-12 {
right: 100%;
}
.col-md-pull-11 {
right: 91.66666667%;
}
.col-md-pull-10 {
right: 83.33333333%;
}
.col-md-pull-9 {
right: 75%;
}
.col-md-pull-8 {
right: 66.66666667%;
}
.col-md-pull-7 {
right: 58.33333333%;
}
.col-md-pull-6 {
right: 50%;
}
.col-md-pull-5 {
right: 41.66666667%;
}
.col-md-pull-4 {
right: 33.33333333%;
}
.col-md-pull-3 {
right: 25%;
}
.col-md-pull-2 {
right: 16.66666667%;
}
.col-md-pull-1 {
right: 8.33333333%;
}
.col-md-pull-0 {
right: auto;
}
.col-md-push-12 {
left: 100%;
}
.col-md-push-11 {
left: 91.66666667%;
}
.col-md-push-10 {
left: 83.33333333%;
}
.col-md-push-9 {
left: 75%;
}
.col-md-push-8 {
left: 66.66666667%;
}
.col-md-push-7 {
left: 58.33333333%;
}
.col-md-push-6 {
left: 50%;
}
.col-md-push-5 {
left: 41.66666667%;
}
.col-md-push-4 {
left: 33.33333333%;
}
.col-md-push-3 {
left: 25%;
}
.col-md-push-2 {
left: 16.66666667%;
}
.col-md-push-1 {
left: 8.33333333%;
}
.col-md-push-0 {
left: auto;
}
.col-md-offset-12 {
margin-left: 100%;
}
.col-md-offset-11 {
margin-left: 91.66666667%;
}
.col-md-offset-10 {
margin-left: 83.33333333%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-8 {
margin-left: 66.66666667%;
}
.col-md-offset-7 {
margin-left: 58.33333333%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-5 {
margin-left: 41.66666667%;
}
.col-md-offset-4 {
margin-left: 33.33333333%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-2 {
margin-left: 16.66666667%;
}
.col-md-offset-1 {
margin-left: 8.33333333%;
}
.col-md-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 1200px) {
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
float: left;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.col-lg-pull-12 {
right: 100%;
}
.col-lg-pull-11 {
right: 91.66666667%;
}
.col-lg-pull-10 {
right: 83.33333333%;
}
.col-lg-pull-9 {
right: 75%;
}
.col-lg-pull-8 {
right: 66.66666667%;
}
.col-lg-pull-7 {
right: 58.33333333%;
}
.col-lg-pull-6 {
right: 50%;
}
.col-lg-pull-5 {
right: 41.66666667%;
}
.col-lg-pull-4 {
right: 33.33333333%;
}
.col-lg-pull-3 {
right: 25%;
}
.col-lg-pull-2 {
right: 16.66666667%;
}
.col-lg-pull-1 {
right: 8.33333333%;
}
.col-lg-pull-0 {
right: auto;
}
.col-lg-push-12 {
left: 100%;
}
.col-lg-push-11 {
left: 91.66666667%;
}
.col-lg-push-10 {
left: 83.33333333%;
}
.col-lg-push-9 {
left: 75%;
}
.col-lg-push-8 {
left: 66.66666667%;
}
.col-lg-push-7 {
left: 58.33333333%;
}
.col-lg-push-6 {
left: 50%;
}
.col-lg-push-5 {
left: 41.66666667%;
}
.col-lg-push-4 {
left: 33.33333333%;
}
.col-lg-push-3 {
left: 25%;
}
.col-lg-push-2 {
left: 16.66666667%;
}
.col-lg-push-1 {
left: 8.33333333%;
}
.col-lg-push-0 {
left: auto;
}
.col-lg-offset-12 {
margin-left: 100%;
}
.col-lg-offset-11 {
margin-left: 91.66666667%;
}
.col-lg-offset-10 {
margin-left: 83.33333333%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-8 {
margin-left: 66.66666667%;
}
.col-lg-offset-7 {
margin-left: 58.33333333%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-5 {
margin-left: 41.66666667%;
}
.col-lg-offset-4 {
margin-left: 33.33333333%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-2 {
margin-left: 16.66666667%;
}
.col-lg-offset-1 {
margin-left: 8.33333333%;
}
.col-lg-offset-0 {
margin-left: 0%;
}
}
.clearfix:before,
.clearfix:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after {
content: " ";
display: table;
}
.clearfix:after,
.container:after,
.container-fluid:after,
.row:after {
clear: both;
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
.hide {
display: none !important;
}
.show {
display: block !important;
}
.invisible {
visibility: hidden;
}
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.hidden {
display: none !important;
}
.affix {
position: fixed;
}
@-ms-viewport {
width: device-width;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
display: none !important;
}
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
display: none !important;
}
@media (max-width: 767px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table !important;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
@media (max-width: 767px) {
.visible-xs-block {
display: block !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline {
display: inline !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline-block {
display: inline-block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm {
display: block !important;
}
table.visible-sm {
display: table !important;
}
tr.visible-sm {
display: table-row !important;
}
th.visible-sm,
td.visible-sm {
display: table-cell !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-block {
display: block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline {
display: inline !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline-block {
display: inline-block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md {
display: block !important;
}
table.visible-md {
display: table !important;
}
tr.visible-md {
display: table-row !important;
}
th.visible-md,
td.visible-md {
display: table-cell !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-block {
display: block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline {
display: inline !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline-block {
display: inline-block !important;
}
}
@media (min-width: 1200px) {
.visible-lg {
display: block !important;
}
table.visible-lg {
display: table !important;
}
tr.visible-lg {
display: table-row !important;
}
th.visible-lg,
td.visible-lg {
display: table-cell !important;
}
}
@media (min-width: 1200px) {
.visible-lg-block {
display: block !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline {
display: inline !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline-block {
display: inline-block !important;
}
}
@media (max-width: 767px) {
.hidden-xs {
display: none !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.hidden-sm {
display: none !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.hidden-md {
display: none !important;
}
}
@media (min-width: 1200px) {
.hidden-lg {
display: none !important;
}
}
.visible-print {
display: none !important;
}
@media print {
.visible-print {
display: block !important;
}
table.visible-print {
display: table !important;
}
tr.visible-print {
display: table-row !important;
}
th.visible-print,
td.visible-print {
display: table-cell !important;
}
}
.visible-print-block {
display: none !important;
}
@media print {
.visible-print-block {
display: block !important;
}
}
.visible-print-inline {
display: none !important;
}
@media print {
.visible-print-inline {
display: inline !important;
}
}
.visible-print-inline-block {
display: none !important;
}
@media print {
.visible-print-inline-block {
display: inline-block !important;
}
}
@media print {
.hidden-print {
display: none !important;
}
}
h1{
color:#0000FF;
}
h2{
color:#FF0000;
}
.select_width{
width: 172px;
padding: 5px;
color: #555;
margin-top: 5px;
height: 30px;
}
.error {
color: #D8000C;
/* background-color: #FFBABA; */
}
header {
padding: 10px 20px 5px;
}
.box {
background: #f4f4f4;
padding: 20px;
color: #555;
margin-top: 30px;
}
\ No newline at end of file
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title>Település melyik járáshoz tartozik</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width initial-scale=1 maximum-scale=1 user-scalable=no" />
<!-- link rel="stylesheet" type="text/css" href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" /-->
<link rel="stylesheet" th:href="@{/css/main.css}" href="../../css/main.css" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}" href="../../css/bootstrap.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<style type="text/css">
@media screen and (device-width: 240px) and (orientation: landscape){
/* CSS for screens that are 320 pixels or less will be put in this section */
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr {
/*border: 1px solid #ccc;*/
}
td {
/* Behave like a "row" */
border: none;
/*border-bottom: 1px solid #eee; */
position: relative;
padding-left: 5%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 5%;
padding-right: 10px;
white-space: nowrap;
}
input[type=text], input[type=url], input[type=email], input[type=password], input[type=tel], select {
margin: 0;
width: 172px; height: 30px;
}
button[type=submit] {
-webkit-appearance: none; -moz-appearance: none;
display: block;
margin: 1.5em 0;
font-size: 1em; line-height: 2.5em;
color: #333;
font-weight: bold;
height: 2.5em;
background: #fdfdfd; background: -moz-linear-gradient(top, #fdfdfd 0%, #bebebe 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#bebebe)); background: -webkit-linear-gradient(top, #fdfdfd 0%,#bebebe 100%); background: -o-linear-gradient(top, #fdfdfd 0%,#bebebe 100%); background: -ms-linear-gradient(top, #fdfdfd 0%,#bebebe 100%); background: linear-gradient(to bottom, #fdfdfd 0%,#bebebe 100%);
border: 1px solid #bbb;
-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;
}
}
/* @media screen and (min-width: 241px) /*(min-width: 240px) and (max-width: 320)*/ { */
/* /* Generic Styling, for Desktops/Laptops */ */
/* input[type=text], select { */
/* margin: 0; */
/* width: 172px; height: 30px; */
/* } */
}
</style>
</head>
<body>
<!-- <div class="visible-xs">XS</div> -->
<!-- <div class="visible-sm">SM</div> -->
<!-- <div class="visible-md">MD</div> -->
<!-- <div class="visible-lg">LG</div> -->
<header class="container-fluid">
Település kiválasztása:
</header>
<form action="#" th:action="@{/}" th:object="${addressForm}" method="post">
<!-- <div class="container"> -->
<!-- <div class="row" > -->
<!-- <div class="col-md-1 "> -->
<!-- <label for="county">Megye:</label> -->
<!-- </div> -->
<!-- <div class="col-md-2 "> -->
<!-- <select name="county" class="select_width" th:field="*{county}" th:onchange="'updateDistrict(this);'" > -->
<!-- <option th:each="acounty : ${dropDownDistrict}" -->
<!-- th:value="${acounty}" -->
<!-- th:text="${acounty}" /> -->
<!-- </select> -->
<!-- </div> -->
<!-- <div class="col-md-9"> -->
<!-- <span th:if="${#fields.hasErrors('county')}" th:errors="*{county}">District Error</span> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div class="container">
<div class="row" >
<div class="col-md-1 ">
<label for="city">Település:</label>
</div>
<div class="col-md-2 ">
<input class="select_width" name="city" type="text" th:field="*{city}" th:placeholder="#{telepules.help}" />
</div>
<div class="col-md-9 ">
<span th:if="${#fields.hasErrors('city')}" th:errors="*{city}" class="error" >City Error</span>
</div>
</div> <!-- row -->
</div> <!-- container -->
<div class="container">
<div class="row" >
<div class="col-md-1 ">
</div>
<div class="col-md-2 ">
<b><button class="select_width" type="submit">Megye/járás keresés</button></b>
</div>
</div>
</div>
</form>
<script>
//http://xdsoft.net/jqplugins/autocomplete/ innine a limit, visiblelimit, de nem megy :((
$(document).ready(function() {
$( "#city" ).autocomplete({
source: "/HU_OGD/telepulesek/json/city"
});
})
function updateDistrict(value) {
$.ajax({
url: "/HU_OGD/telepulesek/json/district",
type : "GET",
// cache : false,
dataType: 'text',
contentType: 'application/json',
mimeType: 'application/json',
data: {
term: value.value
},
success: function(response){
$('#city').val('');
// if (response == "failure" ) {
// $('#city').autocomplete({
// delay: 10,
// source: '',
// minLength: 1,
// close: function(el){
// el.target.value = "";
// }
// });
// }
},
error: function(e){
alert('error message ' + e);
}
});
}
</script>
</body>
</html>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Település melyik megyében, járásban</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width initial-scale=1 maximum-scale=1 user-scalable=no" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="/webjars/bootstrap/3.3.7/css/bootstrap.min.css" /> -->
<link rel="stylesheet" th:href="@{/css/main.css}" href="../../css/main.css" />
<link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}" href="../../css/bootstrap.css" />
<style type="text/css">
div#map{
width:100%;
height:300px;
margin:0 auto 0 auto;
}
img.centered{
display:block;
margin-left:auto;
margin-right:auto;
}
</style>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<style>
table {
width: 100%;
border-collapse: collapse;
/* font-size: 150%;*/
}
td {
/* width: 200px;*/
/* height: 50px;*/
text-align: left;
vertical-align: middle;
padding: 2px;
}
</style>
<script th:inline="javascript">
var county = [[${target2}]]; //ez a megye székhely
var ts = [[${target}]]; //ez a járás székhely
var home = [[${home}]]; //ez a település
var hteq = [[${hometarget}]] //igaz, ha valójában csak 1 település van; ilyenkor 15-ös nagyítás kell
function initMap() {
var county_gps = {lat: Number(county.gps.lat), lng: Number(county.gps.lon)};
var ts_gps = {lat: Number(ts.gps.lat), lng: Number(ts.gps.lon)};
var home_gps;
// alert(school_gps.lat + " " + school_gps.lng + "/" + home_gps.lat + " " + home_gps.lng);
map = new google.maps.Map(document.getElementById('map'), {
center: new google.maps.LatLng(ts_gps), //{lat: -34.397, lng: 150.644},
// zoom: 15
});
// if (hteq) {
//azonos a település és a járási székhely
// ts_gps.lat += 0.0004;
// ts_gps.lng += 0.0003;
// }
var marker1 = new google.maps.Marker({
position: new google.maps.LatLng(ts_gps),
label: "J",
icon: pinSymbol('orange'),
map: map
});
var marker3 = new google.maps.Marker({
position: new google.maps.LatLng(county_gps),
label: "M",
icon: pinSymbol('red'),
map: map
});
var marker2; //lehet, h nincs. Pl. I.ker Anna utca
if (home.gps != null) {
home_gps = {lat: Number(home.gps.lat), lng: Number(home.gps.lon)};
marker2 = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(home_gps),
label: "t",
icon: pinSymbol('#00FF00')
});
}
//innen: http://stackoverflow.com/questions/10268033/google-maps-api-v3-method-fitbounds
if (hteq) {
map.setZoom(12);
} else {
var bounds = new google.maps.LatLngBounds();
bounds.extend(marker1.position);
bounds.extend(marker3.position);
bounds.extend(marker2.position);
map.fitBounds(bounds);
}
}
function pinSymbol(color) {
return {
path: 'M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z',
fillColor: color,
fillOpacity: 1,
strokeColor: '#000',
strokeWeight: 1,
scale: 1,
labelOrigin: new google.maps.Point(0, -29)
};
}
</script>
</head>
<body >
<!-- <div class="visible-xs">XS</div> -->
<!-- <div class="visible-sm">SM</div> -->
<!-- <div class="visible-md">MD</div> -->
<!-- <div class="visible-lg">LG</div> -->
<header class="container-fluid">
Megye és járás kikeresése:
</header>
<header class="container-fluid">
<div th:if="${error}" >
<b><span th:text="${address.city}"></span></b> <u>t</u>elepülés <span th:text="${result}"></span>
</div>
<div th:if="!${error}" >
<b><span th:text="${address.city}"></span></b> <u>t</u>elepülés a <span th:text="${address.county}"></span>i <b><span th:text="${result}"></span></b> körzetéhez tartozik. <br/>
(<u>M</u>egye székhely: <span th:text="${target2.city}"></span>. <u>J</u>árási székhely: <span th:text="${target.city}"></span>.)
</div>
</header>
<header class="container-fluid">
<div th:if="${home} != null" >
<div class="row">
<div class="container">
<div class="row">
<h1 class="col-sm-3 hidden-xs"></h1> <!-- bal -->
<nav class="col-sm-6">
<div id="map" >
<script class="img-responsive" src="https://maps.googleapis.com/maps/api/js?v=3&amp;key=AIzaSyCBaQeNLWjURn4XV1Am9DHeG-9DLDglzTI&amp;callback=initMap" ></script>
</div>
</nav>
<h1 class="col-sm-3 hidden-xs"></h1> <!-- jobb -->
</div>
</div>
</div>
</div>
</header>
<header class="container-fluid">
<div th:if="${home} != null" >
<b>A járásnak további <span th:text="${#lists.size(others)}"></span> települése van még</b> (a térképen jelölteken kívül):
</div>
<div th:if="${home} != null" >
<div class="table-responsive col-sm-12 visible-lg-block">
<table id="cities" class="table" >
<tr th:each="city : ${others}" th:if="${cityStat.index % 5 == 0}">
<td> &nbsp; &nbsp; </td>
<td th:each="index : ${#numbers.sequence(cityStat.index, cityStat.index + 5 - 1)}"
th:if="${index lt cityStat.size}"
th:text="${others[index]}">city</td>
</tr>
</table>
</div>
<div class="table-responsive col-sm-12 visible-sm-block visible-md-block">
<table id="cities" class="table" >
<tr th:each="city : ${others}" th:if="${cityStat.index % 4 == 0}">
<td> &nbsp; &nbsp; </td>
<td th:each="index : ${#numbers.sequence(cityStat.index, cityStat.index + 4 - 1)}"
th:if="${index lt cityStat.size}"
th:text="${others[index]}">city</td>
</tr>
</table>
</div>
<div class="table-responsive col-sm-12 visible-xs-block">
<table id="cities" class="table" >
<tr th:each="city : ${others}" th:if="${cityStat.index % 2 == 0}">
<td> &nbsp; &nbsp; </td>
<td th:each="index : ${#numbers.sequence(cityStat.index, cityStat.index + 2 - 1)}"
th:if="${index lt cityStat.size}"
th:text="${others[index]}">city</td>
</tr>
</table>
</div>
</div>
</header>
<header class="container-fluid">
<form action="#" th:action="@{/xxx}" th:object="${addressForm}" method="post">
<b><button type="submit">Új településnév beadás</button></b>
</form>
</header>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Spring Boot Thymeleaf Hello World Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css"
href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" th:href="@{/css/main.css}"
href="../../css/main.css" />
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Spring Boot</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="starter-template">
<h1>Spring Boot Web Thymeleaf Example</h1>
<h2>
<span th:text="'Message: ' + ${message}"></span>
</h2>
</div>
</div>
<!-- /.container -->
<form action="#" th:action="@{/}" th:object="${personForm}" method="post">
<table>
<tr>
<td>Name:</td>
<td><input type="text" th:field="*{street}" /></td>
<td th:if="${#fields.hasErrors('street')}" th:errors="*{street}">Name Error</td>
</tr>
<tr>
<td>Age:</td>
<td><input type="text" th:field="*{number}" /></td>
<td th:if="${#fields.hasErrors('number')}" th:errors="*{number}">Age Error</td>
</tr>
<tr>
<td><button type="submit">Submit</button></td>
</tr>
</table>
</form>
<script type="text/javascript"
src="webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
\ No newline at end of file
#Generated by Apache Maven
#Mon Mar 26 09:44:20 CEST 2018
version=0.0.1-SNAPSHOT
groupId=com.springjpa
artifactId=springJPA-postgreSQL
com\springjpa\json\Query.class
com\springjpa\io\Address.class
com\springjpa\json\Key.class
com\springjpa\persistence\TableRepositoryImpl.class
com\springjpa\model\Town.class
com\springjpa\google\ViewPort.class
com\springjpa\google\Result.class
com\springjpa\controller\WebController.class
com\springjpa\SpringJpaApplication.class
com\springjpa\google\GoogleMapClient.class
com\springjpa\repo\TownRepository.class
com\springjpa\json\Rename.class
com\springjpa\repo\TownShipRepository.class
com\springjpa\json\KeyInt.class
com\springjpa\google\Geometry.class
com\springjpa\model\County.class
com\springjpa\repo\CountyRepository.class
com\springjpa\io\AddressForm.class
com\springjpa\google\AddressComponent.class
com\springjpa\google\LatLon.class
com\springjpa\model\TownShip.class
com\springjpa\google\Location.class
com\springjpa\controller\SearchBean.class
com\springjpa\google\Root.class
com\springjpa\persistence\TableRepo.class
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\model\TownShip.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\repo\TownShipRepository.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\persistence\TableRepo.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\Root.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\Result.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\model\County.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\repo\TownRepository.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\Location.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\repo\CountyRepository.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\ViewPort.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\SpringJpaApplication.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\json\Rename.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\AddressComponent.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\controller\SearchBean.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\json\KeyInt.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\LatLon.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\json\Key.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\io\AddressForm.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\model\Town.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\GoogleMapClient.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\controller\WebController.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\persistence\TableRepositoryImpl.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\json\Query.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\io\Address.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\main\java\com\springjpa\google\Geometry.java
C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\src\test\java\com\springjpa\telepules_CkanApplicationTests.java
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.springjpa.telepules_CkanApplicationTests" time="0.401" tests="3" errors="0" skipped="2" failures="0">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="C:\Program Files (x86)\Java\jdk1.8.0_101\jre\bin"/>
<property name="java.vm.version" value="25.101-b13"/>
<property name="java.vm.vendor" value="Oracle Corporation"/>
<property name="maven.multiModuleProjectDirectory" value="C:\WSP\eclipsedata_Angular\telepules_CKANApplication3"/>
<property name="java.vendor.url" value="http://java.oracle.com/"/>
<property name="path.separator" value=";"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/>
<property name="java.vm.name" value="Java HotSpot(TM) Client VM"/>
<property name="file.encoding.pkg" value="sun.io"/>
<property name="user.script" value=""/>
<property name="user.country" value="HU"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.os.patch.level" value=""/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="C:\WSP\eclipsedata_Angular\telepules_CKANApplication3"/>
<property name="java.runtime.version" value="1.8.0_101-b13"/>
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
<property name="java.endorsed.dirs" value="C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\endorsed"/>
<property name="os.arch" value="x86"/>
<property name="java.io.tmpdir" value="C:\Users\eax\AppData\Local\Temp\"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="user.variant" value=""/>
<property name="os.name" value="Windows 10"/>
<property name="classworlds.conf" value="C:\WSP\eclipsedata_CKAN\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf6256018460692843546.tmp"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.library.path" value="C:\Program Files (x86)\Java\jdk1.8.0_101\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:/Program Files (x86)/Java/jdk1.8.0_101/bin/../jre/bin/client;c:/Program Files (x86)/Java/jdk1.8.0_101/bin/../jre/bin;c:/Program Files (x86)/Java/jdk1.8.0_101/bin/../jre/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Java\jdk1.8.0_101\bin\;c:\Python27;c:\Python27\Scripts;C:\Program Files (x86)\Calibre2\;C:\TDM-GCC-32\bin;C:\Program Files (x86)\Skype\Phone\;c:\PROG2\Python\Python36-32\;c:\PROG2\Python\Python36-32\Scripts;c:\PROG2\PostgreSQL\9.6\bin;c:\PROG2\PostgreSQL\9.6\lib;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\eax\AppData\Local\Microsoft\WindowsApps;;C:\PROG\eclipse-neon-1a;;."/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
<property name="sun.management.compiler" value="HotSpot Client Compiler"/>
<property name="os.version" value="10.0"/>
<property name="user.home" value="C:\Users\eax"/>
<property name="user.timezone" value="Europe/Prague"/>
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
<property name="java.specification.version" value="1.8"/>
<property name="file.encoding" value="Cp1252"/>
<property name="user.name" value="eax"/>
<property name="java.class.path" value="/C:/PROG/eclipse-neon-1a/plugins/org.eclipse.m2e.maven.runtime_1.7.1.20161104-1803/jars/plexus-classworlds-2.5.2.jar"/>
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="32"/>
<property name="java.home" value="C:\Program Files (x86)\Java\jdk1.8.0_101\jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B clean package"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="hu"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.version" value="1.8.0_101"/>
<property name="java.ext.dirs" value="C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
<property name="sun.boot.class.path" value="C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\lib\jfr.jar;C:\Program Files (x86)\Java\jdk1.8.0_101\jre\classes"/>
<property name="java.vendor" value="Oracle Corporation"/>
<property name="maven.home" value="C:\WSP\eclipsedata_Angular\telepules_CKANApplication3\EMBEDDED"/>
<property name="file.separator" value="\"/>
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="sun.desktop" value="windows"/>
<property name="sun.cpu.isalist" value="pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86"/>
</properties>
<testcase name="shouldGetTowns" classname="com.springjpa.telepules_CkanApplicationTests" time="0.401"/>
<testcase name="contextLoads" classname="com.springjpa.telepules_CkanApplicationTests" time="0">
<skipped/>
</testcase>
<testcase name="shouldGetCounties" classname="com.springjpa.telepules_CkanApplicationTests" time="0">
<skipped/>
</testcase>
</testsuite>
\ No newline at end of file
-------------------------------------------------------------------------------
Test set: com.springjpa.telepules_CkanApplicationTests
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 11.74 sec - in com.springjpa.telepules_CkanApplicationTests
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment