-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made entity containers optional in the meta model.
Fixed various compile warnings. Refactored packages for rest services. Generalized the statistic service to report on stats for all entities and relationships. Added pooling support for Marshaller/Unmarshaller in AbstractContentStore to allow for reuse and better efficiencies in processing since these are expensive to create. Integrated AbstractContentStore into the content DB project. Fixed exception handling in content DB store. Added content DB store to the main build. Added diagram of the meta model.
- Loading branch information
1 parent
b4d092f
commit 9cb5d61
Showing
21 changed files
with
348 additions
and
118 deletions.
There are no files selected for viewing
Binary file added
BIN
+12.9 KB
content-model/src/main/java/org/scapdev/content/model/MetadataModel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...ository-war/src/main/java/org/content/repository/war/rest/statistic/RelationshipItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.content.repository.war.rest.statistic; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
import org.scapdev.content.core.query.RelationshipStatistic; | ||
|
||
@XmlType | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class RelationshipItem { | ||
@SuppressWarnings("unused") | ||
@XmlAttribute(required=true) | ||
private String id; | ||
// TODO: add support for language bundle | ||
private String title; | ||
@SuppressWarnings("unused") | ||
@XmlAttribute(required=true) | ||
private int count; | ||
|
||
public RelationshipItem () { | ||
// No arg required by JAXB | ||
} | ||
|
||
public RelationshipItem(RelationshipStatistic stat) { | ||
id = stat.getRelationshipInfo().getId(); | ||
count = stat.getCount(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
content-repository-war/src/main/java/org/content/repository/war/rest/statistic/StatItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.content.repository.war.rest.statistic; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
|
||
import org.scapdev.content.core.query.EntityStatistic; | ||
import org.scapdev.content.core.query.RelationshipStatistic; | ||
|
||
@XmlType | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class StatItem { | ||
@SuppressWarnings("unused") | ||
@XmlAttribute(required=true) | ||
private String id; | ||
// TODO: add support for language bundle | ||
private String title; | ||
@SuppressWarnings("unused") | ||
@XmlAttribute(required=true) | ||
private int count; | ||
@XmlElement | ||
private List<RelationshipItem> relationship; | ||
|
||
public StatItem () { | ||
// No arg required by JAXB | ||
} | ||
|
||
public StatItem(EntityStatistic stat) { | ||
this.id = stat.getEntityInfo().getId(); | ||
this.count = stat.getCount(); | ||
Collection<? extends RelationshipStatistic> relationshipStats = stat.getRelationshipInfoStatistics().values(); | ||
this.relationship = new ArrayList<RelationshipItem>(relationshipStats.size()); | ||
for (RelationshipStatistic item : relationshipStats) { | ||
this.relationship.add(new RelationshipItem(item)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...itory/src/main/java/org/scapdev/content/core/persistence/ContentPersistenceException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/******************************************************************************* | ||
* The MIT License | ||
* | ||
* Copyright (c) 2011 davidwal | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
******************************************************************************/ | ||
package org.scapdev.content.core.persistence; | ||
|
||
import org.scapdev.content.core.ContentException; | ||
|
||
public class ContentPersistenceException extends ContentException { | ||
|
||
/** the serial version UID */ | ||
private static final long serialVersionUID = 1L; | ||
|
||
public ContentPersistenceException() { | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ContentPersistenceException(String message) { | ||
super(message); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ContentPersistenceException(Throwable cause) { | ||
super(cause); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ContentPersistenceException(String message, Throwable cause) { | ||
super(message, cause); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.