lindam100409의 블로그

eunhyuki.egloos.com

포토로그 마이가든



Models and Eclipse EMF

Eclipse EMF
domain model을 modeling하기 위해!
meta-model와 actual model의 차이
 model: meta model의 instance
 meta-model: model의 structure를 나타냄

meta-model을 생성하는 수단들
XMI, Java annotation, UML, XML Schema

meta models- Ecore and Genmodel
Ecore metamodel :  information about the defined classes
EClass(zero or more attributes/references), 
EAttribute(a name and a type),
        EReference(an association b/w two classes, flag to indicate if it represent a containment  and a reference class                                   which it points), 
EDataType(type of an attribute ex.int float java.utill.date)


Genmodel : additional information for the code-generation


EMF의 장점
model의 구조를 깔끔하고 확실하게 보여주는 domain model을 디자인 할수 있다.
모델이 수정될 경우 noti를 제공한다.
object를 생성하기 위한 interface, factory들을 제공하고 이로써 application이 각각의 구현된 클래로 부터 깔끔하게 유지된다.










Basic EMF Exlplorer

Eclipse Common Navigator, EMF Edit Frameworks. EMF Transaction Framework. EMF Transaction Workspace Intergration Layer

1) Eclipse Resource Navigator 혹은 Project Explorer View처럼 Eclipse Workspace에 있는 프로젝트, 폴더, 파일들을 트리기반으로 볼 수 있고, EMF 모델을 포함하는 모든 리소스들이 확장(expanded)되어 그 모델들의 element들이  visible 하다.

2) tabbed property sheet page를 이용하여 Eclipse Properties View에 selected model element들의 feature를 display한다.
3) copy, paste, delete등과 같은 selected model을 manipulate하기위한 context menu action과 undo,redo, validation, 그리고 새로운 element를 생성(create child, create sibling)을 제공한다.
4) 모델 리소스의 on-demand loading, 바깥쪽 view에서 수정된 리소스들의 reloading, 안쪽 view에서 모델의 수정에 관한  tracking, view dirty state management(asterisk on view tab, enablement of save button) 그리고 saving of models 


savepost.[hp

<?php
include './lib/xmlrpc.inc';
include './lib/xmlrpcs.inc';
$title = $_GET['title'];
$author = $_GET['author'];
$contents = $_GET['contents'];

//echo "$title <br/> $author <br/> $contents"

 


$link = mysql_connect("localhost","root","");

mysql_query("delete from my",$link);

$sql ="insert into my_db.entry values (NULL, '$title', '$author', '$contents')";
mysql_query($sql,$link);

 

preg_match_all('@(http?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@',
$contents, $matches);
//print_r($matches[0]);


foreach($matches as $key => $value)
{
 foreach($value as $key2 => $value2)
 {

   echo $value2."요고<br/>";
    //external link
  $c = curl_init();
  curl_setopt($c, CURLOPT_URL,'http://pcj1248.egloos.com/798784');
  curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($c, CURLOPT_HEADER, false);
  $page_data = curl_exec($c);
  curl_close($c);
 


  if (preg_match('/<LINK REL="pingback" HREF="([^"]+)">/i',$page_data,$server))
   {
    echo $server."link does exist!";
  }
 }

 break;
}

 

 

?>

 


핑백허용안할것이야

안해안해 메렁~~

은혁이 이글루스 핑백 테스팅

안뇽하십니까

세번째 과제 핑백 구현을 열심히 해봅시다 으허허
메롱메롱

1