Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions schema/def/sampleFragmentSchema.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<pagis-fragment id="organization-employee" xmlns="http://pagi.org/schema">
<nodeType name="organization">
<!-- required attributes -->
<stringProperty name="name" minArity="1" maxArity="1"/>

<stringProperty name="website" />
<integerProperty name="num_employees" minRange="1" maxArity="1"/>

<edgeType name="org_parent" targetNodeType="organization" maxArity="1" />
<edgeType name="org_child" targetNodeType="organization"/>
</nodeType>

<nodeType name="employee">
<!-- required attributes -->
<stringProperty name="name" minArity="1" maxArity="1"/>
<stringProperty name="ssn" minArity="1" maxArity="1"/> <!-- social security number -->
<stringProperty name="title" />
<stringProperty name="ethnicity" />
<stringProperty name="birth_date" maxArity="1"/>
<stringProperty name="email" />
<stringProperty name="phone" />
<enumProperty name="gender" maxArity="1">
<item name="M"/>
<item name="F"/>
</enumProperty>

<edgeType name="employed_by" targetNodeType="organization">
<stringProperty name="dur_start" maxArity="1" minArity="0"/>
<stringProperty name="dur_end" maxArity="1" minArity="0"/>
</edgeType>
</nodeType>
</pagis-fragment>
34 changes: 34 additions & 0 deletions stream/fragment-xml/sampleFragment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<graphFragment xmlns="http://pagi.org/stream" sourceGraph="company-org" fragmentIdentifier="IT">
<schema uri="organization-employee"/>

<node type="organization" id="my-company">
<strProp k="name" v="My Company"/>
<strProp k="num_employees" v="2"/>
</node>

<node type="employee" id="1231233333">
<strProp k="name" v="Jane Doe"/>

<strProp k="ssn" v="1231233333"/>
<strProp k="title" v="Director of IT"/>
<strProp k="ethnicity" v="Hispanic"/>
<strProp k="gender" v="M"/>

<edge type="employed_by" toType="organization" to="my-company">
<strProp k="dur_start" v="2012-01-01"/>
</edge>
</node>
<node type="employee" id="3213211111">
<strProp k="name" v="John Smith"/>

<strProp k="ssn" v="3213211111"/>
<strProp k="title" v="Network Administrator"/>
<strProp k="ethnicity" v="White"/>
<strProp k="gender" v="M"/>

<edge type="employed_by" toType="organization" to="my-company">
<strProp k="dur_start" v="2005-01-01"/>
</edge>
</node>
</graphFragment>