막연히, RDF 가 더 간단하고, 머신 친화적(?) 이라고 알고 있다가,
문득 생각나 찾아봤다.
비슷한 질문을 수없이 들었다는 Tim 이 꽤 간단 명료하게 해설을 해놓았다.
관심이 있다면 꼭 읽어보기 바란다.
XML 는 구조가 다변적이고 의미가 애매해서 문제가 된단다. 원문에 예제들이 있다.
물론, 이것이 장점이 될수도 있겠지만  의미를 해석하는데는  한계가 있다.

Things you can do with RDF which you can't do with XML include

  • You can parse the semantic tree, which end up giving you a set of (possibly mutually referential) triples and then you can use the ones you want ignoring the ones you don't understand.

Problems with basing you understanding on the structure include

  • Without having gone to the trouble of getting the schema, or having an application hand-programmed to recognise a particular document type, you can't pick up any semantic information from a document;
  • When an XML schema changes, it could typically introduce new intermediate elements (like "details" in the tree above or "div" is HTML). These may or may or may not invalidate any query which has been based on the structure of the document.
  • If you haven't gone to the trouble of making a semantic model, then you may not have a well defined one. ( Look at a label on the jam jar which says: "Expires 1999". What expires: the label, or the jam? Here the ambiguity is between a statement about a statement about a document, and a statement about a document. )

Why RDF model is different from the XML model - Tim Berners-Lee


Posted by ukmie
,

DWR - Ajax-RPC 툴킷

software 2008. 2. 11. 14:11
DWR(Direct Web Remoting)은 프락시 기반 Ajax로 자바스크립트에서 서버측 로직을 호출하도록 만들어주는 프레임워크이다.

자바 개발자를 위한 Ajax: Ajax와 Direct Web Remoting (쇼핑카드 예제)
http://www.ibm.com/developerworks/kr/library/j-ajax3/

Posted by ukmie
,

간혹, 주변에 위키를 소개해보면 불편해 하면서도 높은 자유도에 매료되는 경우가 많다.
블로그나 포럼들도 나름 진화해가고 있지만, 역시 위키의 진보성(?) 을 따라 잡진 못한듯 하다.
초기 정보공개,공유의 정신이 다소 희미해지면서 자유분방하고 다소 괴팍스러운 분위기는 줄었을지 모르나, 기업용 인트라넷을 대체하려는 움직임이 활발해졌고 협업, 커뮤니티, 자료관리 등에 적용되면서 상당히 편리하고 풍부한 기능을 가진 위키들이 만들어지고 있다.
시맨틱 기술을 적용시키고 싶은 생각을 유발하는 것이 또 위키이다.  아니나 다를까  많이들 하고있다.
성공을 기원해보자.음음

Classical but super(?) Wiki
* Confluence - Attlassian ( 유료. 풍부한 기능과 편리함을 지님)
http://www.atlassian.com/software/confluence/

* Deki Wiki (무료. 2006 Gilbane Conference Best Wiki 선정작. 오픈소스-C#, php)
http://wiki.mindtouch.com/Deki_wiki
- http://wik.is/ 에서 서비스 중

* Xwiki
http://www.xwiki.org/xwiki/bin/view/Main/WebHome
강력한 기능의 자바기반 위키. 적용된 서비스를 종종 볼수 있슴. 무료

SemanticWiki
* Platypus Wiki (오픈소스. RDF,RDFS,OWL 사용)
http://platypuswiki.sourceforge.net/

* makna (JSPWiki with the semantic web framework Jena)            A Semantic Enhanced Page in View Mode                            
http://www.apps.ag-nbi.de/makna/





* OntoWiki
http://ontowiki.net/Projects/OntoWiki

* SemanticMoin
http://ontowiki.net/Projects/OntoWiki

* Semantic_Wiki_State_Of_The_Art (시맨틱위키 리스트)
http://ontoworld.org/wiki/Semantic_Wiki_State_Of_The_Art

with Topic Map
Ceryle
http://www.altheim.com/ceryle/wiki/

* TMWiki
http://www.topic-maps.org/projects:tmwiki

* Topincs
http://www.cerny-online.com/topincs/

이밖에도 많은 위키들이 존재하고 대부분 플러그인 기능을 이용해서 RSS,SOAP,Categories, 권한관리 등의 다양한 기능을 지원하고 있다.
WikiMatrix : 다양한 위키의 스펙을 확인하고 비교할 수 있는곳

위키의 특징은 무엇보다도 컨텐츠 중심의 구조와 개방성이라 할 수 있는데,
요즘 위키들을 보면 트리구조의 메뉴, 권한 관리등이 지원되면서 이런 특징들이 사라지고
포럼이나 공유블로그와 다를게 없다는 생각도 든다. 게다사 편집도 WYSIWYG 가 지원되는
HTML 방식의 편집을 바뀌고 있다. 허나, 이런류의 통합(?) 나쁠건 없다고 본다.
이것이 위키이건 아니건 그게 중요한 건 아닐테니까, 여전히 위키는 편리하고 유연한
구조를 가지고 있는 매우 쓸만한 툴이라고 생각한다. 음음,,


Posted by ukmie
,
루씬을 볼때 필요하겠다 싶었던 것들인데 역시 진행이 되고 있었다.
아파치 솔라와 PHP 를 연동한 예제를 보여주는 IBM DeveloperWorks 의 가사.


아파치 루씬 서브프로젝트인 아파치 솔라 1.2 버전을 다루는 요령 배워보기
http://www.ibm.com/developerworks/kr/library/tutorial/os-apachelucene/section2.html

소개

누구나 검색이 필요하다. 그것이 열쇠든, 휴대전화든, 지갑이든, 마음이든 간에 말이다. 매장 데이터베이스의 모든 제품을 검색할 수 있다면 어떨까? 혹은 인트라넷과 관련된 파일들은 어떤가? 이것이 본 튜토리얼에서 다룰 내용이다.


아파치 루씬

루씬 자바는 주요 아파치 루씬 프로젝트이며 다른 프로젝트도 여기서 비롯됐다. 이는 자바로 작성된 최고의 고성능 검색 엔진 라이브러리를 목표로 만들어졌고, 그래서 여기엔 서브프로젝트가 그리 많지 않다.

아파치 루씬은 오픈 소스이기 때문에 개발자들이 사용하기에 더 알맞다. 루씬으로 맞춤 애플리케이션에 견고한 검색 엔진을 만들 수 있고, 이것이 솔라나 넛치(Nutch) 같은 다른 서브프로젝트가 등장하는 방법이기도 하다.

웹 크롤러가 필요하다면 직접 만들어야 한다. 그리고 나서 크롤러를 사용해 웹 크롤러가 웹을 기어다니면서 웹에서 꺼낸 파일을 목록에 넣어야 한다. 하지만 이미 작성된 것이 있다면 왜 굳이 직접 만들어야 할까? 그래서 아파치 넛치와 하둡(Hadoop)이 등장했다.


넛치와 하둡, 아피치 루씬 서브프로젝트

넛 치는 루씬에 웹 페이지를 검색하고 다른 문서 포맷에서 HTML을 파스하는 방법이 필요하다는 명백한 이유로 만들어졌다. 넛치는 모든 웹 크롤링, 인트라넷에서 로컬 파일 크롤링, 모든 인덱싱을 포함하는 수많은 멋진 특징들을 가지고 있다.

하 둡은 넛치가 잠재적으로 저장, 처리할 수 있는 페타바이트의 데이터를 처리할 수 있도록 고안됐다. 사실 하둡은 자체 파일 시스템인 HDFS(Hadoop Distributed File System)를 갖고 있다. 이는 어떠한 평범한 저가 하드웨어에서도 작동할 수 있다. 하둡은 클러스터의 모든 서버에 걸쳐 파일 시스템 데이터 중 일부분을 저장한다. 새 질의가 들어오면 HDFS는 "움직이는 계산은 움직이는 데이터보다 저렴하다"라는 규칙(즉 질의 처리를 움직여 데이터에 가장 가깝게 하는 것은 클러스터 내에 마구잡이로 질의를 놓고 데이터를 네트워크 전반에 먼 거리로 이동시키는 것보다 빠르다는 뜻이다)을 따른다.


오픈 소스 검색 서버 아파치 솔라

그 렇다면 왜 솔라가 필요한 것일까? 솔라는 파일을 인덱스하는 검색 엔진 이상이기 때문이다. 이는 XML 요청을 HTTP를 통해 보내는 웹 서비스 API가 있는 검색 서버다. 그러므로 솔라 검색 서버 URL을 사용하여 인터넷을 통해(XML 요청을 HTTP를 통해 보냄으로써) 파일을 질의, 인덱스하는 어느 곳에서나 애플리케이션을 가질 수 있다. 또한 다른 솔라 검색 서버로 캐싱과 복사가 가능한 최적화된 검색 서버다.



참고: 루씬 소개 마소기사 (http://jongsclub.com/webedit/studyView.jsp?num=26 )
Posted by ukmie
,
출처 : http://lhs0806.wowdns.com/tt/lhs/200
===== 실행 =====
1. Ctrl + F11 : 바로 전에 실행했던 클래스 실행
 
===== 소스 네비게이션 =====
1. Ctrl + 마우스커서(혹은 F3) : 클래스나 메소드 혹은 멤버를 상세하게 검색하고자 할때
2. Alt + ->, Alt + <- : 이후, 이전
3. Ctrl + o : 해당 소스의 메소드 리스트를 확인하려 할때
4. F4 : 클래스명을 선택하고 누르면 해당 클래스의 Hierarchy 를 볼 수 있다.
===== 문자열 찾기 =====
1. Ctrl + k : 찾고자 하는 문자열을 블럭으로 설정한 후 키를 누른다.
2. Ctrl + Shift + k : 역으로 찾고자 하는 문자열을 찾아감.
3. Ctrl + j : 입력하면서 찾을 수 있음.
4. Ctrl + Shift + j : 입력하면서 거꾸로 찾아갈 수 있음.
5. Ctrl + f : 기본적으로 찾기
 
===== 소스 편집 =====
1. Ctrl + Space : 입력 보조장치(Content Assistance) 강제 호출 => 입력하는 도중엔 언제라도 강제 호출 가능하다.
2. F2 : 컴파일 에러의 빨간줄에 커서를 갖져다가 이 키를 누르면 에러의 원인에 대한 힌트를 제공한다.
3. Ctrl + l : 원하는 소스 라인으로 이동
   로컬 히스토리 기능을 이용하면 이전에 편집했던 내용으로 변환이 가능하다.
4. Ctrl + Shift + Space : 메소드의 가로안에 커서를 놓고 이 키를 누르면 파라미터 타입 힌트를 볼 수 있다.
5. 한줄 삭제 CTRL + D
6. 파일 닫기 : CTRL+W
7. 들여쓰기 자동 수정. (3.0 NEW) : CTRL+I
8. 블록 주석(/*..*/) 추가.(3.0 NEW): CTRL+SHIFT+/
  8.1 Ctrl + / 해주면 여러줄이 한꺼번에 주석처리됨. 주석 해제하려면 반대로 하면 됨.
9. 위(아래)줄과 바꾸기 : ALT+UP(DOWN)
10. 블록 선택하기.  : ALT+SHIFT+방향키
11. 메소드의 파라메터 목록 보기. : CTRL+SHIFT+SPACE
12. 자동으로 import 하기 : CTRL+SHIFT+O
13. 열린 파일 모두 닫기 : CTRL + SHIFT + F4
14. 블록 주석 제거 : CTRL+SHIFT+
15. 전체화면 토글 : CTRL+M
16. 한줄(블럭) 복사 : Ctrl + Alt + 위(아래)
17. 다음 annotation(에러, 워닝, 북마크 가능)으로 점프 : Ctrl + , or .
18. 퀵 픽스 : Ctrl + 1 
19. 메소드 정의부로 이동 : F3
20. 하이어라키 ㅤㅍㅏㅍ업 창 띄우기(인터페이스 구현 클래스간 이동시 편리) : Ctrl + T 
21. 메소드나 필드 이동하기 CTRL + O
22. ULTRAEDIT나 EDITPLUS 의 CTRL+TAB 과 같은 기능. : CTRL+F6
 
===== 템플릿 사용 =====
1. sysout 입력한 후 Ctrl + Space 하면 System.out.println(); 으로 바뀐다.
2. try 입력한 후 Ctrl + Space 하면 try-catch 문이 완성된다.
3. for 입력한 후 Ctrl + Space 하면 여러가지 for 문을 완성할 수 있다.
4. 템플릿을 수정하거나 추가하려면 환경설정/자바/편집기/템플리트 에서 할 수 있다.
 
===== 메소드 쉽게 생성하기 =====
1. 클래스의 멤버를 일단 먼저 생성한다.
2. override 메소드를 구현하려면 : 소스->메소드대체/구현 에서 해당 메소드를 체크한다.
3. 기타 클래스의 멤버가 클래스의 오브젝트라면 : 소스->위임메소드 생성에서 메소드를 선택한다.
 
===== organize import =====
1. 자바파일을 여러개 선택한 후 소스 -> 가져오기 체계화 해주면 모두 적용된다.
 
===== 소스 코드 형식 및 공통 주석 설정 =====
1. 환경설정 -> 자바 -> 코드 스타일 -> 코드 포멧터 -> 가져오기 -> 프로파일.xml 을 불러다가 쓰면 된다.
2. 또한 다수의 자바파일에 프로파일을 적용하려면 패키지 탐색기에서 패키지를 선택한 후 소스 -> 형식화를 선택하면 된다.
3. 환경설정 -> 자바 -> 코드 스타일 -> 코드 템플리트 -> 가져오기 -> 템플리트.xml 을 불러다가 쓰면 된다.
 
===== 에디터 변환 =====
1. 에디터가 여러 파일을 열어서 작업중일때 Ctrl + F6 키를 누르면 여러파일명이 나오고 F6키를 계속 누르면 아래로
2. Ctrl + Shift + F6 키를 누르면 위로 커서가 움직인다.
3. Ctrl + F7 : 뷰간 전환
4. Ctrl + F8 : 퍼스펙티브간 전환
5. F12 : 에디터로 포커스 위치

Posted by ukmie
,
IMS Enterprise Service 스펙은 학습이 일어나는 문맥 안에서 개인, 그룹, 멤버쉽에 대하여 기술된 정보를 시스템끼리 어떻게 교환하고 관리할 것인가에 대하여 정의한다.
IMS Enterprise Service 스펙이 나오기 이전에 IMS Enterprise 스펙이 이미 존재하였었다. 원래의 IMS Enterprise 스펙은 엔터프라이즈 시스템의 통신에서 교환하는 정보를 위한 데이터 모델을 기술하는데 초점이 맞추어져 있었다. Enterprise Service 스펙은 이러한 데이터 모델에 대한 behavior model을 추가하여 확장한 것이다. IMS Enterprise Service 1.0은 IMS Enterprise 1.1을 대체한다.

IMS Enterprise Service 스펙은 IMS Abstract Framework 1.0의 권고 사항에 따라 만들어졌다. 이것은 Enterprise Sevice 스펙이 상호운용성(Interoperability), 서비스 지향적(Service-oriented), 컴포넌트 기반(Component-based), 레이어 접근(Layering), 다중 바인딩(Multiple Bindings), 채택(Adoption) 등과 같은 개념에 기반한다는 것을 의미한다.
IMS Enterprise Service 스펙은 매우 간단하고 추상적인 수준에서 엔터프라이즈 시스템간의 메시징 모델을 표현한다. 추상적인 메시징 표현을 채택한 이유는 엔터프라이즈 시스템 아키텍처가 느슨하게 연결된(loosely coupled) 시스템에 기반하고 있고 IMS 바인딩은 XML 문서와 메시지의 교환에 중점을 두고 있기 때문이다.

IMS Enterprise Service 1.0에서 다루는 엔터프라이즈 서비스 분야는 개인관리서비스, 그룹관리 서비스, 멤버쉽 관리 서비스이다.

- 개인 관리 서비스 : 개인에 대한 정보를 관리하는 것이다. 각 개인들은 학습활동과 관련 되어있다.
- 그룹 관리 서비스 : 오브젝트들의 집합에 관한 정보를 관리하는 것이다. 오브젝트는 학습활동 또는 개인들과 관련이 있다.
- 멤버쉽 관리 서비스 : 멤버쉽 구조에 대한 정보를 관리하는 것이다. 멤버쉽 구조는 그룹에 대한 멤버를 정의하는데 사용한다.

IMS Enterprise Service 정보 모델은 UML을 사용하여 정의하였으므로 다양한 방법의 바인딩을 가능하게 한다. IMS Enterprise Service에서는 바인딩 방법의 한 예로 WSDL 바인딩에 대한 문서를 제공하고 있다.

관련 기술 표준

(1) IMS Enterprise
IMS Enterprise Service 스펙이 나오기 이전에 IMS Enterprise 스펙이 이미 존재하였었다. 이 스펙의 가장 최근 버전은 2002년 7월 16일에 발표한 1.1 final 버전이다. 원래의 IMS Enterprise 스펙은 엔터프라이즈 시스템의 통신에서 교환하는 정보를 위한 데이터 모델을 기술하는데 초점이 맞추어져 있었다. Enterprise Service 스펙은 이러한 데이터 모델에 대한 behavior model을 추가하여 확장한 것이다. IMS Enterprise Service 1.0은 IMS Enterprise 1.1을 대체한다.

(2) IMS Abstract Framework
IMS Enterprise Service 스펙은 IMS Abstract Framework 1.0의 권고 사항에 따라 만들어졌다. 이것은 Enterprise Sevice 스펙이 상호운용성(Interoperability), 서비스 지향적(Service-oriented), 컴포넌트 기반(Component-based), 레이어 접근(Layering), 다중 바인딩(Multiple Bindings), 채택(Adoption) 등과 같은 같은 개념에 기반한다는 것을 의미한다.

IMS Abstract Framework은 다양한 분야에서 제시하고 있는 프레임워크를 분석하여 각 분야 프레임워크를 포괄할 수 있는 추상 프레임워크를 제시한 것이다. 이것은 IMS 아키텍처가 아니라 IMS가 그동안 개별적인 단위로 만든 스펙이 어떤 맥락에서 사용되고 있는지, 앞으로 어떤 스펙을 개발할 것인지를 예측하기 위한 방법론적인 접근으로 보아야 한다. 다시말하면 IMS Abstract Framework는 스펙은 아니지만 IMS가 표준화 작업을 하는데 있어서 방향성을 제시하는 역할을 하고 있다.

이 밖에도 IMS Enterprise Service는 IMS Learner Information Package, IETF vCard, Internet2/Education eduPerson 등과 관련이 있다.

IMS Global Learning Consortium Inc
http://www.imsglobal.org/es/index.cfm

[thanksto:ksa]
Posted by ukmie
,
nio 패키지의 ByteBuffer 에 있는 allocateDirect 를 사용하면 시스템 메모리를 직접 
사용할 수 있다. 쉽게 사용할 수 있도록한 유틸클래스가 있어 저장해놓는다.

http://www.koders.com/java/fidCA9FE2D4CBBD117C2E10FD0D4CEE77005582F45F.aspx
DirectByteBufferProvider by Phex Development Group
with GNU General Public License
/*
* PHEX - The pure-java Gnutella-servent.
* Copyright (C) 2001 - 2006 Phex Development Group
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on 17.02.2005
* --- CVS Information ---
* $Id: DirectByteBufferProvider.java 3536 2006-08-05 22:16:44Z gregork $
*/

package phex.utils;

import java.nio.ByteBuffer;
import java.util.*;

import phex.common.Environment;

/**
* TODO find out the usuall requested buffer sizes and provide storage slots for
* these sizes.
*/

public class DirectByteBufferProvider
{
public static final int BUFFER_SIZE_64K = 64 * 1024;
private static final DirectByteBufferProvider instance;

private Map<Integer, Set<DirectByteBuffer>> sizeToBufferListMap;

/**
* Max use 10MB in buffer cache.
*/

private static final long MAX_TOTAL_BUFFER_SIZE = 10 * 1024 * 1024;

static
{
instance = new DirectByteBufferProvider();
}

private DirectByteBufferProvider()
{
sizeToBufferListMap = new LinkedHashMap<Integer, Set<DirectByteBuffer>>();

Environment.getInstance().scheduleTimerTask(new CleanupCheckerTask(),
CleanupCheckerTask.TIMER_PERIOD, CleanupCheckerTask.TIMER_PERIOD);
}

public static DirectByteBuffer requestBuffer(int sizeInBytes)
{
return instance.requestDirectByteBuffer(sizeInBytes);
}

protected synchronized void releaseDirectByteBuffer(
DirectByteBuffer directByteBuffer)
{
//NLogger.debug( NLoggerNames.GLOBAL, "Releasing DirectByteBuffer:" + directByteBuffer );
debugDump();
ByteBuffer buffer = directByteBuffer.getInternalBuffer();
int kb = (int) Math.ceil(buffer.capacity() / 1024.0);
Integer key = new Integer(kb);
Set<DirectByteBuffer> set = sizeToBufferListMap.get(key);
if (set == null)
{
set = new HashSet<DirectByteBuffer>();
sizeToBufferListMap.put(key, set);
}
set.add(directByteBuffer);
debugDump();
}

private synchronized DirectByteBuffer requestDirectByteBuffer(int capacity)
{
//NLogger.debug( NLoggerNames.GLOBAL, "Requesting DirectByteBuffer:" + capacity );
debugDump();

int kb = (int) Math.ceil(capacity / 1024.0);
Integer key = new Integer(kb);
Set<DirectByteBuffer> set = sizeToBufferListMap.get(key);
if (set == null)
{
set = new HashSet<DirectByteBuffer>();
sizeToBufferListMap.put(key, set);
}
DirectByteBuffer directByteBuffer;
if (set.isEmpty())
{
directByteBuffer = allocateDirectByteBuffer(kb * 1024);
}
else
{
directByteBuffer = set.iterator().next();
set.remove(directByteBuffer);
}
ByteBuffer buffer = directByteBuffer.getInternalBuffer();
buffer.clear();
buffer.limit(capacity);

//NLogger.debug( NLoggerNames.GLOBAL, "Requested DirectByteBuffer:" + directByteBuffer );
debugDump();
return directByteBuffer;
}

/**
* @param kb
* @return
*/

private synchronized DirectByteBuffer allocateDirectByteBuffer(int capacity)
{
ByteBuffer byteBuffer;
try
{
byteBuffer = ByteBuffer.allocateDirect(capacity);
}
catch (OutOfMemoryError err)
{
clearBuffers();
System.runFinalization();
System.gc();
Thread.yield();
try
{
byteBuffer = ByteBuffer.allocateDirect(capacity);
}
catch (OutOfMemoryError err2)
{
NLogger.error( DirectByteBufferProvider.class,
"Out of memory while trying to allocated direct byte buffer.");
throw err2;
}
}
DirectByteBuffer directByteBuffer = new DirectByteBuffer(byteBuffer,
this);
return directByteBuffer;
}

/**
* Clears available buffers of the provider.
*/

private synchronized void clearBuffers()
{
for ( Set<DirectByteBuffer> set : sizeToBufferListMap.values() )
{
set.clear();
}
}

private synchronized void cleanupChecker()
{
long bytesUsed = 0;
Iterator<Integer> iterator = sizeToBufferListMap.keySet().iterator();
while (iterator.hasNext())
{
Integer key = iterator.next();
Set<DirectByteBuffer> set = sizeToBufferListMap.get(key);

bytesUsed += key.intValue() * set.size() * 1024;
}

if (bytesUsed > MAX_TOTAL_BUFFER_SIZE)
{
performCleanup(bytesUsed - MAX_TOTAL_BUFFER_SIZE);
}
}

private synchronized void performCleanup(long bytesToFree)
{
// we remove buffers from sizes with the highest amount of cached buffers
int mapSize = sizeToBufferListMap.size();
int highestCount = 0;
int[] bufferSizeArr = new int[mapSize];
Set[] bufferSetArr = new Set[mapSize];

int i = 0;
Iterator<Integer> listIterator = sizeToBufferListMap.keySet().iterator();
while (listIterator.hasNext())
{
Integer key = listIterator.next();
Set<DirectByteBuffer> set = sizeToBufferListMap.get(key);
bufferSizeArr[i] = key.intValue() * 1024;
bufferSetArr[i] = set;
int setSize = set.size();
if (setSize > highestCount)
{
highestCount = setSize;
}
i++;
}

long bytesFreed = 0;
while (bytesFreed < bytesToFree && highestCount > 0)
{
for (i = 0; i < mapSize; i++)
{
// if this is the largest buffer list remove
// one buffer.
if (bufferSetArr[i].size() == highestCount)
{
bufferSetArr[i].remove( bufferSetArr[i].iterator().next() );
bytesFreed += bufferSizeArr[i];
}
}
highestCount--;
}
}

private synchronized void debugDump()
{
// Iterator keys = sizeToBufferListMap.keySet().iterator();
// while ( keys.hasNext() )
// {
// Integer key = (Integer) keys.next();
// System.out.println( "------------------------" );
// System.out.println( "Key: " + key.intValue() );
// Set keySet = (Set) sizeToBufferListMap.get(key);
// Iterator bufferIterator = keySet.iterator();
// while ( bufferIterator.hasNext() )
// {
// DirectByteBuffer buffer = (DirectByteBuffer) bufferIterator.next();
// System.out.println( buffer );
// }
// }
}

private class CleanupCheckerTask extends TimerTask
{
private static final int TIMER_PERIOD = 10 * 60 * 1000;

/**
* @see java.util.TimerTask#run()
*/

public void run()
{
cleanupChecker();
}

}
}

Posted by ukmie
,

Anonymous Class

software 2007. 12. 18. 17:30
 
public void aMethod() {
theButton.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("The action has occure");
}
}
);

}

public java.util.Enumeration enumerate() { // The anonymous class is defined as part of the return statement
return new java.util.Enumeration() { Linkable current; = head; { current = head; } // Replace constructor with an instance initializer public boolean hasMoreElements() { return (current != null); } public Object nextElement() { if (current == null) throw new java.util.NoSuchElementException(); Object value = current; current = current.getNext(); return value; } }; // Note the required semicolon: it terminates the return statement
}
클래스끝에 세미콜론이 있어야 한다는 점과 메소드안에서 선언된 변수를 참조하려면 final 이어야 함을 기억하자.

Why use anonymous classes?

As with local classes, objects instantiated from anonymous classes share many of the characteristics of objects instantiated from member classes.  However, in some cases, an anonymous class can be defined closer to its point of use than would be possible with a member class or a local class.  Once you become accustomed to the somewhat cryptic syntax used with anonymous classes, this can often lead to improved code readability.

Probably the most important benefit of anonymous classes has to do with accessing the members of enclosing classes.  Just like with member classes and local classes, methods of an anonymous class have direct access to all the members of the enclosing classes, including private members. Thus the use of anonymous classes can often eliminate the requirement to connect objects together via constructor parameters.

In addition, although not demonstrated in this lesson, as with local classes, objects of anonymous classes have access to final local variables that are declared within the scope of the anonymous class.

Can be particularly useful when ...

An anonymous class can be particularly useful in those cases where

  • There is no reason for an object of the anonymous class to exist in the absence of an object of the enclosing class.
  • There is no reason for an object of the anonymous class to exist outside a method of the enclosing class.
  • Methods of the object of the anonymous class need access to members of the object of the enclosing class.
  • Methods of the object of the anonymous class need access to final local variables and method parameters belonging to the method in which the anonymous class is defined.
  • Only one instance of the anonymous class is needed.
  • There is no need for the class to have a name that is accessible elsewhere in the program.


Anonymous Class 초기화 하기 - Instance initializer

http://www.javastudy.co.kr/docs/b612/basic/doc/study5.html

http://www.unix.org.ua/orelly/java-ent/jnut/ch03_12.htm

http://www.developer.com/java/other/article.php/3300881



Posted by ukmie
,
컬럼에
ALTER TABLE `organizations`
  CHANGE `Location` Location VARCHAR(50) CHARACTER SET utf8;
테이블에
ALTER TABLE `organizations` CHARACTER SET utf8;
MySQL 환경설정에
[client]
...
default-character-set=utf8
...
[mysql]
...
default-character-set=utf8
...
[mysqld]
...
default-character-set=utf8
다른 문자셋.. euckr, lantin1, iso-8859-1, ascii, binary ,,,.

Posted by ukmie
,
[Enterprise Ontology]
Enterprise Ontology: Theory and Methodology (Hardcover) / by Jan L.G. Dietz (Author)
http://www.springer.com/east/home/computer?SGWID=5-146-22-81056370-0
The Enterprise Ontology / by Dave McComb / Published: July 1, 2006
http://www.tdan.com/view-articles/5016
The Enterprise Ontology
http://www.aiai.ed.ac.uk/project/enterprise/enterprise/ontology.html
REA Enterprise Ontology Source Page
http://www.msu.edu/user/mccarth4/rea-ontology/
On Approach for Enterprise Ontology Transformation into Conceptual Model
/Olegas Vasilecas, Diana Bugaite, Justas Trinkunas
http://ecet.ecs.ru.acad.bg/cst06/Docs/cp/SIII/IIIA.23.pdf


기업 온톨로지 구축을 위한 AHP기법 기반의 시스템 우선 순위선정 방법
http://www.dbpia.co.kr/view/ar_view.asp?pid=760&isid=40594&arid=848925&topMenu=&topMenu1=
비즈니스 프로세스 및 비즈니스 정보 분석 개요
http://www.kito.co.kr/ebxml%20standard/kor/bpOVER.pdf
Semantic eBusiness
http://knowledge.kaistgsm.ac.kr/knowledge@KGSM/print.aspx?articleid=56

[방법론]
ontology development 101
http://protege.stanford.edu/publications/ontology_development/ontology101.html
온톨로지 구축방법
http://humbroll.springnote.com/pages/344340
온톨로지 구축과 의미 메타데이터 관리 (기초부터)
http://www.dpc.or.kr/workshop/5.pdf
온톨로지 구축 방법론 (김학래)
http://agent.itfind.or.kr/Datarpt/Web_R_13.pdf
웹 온톨로지 개발지침 연구
http://www.blogweb.co.kr/resources/haklae_guide_2005.pdf
온톨로지 구축방법 비교(OTK, CommonKADS, ONIONS, Ontology Development 101)




Posted by ukmie
,